From e9ae80694875f869892f13f4fcaf1170a00dea41 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/AUTHORS | 11 + quanta/ChangeLog | 1172 +++++ quanta/DESIGN | 338 ++ quanta/HACKING | 55 + quanta/Makefile.am | 24 + quanta/NEWS | 4 + quanta/Quanta-3.3-plan.kno | 106 + quanta/README | 250 + quanta/TODO | 42 + quanta/VERSION | 1 + quanta/components/Makefile.am | 5 + quanta/components/csseditor/Makefile.am | 18 + quanta/components/csseditor/colorrequester.cpp | 129 + quanta/components/csseditor/colorrequester.h | 50 + quanta/components/csseditor/colorslider.cpp | 85 + quanta/components/csseditor/colorslider.h | 69 + quanta/components/csseditor/csseditor.cpp | 697 +++ quanta/components/csseditor/csseditor.h | 117 + quanta/components/csseditor/csseditor_globals.cpp | 50 + quanta/components/csseditor/csseditor_globals.h | 63 + quanta/components/csseditor/csseditors.ui | 411 ++ quanta/components/csseditor/cssselector.cpp | 395 ++ quanta/components/csseditor/cssselector.h | 74 + quanta/components/csseditor/cssselectors.ui | 985 ++++ .../components/csseditor/cssshpropertyparser.cpp | 127 + quanta/components/csseditor/cssshpropertyparser.h | 46 + quanta/components/csseditor/data/Makefile.am | 3 + quanta/components/csseditor/data/atrules.xml | 7 + quanta/components/csseditor/data/config.xml | 609 +++ quanta/components/csseditor/data/dtdTags.xml | 19 + quanta/components/csseditor/data/pseudo.xml | 14 + quanta/components/csseditor/doubleeditors.cpp | 120 + quanta/components/csseditor/doubleeditors.h | 86 + quanta/components/csseditor/encodingselector.cpp | 47 + quanta/components/csseditor/encodingselector.h | 40 + quanta/components/csseditor/encodingselectors.ui | 115 + quanta/components/csseditor/fontfamilychooser.cpp | 175 + quanta/components/csseditor/fontfamilychooser.h | 52 + quanta/components/csseditor/fontfamilychoosers.ui | 441 ++ quanta/components/csseditor/minieditor.h | 37 + quanta/components/csseditor/percentageeditor.cpp | 38 + quanta/components/csseditor/percentageeditor.h | 52 + quanta/components/csseditor/propertysetter.cpp | 129 + quanta/components/csseditor/propertysetter.h | 64 + quanta/components/csseditor/qmyhighlighter.cpp | 65 + quanta/components/csseditor/qmyhighlighter.h | 36 + quanta/components/csseditor/shorthandformer.cpp | 781 +++ quanta/components/csseditor/shorthandformer.h | 117 + quanta/components/csseditor/specialsb.cpp | 127 + quanta/components/csseditor/specialsb.h | 79 + quanta/components/csseditor/styleeditor.cpp | 109 + quanta/components/csseditor/styleeditor.h | 42 + quanta/components/csseditor/stylesheetparser.cpp | 245 + quanta/components/csseditor/stylesheetparser.h | 58 + quanta/components/csseditor/tlpeditors.cpp | 174 + quanta/components/csseditor/tlpeditors.h | 94 + quanta/components/cvsservice/Makefile.am | 13 + quanta/components/cvsservice/cvscommitdlgs.ui | 150 + quanta/components/cvsservice/cvsservice.cpp | 555 ++ quanta/components/cvsservice/cvsservice.h | 118 + quanta/components/cvsservice/cvsservicedcopif.h | 30 + quanta/components/cvsservice/cvsupdatetodlgs.ui | 198 + quanta/components/debugger/Makefile.am | 25 + quanta/components/debugger/backtracelistview.cpp | 128 + quanta/components/debugger/backtracelistview.h | 93 + .../debugger/conditionalbreakpointdialog.cpp | 100 + .../debugger/conditionalbreakpointdialog.h | 56 + .../debugger/conditionalbreakpointdialogs.ui | 329 ++ quanta/components/debugger/dbgp/Makefile.am | 17 + quanta/components/debugger/dbgp/dbgpnetwork.cpp | 314 ++ quanta/components/debugger/dbgp/dbgpnetwork.h | 76 + quanta/components/debugger/dbgp/dbgpsettings.cpp | 44 + quanta/components/debugger/dbgp/dbgpsettings.h | 35 + quanta/components/debugger/dbgp/dbgpsettingss.ui | 728 +++ quanta/components/debugger/dbgp/qbytearrayfifo.cpp | 76 + quanta/components/debugger/dbgp/qbytearrayfifo.h | 43 + .../debugger/dbgp/quantadebuggerdbgp.cpp | 1042 ++++ .../debugger/dbgp/quantadebuggerdbgp.desktop | 44 + .../components/debugger/dbgp/quantadebuggerdbgp.h | 166 + quanta/components/debugger/debuggerbreakpoint.cpp | 181 + quanta/components/debugger/debuggerbreakpoint.h | 85 + .../components/debugger/debuggerbreakpointlist.cpp | 193 + .../components/debugger/debuggerbreakpointlist.h | 58 + .../components/debugger/debuggerbreakpointview.cpp | 193 + .../components/debugger/debuggerbreakpointview.h | 74 + quanta/components/debugger/debuggermanager.cpp | 850 +++ quanta/components/debugger/debuggermanager.h | 128 + quanta/components/debugger/debuggerui.cpp | 205 + quanta/components/debugger/debuggerui.h | 90 + quanta/components/debugger/debuggervariable.cpp | 283 + quanta/components/debugger/debuggervariable.h | 103 + quanta/components/debugger/debuggervariablesets.ui | 185 + quanta/components/debugger/gubed/Makefile.am | 18 + quanta/components/debugger/gubed/gubedsettings.cpp | 41 + quanta/components/debugger/gubed/gubedsettings.h | 36 + quanta/components/debugger/gubed/gubedsettingss.ui | 762 +++ .../debugger/gubed/quantadebuggergubed.cpp | 1247 +++++ .../debugger/gubed/quantadebuggergubed.desktop | 48 + .../debugger/gubed/quantadebuggergubed.h | 153 + quanta/components/debugger/interfaces/Makefile.am | 17 + .../debugger/interfaces/debuggerclient.cpp | 160 + .../debugger/interfaces/debuggerclient.h | 115 + .../debugger/interfaces/debuggerinterface.cpp | 26 + .../debugger/interfaces/debuggerinterface.h | 80 + .../debugger/interfaces/quantadebugger.desktop | 45 + quanta/components/debugger/pathmapper.cpp | 228 + quanta/components/debugger/pathmapper.h | 55 + quanta/components/debugger/pathmapperdialog.cpp | 102 + quanta/components/debugger/pathmapperdialog.h | 52 + quanta/components/debugger/pathmapperdialogs.ui | 345 ++ .../debugger/quantadebuggerinterface.cpp | 176 + .../components/debugger/quantadebuggerinterface.h | 75 + quanta/components/debugger/variableslistview.cpp | 290 ++ quanta/components/debugger/variableslistview.h | 71 + quanta/components/framewizard/Makefile.am | 9 + quanta/components/framewizard/areaattributedb.cpp | 40 + quanta/components/framewizard/areaattributedb.h | 49 + quanta/components/framewizard/fmfpeditor.cpp | 111 + quanta/components/framewizard/fmfpeditor.h | 42 + quanta/components/framewizard/fmfpeditors.ui | 541 ++ quanta/components/framewizard/fmrceditor.cpp | 34 + quanta/components/framewizard/fmrceditor.h | 38 + quanta/components/framewizard/fmrceditors.ui | 149 + quanta/components/framewizard/framewizard.cpp | 120 + quanta/components/framewizard/framewizard.h | 61 + quanta/components/framewizard/framewizards.ui | 369 ++ quanta/components/framewizard/fwglobal.cpp | 22 + quanta/components/framewizard/fwglobal.h | 24 + quanta/components/framewizard/selectablearea.cpp | 57 + quanta/components/framewizard/selectablearea.h | 53 + quanta/components/framewizard/treenode.cpp | 135 + quanta/components/framewizard/treenode.h | 87 + .../components/framewizard/visualframeeditor.cpp | 449 ++ quanta/components/framewizard/visualframeeditor.h | 66 + quanta/components/tableeditor/Makefile.am | 15 + quanta/components/tableeditor/tableeditor.cpp | 1298 +++++ quanta/components/tableeditor/tableeditor.h | 132 + quanta/components/tableeditor/tableeditors.ui | 642 +++ quanta/components/tableeditor/tableitem.cpp | 94 + quanta/components/tableeditor/tableitem.h | 56 + quanta/data/Makefile.am | 5 + quanta/data/chars | 170 + quanta/data/config/Makefile.am | 13 + quanta/data/config/actions.rc | 21 + quanta/data/config/plugins.rc | 66 + quanta/data/config/quanta_preview_config.desktop | 44 + quanta/data/config/quantaui.rc | 293 ++ quanta/data/doc/Makefile.am | 3 + quanta/data/doc/README.FIRST | 9 + quanta/data/doc/aniquanta.gif | Bin 0 -> 6305 bytes quanta/data/doc/background.png | Bin 0 -> 123424 bytes quanta/data/doc/bgtable.png | Bin 0 -> 17111 bytes quanta/data/doc/developer.html | 102 + quanta/data/doc/documentation.html | 146 + quanta/data/doc/faq.html | 239 + quanta/data/doc/focus.html | 100 + quanta/data/doc/head_bg.gif | Bin 0 -> 205 bytes quanta/data/doc/intro.html | 142 + quanta/data/doc/kdelogo2.png | Bin 0 -> 7719 bytes quanta/data/doc/konq.css | 61 + quanta/data/doc/lines.png | Bin 0 -> 259 bytes quanta/data/doc/lines2.png | Bin 0 -> 198 bytes quanta/data/doc/maindoc.html | 119 + quanta/data/doc/minilogo.jpg | Bin 0 -> 2537 bytes quanta/data/doc/minilogo.png | Bin 0 -> 14907 bytes quanta/data/doc/more.png | Bin 0 -> 640 bytes quanta/data/doc/qcenter2.png | Bin 0 -> 73836 bytes quanta/data/doc/quanta.css | 9 + quanta/data/doc/quanta.docrc | 10 + quanta/data/doc/quantahdr.png | Bin 0 -> 19719 bytes quanta/data/doc/shadow1.png | Bin 0 -> 184 bytes quanta/data/doc/template.html | 81 + quanta/data/doc/templates.html | 189 + quanta/data/doc/tips.html | 151 + quanta/data/doc/webdev.png | Bin 0 -> 7322 bytes quanta/data/dtep/Makefile.am | 4 + quanta/data/dtep/cffunct/Makefile.am | 3 + quanta/data/dtep/cffunct/abs.tag | 6 + quanta/data/dtep/cffunct/acos.tag | 6 + quanta/data/dtep/cffunct/acs.tag | 6 + quanta/data/dtep/cffunct/array.tag | 68 + quanta/data/dtep/cffunct/asin.tag | 6 + quanta/data/dtep/cffunct/atn.tag | 6 + quanta/data/dtep/cffunct/authenticatedcontext.tag | 5 + quanta/data/dtep/cffunct/authenticateduser.tag | 5 + quanta/data/dtep/cffunct/bitand.tag | 7 + quanta/data/dtep/cffunct/bitmaskclear.tag | 8 + quanta/data/dtep/cffunct/bitmaskread.tag | 8 + quanta/data/dtep/cffunct/bitmaskset.tag | 9 + quanta/data/dtep/cffunct/bitnot.tag | 6 + quanta/data/dtep/cffunct/bitor.tag | 7 + quanta/data/dtep/cffunct/bitshln.tag | 7 + quanta/data/dtep/cffunct/bitshrn.tag | 7 + quanta/data/dtep/cffunct/bitxor.tag | 7 + quanta/data/dtep/cffunct/ceiling.tag | 6 + quanta/data/dtep/cffunct/chr.tag | 6 + quanta/data/dtep/cffunct/cjustify.tag | 7 + quanta/data/dtep/cffunct/compare.tag | 7 + quanta/data/dtep/cffunct/comparenocase.tag | 7 + quanta/data/dtep/cffunct/cos.tag | 6 + quanta/data/dtep/cffunct/createobject.tag | 10 + quanta/data/dtep/cffunct/createuuid.tag | 5 + quanta/data/dtep/cffunct/datetime.tag | 91 + quanta/data/dtep/cffunct/de.tag | 7 + quanta/data/dtep/cffunct/decimalformat.tag | 7 + quanta/data/dtep/cffunct/decrementvalue.tag | 7 + quanta/data/dtep/cffunct/decrypt.tag | 8 + quanta/data/dtep/cffunct/deleteclientvariable.tag | 7 + quanta/data/dtep/cffunct/description.rc | 15 + quanta/data/dtep/cffunct/directoryexists.tag | 7 + quanta/data/dtep/cffunct/dollarformat.tag | 7 + quanta/data/dtep/cffunct/duplicate.tag | 7 + quanta/data/dtep/cffunct/encrypt.tag | 8 + quanta/data/dtep/cffunct/evaluate.tag | 8 + quanta/data/dtep/cffunct/exp.tag | 7 + quanta/data/dtep/cffunct/expandpath.tag | 7 + quanta/data/dtep/cffunct/fileexists.tag | 7 + quanta/data/dtep/cffunct/find.tag | 19 + quanta/data/dtep/cffunct/fix.tag | 7 + quanta/data/dtep/cffunct/formatbasen.tag | 8 + quanta/data/dtep/cffunct/getbasetagdata.tag | 8 + quanta/data/dtep/cffunct/getbasetaglist.tag | 6 + quanta/data/dtep/cffunct/getbasetemplatepath.tag | 6 + .../data/dtep/cffunct/getclientvariableslist.tag | 6 + .../data/dtep/cffunct/getcurrenttemplatepath.tag | 6 + quanta/data/dtep/cffunct/getdirectoryfrompath.tag | 7 + quanta/data/dtep/cffunct/getexception.tag | 7 + quanta/data/dtep/cffunct/getfilefrompath.tag | 7 + quanta/data/dtep/cffunct/getfunctionlist.tag | 6 + quanta/data/dtep/cffunct/gethttprequestdata.tag | 6 + quanta/data/dtep/cffunct/gethttptimestring.tag | 7 + quanta/data/dtep/cffunct/getlocale.tag | 6 + quanta/data/dtep/cffunct/getmetricdata.tag | 7 + quanta/data/dtep/cffunct/getprofilestring.tag | 9 + quanta/data/dtep/cffunct/gettempdirectory.tag | 6 + quanta/data/dtep/cffunct/gettempfile.tag | 8 + quanta/data/dtep/cffunct/gettemplatepath.tag | 6 + quanta/data/dtep/cffunct/gettickcount.tag | 6 + quanta/data/dtep/cffunct/gettoken.tag | 9 + quanta/data/dtep/cffunct/hash.tag | 7 + quanta/data/dtep/cffunct/htmlcodeformat.tag | 8 + quanta/data/dtep/cffunct/htmleditformat.tag | 8 + quanta/data/dtep/cffunct/iif.tag | 9 + quanta/data/dtep/cffunct/incrementvalue.tag | 7 + quanta/data/dtep/cffunct/inputbasen.tag | 8 + quanta/data/dtep/cffunct/insert.tag | 9 + quanta/data/dtep/cffunct/int.tag | 7 + quanta/data/dtep/cffunct/isarray.tag | 7 + quanta/data/dtep/cffunct/isauthenticated.tag | 6 + quanta/data/dtep/cfml/Makefile.am | 3 + quanta/data/dtep/cfml/cfabort.tag | 14 + quanta/data/dtep/cfml/cfapplet.tag | 6 + quanta/data/dtep/cfml/cfapplication.tag | 69 + quanta/data/dtep/cfml/cfargument.tag | 9 + quanta/data/dtep/cfml/cfassociate.tag | 7 + quanta/data/dtep/cfml/cfauthenticate.tag | 32 + quanta/data/dtep/cfml/cfbreak.tag | 4 + quanta/data/dtep/cfml/cfcache.tag | 21 + quanta/data/dtep/cfml/cfcase.tag | 19 + quanta/data/dtep/cfml/cfcatch.tag | 26 + quanta/data/dtep/cfml/cfchart.tag | 120 + quanta/data/dtep/cfml/cfchartdata.tag | 7 + quanta/data/dtep/cfml/cfchartseries.tag | 45 + quanta/data/dtep/cfml/cfcol.tag | 15 + quanta/data/dtep/cfml/cfcollection.tag | 19 + quanta/data/dtep/cfml/cfcomponent.tag | 16 + quanta/data/dtep/cfml/cfcontent.tag | 9 + quanta/data/dtep/cfml/cfcookie.tag | 16 + quanta/data/dtep/cfml/cfdirectory.tag | 19 + quanta/data/dtep/cfml/cfdump.tag | 13 + quanta/data/dtep/cfml/cferror.tag | 22 + quanta/data/dtep/cfml/cfexecute.tag | 9 + quanta/data/dtep/cfml/cfexit.tag | 12 + quanta/data/dtep/cfml/cffile.tag | 37 + quanta/data/dtep/cfml/cfflush.tag | 6 + quanta/data/dtep/cfml/cfform.tag | 24 + quanta/data/dtep/cfml/cfftp.tag | 64 + quanta/data/dtep/cfml/cffunction.tag | 38 + quanta/data/dtep/cfml/cfgrid.tag | 173 + quanta/data/dtep/cfml/cfgridcolumn.tag | 86 + quanta/data/dtep/cfml/cfgridrow.tag | 6 + quanta/data/dtep/cfml/cfgridupdate.tag | 18 + quanta/data/dtep/cfml/cfheader.tag | 9 + quanta/data/dtep/cfml/cfhtmlhead.tag | 6 + quanta/data/dtep/cfml/cfhttp.tag | 50 + quanta/data/dtep/cfml/cfhttpparam.tag | 17 + quanta/data/dtep/cfml/cfimport.tag | 8 + quanta/data/dtep/cfml/cfinclude.tag | 6 + quanta/data/dtep/cfml/cfindex.tag | 36 + quanta/data/dtep/cfml/cfinput.tag | 42 + quanta/data/dtep/cfml/cfinsert.tag | 12 + quanta/data/dtep/cfml/cfinvoke.tag | 13 + quanta/data/dtep/cfml/cfinvokeargument.tag | 7 + quanta/data/dtep/cfml/cfldap.tag | 60 + quanta/data/dtep/cfml/cflocation.tag | 12 + quanta/data/dtep/cfml/cflock.tag | 26 + quanta/data/dtep/cfml/cflog.tag | 27 + quanta/data/dtep/cfml/cflogin.tag | 8 + quanta/data/dtep/cfml/cfloginuser.tag | 8 + quanta/data/dtep/cfml/cfloop.tag | 17 + quanta/data/dtep/cfml/cfmail.tag | 34 + quanta/data/dtep/cfml/cfmailparam.tag | 8 + quanta/data/dtep/cfml/cfmodule.tag | 9 + quanta/data/dtep/cfml/cfobject.tag | 37 + quanta/data/dtep/cfml/cfobjectcache.tag | 8 + quanta/data/dtep/cfml/cfoutput.tag | 15 + quanta/data/dtep/cfml/cfparam.tag | 21 + quanta/data/dtep/cfml/cfpop.tag | 28 + quanta/data/dtep/cfml/cfprocessingdirective.tag | 13 + quanta/data/dtep/cfml/cfprocparam.tag | 49 + quanta/data/dtep/cfml/cfprocresult.tag | 8 + quanta/data/dtep/cfml/cfproperty.tag | 20 + quanta/data/dtep/cfml/cfquery.tag | 21 + quanta/data/dtep/cfml/cfqueryparam.tag | 47 + quanta/data/dtep/cfml/cfregistry.tag | 32 + quanta/data/dtep/cfml/cfreport.tag | 19 + quanta/data/dtep/cfml/cfsavecontent.tag | 6 + quanta/data/dtep/cfml/cfschedule.tag | 40 + quanta/data/dtep/cfml/cfsearch.tag | 17 + quanta/data/dtep/cfml/cfselect.tag | 26 + quanta/data/dtep/cfml/cfsetting.tag | 18 + quanta/data/dtep/cfml/cfslider.tag | 85 + quanta/data/dtep/cfml/cfstoredproc.tag | 22 + quanta/data/dtep/cfml/cfswitch.tag | 6 + quanta/data/dtep/cfml/cftable.tag | 13 + quanta/data/dtep/cfml/cftextinput.tag | 68 + quanta/data/dtep/cfml/cfthrow.tag | 16 + quanta/data/dtep/cfml/cftrace.tag | 23 + quanta/data/dtep/cfml/cftransaction.tag | 20 + quanta/data/dtep/cfml/cftree.tag | 91 + quanta/data/dtep/cfml/cftreeitem.tag | 37 + quanta/data/dtep/cfml/cfupdate.tag | 12 + quanta/data/dtep/cfml/cfusion.tag | 15 + quanta/data/dtep/cfml/cfwddx.tag | 28 + quanta/data/dtep/cfml/cfxml.tag | 12 + quanta/data/dtep/cfml/description.rc | 20 + quanta/data/dtep/cfml/ftp.tag | 64 + quanta/data/dtep/cfml/test.cfm | 2 + quanta/data/dtep/css/Makefile.am | 18 + quanta/data/dtep/css/background.tag | 67 + quanta/data/dtep/css/border-bottom-color.tag | 11 + quanta/data/dtep/css/border-bottom-style.tag | 20 + quanta/data/dtep/css/border-bottom-width.tag | 14 + quanta/data/dtep/css/border-bottom.tag | 23 + quanta/data/dtep/css/border-collapse.tag | 12 + quanta/data/dtep/css/border-color.tag | 12 + quanta/data/dtep/css/border-left-color.tag | 12 + quanta/data/dtep/css/border-left-style.tag | 20 + quanta/data/dtep/css/border-left-width.tag | 14 + quanta/data/dtep/css/border-left.tag | 25 + quanta/data/dtep/css/border-right-color.tag | 12 + quanta/data/dtep/css/border-right-style.tag | 20 + quanta/data/dtep/css/border-right-width.tag | 14 + quanta/data/dtep/css/border-right.tag | 25 + quanta/data/dtep/css/border-spacing.tag | 11 + quanta/data/dtep/css/border-top-color.tag | 12 + quanta/data/dtep/css/border-top-style.tag | 20 + quanta/data/dtep/css/border-top-width.tag | 14 + quanta/data/dtep/css/border-top.tag | 25 + quanta/data/dtep/css/border.tag | 41 + quanta/data/dtep/css/bottom.tag | 13 + quanta/data/dtep/css/caption-side.tag | 14 + quanta/data/dtep/css/clear.tag | 14 + quanta/data/dtep/css/clip.tag | 12 + quanta/data/dtep/css/color.tag | 12 + quanta/data/dtep/css/content.tag | 18 + quanta/data/dtep/css/counter-increment.tag | 13 + quanta/data/dtep/css/counter-reset.tag | 13 + quanta/data/dtep/css/cursor.tag | 28 + quanta/data/dtep/css/description.rc | 37 + quanta/data/dtep/css/direction.tag | 12 + quanta/data/dtep/css/display.tag | 27 + quanta/data/dtep/css/empty-cells.tag | 12 + quanta/data/dtep/css/float.tag | 13 + quanta/data/dtep/css/font-size-adjust.tag | 12 + quanta/data/dtep/css/font-stretch.tag | 21 + quanta/data/dtep/css/font.tag | 75 + quanta/data/dtep/css/height.tag | 13 + quanta/data/dtep/css/left.tag | 13 + quanta/data/dtep/css/letter-spacing.tag | 12 + quanta/data/dtep/css/line-height.tag | 14 + quanta/data/dtep/css/list-style.tag | 60 + quanta/data/dtep/css/margin-bottom.tag | 13 + quanta/data/dtep/css/margin-left.tag | 13 + quanta/data/dtep/css/margin-right.tag | 13 + quanta/data/dtep/css/margin-top.tag | 13 + quanta/data/dtep/css/margin.tag | 13 + quanta/data/dtep/css/marker-offset.tag | 12 + quanta/data/dtep/css/max-height.tag | 13 + quanta/data/dtep/css/max-width.tag | 13 + quanta/data/dtep/css/min-height.tag | 12 + quanta/data/dtep/css/min-width.tag | 12 + quanta/data/dtep/css/outline.tag | 49 + quanta/data/dtep/css/overflow.tag | 14 + quanta/data/dtep/css/padding-bottom.tag | 12 + quanta/data/dtep/css/padding-left.tag | 12 + quanta/data/dtep/css/padding-right.tag | 12 + quanta/data/dtep/css/padding-top.tag | 12 + quanta/data/dtep/css/padding.tag | 12 + quanta/data/dtep/css/position.tag | 14 + quanta/data/dtep/css/quotes.tag | 12 + quanta/data/dtep/css/right.tag | 13 + quanta/data/dtep/css/table-layout.tag | 12 + quanta/data/dtep/css/text-align.tag | 15 + quanta/data/dtep/css/text-decoration.tag | 15 + quanta/data/dtep/css/text-indent.tag | 12 + quanta/data/dtep/css/text-shadow.tag | 13 + quanta/data/dtep/css/text-transform.tag | 14 + quanta/data/dtep/css/top.tag | 13 + quanta/data/dtep/css/unicode-bidi.tag | 13 + quanta/data/dtep/css/vertical-align.tag | 20 + quanta/data/dtep/css/visibility.tag | 13 + quanta/data/dtep/css/white-space.tag | 13 + quanta/data/dtep/css/width.tag | 13 + quanta/data/dtep/css/word-spacing.tag | 12 + quanta/data/dtep/css/z-index.tag | 12 + quanta/data/dtep/docbook-4.2/Makefile.am | 6 + quanta/data/dtep/docbook-4.2/a.tag | 339 ++ quanta/data/dtep/docbook-4.2/b.tag | 206 + quanta/data/dtep/docbook-4.2/c.tag | 264 + quanta/data/dtep/docbook-4.2/common.tag | 35 + quanta/data/dtep/docbook-4.2/d.tag | 43 + quanta/data/dtep/docbook-4.2/description.rc | 23 + quanta/data/dtep/docbook-4.2/e.tag | 172 + quanta/data/dtep/docbook-4.2/f.tag | 128 + quanta/data/dtep/docbook-4.2/g.tag | 249 + quanta/data/dtep/docbook-4.2/h.tag | 19 + quanta/data/dtep/docbook-4.2/i.tag | 379 ++ quanta/data/dtep/docbook-4.2/j.tag | 5 + quanta/data/dtep/docbook-4.2/k.tag | 48 + quanta/data/dtep/docbook-4.2/l.tag | 101 + quanta/data/dtep/docbook-4.2/m.tag | 123 + quanta/data/dtep/docbook-4.2/n.tag | 12 + quanta/data/dtep/docbook-4.2/o.tag | 106 + quanta/data/dtep/docbook-4.2/p.tag | 152 + quanta/data/dtep/docbook-4.2/q.tag | 20 + quanta/data/dtep/docbook-4.2/r.tag | 112 + quanta/data/dtep/docbook-4.2/s.tag | 482 ++ quanta/data/dtep/docbook-4.2/t.tag | 305 ++ quanta/data/dtep/docbook-4.2/u.tag | 27 + quanta/data/dtep/docbook-4.2/v.tag | 113 + quanta/data/dtep/docbook-4.2/w.tag | 6 + quanta/data/dtep/docbook-4.2/x.tag | 16 + quanta/data/dtep/docbook-4.2/y.tag | 5 + quanta/data/dtep/dtd-description.txt | 207 + quanta/data/dtep/dtd/Makefile.am | 3 + quanta/data/dtep/dtd/description.rc | 25 + quanta/data/dtep/empty/Makefile.am | 4 + quanta/data/dtep/empty/description.rc | 9 + quanta/data/dtep/html-frameset/Makefile.am | 3 + quanta/data/dtep/html-frameset/basefont.tag | 44 + quanta/data/dtep/html-frameset/common.tag | 46 + quanta/data/dtep/html-frameset/description.rc | 59 + quanta/data/dtep/html-frameset/font.tag | 77 + quanta/data/dtep/html-frameset/frame.tag | 79 + quanta/data/dtep/html-frameset/frameset.tag | 35 + quanta/data/dtep/html-frameset/isindex.tag | 14 + quanta/data/dtep/html-strict/Makefile.am | 5 + quanta/data/dtep/html-strict/a.tag | 329 ++ quanta/data/dtep/html-strict/b.tag | 365 ++ quanta/data/dtep/html-strict/c.tag | 257 + quanta/data/dtep/html-strict/common.tag | 46 + quanta/data/dtep/html-strict/d.tag | 288 ++ quanta/data/dtep/html-strict/description.rc | 59 + quanta/data/dtep/html-strict/e.tag | 40 + quanta/data/dtep/html-strict/f.tag | 136 + quanta/data/dtep/html-strict/h.tag | 374 ++ quanta/data/dtep/html-strict/i.tag | 303 ++ quanta/data/dtep/html-strict/k.tag | 40 + quanta/data/dtep/html-strict/l.tag | 314 ++ quanta/data/dtep/html-strict/m.tag | 83 + quanta/data/dtep/html-strict/n.tag | 27 + quanta/data/dtep/html-strict/o.tag | 242 + quanta/data/dtep/html-strict/p.tag | 133 + quanta/data/dtep/html-strict/q.tag | 40 + quanta/data/dtep/html-strict/s.tag | 354 ++ quanta/data/dtep/html-strict/t.tag | 651 +++ quanta/data/dtep/html-strict/u.tag | 72 + quanta/data/dtep/html-strict/v.tag | 40 + quanta/data/dtep/html/Makefile.am | 4 + quanta/data/dtep/html/a.tag | 359 ++ quanta/data/dtep/html/b.tag | 477 ++ quanta/data/dtep/html/c.tag | 349 ++ quanta/data/dtep/html/common.tag | 46 + quanta/data/dtep/html/d.tag | 337 ++ quanta/data/dtep/html/description.rc | 58 + quanta/data/dtep/html/e.tag | 47 + quanta/data/dtep/html/f.tag | 280 + quanta/data/dtep/html/h.tag | 423 ++ quanta/data/dtep/html/i.tag | 494 ++ quanta/data/dtep/html/k.tag | 47 + quanta/data/dtep/html/l.tag | 345 ++ quanta/data/dtep/html/m.tag | 88 + quanta/data/dtep/html/n.tag | 71 + quanta/data/dtep/html/o.tag | 253 + quanta/data/dtep/html/p.tag | 144 + quanta/data/dtep/html/q.tag | 47 + quanta/data/dtep/html/s.tag | 408 ++ quanta/data/dtep/html/strong.tag | 51 + quanta/data/dtep/html/t.tag | 684 +++ quanta/data/dtep/html/u.tag | 72 + quanta/data/dtep/html/v.tag | 47 + quanta/data/dtep/kde-docbook-4.1.2/Makefile.am | 6 + quanta/data/dtep/kde-docbook-4.1.2/a.tag | 255 + quanta/data/dtep/kde-docbook-4.1.2/b.tag | 152 + quanta/data/dtep/kde-docbook-4.1.2/c.tag | 174 + quanta/data/dtep/kde-docbook-4.1.2/common.tag | 35 + quanta/data/dtep/kde-docbook-4.1.2/d.tag | 12 + quanta/data/dtep/kde-docbook-4.1.2/description.rc | 23 + quanta/data/dtep/kde-docbook-4.1.2/e.tag | 106 + quanta/data/dtep/kde-docbook-4.1.2/f.tag | 109 + quanta/data/dtep/kde-docbook-4.1.2/g.tag | 148 + quanta/data/dtep/kde-docbook-4.1.2/h.tag | 17 + quanta/data/dtep/kde-docbook-4.1.2/i.tag | 252 + quanta/data/dtep/kde-docbook-4.1.2/k.tag | 48 + quanta/data/dtep/kde-docbook-4.1.2/l.tag | 76 + quanta/data/dtep/kde-docbook-4.1.2/m.tag | 62 + quanta/data/dtep/kde-docbook-4.1.2/n.tag | 12 + quanta/data/dtep/kde-docbook-4.1.2/o.tag | 52 + quanta/data/dtep/kde-docbook-4.1.2/p.tag | 91 + quanta/data/dtep/kde-docbook-4.1.2/q.tag | 19 + quanta/data/dtep/kde-docbook-4.1.2/r.tag | 104 + quanta/data/dtep/kde-docbook-4.1.2/s.tag | 296 ++ quanta/data/dtep/kde-docbook-4.1.2/t.tag | 238 + quanta/data/dtep/kde-docbook-4.1.2/u.tag | 27 + quanta/data/dtep/kde-docbook-4.1.2/v.tag | 15 + quanta/data/dtep/kde-docbook-4.1.2/w.tag | 5 + quanta/data/dtep/kde-docbook-4.1.2/x.tag | 16 + quanta/data/dtep/kde-docbook-4.1.2/y.tag | 5 + quanta/data/dtep/kde-docbook-4.2/Makefile.am | 4 + quanta/data/dtep/kde-docbook-4.2/common.tag | 35 + quanta/data/dtep/kde-docbook-4.2/description.rc | 24 + quanta/data/dtep/php/Makefile.am | 144 + quanta/data/dtep/php/apache.tag | 40 + quanta/data/dtep/php/apd.tag | 56 + quanta/data/dtep/php/array.tag | 319 ++ quanta/data/dtep/php/aspell.tag | 19 + quanta/data/dtep/php/bc.tag | 50 + quanta/data/dtep/php/bcompiler.tag | 43 + quanta/data/dtep/php/bzip2.tag | 40 + quanta/data/dtep/php/calendar.tag | 76 + quanta/data/dtep/php/ccvs.tag | 68 + quanta/data/dtep/php/classkit.tag | 35 + quanta/data/dtep/php/classobj.tag | 53 + quanta/data/dtep/php/com.tag | 166 + quanta/data/dtep/php/cpdf.tag | 367 ++ quanta/data/dtep/php/crack.tag | 15 + quanta/data/dtep/php/ctype.tag | 36 + quanta/data/dtep/php/curl.tag | 60 + quanta/data/dtep/php/cybercash.tag | 19 + quanta/data/dtep/php/cybermut.tag | 29 + quanta/data/dtep/php/cyrus.tag | 33 + quanta/data/dtep/php/datetime.tag | 84 + quanta/data/dtep/php/dba.tag | 60 + quanta/data/dtep/php/dbase.tag | 47 + quanta/data/dtep/php/dbm.tag | 41 + quanta/data/dtep/php/dbplus.tag | 181 + quanta/data/dtep/php/dbx.tag | 39 + quanta/data/dtep/php/description.rc | 78 + quanta/data/dtep/php/dio.tag | 41 + quanta/data/dtep/php/dir.tag | 30 + quanta/data/dtep/php/dom.tag | 245 + quanta/data/dtep/php/domxml.tag | 230 + quanta/data/dtep/php/dotnet.tag | 8 + quanta/data/dtep/php/errorfunc.tag | 31 + quanta/data/dtep/php/exec.tag | 46 + quanta/data/dtep/php/exif.tag | 21 + quanta/data/dtep/php/fam.tag | 41 + quanta/data/dtep/php/fbsql.tag | 224 + quanta/data/dtep/php/fdf.tag | 157 + quanta/data/dtep/php/filepro.tag | 23 + quanta/data/dtep/php/filesystem.tag | 272 + quanta/data/dtep/php/fribidi.tag | 8 + quanta/data/dtep/php/ftp.tag | 162 + quanta/data/dtep/php/funchand.tag | 41 + quanta/data/dtep/php/gettext.tag | 44 + quanta/data/dtep/php/gmp.tag | 149 + quanta/data/dtep/php/http.tag | 30 + quanta/data/dtep/php/hw.tag | 271 + quanta/data/dtep/php/hwapi.tag | 158 + quanta/data/dtep/php/hyperwave.tag | 268 + quanta/data/dtep/php/ibase.tag | 219 + quanta/data/dtep/php/icap.tag | 58 + quanta/data/dtep/php/iconv.tag | 55 + quanta/data/dtep/php/id3.tag | 27 + quanta/data/dtep/php/ifx.tag | 137 + quanta/data/dtep/php/iisfunc.tag | 71 + quanta/data/dtep/php/image.tag | 557 ++ quanta/data/dtep/php/imap.tag | 278 + quanta/data/dtep/php/includes.tag | 15 + quanta/data/dtep/php/info.tag | 112 + quanta/data/dtep/php/ingres-ii.tag | 70 + quanta/data/dtep/php/ircg.tag | 139 + quanta/data/dtep/php/java.tag | 7 + quanta/data/dtep/php/ldap.tag | 205 + quanta/data/dtep/php/lzf.tag | 11 + quanta/data/dtep/php/mail.tag | 13 + quanta/data/dtep/php/mailparse.tag | 49 + quanta/data/dtep/php/math.tag | 157 + quanta/data/dtep/php/mbstring.tag | 201 + quanta/data/dtep/php/mcal.tag | 210 + quanta/data/dtep/php/mcrypt.tag | 153 + quanta/data/dtep/php/mcve.tag | 404 ++ quanta/data/dtep/php/memcache.tag | 57 + quanta/data/dtep/php/mhash.tag | 22 + quanta/data/dtep/php/mime_magic.tag | 6 + quanta/data/dtep/php/ming.tag | 318 ++ quanta/data/dtep/php/misc.tag | 71 + quanta/data/dtep/php/mnogosearch.tag | 96 + quanta/data/dtep/php/msession.tag | 76 + quanta/data/dtep/php/msql.tag | 111 + quanta/data/dtep/php/mssql.tag | 117 + quanta/data/dtep/php/muscat.tag | 20 + quanta/data/dtep/php/mysql.tag | 181 + quanta/data/dtep/php/mysqli.tag | 313 ++ quanta/data/dtep/php/ncurses.tag | 535 ++ quanta/data/dtep/php/network.tag | 94 + quanta/data/dtep/php/nis.tag | 41 + quanta/data/dtep/php/notes.tag | 60 + quanta/data/dtep/php/nsapi.tag | 10 + quanta/data/dtep/php/objaggregation.tag | 46 + quanta/data/dtep/php/oci8.tag | 421 ++ quanta/data/dtep/php/odbc.tag | 209 + quanta/data/dtep/php/openal.tag | 81 + quanta/data/dtep/php/openssl.tag | 168 + quanta/data/dtep/php/oracle.tag | 87 + quanta/data/dtep/php/outcontrol.tag | 46 + quanta/data/dtep/php/overload.tag | 6 + quanta/data/dtep/php/ovrimos.tag | 81 + quanta/data/dtep/php/parsekit.tag | 16 + quanta/data/dtep/php/pcntl.tag | 54 + quanta/data/dtep/php/pcre.tag | 44 + quanta/data/dtep/php/pdf.tag | 473 ++ quanta/data/dtep/php/pfpro.tag | 29 + quanta/data/dtep/php/pgsql.tag | 272 + quanta/data/dtep/php/posix.tag | 86 + quanta/data/dtep/php/printer.tag | 159 + quanta/data/dtep/php/pspell.tag | 86 + quanta/data/dtep/php/qtdom.tag | 8 + quanta/data/dtep/php/rar.tag | 38 + quanta/data/dtep/php/readline.tag | 38 + quanta/data/dtep/php/recode.tag | 12 + quanta/data/dtep/php/regex.tag | 36 + quanta/data/dtep/php/sem.tag | 78 + quanta/data/dtep/php/sesam.tag | 64 + quanta/data/dtep/php/session.tag | 62 + quanta/data/dtep/php/shmop.tag | 28 + quanta/data/dtep/php/simplexml.tag | 25 + quanta/data/dtep/php/snmp.tag | 66 + quanta/data/dtep/php/soap.tag | 71 + quanta/data/dtep/php/sockets.tag | 123 + quanta/data/dtep/php/spl.tag | 190 + quanta/data/dtep/php/sqlite.tag | 150 + quanta/data/dtep/php/stream.tag | 136 + quanta/data/dtep/php/strings.tag | 382 ++ quanta/data/dtep/php/swf.tag | 272 + quanta/data/dtep/php/sybase.tag | 96 + quanta/data/dtep/php/tcpwrap.tag | 9 + quanta/data/dtep/php/tidy.tag | 144 + quanta/data/dtep/php/tokenizer.tag | 9 + quanta/data/dtep/php/uodbc.tag | 211 + quanta/data/dtep/php/url.tag | 36 + quanta/data/dtep/php/var.tag | 99 + quanta/data/dtep/php/vpopmail.tag | 79 + quanta/data/dtep/php/w32api.tag | 28 + quanta/data/dtep/php/wddx.tag | 25 + quanta/data/dtep/php/xattr.tag | 26 + quanta/data/dtep/php/xdiff.tag | 58 + quanta/data/dtep/php/xml.tag | 95 + quanta/data/dtep/php/xmlrpc.tag | 57 + quanta/data/dtep/php/xsl.tag | 33 + quanta/data/dtep/php/xslt.tag | 71 + quanta/data/dtep/php/yaz.tag | 98 + quanta/data/dtep/php/zip.tag | 36 + quanta/data/dtep/php/zlib.tag | 79 + quanta/data/dtep/relaxng/Makefile.am | 4 + quanta/data/dtep/relaxng/anyName.tag | 11 + quanta/data/dtep/relaxng/attribute.tag | 32 + quanta/data/dtep/relaxng/choice.tag | 33 + quanta/data/dtep/relaxng/data.tag | 13 + quanta/data/dtep/relaxng/define.tag | 31 + quanta/data/dtep/relaxng/description.rc | 12 + quanta/data/dtep/relaxng/div.tag | 12 + quanta/data/dtep/relaxng/element.tag | 34 + quanta/data/dtep/relaxng/empty.tag | 8 + quanta/data/dtep/relaxng/except.tag | 33 + quanta/data/dtep/relaxng/externalRef.tag | 9 + quanta/data/dtep/relaxng/grammar.tag | 15 + quanta/data/dtep/relaxng/group.tag | 29 + quanta/data/dtep/relaxng/include.tag | 14 + quanta/data/dtep/relaxng/interleave.tag | 29 + quanta/data/dtep/relaxng/list.tag | 24 + quanta/data/dtep/relaxng/mixed.tag | 29 + quanta/data/dtep/relaxng/name.tag | 8 + quanta/data/dtep/relaxng/notAllowed.tag | 8 + quanta/data/dtep/relaxng/nsName.tag | 11 + quanta/data/dtep/relaxng/oneOrMore.tag | 29 + quanta/data/dtep/relaxng/optional.tag | 29 + quanta/data/dtep/relaxng/param.tag | 7 + quanta/data/dtep/relaxng/parentRef.tag | 9 + quanta/data/dtep/relaxng/ref.tag | 9 + quanta/data/dtep/relaxng/start.tag | 21 + quanta/data/dtep/relaxng/text.tag | 8 + quanta/data/dtep/relaxng/value.tag | 9 + quanta/data/dtep/relaxng/zeroOrMore.tag | 29 + quanta/data/dtep/schema/Makefile.am | 7 + quanta/data/dtep/schema/all.tag | 46 + quanta/data/dtep/schema/annotation.tag | 19 + quanta/data/dtep/schema/any.tag | 63 + quanta/data/dtep/schema/anyAttribute.tag | 43 + quanta/data/dtep/schema/appInfo.tag | 15 + quanta/data/dtep/schema/attribute.tag | 110 + quanta/data/dtep/schema/attributeGroup.tag | 52 + quanta/data/dtep/schema/choice.tag | 43 + quanta/data/dtep/schema/complexContent.tag | 34 + quanta/data/dtep/schema/complexType.tag | 91 + quanta/data/dtep/schema/description.rc | 17 + quanta/data/dtep/schema/documentation.tag | 25 + quanta/data/dtep/schema/element.tag | 168 + quanta/data/dtep/schema/enumeration.tag | 18 + quanta/data/dtep/schema/extension.tag | 35 + quanta/data/dtep/schema/field.tag | 28 + quanta/data/dtep/schema/fractionDigits.tag | 18 + quanta/data/dtep/schema/group.tag | 74 + quanta/data/dtep/schema/import.tag | 51 + quanta/data/dtep/schema/include.tag | 41 + quanta/data/dtep/schema/key.tag | 30 + quanta/data/dtep/schema/keyref.tag | 40 + quanta/data/dtep/schema/length.tag | 18 + quanta/data/dtep/schema/list.tag | 29 + quanta/data/dtep/schema/maxExclusive.tag | 18 + quanta/data/dtep/schema/maxInclusive.tag | 18 + quanta/data/dtep/schema/maxLength.tag | 18 + quanta/data/dtep/schema/minExclusive.tag | 18 + quanta/data/dtep/schema/minInclusive.tag | 18 + quanta/data/dtep/schema/minLength.tag | 18 + quanta/data/dtep/schema/notation.tag | 61 + quanta/data/dtep/schema/pattern.tag | 18 + quanta/data/dtep/schema/redefine.tag | 41 + quanta/data/dtep/schema/restriction.tag | 48 + quanta/data/dtep/schema/schema.tag | 102 + quanta/data/dtep/schema/selector.tag | 28 + quanta/data/dtep/schema/sequence.tag | 43 + quanta/data/dtep/schema/simpleContent.tag | 20 + quanta/data/dtep/schema/simpleType.tag | 44 + quanta/data/dtep/schema/totalDigits.tag | 18 + quanta/data/dtep/schema/union.tag | 29 + quanta/data/dtep/schema/unique.tag | 30 + quanta/data/dtep/schema/whiteSpace.tag | 23 + quanta/data/dtep/tagxml/Makefile.am | 3 + quanta/data/dtep/tagxml/attr.tag | 41 + quanta/data/dtep/tagxml/childstop.tag | 28 + quanta/data/dtep/tagxml/description.rc | 17 + quanta/data/dtep/tagxml/location.tag | 178 + quanta/data/dtep/tagxml/nonparams.tag | 12 + quanta/data/dtep/tagxml/spacer.tag | 25 + quanta/data/dtep/tagxml/tag.tag | 73 + quanta/data/dtep/tagxml/vpl.tag | 65 + quanta/data/dtep/wml-1-2/Makefile.am | 5 + quanta/data/dtep/wml-1-2/a.tag | 30 + quanta/data/dtep/wml-1-2/access.tag | 20 + quanta/data/dtep/wml-1-2/anchor.tag | 24 + quanta/data/dtep/wml-1-2/br.tag | 6 + quanta/data/dtep/wml-1-2/card.tag | 56 + quanta/data/dtep/wml-1-2/common.tag | 11 + quanta/data/dtep/wml-1-2/description.rc | 58 + quanta/data/dtep/wml-1-2/do.tag | 51 + quanta/data/dtep/wml-1-2/fieldset.tag | 18 + quanta/data/dtep/wml-1-2/go.tag | 44 + quanta/data/dtep/wml-1-2/img.tag | 65 + quanta/data/dtep/wml-1-2/input.tag | 80 + quanta/data/dtep/wml-1-2/meta.tag | 40 + quanta/data/dtep/wml-1-2/noop.tag | 6 + quanta/data/dtep/wml-1-2/onevent.tag | 22 + quanta/data/dtep/wml-1-2/optgroup.tag | 18 + quanta/data/dtep/wml-1-2/option.tag | 30 + quanta/data/dtep/wml-1-2/p.tag | 33 + quanta/data/dtep/wml-1-2/postfield.tag | 18 + quanta/data/dtep/wml-1-2/pre.tag | 12 + quanta/data/dtep/wml-1-2/select.tag | 58 + quanta/data/dtep/wml-1-2/setvar.tag | 18 + quanta/data/dtep/wml-1-2/table.tag | 37 + quanta/data/dtep/wml-1-2/template.tag | 24 + quanta/data/dtep/wml-1-2/timer.tag | 18 + quanta/data/dtep/wml-1-2/wml.tag | 13 + quanta/data/dtep/xhtml-basic/Makefile.am | 6 + quanta/data/dtep/xhtml-basic/a.tag | 76 + quanta/data/dtep/xhtml-basic/base.tag | 11 + quanta/data/dtep/xhtml-basic/blockquote.tag | 33 + quanta/data/dtep/xhtml-basic/body.tag | 24 + quanta/data/dtep/xhtml-basic/br.tag | 5 + quanta/data/dtep/xhtml-basic/common.tag | 18 + quanta/data/dtep/xhtml-basic/description.rc | 50 + quanta/data/dtep/xhtml-basic/div.tag | 46 + quanta/data/dtep/xhtml-basic/form.tag | 51 + quanta/data/dtep/xhtml-basic/head.tag | 20 + quanta/data/dtep/xhtml-basic/headings.tag | 161 + quanta/data/dtep/xhtml-basic/html.tag | 24 + quanta/data/dtep/xhtml-basic/input.tag | 104 + quanta/data/dtep/xhtml-basic/li.tag | 48 + quanta/data/dtep/xhtml-basic/link.tag | 70 + quanta/data/dtep/xhtml-basic/meta.tag | 31 + quanta/data/dtep/xhtml-basic/ol.tag | 9 + quanta/data/dtep/xhtml-basic/option.tag | 26 + quanta/data/dtep/xhtml-basic/p.tag | 41 + quanta/data/dtep/xhtml-basic/select.tag | 27 + quanta/data/dtep/xhtml-basic/table.tag | 12 + quanta/data/dtep/xhtml-basic/td.tag | 103 + quanta/data/dtep/xhtml-basic/textarea.tag | 29 + quanta/data/dtep/xhtml-basic/th.tag | 103 + quanta/data/dtep/xhtml-basic/tr.tag | 41 + quanta/data/dtep/xhtml-basic/ul.tag | 11 + quanta/data/dtep/xhtml-frameset/Makefile.am | 3 + quanta/data/dtep/xhtml-frameset/a.tag | 132 + quanta/data/dtep/xhtml-frameset/abbr.tag | 51 + quanta/data/dtep/xhtml-frameset/acronym.tag | 51 + quanta/data/dtep/xhtml-frameset/address.tag | 50 + quanta/data/dtep/xhtml-frameset/applet.tag | 146 + quanta/data/dtep/xhtml-frameset/area.tag | 49 + quanta/data/dtep/xhtml-frameset/b.tag | 51 + quanta/data/dtep/xhtml-frameset/base.tag | 24 + quanta/data/dtep/xhtml-frameset/basefont.tag | 41 + quanta/data/dtep/xhtml-frameset/bdo.tag | 51 + quanta/data/dtep/xhtml-frameset/big.tag | 51 + quanta/data/dtep/xhtml-frameset/blockquote.tag | 82 + quanta/data/dtep/xhtml-frameset/body.tag | 128 + quanta/data/dtep/xhtml-frameset/br.tag | 20 + quanta/data/dtep/xhtml-frameset/button.tag | 93 + quanta/data/dtep/xhtml-frameset/caption.tag | 63 + quanta/data/dtep/xhtml-frameset/center.tag | 75 + quanta/data/dtep/xhtml-frameset/cite.tag | 51 + quanta/data/dtep/xhtml-frameset/code.tag | 51 + quanta/data/dtep/xhtml-frameset/col.tag | 57 + quanta/data/dtep/xhtml-frameset/colgroup.tag | 61 + quanta/data/dtep/xhtml-frameset/common.tag | 70 + quanta/data/dtep/xhtml-frameset/dd.tag | 75 + quanta/data/dtep/xhtml-frameset/del.tag | 87 + quanta/data/dtep/xhtml-frameset/description.rc | 55 + quanta/data/dtep/xhtml-frameset/dfn.tag | 51 + quanta/data/dtep/xhtml-frameset/dir.tag | 16 + quanta/data/dtep/xhtml-frameset/div.tag | 88 + quanta/data/dtep/xhtml-frameset/dl.tag | 16 + quanta/data/dtep/xhtml-frameset/dt.tag | 51 + quanta/data/dtep/xhtml-frameset/em.tag | 51 + quanta/data/dtep/xhtml-frameset/fieldset.tag | 76 + quanta/data/dtep/xhtml-frameset/font.tag | 87 + quanta/data/dtep/xhtml-frameset/form.tag | 151 + quanta/data/dtep/xhtml-frameset/frame.tag | 63 + quanta/data/dtep/xhtml-frameset/frameset.tag | 37 + quanta/data/dtep/xhtml-frameset/head.tag | 30 + quanta/data/dtep/xhtml-frameset/headings.tag | 369 ++ quanta/data/dtep/xhtml-frameset/hr.tag | 35 + quanta/data/dtep/xhtml-frameset/html.tag | 27 + quanta/data/dtep/xhtml-frameset/i.tag | 51 + quanta/data/dtep/xhtml-frameset/iframe.tag | 160 + quanta/data/dtep/xhtml-frameset/img.tag | 43 + quanta/data/dtep/xhtml-frameset/input.tag | 125 + quanta/data/dtep/xhtml-frameset/ins.tag | 87 + quanta/data/dtep/xhtml-frameset/isindex.tag | 13 + quanta/data/dtep/xhtml-frameset/kbd.tag | 51 + quanta/data/dtep/xhtml-frameset/label.tag | 75 + quanta/data/dtep/xhtml-frameset/legend.tag | 70 + quanta/data/dtep/xhtml-frameset/li.tag | 101 + quanta/data/dtep/xhtml-frameset/link.tag | 77 + quanta/data/dtep/xhtml-frameset/map.tag | 44 + quanta/data/dtep/xhtml-frameset/menu.tag | 16 + quanta/data/dtep/xhtml-frameset/meta.tag | 37 + quanta/data/dtep/xhtml-frameset/noframes.tag | 11 + quanta/data/dtep/xhtml-frameset/noscript.tag | 75 + quanta/data/dtep/xhtml-frameset/object.tag | 209 + quanta/data/dtep/xhtml-frameset/ol.tag | 36 + quanta/data/dtep/xhtml-frameset/optgroup.tag | 23 + quanta/data/dtep/xhtml-frameset/option.tag | 37 + quanta/data/dtep/xhtml-frameset/p.tag | 74 + quanta/data/dtep/xhtml-frameset/param.tag | 53 + quanta/data/dtep/xhtml-frameset/pre.tag | 53 + quanta/data/dtep/xhtml-frameset/q.tag | 57 + quanta/data/dtep/xhtml-frameset/s.tag | 51 + quanta/data/dtep/xhtml-frameset/samp.tag | 51 + quanta/data/dtep/xhtml-frameset/script.tag | 58 + quanta/data/dtep/xhtml-frameset/select.tag | 62 + quanta/data/dtep/xhtml-frameset/small.tag | 51 + quanta/data/dtep/xhtml-frameset/span.tag | 51 + quanta/data/dtep/xhtml-frameset/strike.tag | 51 + quanta/data/dtep/xhtml-frameset/strong.tag | 51 + quanta/data/dtep/xhtml-frameset/style.tag | 57 + quanta/data/dtep/xhtml-frameset/sub.tag | 51 + quanta/data/dtep/xhtml-frameset/sup.tag | 51 + quanta/data/dtep/xhtml-frameset/table.tag | 97 + quanta/data/dtep/xhtml-frameset/tbody.tag | 48 + quanta/data/dtep/xhtml-frameset/td.tag | 187 + quanta/data/dtep/xhtml-frameset/textarea.tag | 49 + quanta/data/dtep/xhtml-frameset/tfoot.tag | 48 + quanta/data/dtep/xhtml-frameset/th.tag | 187 + quanta/data/dtep/xhtml-frameset/thead.tag | 48 + quanta/data/dtep/xhtml-frameset/title.tag | 14 + quanta/data/dtep/xhtml-frameset/tr.tag | 53 + quanta/data/dtep/xhtml-frameset/tt.tag | 51 + quanta/data/dtep/xhtml-frameset/u.tag | 51 + quanta/data/dtep/xhtml-frameset/ul.tag | 28 + quanta/data/dtep/xhtml-frameset/var.tag | 51 + quanta/data/dtep/xhtml-strict/Makefile.am | 3 + quanta/data/dtep/xhtml-strict/a.tag | 119 + quanta/data/dtep/xhtml-strict/abbr.tag | 42 + quanta/data/dtep/xhtml-strict/acronym.tag | 42 + quanta/data/dtep/xhtml-strict/address.tag | 42 + quanta/data/dtep/xhtml-strict/area.tag | 43 + quanta/data/dtep/xhtml-strict/b.tag | 42 + quanta/data/dtep/xhtml-strict/base.tag | 17 + quanta/data/dtep/xhtml-strict/bdo.tag | 43 + quanta/data/dtep/xhtml-strict/big.tag | 42 + quanta/data/dtep/xhtml-strict/blockquote.tag | 38 + quanta/data/dtep/xhtml-strict/body.tag | 43 + quanta/data/dtep/xhtml-strict/br.tag | 5 + quanta/data/dtep/xhtml-strict/button.tag | 83 + quanta/data/dtep/xhtml-strict/caption.tag | 42 + quanta/data/dtep/xhtml-strict/cite.tag | 42 + quanta/data/dtep/xhtml-strict/code.tag | 42 + quanta/data/dtep/xhtml-strict/col.tag | 57 + quanta/data/dtep/xhtml-strict/colgroup.tag | 61 + quanta/data/dtep/xhtml-strict/common.tag | 68 + quanta/data/dtep/xhtml-strict/dd.tag | 61 + quanta/data/dtep/xhtml-strict/del.tag | 73 + quanta/data/dtep/xhtml-strict/description.rc | 62 + quanta/data/dtep/xhtml-strict/dfn.tag | 42 + quanta/data/dtep/xhtml-strict/div.tag | 62 + quanta/data/dtep/xhtml-strict/dl.tag | 10 + quanta/data/dtep/xhtml-strict/dt.tag | 42 + quanta/data/dtep/xhtml-strict/em.tag | 42 + quanta/data/dtep/xhtml-strict/empty.tag | 12 + quanta/data/dtep/xhtml-strict/fieldset.tag | 64 + quanta/data/dtep/xhtml-strict/form.tag | 95 + quanta/data/dtep/xhtml-strict/head.tag | 29 + quanta/data/dtep/xhtml-strict/headings.tag | 244 + quanta/data/dtep/xhtml-strict/hr.tag | 5 + quanta/data/dtep/xhtml-strict/html.tag | 27 + quanta/data/dtep/xhtml-strict/i.tag | 42 + quanta/data/dtep/xhtml-strict/img.tag | 31 + quanta/data/dtep/xhtml-strict/input.tag | 109 + quanta/data/dtep/xhtml-strict/ins.tag | 73 + quanta/data/dtep/xhtml-strict/kbd.tag | 42 + quanta/data/dtep/xhtml-strict/label.tag | 66 + quanta/data/dtep/xhtml-strict/legend.tag | 49 + quanta/data/dtep/xhtml-strict/li.tag | 65 + quanta/data/dtep/xhtml-strict/link.tag | 71 + quanta/data/dtep/xhtml-strict/map.tag | 39 + quanta/data/dtep/xhtml-strict/meta.tag | 37 + quanta/data/dtep/xhtml-strict/noscript.tag | 31 + quanta/data/dtep/xhtml-strict/object.tag | 163 + quanta/data/dtep/xhtml-strict/ol.tag | 11 + quanta/data/dtep/xhtml-strict/optgroup.tag | 23 + quanta/data/dtep/xhtml-strict/option.tag | 37 + quanta/data/dtep/xhtml-strict/p.tag | 54 + quanta/data/dtep/xhtml-strict/param.tag | 53 + quanta/data/dtep/xhtml-strict/pre.tag | 45 + quanta/data/dtep/xhtml-strict/q.tag | 48 + quanta/data/dtep/xhtml-strict/samp.tag | 42 + quanta/data/dtep/xhtml-strict/script.tag | 52 + quanta/data/dtep/xhtml-strict/select.tag | 62 + quanta/data/dtep/xhtml-strict/small.tag | 42 + quanta/data/dtep/xhtml-strict/span.tag | 42 + quanta/data/dtep/xhtml-strict/strong.tag | 42 + quanta/data/dtep/xhtml-strict/style.tag | 57 + quanta/data/dtep/xhtml-strict/sub.tag | 42 + quanta/data/dtep/xhtml-strict/sup.tag | 42 + quanta/data/dtep/xhtml-strict/table.tag | 79 + quanta/data/dtep/xhtml-strict/tbody.tag | 48 + quanta/data/dtep/xhtml-strict/td.tag | 147 + quanta/data/dtep/xhtml-strict/textarea.tag | 49 + quanta/data/dtep/xhtml-strict/tfoot.tag | 48 + quanta/data/dtep/xhtml-strict/th.tag | 148 + quanta/data/dtep/xhtml-strict/thead.tag | 48 + quanta/data/dtep/xhtml-strict/title.tag | 14 + quanta/data/dtep/xhtml-strict/tr.tag | 53 + quanta/data/dtep/xhtml-strict/tt.tag | 42 + quanta/data/dtep/xhtml-strict/ul.tag | 11 + quanta/data/dtep/xhtml-strict/var.tag | 42 + quanta/data/dtep/xhtml/Makefile.am | 3 + quanta/data/dtep/xhtml/a.tag | 132 + quanta/data/dtep/xhtml/abbr.tag | 51 + quanta/data/dtep/xhtml/acronym.tag | 51 + quanta/data/dtep/xhtml/address.tag | 50 + quanta/data/dtep/xhtml/applet.tag | 145 + quanta/data/dtep/xhtml/area.tag | 49 + quanta/data/dtep/xhtml/b.tag | 51 + quanta/data/dtep/xhtml/base.tag | 24 + quanta/data/dtep/xhtml/basefont.tag | 41 + quanta/data/dtep/xhtml/bdo.tag | 51 + quanta/data/dtep/xhtml/big.tag | 51 + quanta/data/dtep/xhtml/blockquote.tag | 82 + quanta/data/dtep/xhtml/body.tag | 128 + quanta/data/dtep/xhtml/br.tag | 20 + quanta/data/dtep/xhtml/button.tag | 93 + quanta/data/dtep/xhtml/caption.tag | 63 + quanta/data/dtep/xhtml/center.tag | 75 + quanta/data/dtep/xhtml/cite.tag | 51 + quanta/data/dtep/xhtml/code.tag | 51 + quanta/data/dtep/xhtml/col.tag | 57 + quanta/data/dtep/xhtml/colgroup.tag | 61 + quanta/data/dtep/xhtml/common.tag | 48 + quanta/data/dtep/xhtml/dd.tag | 75 + quanta/data/dtep/xhtml/del.tag | 87 + quanta/data/dtep/xhtml/description.rc | 68 + quanta/data/dtep/xhtml/dfn.tag | 51 + quanta/data/dtep/xhtml/dir.tag | 16 + quanta/data/dtep/xhtml/div.tag | 88 + quanta/data/dtep/xhtml/dl.tag | 16 + quanta/data/dtep/xhtml/dt.tag | 51 + quanta/data/dtep/xhtml/em.tag | 51 + quanta/data/dtep/xhtml/fieldset.tag | 76 + quanta/data/dtep/xhtml/font.tag | 87 + quanta/data/dtep/xhtml/form.tag | 151 + quanta/data/dtep/xhtml/head.tag | 30 + quanta/data/dtep/xhtml/headings.tag | 369 ++ quanta/data/dtep/xhtml/hr.tag | 35 + quanta/data/dtep/xhtml/html.tag | 27 + quanta/data/dtep/xhtml/i.tag | 51 + quanta/data/dtep/xhtml/iframe.tag | 159 + quanta/data/dtep/xhtml/img.tag | 43 + quanta/data/dtep/xhtml/input.tag | 125 + quanta/data/dtep/xhtml/ins.tag | 87 + quanta/data/dtep/xhtml/isindex.tag | 13 + quanta/data/dtep/xhtml/kbd.tag | 51 + quanta/data/dtep/xhtml/label.tag | 75 + quanta/data/dtep/xhtml/legend.tag | 70 + quanta/data/dtep/xhtml/li.tag | 101 + quanta/data/dtep/xhtml/link.tag | 77 + quanta/data/dtep/xhtml/map.tag | 44 + quanta/data/dtep/xhtml/menu.tag | 16 + quanta/data/dtep/xhtml/meta.tag | 37 + quanta/data/dtep/xhtml/noframes.tag | 74 + quanta/data/dtep/xhtml/noscript.tag | 75 + quanta/data/dtep/xhtml/object.tag | 209 + quanta/data/dtep/xhtml/ol.tag | 36 + quanta/data/dtep/xhtml/optgroup.tag | 23 + quanta/data/dtep/xhtml/option.tag | 37 + quanta/data/dtep/xhtml/p.tag | 74 + quanta/data/dtep/xhtml/param.tag | 53 + quanta/data/dtep/xhtml/pre.tag | 53 + quanta/data/dtep/xhtml/q.tag | 57 + quanta/data/dtep/xhtml/s.tag | 50 + quanta/data/dtep/xhtml/samp.tag | 51 + quanta/data/dtep/xhtml/script.tag | 58 + quanta/data/dtep/xhtml/select.tag | 62 + quanta/data/dtep/xhtml/small.tag | 51 + quanta/data/dtep/xhtml/span.tag | 51 + quanta/data/dtep/xhtml/strike.tag | 50 + quanta/data/dtep/xhtml/strong.tag | 51 + quanta/data/dtep/xhtml/style.tag | 57 + quanta/data/dtep/xhtml/sub.tag | 51 + quanta/data/dtep/xhtml/sup.tag | 51 + quanta/data/dtep/xhtml/table.tag | 97 + quanta/data/dtep/xhtml/tbody.tag | 48 + quanta/data/dtep/xhtml/td.tag | 187 + quanta/data/dtep/xhtml/textarea.tag | 49 + quanta/data/dtep/xhtml/tfoot.tag | 48 + quanta/data/dtep/xhtml/th.tag | 187 + quanta/data/dtep/xhtml/thead.tag | 48 + quanta/data/dtep/xhtml/title.tag | 14 + quanta/data/dtep/xhtml/tr.tag | 53 + quanta/data/dtep/xhtml/tt.tag | 51 + quanta/data/dtep/xhtml/u.tag | 51 + quanta/data/dtep/xhtml/ul.tag | 28 + quanta/data/dtep/xhtml/var.tag | 51 + quanta/data/dtep/xhtml11/Makefile.am | 14 + quanta/data/dtep/xhtml11/a.tag | 108 + quanta/data/dtep/xhtml11/abbr.tag | 42 + quanta/data/dtep/xhtml11/acronym.tag | 42 + quanta/data/dtep/xhtml11/address.tag | 42 + quanta/data/dtep/xhtml11/applet.tag | 123 + quanta/data/dtep/xhtml11/area.tag | 44 + quanta/data/dtep/xhtml11/b.tag | 42 + quanta/data/dtep/xhtml11/base.tag | 17 + quanta/data/dtep/xhtml11/bdo.tag | 53 + quanta/data/dtep/xhtml11/big.tag | 42 + quanta/data/dtep/xhtml11/blockquote.tag | 36 + quanta/data/dtep/xhtml11/body.tag | 42 + quanta/data/dtep/xhtml11/br.tag | 5 + quanta/data/dtep/xhtml11/button.tag | 66 + quanta/data/dtep/xhtml11/caption.tag | 42 + quanta/data/dtep/xhtml11/cite.tag | 42 + quanta/data/dtep/xhtml11/code.tag | 42 + quanta/data/dtep/xhtml11/col.tag | 60 + quanta/data/dtep/xhtml11/colgroup.tag | 63 + quanta/data/dtep/xhtml11/common.tag | 56 + quanta/data/dtep/xhtml11/dd.tag | 61 + quanta/data/dtep/xhtml11/del.tag | 73 + quanta/data/dtep/xhtml11/description.rc | 58 + quanta/data/dtep/xhtml11/dfn.tag | 42 + quanta/data/dtep/xhtml11/div.tag | 61 + quanta/data/dtep/xhtml11/dl.tag | 10 + quanta/data/dtep/xhtml11/dt.tag | 42 + quanta/data/dtep/xhtml11/em.tag | 42 + quanta/data/dtep/xhtml11/empty.tag | 13 + quanta/data/dtep/xhtml11/fieldset.tag | 65 + quanta/data/dtep/xhtml11/form.tag | 84 + quanta/data/dtep/xhtml11/head.tag | 29 + quanta/data/dtep/xhtml11/headings.tag | 239 + quanta/data/dtep/xhtml11/hr.tag | 5 + quanta/data/dtep/xhtml11/html.tag | 25 + quanta/data/dtep/xhtml11/i.tag | 42 + quanta/data/dtep/xhtml11/image.tag | 48 + quanta/data/dtep/xhtml11/input.tag | 104 + quanta/data/dtep/xhtml11/ins.tag | 73 + quanta/data/dtep/xhtml11/kbd.tag | 42 + quanta/data/dtep/xhtml11/label.tag | 66 + quanta/data/dtep/xhtml11/legend.tag | 49 + quanta/data/dtep/xhtml11/li.tag | 65 + quanta/data/dtep/xhtml11/link.tag | 70 + quanta/data/dtep/xhtml11/map.tag | 33 + quanta/data/dtep/xhtml11/meta.tag | 31 + quanta/data/dtep/xhtml11/noscript.tag | 31 + quanta/data/dtep/xhtml11/object.tag | 181 + quanta/data/dtep/xhtml11/ol.tag | 11 + quanta/data/dtep/xhtml11/optgroup.tag | 23 + quanta/data/dtep/xhtml11/option.tag | 41 + quanta/data/dtep/xhtml11/p.tag | 54 + quanta/data/dtep/xhtml11/param.tag | 47 + quanta/data/dtep/xhtml11/pre.tag | 45 + quanta/data/dtep/xhtml11/q.tag | 48 + quanta/data/dtep/xhtml11/rb.tag | 7 + quanta/data/dtep/xhtml11/rbc.tag | 9 + quanta/data/dtep/xhtml11/rp.tag | 7 + quanta/data/dtep/xhtml11/rt.tag | 9 + quanta/data/dtep/xhtml11/rtc.tag | 9 + quanta/data/dtep/xhtml11/ruby.tag | 13 + quanta/data/dtep/xhtml11/samp.tag | 42 + quanta/data/dtep/xhtml11/script.tag | 46 + quanta/data/dtep/xhtml11/select.tag | 55 + quanta/data/dtep/xhtml11/small.tag | 42 + quanta/data/dtep/xhtml11/span.tag | 42 + quanta/data/dtep/xhtml11/strong.tag | 42 + quanta/data/dtep/xhtml11/style.tag | 60 + quanta/data/dtep/xhtml11/sub.tag | 42 + quanta/data/dtep/xhtml11/sup.tag | 42 + quanta/data/dtep/xhtml11/table.tag | 79 + quanta/data/dtep/xhtml11/tbody.tag | 39 + quanta/data/dtep/xhtml11/td.tag | 132 + quanta/data/dtep/xhtml11/textarea.tag | 43 + quanta/data/dtep/xhtml11/tfoot.tag | 38 + quanta/data/dtep/xhtml11/th.tag | 132 + quanta/data/dtep/xhtml11/thead.tag | 38 + quanta/data/dtep/xhtml11/title.tag | 14 + quanta/data/dtep/xhtml11/tr.tag | 44 + quanta/data/dtep/xhtml11/tt.tag | 42 + quanta/data/dtep/xhtml11/ul.tag | 11 + quanta/data/dtep/xhtml11/var.tag | 42 + quanta/data/dtep/xslt/Makefile.am | 2 + quanta/data/dtep/xslt/apply-imports.tag | 6 + quanta/data/dtep/xslt/attribute-set.tag | 24 + quanta/data/dtep/xslt/attribute.tag | 24 + quanta/data/dtep/xslt/call-template.tag | 15 + quanta/data/dtep/xslt/choose.tag | 5 + quanta/data/dtep/xslt/comment.tag | 6 + quanta/data/dtep/xslt/copy-of.tag | 15 + quanta/data/dtep/xslt/decimal-format.tag | 105 + quanta/data/dtep/xslt/description.rc | 15 + quanta/data/dtep/xslt/element.tag | 33 + quanta/data/dtep/xslt/fallback.tag | 6 + quanta/data/dtep/xslt/for-each.tag | 15 + quanta/data/dtep/xslt/if.tag | 15 + quanta/data/dtep/xslt/import.tag | 15 + quanta/data/dtep/xslt/key.tag | 33 + quanta/data/dtep/xslt/message.tag | 19 + quanta/data/dtep/xslt/namespace-alias.tag | 24 + quanta/data/dtep/xslt/number.tag | 95 + quanta/data/dtep/xslt/otherwise.tag | 6 + quanta/data/dtep/xslt/output.tag | 113 + quanta/data/dtep/xslt/param.tag | 23 + quanta/data/dtep/xslt/preserve-space.tag | 15 + quanta/data/dtep/xslt/processing-instruction.tag | 15 + quanta/data/dtep/xslt/sort.tag | 64 + quanta/data/dtep/xslt/strip-space.tag | 15 + quanta/data/dtep/xslt/stylesheet.tag | 42 + quanta/data/dtep/xslt/template.tag | 42 + quanta/data/dtep/xslt/text.tag | 19 + quanta/data/dtep/xslt/transform.tag | 43 + quanta/data/dtep/xslt/value-of.tag | 28 + quanta/data/dtep/xslt/variable.tag | 24 + quanta/data/dtep/xslt/when.tag | 15 + quanta/data/dtep/xslt/with-param.tag | 24 + quanta/data/icons/16x16/Makefile.am | 4 + quanta/data/icons/16x16/debug_breakpoint.png | Bin 0 -> 745 bytes quanta/data/icons/16x16/debug_connect.png | Bin 0 -> 1003 bytes quanta/data/icons/16x16/debug_currentline.png | Bin 0 -> 133 bytes quanta/data/icons/16x16/debug_disconnect.png | Bin 0 -> 1023 bytes quanta/data/icons/16x16/debug_kill.png | Bin 0 -> 719 bytes quanta/data/icons/16x16/debug_pause.png | Bin 0 -> 750 bytes quanta/data/icons/16x16/delete.png | Bin 0 -> 892 bytes quanta/data/icons/16x16/empty16x16.png | Bin 0 -> 141 bytes quanta/data/icons/16x16/empty1x16.png | Bin 0 -> 229 bytes quanta/data/icons/16x16/java.png | Bin 0 -> 862 bytes quanta/data/icons/16x16/mini-book1.png | Bin 0 -> 290 bytes quanta/data/icons/16x16/mini-book2.png | Bin 0 -> 1111 bytes quanta/data/icons/16x16/mini-modules.png | Bin 0 -> 794 bytes quanta/data/icons/16x16/tag_br_small.png | Bin 0 -> 308 bytes quanta/data/icons/16x16/tag_font_small.png | Bin 0 -> 364 bytes quanta/data/icons/16x16/tag_hr_small.png | Bin 0 -> 233 bytes quanta/data/icons/22x22/Makefile.am | 172 + quanta/data/icons/22x22/ball.png | Bin 0 -> 271 bytes quanta/data/icons/22x22/button.png | Bin 0 -> 258 bytes quanta/data/icons/22x22/check.png | Bin 0 -> 293 bytes quanta/data/icons/22x22/check_clear.png | Bin 0 -> 186 bytes quanta/data/icons/22x22/check_grey.png | Bin 0 -> 164 bytes quanta/data/icons/22x22/css.png | Bin 0 -> 1133 bytes quanta/data/icons/22x22/date.png | Bin 0 -> 357 bytes quanta/data/icons/22x22/debug_leap.png | Bin 0 -> 244 bytes quanta/data/icons/22x22/debug_run.png | Bin 0 -> 275 bytes quanta/data/icons/22x22/debug_skip.png | Bin 0 -> 187 bytes quanta/data/icons/22x22/debug_stepinto.png | Bin 0 -> 202 bytes quanta/data/icons/22x22/debug_stepout.png | Bin 0 -> 204 bytes quanta/data/icons/22x22/debug_stepover.png | Bin 0 -> 182 bytes quanta/data/icons/22x22/div_center.png | Bin 0 -> 248 bytes quanta/data/icons/22x22/div_justify.png | Bin 0 -> 232 bytes quanta/data/icons/22x22/div_left.png | Bin 0 -> 243 bytes quanta/data/icons/22x22/div_right.png | Bin 0 -> 248 bytes quanta/data/icons/22x22/font_dec.png | Bin 0 -> 314 bytes quanta/data/icons/22x22/font_inc.png | Bin 0 -> 324 bytes quanta/data/icons/22x22/form.png | Bin 0 -> 244 bytes quanta/data/icons/22x22/frame.png | Bin 0 -> 204 bytes quanta/data/icons/22x22/ftab.png | Bin 0 -> 816 bytes quanta/data/icons/22x22/ftpclient.png | Bin 0 -> 498 bytes quanta/data/icons/22x22/lineedit.png | Bin 0 -> 299 bytes quanta/data/icons/22x22/linepas.png | Bin 0 -> 306 bytes quanta/data/icons/22x22/output_win.png | Bin 0 -> 358 bytes quanta/data/icons/22x22/preview.png | Bin 0 -> 983 bytes quanta/data/icons/22x22/ptab.png | Bin 0 -> 1356 bytes quanta/data/icons/22x22/quick-screenshot.png | Bin 0 -> 369 bytes quanta/data/icons/22x22/quick_list.png | Bin 0 -> 366 bytes quanta/data/icons/22x22/quick_start.png | Bin 0 -> 802 bytes quanta/data/icons/22x22/quick_table.png | Bin 0 -> 355 bytes quanta/data/icons/22x22/radio.png | Bin 0 -> 309 bytes quanta/data/icons/22x22/replace.png | Bin 0 -> 324 bytes quanta/data/icons/22x22/reset.png | Bin 0 -> 310 bytes quanta/data/icons/22x22/select.png | Bin 0 -> 325 bytes quanta/data/icons/22x22/submit.png | Bin 0 -> 322 bytes quanta/data/icons/22x22/table_data.png | Bin 0 -> 235 bytes quanta/data/icons/22x22/table_head.png | Bin 0 -> 223 bytes quanta/data/icons/22x22/tag_a.png | Bin 0 -> 359 bytes quanta/data/icons/22x22/tag_a_url.png | Bin 0 -> 637 bytes quanta/data/icons/22x22/tag_access.png | Bin 0 -> 206 bytes quanta/data/icons/22x22/tag_all.png | Bin 0 -> 253 bytes quanta/data/icons/22x22/tag_amp.png | Bin 0 -> 182 bytes quanta/data/icons/22x22/tag_any.png | Bin 0 -> 268 bytes quanta/data/icons/22x22/tag_anyAttribute.png | Bin 0 -> 2084 bytes quanta/data/icons/22x22/tag_appInfo.png | Bin 0 -> 285 bytes quanta/data/icons/22x22/tag_attr.png | Bin 0 -> 194 bytes quanta/data/icons/22x22/tag_attribute.png | Bin 0 -> 124 bytes quanta/data/icons/22x22/tag_attributeGroup.png | Bin 0 -> 184 bytes quanta/data/icons/22x22/tag_bold.png | Bin 0 -> 296 bytes quanta/data/icons/22x22/tag_br.png | Bin 0 -> 323 bytes quanta/data/icons/22x22/tag_caption.png | Bin 0 -> 310 bytes quanta/data/icons/22x22/tag_card.png | Bin 0 -> 188 bytes quanta/data/icons/22x22/tag_cdata.png | Bin 0 -> 201 bytes quanta/data/icons/22x22/tag_chapter.png | Bin 0 -> 891 bytes quanta/data/icons/22x22/tag_choice.png | Bin 0 -> 234 bytes quanta/data/icons/22x22/tag_comm.png | Bin 0 -> 226 bytes quanta/data/icons/22x22/tag_complexContent.png | Bin 0 -> 406 bytes quanta/data/icons/22x22/tag_complexType.png | Bin 0 -> 355 bytes quanta/data/icons/22x22/tag_dd.png | Bin 0 -> 184 bytes quanta/data/icons/22x22/tag_dl.png | Bin 0 -> 179 bytes quanta/data/icons/22x22/tag_do.png | Bin 0 -> 157 bytes quanta/data/icons/22x22/tag_documenation.png | Bin 0 -> 213 bytes quanta/data/icons/22x22/tag_dt.png | Bin 0 -> 177 bytes quanta/data/icons/22x22/tag_element.png | Bin 0 -> 184 bytes quanta/data/icons/22x22/tag_em.png | Bin 0 -> 159 bytes quanta/data/icons/22x22/tag_example.png | Bin 0 -> 740 bytes quanta/data/icons/22x22/tag_extension.png | Bin 0 -> 211 bytes quanta/data/icons/22x22/tag_field.png | Bin 0 -> 185 bytes quanta/data/icons/22x22/tag_font.png | Bin 0 -> 381 bytes quanta/data/icons/22x22/tag_font_base.png | Bin 0 -> 398 bytes quanta/data/icons/22x22/tag_footnote.png | Bin 0 -> 837 bytes quanta/data/icons/22x22/tag_footnoteref.png | Bin 0 -> 957 bytes quanta/data/icons/22x22/tag_fractionDigits.png | Bin 0 -> 160 bytes quanta/data/icons/22x22/tag_go.png | Bin 0 -> 206 bytes quanta/data/icons/22x22/tag_group.png | Bin 0 -> 345 bytes quanta/data/icons/22x22/tag_guimenu.png | Bin 0 -> 236 bytes quanta/data/icons/22x22/tag_guimenuitem.png | Bin 0 -> 229 bytes quanta/data/icons/22x22/tag_guisubmenu.png | Bin 0 -> 237 bytes quanta/data/icons/22x22/tag_h1.png | Bin 0 -> 298 bytes quanta/data/icons/22x22/tag_h2.png | Bin 0 -> 319 bytes quanta/data/icons/22x22/tag_h3.png | Bin 0 -> 320 bytes quanta/data/icons/22x22/tag_h4.png | Bin 0 -> 309 bytes quanta/data/icons/22x22/tag_h5.png | Bin 0 -> 310 bytes quanta/data/icons/22x22/tag_head.png | Bin 0 -> 183 bytes quanta/data/icons/22x22/tag_hr.png | Bin 0 -> 166 bytes quanta/data/icons/22x22/tag_i.png | Bin 0 -> 303 bytes quanta/data/icons/22x22/tag_image.png | Bin 0 -> 909 bytes quanta/data/icons/22x22/tag_imagedata.png | Bin 0 -> 755 bytes quanta/data/icons/22x22/tag_import.png | Bin 0 -> 296 bytes quanta/data/icons/22x22/tag_include.png | Bin 0 -> 219 bytes quanta/data/icons/22x22/tag_informalexample.png | Bin 0 -> 202 bytes quanta/data/icons/22x22/tag_inlinemediaobject.png | Bin 0 -> 623 bytes quanta/data/icons/22x22/tag_key.png | Bin 0 -> 234 bytes quanta/data/icons/22x22/tag_keycap.png | Bin 0 -> 478 bytes quanta/data/icons/22x22/tag_keycombo.png | Bin 0 -> 612 bytes quanta/data/icons/22x22/tag_keyref.png | Bin 0 -> 280 bytes quanta/data/icons/22x22/tag_label.png | Bin 0 -> 265 bytes quanta/data/icons/22x22/tag_li.png | Bin 0 -> 312 bytes quanta/data/icons/22x22/tag_link.png | Bin 0 -> 772 bytes quanta/data/icons/22x22/tag_list.png | Bin 0 -> 268 bytes quanta/data/icons/22x22/tag_listitem.png | Bin 0 -> 110 bytes quanta/data/icons/22x22/tag_loc.png | Bin 0 -> 446 bytes quanta/data/icons/22x22/tag_mail.png | Bin 0 -> 599 bytes quanta/data/icons/22x22/tag_member.png | Bin 0 -> 109 bytes quanta/data/icons/22x22/tag_menu.png | Bin 0 -> 232 bytes quanta/data/icons/22x22/tag_menuchoice.png | Bin 0 -> 244 bytes quanta/data/icons/22x22/tag_meta.png | Bin 0 -> 235 bytes quanta/data/icons/22x22/tag_misc.png | Bin 0 -> 224 bytes quanta/data/icons/22x22/tag_nbsp.png | Bin 0 -> 320 bytes quanta/data/icons/22x22/tag_noop.png | Bin 0 -> 162 bytes quanta/data/icons/22x22/tag_notation.png | Bin 0 -> 611 bytes quanta/data/icons/22x22/tag_ol.png | Bin 0 -> 285 bytes quanta/data/icons/22x22/tag_onevent.png | Bin 0 -> 256 bytes quanta/data/icons/22x22/tag_p.png | Bin 0 -> 324 bytes quanta/data/icons/22x22/tag_para.png | Bin 0 -> 130 bytes quanta/data/icons/22x22/tag_postfield.png | Bin 0 -> 262 bytes quanta/data/icons/22x22/tag_pre.png | Bin 0 -> 309 bytes quanta/data/icons/22x22/tag_procedure.png | Bin 0 -> 662 bytes quanta/data/icons/22x22/tag_redefine.png | Bin 0 -> 606 bytes quanta/data/icons/22x22/tag_restriction.png | Bin 0 -> 265 bytes quanta/data/icons/22x22/tag_schema.png | Bin 0 -> 308 bytes quanta/data/icons/22x22/tag_screenshot.png | Bin 0 -> 239 bytes quanta/data/icons/22x22/tag_screenshotinfo.png | Bin 0 -> 303 bytes quanta/data/icons/22x22/tag_sect1.png | Bin 0 -> 794 bytes quanta/data/icons/22x22/tag_sect2.png | Bin 0 -> 817 bytes quanta/data/icons/22x22/tag_sect3.png | Bin 0 -> 817 bytes quanta/data/icons/22x22/tag_sect4.png | Bin 0 -> 795 bytes quanta/data/icons/22x22/tag_sect5.png | Bin 0 -> 812 bytes quanta/data/icons/22x22/tag_selector.png | Bin 0 -> 231 bytes quanta/data/icons/22x22/tag_sequence.png | Bin 0 -> 231 bytes quanta/data/icons/22x22/tag_setvar.png | Bin 0 -> 194 bytes quanta/data/icons/22x22/tag_shortcut.png | Bin 0 -> 241 bytes quanta/data/icons/22x22/tag_simpleContent.png | Bin 0 -> 365 bytes quanta/data/icons/22x22/tag_simpleType.png | Bin 0 -> 289 bytes quanta/data/icons/22x22/tag_step.png | Bin 0 -> 491 bytes quanta/data/icons/22x22/tag_sub.png | Bin 0 -> 301 bytes quanta/data/icons/22x22/tag_substeps.png | Bin 0 -> 406 bytes quanta/data/icons/22x22/tag_sup.png | Bin 0 -> 305 bytes quanta/data/icons/22x22/tag_table.png | Bin 0 -> 228 bytes quanta/data/icons/22x22/tag_table_body.png | Bin 0 -> 218 bytes quanta/data/icons/22x22/tag_table_row.png | Bin 0 -> 233 bytes quanta/data/icons/22x22/tag_tag.png | Bin 0 -> 239 bytes quanta/data/icons/22x22/tag_tbody.png | Bin 0 -> 211 bytes quanta/data/icons/22x22/tag_td.png | Bin 0 -> 230 bytes quanta/data/icons/22x22/tag_term.png | Bin 0 -> 171 bytes quanta/data/icons/22x22/tag_tgroup.png | Bin 0 -> 232 bytes quanta/data/icons/22x22/tag_th.png | Bin 0 -> 236 bytes quanta/data/icons/22x22/tag_title.png | Bin 0 -> 622 bytes quanta/data/icons/22x22/tag_tr.png | Bin 0 -> 232 bytes quanta/data/icons/22x22/tag_u.png | Bin 0 -> 295 bytes quanta/data/icons/22x22/tag_ul.png | Bin 0 -> 262 bytes quanta/data/icons/22x22/tag_ulink.png | Bin 0 -> 1262 bytes quanta/data/icons/22x22/tag_union.png | Bin 0 -> 348 bytes quanta/data/icons/22x22/tag_unique.png | Bin 0 -> 160 bytes quanta/data/icons/22x22/tag_variablelist.png | Bin 0 -> 173 bytes quanta/data/icons/22x22/tag_varlistentry.png | Bin 0 -> 178 bytes quanta/data/icons/22x22/tag_varlistitem.png | Bin 0 -> 172 bytes quanta/data/icons/22x22/tag_what.png | Bin 0 -> 249 bytes quanta/data/icons/22x22/tag_wml.png | Bin 0 -> 179 bytes quanta/data/icons/22x22/tag_xref.png | Bin 0 -> 751 bytes quanta/data/icons/22x22/textarea.png | Bin 0 -> 317 bytes quanta/data/icons/22x22/tree_win.png | Bin 0 -> 394 bytes quanta/data/icons/22x22/ttab.png | Bin 0 -> 1104 bytes quanta/data/icons/22x22/view_text.png | Bin 0 -> 801 bytes quanta/data/icons/22x22/vpl.png | Bin 0 -> 732 bytes quanta/data/icons/22x22/vpl_text.png | Bin 0 -> 950 bytes quanta/data/icons/22x22/xmlval.png | Bin 0 -> 455 bytes quanta/data/icons/22x22/xsltproc.png | Bin 0 -> 257 bytes quanta/data/icons/Makefile.am | 4 + quanta/data/icons/files.png | Bin 0 -> 1942 bytes quanta/data/icons/hi16-app-quanta.png | Bin 0 -> 906 bytes quanta/data/icons/hi16-app-quanta_be.png | Bin 0 -> 906 bytes quanta/data/icons/hi22-app-quanta.png | Bin 0 -> 1419 bytes quanta/data/icons/hi22-app-quanta_be.png | Bin 0 -> 1419 bytes quanta/data/icons/hi32-app-quanta.png | Bin 0 -> 2489 bytes quanta/data/icons/hi32-app-quanta_be.png | Bin 0 -> 2489 bytes quanta/data/icons/hi48-app-quanta.png | Bin 0 -> 4629 bytes quanta/data/icons/hi48-app-quanta_be.png | Bin 0 -> 4629 bytes quanta/data/pics/Makefile.am | 3 + quanta/data/pics/quantalogo.png | Bin 0 -> 67892 bytes quanta/data/pics/quantalogo_be.png | Bin 0 -> 57598 bytes quanta/data/pics/wiznewprjfin.png | Bin 0 -> 40294 bytes quanta/data/pics/wiznewprjglb.png | Bin 0 -> 39644 bytes quanta/data/pics/wiznewprjloc.png | Bin 0 -> 40448 bytes quanta/data/pics/wiznewprjweb.png | Bin 0 -> 40448 bytes quanta/data/templates/Makefile.am | 1 + quanta/data/templates/binaries/Makefile.am | 7 + quanta/data/templates/binaries/dirinfo | 6 + quanta/data/templates/binaries/images/Makefile.am | 2 + .../data/templates/binaries/images/jpg/Makefile.am | 2 + quanta/data/templates/binaries/images/jpg/demo.jpg | Bin 0 -> 1708 bytes .../templates/binaries/images/others/Makefile.am | 2 + .../data/templates/binaries/images/others/demo.tif | Bin 0 -> 168 bytes .../data/templates/binaries/images/png/Makefile.am | 2 + quanta/data/templates/binaries/images/png/demo.png | Bin 0 -> 12773 bytes quanta/data/templates/binaries/others/Makefile.am | 2 + quanta/data/templates/binaries/others/print.pdf | Bin 0 -> 3547 bytes quanta/data/templates/documents/Makefile.am | 7 + quanta/data/templates/documents/dirinfo | 6 + quanta/data/templates/documents/html/Makefile.am | 2 + quanta/data/templates/documents/html/demo.html | 1 + quanta/data/templates/documents/others/Makefile.am | 2 + quanta/data/templates/documents/others/demo.txt | 2 + .../data/templates/documents/scripts/Makefile.am | 2 + .../data/templates/documents/scripts/demo.script | 1 + quanta/data/templates/images/Makefile.am | 7 + quanta/data/templates/images/banners/Makefile.am | 2 + quanta/data/templates/images/banners/demo.jpg | Bin 0 -> 1708 bytes quanta/data/templates/images/buttons/Makefile.am | 2 + quanta/data/templates/images/buttons/ball.png | Bin 0 -> 271 bytes quanta/data/templates/images/dirinfo | 4 + quanta/data/templates/images/jpg/Makefile.am | 2 + quanta/data/templates/images/jpg/demo.jpg | Bin 0 -> 1708 bytes quanta/data/templates/images/others/Makefile.am | 2 + quanta/data/templates/images/others/demo.tif | Bin 0 -> 168 bytes quanta/data/templates/images/png/Makefile.am | 2 + quanta/data/templates/images/png/demo.png | Bin 0 -> 12773 bytes quanta/data/templates/pages/Makefile.am | 7 + quanta/data/templates/pages/dirinfo | 4 + quanta/data/templates/pages/docbook/Makefile.am | 2 + .../pages/docbook/kde-doc-template.docbook | 568 +++ quanta/data/templates/pages/html/Makefile.am | 1 + .../templates/pages/html/html_4.0.1/Makefile.am | 2 + .../templates/pages/html/html_4.0.1/basic.html | 18 + .../data/templates/pages/html/special/Makefile.am | 2 + .../pages/html/special/drag_n_drop_men.html | 156 + quanta/data/templates/pages/html/xhtml/Makefile.am | 2 + .../templates/pages/html/xhtml/Quanta_Times.html | 103 + .../templates/pages/html/xhtml/leftMen_BB.html | 75 + .../templates/pages/html/xhtml/leftMen_Quanta.html | 86 + .../templates/pages/html/xhtml/rightMen_BB.html | 74 + .../pages/html/xhtml/rightMen_Quanta.html | 86 + .../templates/pages/html/xhtml/twoSideMen_BB.html | 94 + .../pages/html/xhtml/twoSideMen_Quanta.html | 108 + quanta/data/templates/pages/php/Makefile.am | 2 + quanta/data/templates/pages/php/demo.php | 5 + quanta/data/templates/scripts/Makefile.am | 7 + quanta/data/templates/scripts/dirinfo | 6 + .../data/templates/scripts/javascript/Makefile.am | 2 + .../templates/scripts/javascript/email_validate.js | 63 + .../data/templates/scripts/javascript/overlib.js | 1222 +++++ .../data/templates/scripts/javascript/preload.js | 24 + quanta/data/templates/scripts/perl/Makefile.am | 2 + quanta/data/templates/scripts/perl/demo.perl | 1 + quanta/data/templates/scripts/php/Makefile.am | 2 + quanta/data/templates/scripts/php/demo.php | 5 + quanta/data/templates/text/Makefile.am | 7 + quanta/data/templates/text/dirinfo | 6 + quanta/data/templates/text/html/Makefile.am | 2 + quanta/data/templates/text/html/demo.html | 1 + quanta/data/templates/text/others/Makefile.am | 2 + quanta/data/templates/text/others/demo.txt | 1 + quanta/data/templates/text/scripts/Makefile.am | 2 + quanta/data/templates/text/scripts/demo.php | 5 + quanta/data/tips | 369 ++ quanta/data/toolbars/Makefile.am | 4 + quanta/data/toolbars/cfml/Makefile.am | 2 + quanta/data/toolbars/cfml/cfml.toolbar.tgz | Bin 0 -> 571 bytes quanta/data/toolbars/cfml/fonts.toolbar.tgz | Bin 0 -> 949 bytes quanta/data/toolbars/cfml/forms.toolbar.tgz | Bin 0 -> 635 bytes quanta/data/toolbars/cfml/lists.toolbar.tgz | Bin 0 -> 519 bytes quanta/data/toolbars/cfml/standard.toolbar.tgz | Bin 0 -> 1584 bytes quanta/data/toolbars/cfml/tables.toolbar.tgz | Bin 0 -> 616 bytes quanta/data/toolbars/css/Makefile.am | 2 + quanta/data/toolbars/css/css.toolbar.tgz | Bin 0 -> 303 bytes quanta/data/toolbars/debug.toolbar.tgz | Bin 0 -> 432 bytes quanta/data/toolbars/docbook/Makefile.am | 5 + .../data/toolbars/docbook/docbook_code.toolbar.tgz | Bin 0 -> 749 bytes .../data/toolbars/docbook/docbook_ui.toolbar.tgz | Bin 0 -> 677 bytes .../data/toolbars/docbook/docbook_xml.toolbar.tgz | Bin 0 -> 1383 bytes quanta/data/toolbars/docbook/xmltools.toolbar.tgz | Bin 0 -> 509 bytes quanta/data/toolbars/html/Makefile.am | 2 + quanta/data/toolbars/html/forms.toolbar.tgz | Bin 0 -> 873 bytes quanta/data/toolbars/html/lists.toolbar.tgz | Bin 0 -> 519 bytes quanta/data/toolbars/html/other.toolbar.tgz | Bin 0 -> 695 bytes quanta/data/toolbars/html/standard.toolbar.tgz | Bin 0 -> 1722 bytes quanta/data/toolbars/html/style.toolbar.tgz | Bin 0 -> 2219 bytes quanta/data/toolbars/html/tables.toolbar.tgz | Bin 0 -> 655 bytes quanta/data/toolbars/kde-docbook/Makefile.am | 8 + .../kde-docbook-admonitions.toolbar.tgz | Bin 0 -> 751 bytes .../kde-docbook/kde-docbook-images.toolbar.tgz | Bin 0 -> 852 bytes .../kde-docbook/kde-docbook-list.toolbar.tgz | Bin 0 -> 897 bytes .../kde-docbook/kde-docbook-standard.toolbar.tgz | Bin 0 -> 720 bytes .../kde-docbook/kde-docbook-tables.toolbar.tgz | Bin 0 -> 771 bytes .../kde-docbook/kde-docbook-uielements.toolbar.tgz | Bin 0 -> 700 bytes .../toolbars/kde-docbook/kdexmltools.toolbar.tgz | Bin 0 -> 498 bytes quanta/data/toolbars/schema/Makefile.am | 3 + quanta/data/toolbars/schema/attributes.toolbar.tgz | Bin 0 -> 456 bytes quanta/data/toolbars/schema/complex.toolbar.tgz | Bin 0 -> 799 bytes .../data/toolbars/schema/documentation.toolbar.tgz | Bin 0 -> 495 bytes quanta/data/toolbars/schema/facets.toolbar.tgz | Bin 0 -> 724 bytes quanta/data/toolbars/schema/main.toolbar.tgz | Bin 0 -> 572 bytes quanta/data/toolbars/schema/misc.toolbar.tgz | Bin 0 -> 573 bytes quanta/data/toolbars/schema/simple.toolbar.tgz | Bin 0 -> 509 bytes quanta/data/toolbars/tagxml/Makefile.am | 2 + quanta/data/toolbars/tagxml/tagxml.toolbar.tgz | Bin 0 -> 992 bytes quanta/data/toolbars/wml-1-2/Makefile.am | 2 + quanta/data/toolbars/wml-1-2/deck.toolbar.tgz | Bin 0 -> 577 bytes quanta/data/toolbars/wml-1-2/forms.toolbar.tgz | Bin 0 -> 688 bytes quanta/data/toolbars/wml-1-2/misc.toolbar.tgz | Bin 0 -> 896 bytes quanta/data/toolbars/wml-1-2/table.toolbar.tgz | Bin 0 -> 427 bytes quanta/data/toolbars/wml-1-2/tasks.toolbar.tgz | Bin 0 -> 648 bytes quanta/data/toolbars/wml-1-2/text.toolbar.tgz | Bin 0 -> 1005 bytes quanta/data/toolbars/xml/Makefile.am | 2 + quanta/data/toolbars/xml/fonts.toolbar.tgz | Bin 0 -> 949 bytes quanta/dialogs/Makefile.am | 18 + quanta/dialogs/actionconfigdialog.cpp | 933 ++++ quanta/dialogs/actionconfigdialog.h | 92 + quanta/dialogs/actionconfigdialogs.ui | 1001 ++++ quanta/dialogs/casewidget.ui | 108 + quanta/dialogs/copyto.cpp | 127 + quanta/dialogs/copyto.h | 53 + quanta/dialogs/debuggeroptionss.ui | 141 + quanta/dialogs/dirtydialog.ui | 154 + quanta/dialogs/dirtydlg.cpp | 112 + quanta/dialogs/dirtydlg.h | 55 + quanta/dialogs/donationdialog.ui | 155 + quanta/dialogs/dtdselectdialog.ui | 112 + quanta/dialogs/dtepeditdlg.cpp | 556 ++ quanta/dialogs/dtepeditdlg.h | 89 + quanta/dialogs/dtepeditdlgs.ui | 1967 +++++++ quanta/dialogs/dtepstructureeditdlgs.ui | 646 +++ quanta/dialogs/filecombo.cpp | 122 + quanta/dialogs/filecombo.h | 62 + quanta/dialogs/fourbuttonmessagebox.ui | 164 + quanta/dialogs/fourbuttonmessagebox.ui.h | 51 + quanta/dialogs/loadentitydlgs.ui | 72 + quanta/dialogs/settings/Makefile.am | 13 + quanta/dialogs/settings/abbreviation.cpp | 277 + quanta/dialogs/settings/abbreviation.h | 53 + quanta/dialogs/settings/abbreviations.ui | 354 ++ quanta/dialogs/settings/codetemplatedlgs.ui | 81 + quanta/dialogs/settings/filemasks.cpp | 67 + quanta/dialogs/settings/filemasks.h | 35 + quanta/dialogs/settings/filemaskss.ui | 336 ++ quanta/dialogs/settings/parseroptions.cpp | 86 + quanta/dialogs/settings/parseroptions.h | 37 + quanta/dialogs/settings/parseroptionsui.ui | 314 ++ quanta/dialogs/settings/previewoptions.cpp | 127 + quanta/dialogs/settings/previewoptions.h | 50 + quanta/dialogs/settings/previewoptionss.ui | 280 + quanta/dialogs/settings/styleoptionss.ui | 201 + quanta/dialogs/specialchardialog.cpp | 88 + quanta/dialogs/specialchardialog.h | 46 + quanta/dialogs/specialchardialogs.ui | 153 + quanta/dialogs/tagdialogs/Makefile.am | 18 + quanta/dialogs/tagdialogs/colorcombo.cpp | 313 ++ quanta/dialogs/tagdialogs/colorcombo.h | 85 + quanta/dialogs/tagdialogs/corewidgetdlg.cpp | 76 + quanta/dialogs/tagdialogs/listdlg.cpp | 60 + quanta/dialogs/tagdialogs/listdlg.h | 45 + quanta/dialogs/tagdialogs/pictureview.cpp | 103 + quanta/dialogs/tagdialogs/pictureview.h | 59 + quanta/dialogs/tagdialogs/tagattr.cpp | 97 + quanta/dialogs/tagdialogs/tagattr.h | 137 + quanta/dialogs/tagdialogs/tagdialog.cpp | 486 ++ quanta/dialogs/tagdialogs/tagdialog.h | 102 + quanta/dialogs/tagdialogs/tagimgdlg.cpp | 170 + quanta/dialogs/tagdialogs/tagimgdlg.h | 93 + quanta/dialogs/tagdialogs/tagimgdlgdata.cpp | 129 + quanta/dialogs/tagdialogs/tagmail.ui | 130 + quanta/dialogs/tagdialogs/tagmaildlg.cpp | 108 + quanta/dialogs/tagdialogs/tagmaildlg.h | 35 + quanta/dialogs/tagdialogs/tagmisc.ui | 68 + quanta/dialogs/tagdialogs/tagmiscdlg.cpp | 54 + quanta/dialogs/tagdialogs/tagmiscdlg.h | 42 + quanta/dialogs/tagdialogs/tagquicklistdlg.cpp | 41 + quanta/dialogs/tagdialogs/tagquicklistdlg.h | 54 + quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp | 63 + quanta/dialogs/tagdialogs/tagwidget.cpp | 119 + quanta/dialogs/tagdialogs/tagwidget.h | 56 + quanta/dialogs/tagdialogs/tagxml.cpp | 343 ++ quanta/dialogs/tagdialogs/tagxml.h | 56 + quanta/messages/Makefile.am | 13 + quanta/messages/annotationoutput.cpp | 355 ++ quanta/messages/annotationoutput.h | 90 + quanta/messages/messageitem.cpp | 92 + quanta/messages/messageitem.h | 54 + quanta/messages/messageoutput.cpp | 179 + quanta/messages/messageoutput.h | 90 + quanta/parsers/Makefile.am | 16 + quanta/parsers/dtd/Makefile.am | 11 + quanta/parsers/dtd/dtd.cpp | 415 ++ quanta/parsers/dtd/dtd.h | 64 + quanta/parsers/dtd/dtdparser.cpp | 362 ++ quanta/parsers/dtd/dtdparser.h | 55 + quanta/parsers/dtd/dtepcreationdlg.ui | 152 + quanta/parsers/node.cpp | 559 ++ quanta/parsers/node.h | 185 + quanta/parsers/parser.cpp | 1757 +++++++ quanta/parsers/parser.h | 160 + quanta/parsers/parsercommon.cpp | 256 + quanta/parsers/parsercommon.h | 59 + quanta/parsers/qtag.cpp | 260 + quanta/parsers/qtag.h | 283 + quanta/parsers/sagroupparser.cpp | 311 ++ quanta/parsers/sagroupparser.h | 63 + quanta/parsers/saparser.cpp | 986 ++++ quanta/parsers/saparser.h | 150 + quanta/parsers/tag.cpp | 672 +++ quanta/parsers/tag.h | 212 + quanta/parts/Makefile.am | 8 + quanta/parts/kafka/ChangeLog | 25 + quanta/parts/kafka/DESIGN | 131 + quanta/parts/kafka/Makefile.am | 25 + quanta/parts/kafka/configure.in.in | 42 + quanta/parts/kafka/cursors.cpp | 103 + quanta/parts/kafka/cursors.h | 150 + quanta/parts/kafka/domtreeview.cpp | 157 + quanta/parts/kafka/domtreeview.h | 77 + quanta/parts/kafka/entities | 112 + quanta/parts/kafka/htmldocumentproperties.cpp | 748 +++ quanta/parts/kafka/htmldocumentproperties.h | 91 + quanta/parts/kafka/htmldocumentpropertiesui.ui | 456 ++ quanta/parts/kafka/htmlenhancer.cpp | 392 ++ quanta/parts/kafka/htmlenhancer.h | 105 + quanta/parts/kafka/kafkacommon.cpp | 4257 ++++++++++++++++ quanta/parts/kafka/kafkacommon.h | 1177 +++++ quanta/parts/kafka/kafkadragobject.cpp | 90 + quanta/parts/kafka/kafkadragobject.h | 50 + quanta/parts/kafka/kafkahtmlpart.cpp | 2272 +++++++++ quanta/parts/kafka/kafkahtmlpart.h | 315 ++ quanta/parts/kafka/kafkaresource.h | 34 + quanta/parts/kafka/kafkasyncoptions.cpp | 85 + quanta/parts/kafka/kafkasyncoptions.h | 39 + quanta/parts/kafka/kafkasyncoptionsui.ui | 196 + quanta/parts/kafka/nodeenhancer.h | 76 + quanta/parts/kafka/nodeproperties.cpp | 37 + quanta/parts/kafka/nodeproperties.h | 154 + quanta/parts/kafka/pics/Makefile.am | 2 + quanta/parts/kafka/pics/comment.png | Bin 0 -> 278 bytes quanta/parts/kafka/pics/php.png | Bin 0 -> 1147 bytes quanta/parts/kafka/undoredo.cpp | 1539 ++++++ quanta/parts/kafka/undoredo.h | 453 ++ quanta/parts/kafka/wkafkapart.cpp | 2407 +++++++++ quanta/parts/kafka/wkafkapart.h | 473 ++ quanta/parts/preview/Makefile.am | 7 + quanta/parts/preview/whtmlpart.cpp | 189 + quanta/parts/preview/whtmlpart.h | 76 + quanta/plugins/Makefile.am | 15 + quanta/plugins/pluginconfig.ui | 270 + quanta/plugins/plugineditor.ui | 208 + quanta/plugins/quantaplugin.cpp | 395 ++ quanta/plugins/quantaplugin.h | 128 + quanta/plugins/quantapluginconfig.cpp | 94 + quanta/plugins/quantapluginconfig.h | 48 + quanta/plugins/quantaplugineditor.cpp | 240 + quanta/plugins/quantaplugineditor.h | 79 + quanta/plugins/quantaplugininterface.cpp | 271 + quanta/plugins/quantaplugininterface.h | 103 + quanta/project/Makefile.am | 26 + quanta/project/eventconfigurationdlg.cpp | 151 + quanta/project/eventconfigurationdlg.h | 50 + quanta/project/eventconfigurationdlgs.ui | 223 + quanta/project/eventeditordlg.cpp | 407 ++ quanta/project/eventeditordlg.h | 57 + quanta/project/eventeditordlgs.ui | 236 + quanta/project/membereditdlg.cpp | 183 + quanta/project/membereditdlg.h | 40 + quanta/project/membereditdlgs.ui | 196 + quanta/project/project.cpp | 1428 ++++++ quanta/project/project.h | 220 + quanta/project/projectlist.cpp | 187 + quanta/project/projectlist.h | 115 + quanta/project/projectnewfinal.cpp | 42 + quanta/project/projectnewfinal.h | 36 + quanta/project/projectnewfinals.ui | 296 ++ quanta/project/projectnewgeneral.cpp | 254 + quanta/project/projectnewgeneral.h | 58 + quanta/project/projectnewgenerals.ui | 454 ++ quanta/project/projectnewlocal.cpp | 361 ++ quanta/project/projectnewlocal.h | 57 + quanta/project/projectnewlocals.ui | 344 ++ quanta/project/projectnewweb.cpp | 245 + quanta/project/projectnewweb.h | 75 + quanta/project/projectnewwebs.ui | 292 ++ quanta/project/projectoptions.ui | 540 ++ quanta/project/projectoptions.ui.h | 52 + quanta/project/projectprivate.cpp | 1675 ++++++ quanta/project/projectprivate.h | 255 + quanta/project/projectupload.cpp | 819 +++ quanta/project/projectupload.h | 118 + quanta/project/projectuploads.ui | 497 ++ quanta/project/projecturl.h | 64 + quanta/project/rescanprj.cpp | 249 + quanta/project/rescanprj.h | 68 + quanta/project/rescanprjdir.ui | 255 + quanta/project/subprojecteditdlgs.ui | 73 + quanta/project/teammembersdlg.cpp | 263 + quanta/project/teammembersdlg.h | 52 + quanta/project/teammembersdlgs.ui | 249 + quanta/project/uploadprofiledlgs.ui | 310 ++ quanta/project/uploadprofiles.cpp | 120 + quanta/project/uploadprofiles.h | 108 + quanta/project/uploadprofilespage.ui | 125 + quanta/project/uploadprofilespage.ui.h | 31 + quanta/quanta.kdevelop | 338 ++ quanta/quanta.lsm | 14 + quanta/quanta_uml.xmi | 3425 +++++++++++++ quanta/scripts/Makefile.am | 17 + quanta/scripts/TemplateMagic.pl | 380 ++ quanta/scripts/TemplateMagic.pl.info | 14 + quanta/scripts/checkxml.kmdr | 286 ++ quanta/scripts/checkxml.kmdr.info | 14 + quanta/scripts/docbook_table.kmdr | 250 + quanta/scripts/dwt.kmdr | 192 + quanta/scripts/dwt.kmdr.info | 14 + quanta/scripts/dwt.pl | 409 ++ quanta/scripts/dwt.pl.info | 13 + quanta/scripts/externalpreview.sh | 22 + quanta/scripts/externalpreview.sh.info | 14 + quanta/scripts/gubed_install.kmdr | 295 ++ quanta/scripts/gubed_install.kmdr.info | 13 + quanta/scripts/htmlquickstart.kmdr | 987 ++++ quanta/scripts/htmlquickstart.kmdr.info | 14 + quanta/scripts/info.css | 13 + quanta/scripts/info.xsl | 73 + quanta/scripts/listwizard.kmdr | 441 ++ quanta/scripts/meinproc.kmdr | 284 ++ quanta/scripts/meinproc.kmdr.info | 14 + quanta/scripts/picturewizard.kmdr | 587 +++ quanta/scripts/scriptinfo.kmdr | 454 ++ quanta/scripts/scriptinfo.kmdr.info | 13 + quanta/scripts/tablewizard.kmdr | 449 ++ quanta/scripts/tidy.kmdr | 1078 ++++ quanta/scripts/tidy.kmdr.info | 9 + quanta/scripts/xmlval.kmdr | 499 ++ quanta/scripts/xmlval.kmdr.info | 14 + quanta/scripts/xsltproc.kmdr | 294 ++ quanta/scripts/xsltproc.kmdr.info | 14 + quanta/src/Makefile.am | 74 + quanta/src/dcopquanta.cpp | 113 + quanta/src/dcopquanta.h | 34 + quanta/src/dcopquantaif.h | 33 + quanta/src/dcopsettings.cpp | 51 + quanta/src/dcopsettings.h | 35 + quanta/src/dcopsettingsif.h | 34 + quanta/src/dcopwindowmanagerif.h | 46 + quanta/src/document.cpp | 3192 ++++++++++++ quanta/src/document.h | 352 ++ quanta/src/dtds.cpp | 1103 ++++ quanta/src/dtds.h | 238 + quanta/src/kqapp.cpp | 233 + quanta/src/kqapp.h | 79 + quanta/src/main.cpp | 217 + quanta/src/quanta.cpp | 5390 ++++++++++++++++++++ quanta/src/quanta.desktop | 95 + quanta/src/quanta.h | 664 +++ quanta/src/quanta_be.desktop | 94 + quanta/src/quanta_init.cpp | 1631 ++++++ quanta/src/quanta_init.h | 99 + quanta/src/quantadoc.cpp | 375 ++ quanta/src/quantadoc.h | 59 + quanta/src/quantaview.cpp | 1185 +++++ quanta/src/quantaview.h | 233 + quanta/src/viewmanager.cpp | 756 +++ quanta/src/viewmanager.h | 144 + quanta/src/x-webprj.desktop | 51 + quanta/treeviews/Makefile.am | 24 + quanta/treeviews/basetreeview.cpp | 1233 +++++ quanta/treeviews/basetreeview.h | 362 ++ quanta/treeviews/docfolder.cpp | 126 + quanta/treeviews/docfolder.h | 50 + quanta/treeviews/docitem.cpp | 52 + quanta/treeviews/docitem.h | 45 + quanta/treeviews/doctreeview.cpp | 194 + quanta/treeviews/doctreeview.h | 71 + quanta/treeviews/fileinfodlg.ui | 94 + quanta/treeviews/filestreeview.cpp | 334 ++ quanta/treeviews/filestreeview.h | 81 + quanta/treeviews/newtemplatedirdlg.cpp | 29 + quanta/treeviews/newtemplatedirdlg.h | 33 + quanta/treeviews/projecttreeview.cpp | 674 +++ quanta/treeviews/projecttreeview.h | 176 + quanta/treeviews/quantapropertiespage.ui | 247 + quanta/treeviews/scripttreeview.cpp | 425 ++ quanta/treeviews/scripttreeview.h | 220 + quanta/treeviews/servertreeview.cpp | 195 + quanta/treeviews/servertreeview.h | 92 + quanta/treeviews/structtreetag.cpp | 217 + quanta/treeviews/structtreetag.h | 45 + quanta/treeviews/structtreeview.cpp | 1071 ++++ quanta/treeviews/structtreeview.h | 176 + quanta/treeviews/tagattributeitems.cpp | 538 ++ quanta/treeviews/tagattributeitems.h | 178 + quanta/treeviews/tagattributetree.cpp | 659 +++ quanta/treeviews/tagattributetree.h | 143 + quanta/treeviews/templatedirform.ui | 170 + quanta/treeviews/templatestreeview.cpp | 1079 ++++ quanta/treeviews/templatestreeview.h | 162 + quanta/treeviews/uploadtreefile.cpp | 89 + quanta/treeviews/uploadtreefile.h | 53 + quanta/treeviews/uploadtreefolder.cpp | 116 + quanta/treeviews/uploadtreefolder.h | 57 + quanta/treeviews/uploadtreeview.cpp | 451 ++ quanta/treeviews/uploadtreeview.h | 60 + quanta/utility/Makefile.am | 20 + quanta/utility/myprocess.h | 36 + quanta/utility/newstuff.cpp | 144 + quanta/utility/newstuff.h | 121 + quanta/utility/qpevents.cpp | 403 ++ quanta/utility/qpevents.h | 90 + quanta/utility/quantabookmarks.cpp | 399 ++ quanta/utility/quantabookmarks.h | 99 + quanta/utility/quantacommon.cpp | 753 +++ quanta/utility/quantacommon.h | 225 + quanta/utility/quantanetaccess.cpp | 268 + quanta/utility/quantanetaccess.h | 86 + quanta/utility/resource.h | 59 + quanta/utility/tagaction.cpp | 1285 +++++ quanta/utility/tagaction.h | 137 + quanta/utility/tagactionmanager.cpp | 83 + quanta/utility/tagactionmanager.h | 74 + quanta/utility/tagactionset.cpp | 1172 +++++ quanta/utility/tagactionset.h | 161 + quanta/utility/toolbartabwidget.cpp | 351 ++ quanta/utility/toolbartabwidget.h | 111 + quanta/utility/toolbarxmlgui.cpp | 27 + quanta/utility/toolbarxmlgui.h | 32 + 1820 files changed, 186179 insertions(+) create mode 100644 quanta/AUTHORS create mode 100644 quanta/ChangeLog create mode 100644 quanta/DESIGN create mode 100644 quanta/HACKING create mode 100644 quanta/Makefile.am create mode 100644 quanta/NEWS create mode 100644 quanta/Quanta-3.3-plan.kno create mode 100644 quanta/README create mode 100644 quanta/TODO create mode 100644 quanta/VERSION create mode 100644 quanta/components/Makefile.am create mode 100644 quanta/components/csseditor/Makefile.am create mode 100644 quanta/components/csseditor/colorrequester.cpp create mode 100644 quanta/components/csseditor/colorrequester.h create mode 100644 quanta/components/csseditor/colorslider.cpp create mode 100644 quanta/components/csseditor/colorslider.h create mode 100644 quanta/components/csseditor/csseditor.cpp create mode 100644 quanta/components/csseditor/csseditor.h create mode 100644 quanta/components/csseditor/csseditor_globals.cpp create mode 100644 quanta/components/csseditor/csseditor_globals.h create mode 100644 quanta/components/csseditor/csseditors.ui create mode 100644 quanta/components/csseditor/cssselector.cpp create mode 100644 quanta/components/csseditor/cssselector.h create mode 100644 quanta/components/csseditor/cssselectors.ui create mode 100644 quanta/components/csseditor/cssshpropertyparser.cpp create mode 100644 quanta/components/csseditor/cssshpropertyparser.h create mode 100644 quanta/components/csseditor/data/Makefile.am create mode 100644 quanta/components/csseditor/data/atrules.xml create mode 100644 quanta/components/csseditor/data/config.xml create mode 100644 quanta/components/csseditor/data/dtdTags.xml create mode 100644 quanta/components/csseditor/data/pseudo.xml create mode 100644 quanta/components/csseditor/doubleeditors.cpp create mode 100644 quanta/components/csseditor/doubleeditors.h create mode 100644 quanta/components/csseditor/encodingselector.cpp create mode 100644 quanta/components/csseditor/encodingselector.h create mode 100644 quanta/components/csseditor/encodingselectors.ui create mode 100644 quanta/components/csseditor/fontfamilychooser.cpp create mode 100644 quanta/components/csseditor/fontfamilychooser.h create mode 100644 quanta/components/csseditor/fontfamilychoosers.ui create mode 100644 quanta/components/csseditor/minieditor.h create mode 100644 quanta/components/csseditor/percentageeditor.cpp create mode 100644 quanta/components/csseditor/percentageeditor.h create mode 100644 quanta/components/csseditor/propertysetter.cpp create mode 100644 quanta/components/csseditor/propertysetter.h create mode 100644 quanta/components/csseditor/qmyhighlighter.cpp create mode 100644 quanta/components/csseditor/qmyhighlighter.h create mode 100644 quanta/components/csseditor/shorthandformer.cpp create mode 100644 quanta/components/csseditor/shorthandformer.h create mode 100644 quanta/components/csseditor/specialsb.cpp create mode 100644 quanta/components/csseditor/specialsb.h create mode 100644 quanta/components/csseditor/styleeditor.cpp create mode 100644 quanta/components/csseditor/styleeditor.h create mode 100644 quanta/components/csseditor/stylesheetparser.cpp create mode 100644 quanta/components/csseditor/stylesheetparser.h create mode 100644 quanta/components/csseditor/tlpeditors.cpp create mode 100644 quanta/components/csseditor/tlpeditors.h create mode 100644 quanta/components/cvsservice/Makefile.am create mode 100644 quanta/components/cvsservice/cvscommitdlgs.ui create mode 100644 quanta/components/cvsservice/cvsservice.cpp create mode 100644 quanta/components/cvsservice/cvsservice.h create mode 100644 quanta/components/cvsservice/cvsservicedcopif.h create mode 100644 quanta/components/cvsservice/cvsupdatetodlgs.ui create mode 100644 quanta/components/debugger/Makefile.am create mode 100644 quanta/components/debugger/backtracelistview.cpp create mode 100644 quanta/components/debugger/backtracelistview.h create mode 100644 quanta/components/debugger/conditionalbreakpointdialog.cpp create mode 100644 quanta/components/debugger/conditionalbreakpointdialog.h create mode 100644 quanta/components/debugger/conditionalbreakpointdialogs.ui create mode 100644 quanta/components/debugger/dbgp/Makefile.am create mode 100644 quanta/components/debugger/dbgp/dbgpnetwork.cpp create mode 100644 quanta/components/debugger/dbgp/dbgpnetwork.h create mode 100644 quanta/components/debugger/dbgp/dbgpsettings.cpp create mode 100644 quanta/components/debugger/dbgp/dbgpsettings.h create mode 100644 quanta/components/debugger/dbgp/dbgpsettingss.ui create mode 100644 quanta/components/debugger/dbgp/qbytearrayfifo.cpp create mode 100644 quanta/components/debugger/dbgp/qbytearrayfifo.h create mode 100644 quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp create mode 100644 quanta/components/debugger/dbgp/quantadebuggerdbgp.desktop create mode 100644 quanta/components/debugger/dbgp/quantadebuggerdbgp.h create mode 100644 quanta/components/debugger/debuggerbreakpoint.cpp create mode 100644 quanta/components/debugger/debuggerbreakpoint.h create mode 100644 quanta/components/debugger/debuggerbreakpointlist.cpp create mode 100644 quanta/components/debugger/debuggerbreakpointlist.h create mode 100644 quanta/components/debugger/debuggerbreakpointview.cpp create mode 100644 quanta/components/debugger/debuggerbreakpointview.h create mode 100644 quanta/components/debugger/debuggermanager.cpp create mode 100644 quanta/components/debugger/debuggermanager.h create mode 100644 quanta/components/debugger/debuggerui.cpp create mode 100644 quanta/components/debugger/debuggerui.h create mode 100644 quanta/components/debugger/debuggervariable.cpp create mode 100644 quanta/components/debugger/debuggervariable.h create mode 100644 quanta/components/debugger/debuggervariablesets.ui create mode 100644 quanta/components/debugger/gubed/Makefile.am create mode 100644 quanta/components/debugger/gubed/gubedsettings.cpp create mode 100644 quanta/components/debugger/gubed/gubedsettings.h create mode 100644 quanta/components/debugger/gubed/gubedsettingss.ui create mode 100644 quanta/components/debugger/gubed/quantadebuggergubed.cpp create mode 100644 quanta/components/debugger/gubed/quantadebuggergubed.desktop create mode 100644 quanta/components/debugger/gubed/quantadebuggergubed.h create mode 100644 quanta/components/debugger/interfaces/Makefile.am create mode 100644 quanta/components/debugger/interfaces/debuggerclient.cpp create mode 100644 quanta/components/debugger/interfaces/debuggerclient.h create mode 100644 quanta/components/debugger/interfaces/debuggerinterface.cpp create mode 100644 quanta/components/debugger/interfaces/debuggerinterface.h create mode 100644 quanta/components/debugger/interfaces/quantadebugger.desktop create mode 100644 quanta/components/debugger/pathmapper.cpp create mode 100644 quanta/components/debugger/pathmapper.h create mode 100644 quanta/components/debugger/pathmapperdialog.cpp create mode 100644 quanta/components/debugger/pathmapperdialog.h create mode 100644 quanta/components/debugger/pathmapperdialogs.ui create mode 100644 quanta/components/debugger/quantadebuggerinterface.cpp create mode 100644 quanta/components/debugger/quantadebuggerinterface.h create mode 100644 quanta/components/debugger/variableslistview.cpp create mode 100644 quanta/components/debugger/variableslistview.h create mode 100644 quanta/components/framewizard/Makefile.am create mode 100644 quanta/components/framewizard/areaattributedb.cpp create mode 100644 quanta/components/framewizard/areaattributedb.h create mode 100644 quanta/components/framewizard/fmfpeditor.cpp create mode 100644 quanta/components/framewizard/fmfpeditor.h create mode 100644 quanta/components/framewizard/fmfpeditors.ui create mode 100644 quanta/components/framewizard/fmrceditor.cpp create mode 100644 quanta/components/framewizard/fmrceditor.h create mode 100644 quanta/components/framewizard/fmrceditors.ui create mode 100644 quanta/components/framewizard/framewizard.cpp create mode 100644 quanta/components/framewizard/framewizard.h create mode 100644 quanta/components/framewizard/framewizards.ui create mode 100644 quanta/components/framewizard/fwglobal.cpp create mode 100644 quanta/components/framewizard/fwglobal.h create mode 100644 quanta/components/framewizard/selectablearea.cpp create mode 100644 quanta/components/framewizard/selectablearea.h create mode 100644 quanta/components/framewizard/treenode.cpp create mode 100644 quanta/components/framewizard/treenode.h create mode 100644 quanta/components/framewizard/visualframeeditor.cpp create mode 100644 quanta/components/framewizard/visualframeeditor.h create mode 100644 quanta/components/tableeditor/Makefile.am create mode 100644 quanta/components/tableeditor/tableeditor.cpp create mode 100644 quanta/components/tableeditor/tableeditor.h create mode 100644 quanta/components/tableeditor/tableeditors.ui create mode 100644 quanta/components/tableeditor/tableitem.cpp create mode 100644 quanta/components/tableeditor/tableitem.h create mode 100644 quanta/data/Makefile.am create mode 100644 quanta/data/chars create mode 100644 quanta/data/config/Makefile.am create mode 100644 quanta/data/config/actions.rc create mode 100644 quanta/data/config/plugins.rc create mode 100644 quanta/data/config/quanta_preview_config.desktop create mode 100644 quanta/data/config/quantaui.rc create mode 100644 quanta/data/doc/Makefile.am create mode 100644 quanta/data/doc/README.FIRST create mode 100644 quanta/data/doc/aniquanta.gif create mode 100644 quanta/data/doc/background.png create mode 100644 quanta/data/doc/bgtable.png create mode 100644 quanta/data/doc/developer.html create mode 100644 quanta/data/doc/documentation.html create mode 100644 quanta/data/doc/faq.html create mode 100644 quanta/data/doc/focus.html create mode 100644 quanta/data/doc/head_bg.gif create mode 100644 quanta/data/doc/intro.html create mode 100644 quanta/data/doc/kdelogo2.png create mode 100644 quanta/data/doc/konq.css create mode 100644 quanta/data/doc/lines.png create mode 100644 quanta/data/doc/lines2.png create mode 100644 quanta/data/doc/maindoc.html create mode 100644 quanta/data/doc/minilogo.jpg create mode 100644 quanta/data/doc/minilogo.png create mode 100644 quanta/data/doc/more.png create mode 100644 quanta/data/doc/qcenter2.png create mode 100644 quanta/data/doc/quanta.css create mode 100644 quanta/data/doc/quanta.docrc create mode 100644 quanta/data/doc/quantahdr.png create mode 100644 quanta/data/doc/shadow1.png create mode 100644 quanta/data/doc/template.html create mode 100644 quanta/data/doc/templates.html create mode 100644 quanta/data/doc/tips.html create mode 100644 quanta/data/doc/webdev.png create mode 100644 quanta/data/dtep/Makefile.am create mode 100644 quanta/data/dtep/cffunct/Makefile.am create mode 100644 quanta/data/dtep/cffunct/abs.tag create mode 100644 quanta/data/dtep/cffunct/acos.tag create mode 100644 quanta/data/dtep/cffunct/acs.tag create mode 100644 quanta/data/dtep/cffunct/array.tag create mode 100644 quanta/data/dtep/cffunct/asin.tag create mode 100644 quanta/data/dtep/cffunct/atn.tag create mode 100644 quanta/data/dtep/cffunct/authenticatedcontext.tag create mode 100644 quanta/data/dtep/cffunct/authenticateduser.tag create mode 100644 quanta/data/dtep/cffunct/bitand.tag create mode 100644 quanta/data/dtep/cffunct/bitmaskclear.tag create mode 100644 quanta/data/dtep/cffunct/bitmaskread.tag create mode 100644 quanta/data/dtep/cffunct/bitmaskset.tag create mode 100644 quanta/data/dtep/cffunct/bitnot.tag create mode 100644 quanta/data/dtep/cffunct/bitor.tag create mode 100644 quanta/data/dtep/cffunct/bitshln.tag create mode 100644 quanta/data/dtep/cffunct/bitshrn.tag create mode 100644 quanta/data/dtep/cffunct/bitxor.tag create mode 100644 quanta/data/dtep/cffunct/ceiling.tag create mode 100644 quanta/data/dtep/cffunct/chr.tag create mode 100644 quanta/data/dtep/cffunct/cjustify.tag create mode 100644 quanta/data/dtep/cffunct/compare.tag create mode 100644 quanta/data/dtep/cffunct/comparenocase.tag create mode 100644 quanta/data/dtep/cffunct/cos.tag create mode 100644 quanta/data/dtep/cffunct/createobject.tag create mode 100644 quanta/data/dtep/cffunct/createuuid.tag create mode 100644 quanta/data/dtep/cffunct/datetime.tag create mode 100644 quanta/data/dtep/cffunct/de.tag create mode 100644 quanta/data/dtep/cffunct/decimalformat.tag create mode 100644 quanta/data/dtep/cffunct/decrementvalue.tag create mode 100644 quanta/data/dtep/cffunct/decrypt.tag create mode 100644 quanta/data/dtep/cffunct/deleteclientvariable.tag create mode 100644 quanta/data/dtep/cffunct/description.rc create mode 100644 quanta/data/dtep/cffunct/directoryexists.tag create mode 100644 quanta/data/dtep/cffunct/dollarformat.tag create mode 100644 quanta/data/dtep/cffunct/duplicate.tag create mode 100644 quanta/data/dtep/cffunct/encrypt.tag create mode 100644 quanta/data/dtep/cffunct/evaluate.tag create mode 100644 quanta/data/dtep/cffunct/exp.tag create mode 100644 quanta/data/dtep/cffunct/expandpath.tag create mode 100644 quanta/data/dtep/cffunct/fileexists.tag create mode 100644 quanta/data/dtep/cffunct/find.tag create mode 100644 quanta/data/dtep/cffunct/fix.tag create mode 100644 quanta/data/dtep/cffunct/formatbasen.tag create mode 100644 quanta/data/dtep/cffunct/getbasetagdata.tag create mode 100644 quanta/data/dtep/cffunct/getbasetaglist.tag create mode 100644 quanta/data/dtep/cffunct/getbasetemplatepath.tag create mode 100644 quanta/data/dtep/cffunct/getclientvariableslist.tag create mode 100644 quanta/data/dtep/cffunct/getcurrenttemplatepath.tag create mode 100644 quanta/data/dtep/cffunct/getdirectoryfrompath.tag create mode 100644 quanta/data/dtep/cffunct/getexception.tag create mode 100644 quanta/data/dtep/cffunct/getfilefrompath.tag create mode 100644 quanta/data/dtep/cffunct/getfunctionlist.tag create mode 100644 quanta/data/dtep/cffunct/gethttprequestdata.tag create mode 100644 quanta/data/dtep/cffunct/gethttptimestring.tag create mode 100644 quanta/data/dtep/cffunct/getlocale.tag create mode 100644 quanta/data/dtep/cffunct/getmetricdata.tag create mode 100644 quanta/data/dtep/cffunct/getprofilestring.tag create mode 100644 quanta/data/dtep/cffunct/gettempdirectory.tag create mode 100644 quanta/data/dtep/cffunct/gettempfile.tag create mode 100644 quanta/data/dtep/cffunct/gettemplatepath.tag create mode 100644 quanta/data/dtep/cffunct/gettickcount.tag create mode 100644 quanta/data/dtep/cffunct/gettoken.tag create mode 100644 quanta/data/dtep/cffunct/hash.tag create mode 100644 quanta/data/dtep/cffunct/htmlcodeformat.tag create mode 100644 quanta/data/dtep/cffunct/htmleditformat.tag create mode 100644 quanta/data/dtep/cffunct/iif.tag create mode 100644 quanta/data/dtep/cffunct/incrementvalue.tag create mode 100644 quanta/data/dtep/cffunct/inputbasen.tag create mode 100644 quanta/data/dtep/cffunct/insert.tag create mode 100644 quanta/data/dtep/cffunct/int.tag create mode 100644 quanta/data/dtep/cffunct/isarray.tag create mode 100644 quanta/data/dtep/cffunct/isauthenticated.tag create mode 100644 quanta/data/dtep/cfml/Makefile.am create mode 100644 quanta/data/dtep/cfml/cfabort.tag create mode 100644 quanta/data/dtep/cfml/cfapplet.tag create mode 100644 quanta/data/dtep/cfml/cfapplication.tag create mode 100644 quanta/data/dtep/cfml/cfargument.tag create mode 100644 quanta/data/dtep/cfml/cfassociate.tag create mode 100644 quanta/data/dtep/cfml/cfauthenticate.tag create mode 100644 quanta/data/dtep/cfml/cfbreak.tag create mode 100644 quanta/data/dtep/cfml/cfcache.tag create mode 100644 quanta/data/dtep/cfml/cfcase.tag create mode 100644 quanta/data/dtep/cfml/cfcatch.tag create mode 100644 quanta/data/dtep/cfml/cfchart.tag create mode 100644 quanta/data/dtep/cfml/cfchartdata.tag create mode 100644 quanta/data/dtep/cfml/cfchartseries.tag create mode 100644 quanta/data/dtep/cfml/cfcol.tag create mode 100644 quanta/data/dtep/cfml/cfcollection.tag create mode 100644 quanta/data/dtep/cfml/cfcomponent.tag create mode 100644 quanta/data/dtep/cfml/cfcontent.tag create mode 100644 quanta/data/dtep/cfml/cfcookie.tag create mode 100644 quanta/data/dtep/cfml/cfdirectory.tag create mode 100644 quanta/data/dtep/cfml/cfdump.tag create mode 100644 quanta/data/dtep/cfml/cferror.tag create mode 100644 quanta/data/dtep/cfml/cfexecute.tag create mode 100644 quanta/data/dtep/cfml/cfexit.tag create mode 100644 quanta/data/dtep/cfml/cffile.tag create mode 100644 quanta/data/dtep/cfml/cfflush.tag create mode 100644 quanta/data/dtep/cfml/cfform.tag create mode 100644 quanta/data/dtep/cfml/cfftp.tag create mode 100644 quanta/data/dtep/cfml/cffunction.tag create mode 100644 quanta/data/dtep/cfml/cfgrid.tag create mode 100644 quanta/data/dtep/cfml/cfgridcolumn.tag create mode 100644 quanta/data/dtep/cfml/cfgridrow.tag create mode 100644 quanta/data/dtep/cfml/cfgridupdate.tag create mode 100644 quanta/data/dtep/cfml/cfheader.tag create mode 100644 quanta/data/dtep/cfml/cfhtmlhead.tag create mode 100644 quanta/data/dtep/cfml/cfhttp.tag create mode 100644 quanta/data/dtep/cfml/cfhttpparam.tag create mode 100644 quanta/data/dtep/cfml/cfimport.tag create mode 100644 quanta/data/dtep/cfml/cfinclude.tag create mode 100644 quanta/data/dtep/cfml/cfindex.tag create mode 100644 quanta/data/dtep/cfml/cfinput.tag create mode 100644 quanta/data/dtep/cfml/cfinsert.tag create mode 100644 quanta/data/dtep/cfml/cfinvoke.tag create mode 100644 quanta/data/dtep/cfml/cfinvokeargument.tag create mode 100644 quanta/data/dtep/cfml/cfldap.tag create mode 100644 quanta/data/dtep/cfml/cflocation.tag create mode 100644 quanta/data/dtep/cfml/cflock.tag create mode 100644 quanta/data/dtep/cfml/cflog.tag create mode 100644 quanta/data/dtep/cfml/cflogin.tag create mode 100644 quanta/data/dtep/cfml/cfloginuser.tag create mode 100644 quanta/data/dtep/cfml/cfloop.tag create mode 100644 quanta/data/dtep/cfml/cfmail.tag create mode 100644 quanta/data/dtep/cfml/cfmailparam.tag create mode 100644 quanta/data/dtep/cfml/cfmodule.tag create mode 100644 quanta/data/dtep/cfml/cfobject.tag create mode 100644 quanta/data/dtep/cfml/cfobjectcache.tag create mode 100644 quanta/data/dtep/cfml/cfoutput.tag create mode 100644 quanta/data/dtep/cfml/cfparam.tag create mode 100644 quanta/data/dtep/cfml/cfpop.tag create mode 100644 quanta/data/dtep/cfml/cfprocessingdirective.tag create mode 100644 quanta/data/dtep/cfml/cfprocparam.tag create mode 100644 quanta/data/dtep/cfml/cfprocresult.tag create mode 100644 quanta/data/dtep/cfml/cfproperty.tag create mode 100644 quanta/data/dtep/cfml/cfquery.tag create mode 100644 quanta/data/dtep/cfml/cfqueryparam.tag create mode 100644 quanta/data/dtep/cfml/cfregistry.tag create mode 100644 quanta/data/dtep/cfml/cfreport.tag create mode 100644 quanta/data/dtep/cfml/cfsavecontent.tag create mode 100644 quanta/data/dtep/cfml/cfschedule.tag create mode 100644 quanta/data/dtep/cfml/cfsearch.tag create mode 100644 quanta/data/dtep/cfml/cfselect.tag create mode 100644 quanta/data/dtep/cfml/cfsetting.tag create mode 100644 quanta/data/dtep/cfml/cfslider.tag create mode 100644 quanta/data/dtep/cfml/cfstoredproc.tag create mode 100644 quanta/data/dtep/cfml/cfswitch.tag create mode 100644 quanta/data/dtep/cfml/cftable.tag create mode 100644 quanta/data/dtep/cfml/cftextinput.tag create mode 100644 quanta/data/dtep/cfml/cfthrow.tag create mode 100644 quanta/data/dtep/cfml/cftrace.tag create mode 100644 quanta/data/dtep/cfml/cftransaction.tag create mode 100644 quanta/data/dtep/cfml/cftree.tag create mode 100644 quanta/data/dtep/cfml/cftreeitem.tag create mode 100644 quanta/data/dtep/cfml/cfupdate.tag create mode 100644 quanta/data/dtep/cfml/cfusion.tag create mode 100644 quanta/data/dtep/cfml/cfwddx.tag create mode 100644 quanta/data/dtep/cfml/cfxml.tag create mode 100644 quanta/data/dtep/cfml/description.rc create mode 100644 quanta/data/dtep/cfml/ftp.tag create mode 100644 quanta/data/dtep/cfml/test.cfm create mode 100644 quanta/data/dtep/css/Makefile.am create mode 100644 quanta/data/dtep/css/background.tag create mode 100644 quanta/data/dtep/css/border-bottom-color.tag create mode 100644 quanta/data/dtep/css/border-bottom-style.tag create mode 100644 quanta/data/dtep/css/border-bottom-width.tag create mode 100644 quanta/data/dtep/css/border-bottom.tag create mode 100644 quanta/data/dtep/css/border-collapse.tag create mode 100644 quanta/data/dtep/css/border-color.tag create mode 100644 quanta/data/dtep/css/border-left-color.tag create mode 100644 quanta/data/dtep/css/border-left-style.tag create mode 100644 quanta/data/dtep/css/border-left-width.tag create mode 100644 quanta/data/dtep/css/border-left.tag create mode 100644 quanta/data/dtep/css/border-right-color.tag create mode 100644 quanta/data/dtep/css/border-right-style.tag create mode 100644 quanta/data/dtep/css/border-right-width.tag create mode 100644 quanta/data/dtep/css/border-right.tag create mode 100644 quanta/data/dtep/css/border-spacing.tag create mode 100644 quanta/data/dtep/css/border-top-color.tag create mode 100644 quanta/data/dtep/css/border-top-style.tag create mode 100644 quanta/data/dtep/css/border-top-width.tag create mode 100644 quanta/data/dtep/css/border-top.tag create mode 100644 quanta/data/dtep/css/border.tag create mode 100644 quanta/data/dtep/css/bottom.tag create mode 100644 quanta/data/dtep/css/caption-side.tag create mode 100644 quanta/data/dtep/css/clear.tag create mode 100644 quanta/data/dtep/css/clip.tag create mode 100644 quanta/data/dtep/css/color.tag create mode 100644 quanta/data/dtep/css/content.tag create mode 100644 quanta/data/dtep/css/counter-increment.tag create mode 100644 quanta/data/dtep/css/counter-reset.tag create mode 100644 quanta/data/dtep/css/cursor.tag create mode 100644 quanta/data/dtep/css/description.rc create mode 100644 quanta/data/dtep/css/direction.tag create mode 100644 quanta/data/dtep/css/display.tag create mode 100644 quanta/data/dtep/css/empty-cells.tag create mode 100644 quanta/data/dtep/css/float.tag create mode 100644 quanta/data/dtep/css/font-size-adjust.tag create mode 100644 quanta/data/dtep/css/font-stretch.tag create mode 100644 quanta/data/dtep/css/font.tag create mode 100644 quanta/data/dtep/css/height.tag create mode 100644 quanta/data/dtep/css/left.tag create mode 100644 quanta/data/dtep/css/letter-spacing.tag create mode 100644 quanta/data/dtep/css/line-height.tag create mode 100644 quanta/data/dtep/css/list-style.tag create mode 100644 quanta/data/dtep/css/margin-bottom.tag create mode 100644 quanta/data/dtep/css/margin-left.tag create mode 100644 quanta/data/dtep/css/margin-right.tag create mode 100644 quanta/data/dtep/css/margin-top.tag create mode 100644 quanta/data/dtep/css/margin.tag create mode 100644 quanta/data/dtep/css/marker-offset.tag create mode 100644 quanta/data/dtep/css/max-height.tag create mode 100644 quanta/data/dtep/css/max-width.tag create mode 100644 quanta/data/dtep/css/min-height.tag create mode 100644 quanta/data/dtep/css/min-width.tag create mode 100644 quanta/data/dtep/css/outline.tag create mode 100644 quanta/data/dtep/css/overflow.tag create mode 100644 quanta/data/dtep/css/padding-bottom.tag create mode 100644 quanta/data/dtep/css/padding-left.tag create mode 100644 quanta/data/dtep/css/padding-right.tag create mode 100644 quanta/data/dtep/css/padding-top.tag create mode 100644 quanta/data/dtep/css/padding.tag create mode 100644 quanta/data/dtep/css/position.tag create mode 100644 quanta/data/dtep/css/quotes.tag create mode 100644 quanta/data/dtep/css/right.tag create mode 100644 quanta/data/dtep/css/table-layout.tag create mode 100644 quanta/data/dtep/css/text-align.tag create mode 100644 quanta/data/dtep/css/text-decoration.tag create mode 100644 quanta/data/dtep/css/text-indent.tag create mode 100644 quanta/data/dtep/css/text-shadow.tag create mode 100644 quanta/data/dtep/css/text-transform.tag create mode 100644 quanta/data/dtep/css/top.tag create mode 100644 quanta/data/dtep/css/unicode-bidi.tag create mode 100644 quanta/data/dtep/css/vertical-align.tag create mode 100644 quanta/data/dtep/css/visibility.tag create mode 100644 quanta/data/dtep/css/white-space.tag create mode 100644 quanta/data/dtep/css/width.tag create mode 100644 quanta/data/dtep/css/word-spacing.tag create mode 100644 quanta/data/dtep/css/z-index.tag create mode 100644 quanta/data/dtep/docbook-4.2/Makefile.am create mode 100644 quanta/data/dtep/docbook-4.2/a.tag create mode 100644 quanta/data/dtep/docbook-4.2/b.tag create mode 100644 quanta/data/dtep/docbook-4.2/c.tag create mode 100644 quanta/data/dtep/docbook-4.2/common.tag create mode 100644 quanta/data/dtep/docbook-4.2/d.tag create mode 100644 quanta/data/dtep/docbook-4.2/description.rc create mode 100644 quanta/data/dtep/docbook-4.2/e.tag create mode 100644 quanta/data/dtep/docbook-4.2/f.tag create mode 100644 quanta/data/dtep/docbook-4.2/g.tag create mode 100644 quanta/data/dtep/docbook-4.2/h.tag create mode 100644 quanta/data/dtep/docbook-4.2/i.tag create mode 100644 quanta/data/dtep/docbook-4.2/j.tag create mode 100644 quanta/data/dtep/docbook-4.2/k.tag create mode 100644 quanta/data/dtep/docbook-4.2/l.tag create mode 100644 quanta/data/dtep/docbook-4.2/m.tag create mode 100644 quanta/data/dtep/docbook-4.2/n.tag create mode 100644 quanta/data/dtep/docbook-4.2/o.tag create mode 100644 quanta/data/dtep/docbook-4.2/p.tag create mode 100644 quanta/data/dtep/docbook-4.2/q.tag create mode 100644 quanta/data/dtep/docbook-4.2/r.tag create mode 100644 quanta/data/dtep/docbook-4.2/s.tag create mode 100644 quanta/data/dtep/docbook-4.2/t.tag create mode 100644 quanta/data/dtep/docbook-4.2/u.tag create mode 100644 quanta/data/dtep/docbook-4.2/v.tag create mode 100644 quanta/data/dtep/docbook-4.2/w.tag create mode 100644 quanta/data/dtep/docbook-4.2/x.tag create mode 100644 quanta/data/dtep/docbook-4.2/y.tag create mode 100644 quanta/data/dtep/dtd-description.txt create mode 100644 quanta/data/dtep/dtd/Makefile.am create mode 100644 quanta/data/dtep/dtd/description.rc create mode 100644 quanta/data/dtep/empty/Makefile.am create mode 100644 quanta/data/dtep/empty/description.rc create mode 100644 quanta/data/dtep/html-frameset/Makefile.am create mode 100644 quanta/data/dtep/html-frameset/basefont.tag create mode 100644 quanta/data/dtep/html-frameset/common.tag create mode 100644 quanta/data/dtep/html-frameset/description.rc create mode 100644 quanta/data/dtep/html-frameset/font.tag create mode 100644 quanta/data/dtep/html-frameset/frame.tag create mode 100644 quanta/data/dtep/html-frameset/frameset.tag create mode 100644 quanta/data/dtep/html-frameset/isindex.tag create mode 100644 quanta/data/dtep/html-strict/Makefile.am create mode 100644 quanta/data/dtep/html-strict/a.tag create mode 100644 quanta/data/dtep/html-strict/b.tag create mode 100644 quanta/data/dtep/html-strict/c.tag create mode 100644 quanta/data/dtep/html-strict/common.tag create mode 100644 quanta/data/dtep/html-strict/d.tag create mode 100644 quanta/data/dtep/html-strict/description.rc create mode 100644 quanta/data/dtep/html-strict/e.tag create mode 100644 quanta/data/dtep/html-strict/f.tag create mode 100644 quanta/data/dtep/html-strict/h.tag create mode 100644 quanta/data/dtep/html-strict/i.tag create mode 100644 quanta/data/dtep/html-strict/k.tag create mode 100644 quanta/data/dtep/html-strict/l.tag create mode 100644 quanta/data/dtep/html-strict/m.tag create mode 100644 quanta/data/dtep/html-strict/n.tag create mode 100644 quanta/data/dtep/html-strict/o.tag create mode 100644 quanta/data/dtep/html-strict/p.tag create mode 100644 quanta/data/dtep/html-strict/q.tag create mode 100644 quanta/data/dtep/html-strict/s.tag create mode 100644 quanta/data/dtep/html-strict/t.tag create mode 100644 quanta/data/dtep/html-strict/u.tag create mode 100644 quanta/data/dtep/html-strict/v.tag create mode 100644 quanta/data/dtep/html/Makefile.am create mode 100644 quanta/data/dtep/html/a.tag create mode 100644 quanta/data/dtep/html/b.tag create mode 100644 quanta/data/dtep/html/c.tag create mode 100644 quanta/data/dtep/html/common.tag create mode 100644 quanta/data/dtep/html/d.tag create mode 100644 quanta/data/dtep/html/description.rc create mode 100644 quanta/data/dtep/html/e.tag create mode 100644 quanta/data/dtep/html/f.tag create mode 100644 quanta/data/dtep/html/h.tag create mode 100644 quanta/data/dtep/html/i.tag create mode 100644 quanta/data/dtep/html/k.tag create mode 100644 quanta/data/dtep/html/l.tag create mode 100644 quanta/data/dtep/html/m.tag create mode 100644 quanta/data/dtep/html/n.tag create mode 100644 quanta/data/dtep/html/o.tag create mode 100644 quanta/data/dtep/html/p.tag create mode 100644 quanta/data/dtep/html/q.tag create mode 100644 quanta/data/dtep/html/s.tag create mode 100644 quanta/data/dtep/html/strong.tag create mode 100644 quanta/data/dtep/html/t.tag create mode 100644 quanta/data/dtep/html/u.tag create mode 100644 quanta/data/dtep/html/v.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/Makefile.am create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/a.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/b.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/c.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/common.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/d.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/description.rc create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/e.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/f.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/g.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/h.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/i.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/k.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/l.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/m.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/n.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/o.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/p.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/q.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/r.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/s.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/t.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/u.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/v.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/w.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/x.tag create mode 100644 quanta/data/dtep/kde-docbook-4.1.2/y.tag create mode 100644 quanta/data/dtep/kde-docbook-4.2/Makefile.am create mode 100644 quanta/data/dtep/kde-docbook-4.2/common.tag create mode 100644 quanta/data/dtep/kde-docbook-4.2/description.rc create mode 100644 quanta/data/dtep/php/Makefile.am create mode 100644 quanta/data/dtep/php/apache.tag create mode 100644 quanta/data/dtep/php/apd.tag create mode 100644 quanta/data/dtep/php/array.tag create mode 100644 quanta/data/dtep/php/aspell.tag create mode 100644 quanta/data/dtep/php/bc.tag create mode 100644 quanta/data/dtep/php/bcompiler.tag create mode 100644 quanta/data/dtep/php/bzip2.tag create mode 100644 quanta/data/dtep/php/calendar.tag create mode 100644 quanta/data/dtep/php/ccvs.tag create mode 100644 quanta/data/dtep/php/classkit.tag create mode 100644 quanta/data/dtep/php/classobj.tag create mode 100644 quanta/data/dtep/php/com.tag create mode 100644 quanta/data/dtep/php/cpdf.tag create mode 100644 quanta/data/dtep/php/crack.tag create mode 100644 quanta/data/dtep/php/ctype.tag create mode 100644 quanta/data/dtep/php/curl.tag create mode 100644 quanta/data/dtep/php/cybercash.tag create mode 100644 quanta/data/dtep/php/cybermut.tag create mode 100644 quanta/data/dtep/php/cyrus.tag create mode 100644 quanta/data/dtep/php/datetime.tag create mode 100644 quanta/data/dtep/php/dba.tag create mode 100644 quanta/data/dtep/php/dbase.tag create mode 100644 quanta/data/dtep/php/dbm.tag create mode 100644 quanta/data/dtep/php/dbplus.tag create mode 100644 quanta/data/dtep/php/dbx.tag create mode 100644 quanta/data/dtep/php/description.rc create mode 100644 quanta/data/dtep/php/dio.tag create mode 100644 quanta/data/dtep/php/dir.tag create mode 100644 quanta/data/dtep/php/dom.tag create mode 100644 quanta/data/dtep/php/domxml.tag create mode 100644 quanta/data/dtep/php/dotnet.tag create mode 100644 quanta/data/dtep/php/errorfunc.tag create mode 100644 quanta/data/dtep/php/exec.tag create mode 100644 quanta/data/dtep/php/exif.tag create mode 100644 quanta/data/dtep/php/fam.tag create mode 100644 quanta/data/dtep/php/fbsql.tag create mode 100644 quanta/data/dtep/php/fdf.tag create mode 100644 quanta/data/dtep/php/filepro.tag create mode 100644 quanta/data/dtep/php/filesystem.tag create mode 100644 quanta/data/dtep/php/fribidi.tag create mode 100644 quanta/data/dtep/php/ftp.tag create mode 100644 quanta/data/dtep/php/funchand.tag create mode 100644 quanta/data/dtep/php/gettext.tag create mode 100644 quanta/data/dtep/php/gmp.tag create mode 100644 quanta/data/dtep/php/http.tag create mode 100644 quanta/data/dtep/php/hw.tag create mode 100644 quanta/data/dtep/php/hwapi.tag create mode 100644 quanta/data/dtep/php/hyperwave.tag create mode 100644 quanta/data/dtep/php/ibase.tag create mode 100644 quanta/data/dtep/php/icap.tag create mode 100644 quanta/data/dtep/php/iconv.tag create mode 100644 quanta/data/dtep/php/id3.tag create mode 100644 quanta/data/dtep/php/ifx.tag create mode 100644 quanta/data/dtep/php/iisfunc.tag create mode 100644 quanta/data/dtep/php/image.tag create mode 100644 quanta/data/dtep/php/imap.tag create mode 100644 quanta/data/dtep/php/includes.tag create mode 100644 quanta/data/dtep/php/info.tag create mode 100644 quanta/data/dtep/php/ingres-ii.tag create mode 100644 quanta/data/dtep/php/ircg.tag create mode 100644 quanta/data/dtep/php/java.tag create mode 100644 quanta/data/dtep/php/ldap.tag create mode 100644 quanta/data/dtep/php/lzf.tag create mode 100644 quanta/data/dtep/php/mail.tag create mode 100644 quanta/data/dtep/php/mailparse.tag create mode 100644 quanta/data/dtep/php/math.tag create mode 100644 quanta/data/dtep/php/mbstring.tag create mode 100644 quanta/data/dtep/php/mcal.tag create mode 100644 quanta/data/dtep/php/mcrypt.tag create mode 100644 quanta/data/dtep/php/mcve.tag create mode 100644 quanta/data/dtep/php/memcache.tag create mode 100644 quanta/data/dtep/php/mhash.tag create mode 100644 quanta/data/dtep/php/mime_magic.tag create mode 100644 quanta/data/dtep/php/ming.tag create mode 100644 quanta/data/dtep/php/misc.tag create mode 100644 quanta/data/dtep/php/mnogosearch.tag create mode 100644 quanta/data/dtep/php/msession.tag create mode 100644 quanta/data/dtep/php/msql.tag create mode 100644 quanta/data/dtep/php/mssql.tag create mode 100644 quanta/data/dtep/php/muscat.tag create mode 100644 quanta/data/dtep/php/mysql.tag create mode 100644 quanta/data/dtep/php/mysqli.tag create mode 100644 quanta/data/dtep/php/ncurses.tag create mode 100644 quanta/data/dtep/php/network.tag create mode 100644 quanta/data/dtep/php/nis.tag create mode 100644 quanta/data/dtep/php/notes.tag create mode 100644 quanta/data/dtep/php/nsapi.tag create mode 100644 quanta/data/dtep/php/objaggregation.tag create mode 100644 quanta/data/dtep/php/oci8.tag create mode 100644 quanta/data/dtep/php/odbc.tag create mode 100644 quanta/data/dtep/php/openal.tag create mode 100644 quanta/data/dtep/php/openssl.tag create mode 100644 quanta/data/dtep/php/oracle.tag create mode 100644 quanta/data/dtep/php/outcontrol.tag create mode 100644 quanta/data/dtep/php/overload.tag create mode 100644 quanta/data/dtep/php/ovrimos.tag create mode 100644 quanta/data/dtep/php/parsekit.tag create mode 100644 quanta/data/dtep/php/pcntl.tag create mode 100644 quanta/data/dtep/php/pcre.tag create mode 100644 quanta/data/dtep/php/pdf.tag create mode 100644 quanta/data/dtep/php/pfpro.tag create mode 100644 quanta/data/dtep/php/pgsql.tag create mode 100644 quanta/data/dtep/php/posix.tag create mode 100644 quanta/data/dtep/php/printer.tag create mode 100644 quanta/data/dtep/php/pspell.tag create mode 100644 quanta/data/dtep/php/qtdom.tag create mode 100644 quanta/data/dtep/php/rar.tag create mode 100644 quanta/data/dtep/php/readline.tag create mode 100644 quanta/data/dtep/php/recode.tag create mode 100644 quanta/data/dtep/php/regex.tag create mode 100644 quanta/data/dtep/php/sem.tag create mode 100644 quanta/data/dtep/php/sesam.tag create mode 100644 quanta/data/dtep/php/session.tag create mode 100644 quanta/data/dtep/php/shmop.tag create mode 100644 quanta/data/dtep/php/simplexml.tag create mode 100644 quanta/data/dtep/php/snmp.tag create mode 100644 quanta/data/dtep/php/soap.tag create mode 100644 quanta/data/dtep/php/sockets.tag create mode 100644 quanta/data/dtep/php/spl.tag create mode 100644 quanta/data/dtep/php/sqlite.tag create mode 100644 quanta/data/dtep/php/stream.tag create mode 100644 quanta/data/dtep/php/strings.tag create mode 100644 quanta/data/dtep/php/swf.tag create mode 100644 quanta/data/dtep/php/sybase.tag create mode 100644 quanta/data/dtep/php/tcpwrap.tag create mode 100644 quanta/data/dtep/php/tidy.tag create mode 100644 quanta/data/dtep/php/tokenizer.tag create mode 100644 quanta/data/dtep/php/uodbc.tag create mode 100644 quanta/data/dtep/php/url.tag create mode 100644 quanta/data/dtep/php/var.tag create mode 100644 quanta/data/dtep/php/vpopmail.tag create mode 100644 quanta/data/dtep/php/w32api.tag create mode 100644 quanta/data/dtep/php/wddx.tag create mode 100644 quanta/data/dtep/php/xattr.tag create mode 100644 quanta/data/dtep/php/xdiff.tag create mode 100644 quanta/data/dtep/php/xml.tag create mode 100644 quanta/data/dtep/php/xmlrpc.tag create mode 100644 quanta/data/dtep/php/xsl.tag create mode 100644 quanta/data/dtep/php/xslt.tag create mode 100644 quanta/data/dtep/php/yaz.tag create mode 100644 quanta/data/dtep/php/zip.tag create mode 100644 quanta/data/dtep/php/zlib.tag create mode 100644 quanta/data/dtep/relaxng/Makefile.am create mode 100644 quanta/data/dtep/relaxng/anyName.tag create mode 100644 quanta/data/dtep/relaxng/attribute.tag create mode 100644 quanta/data/dtep/relaxng/choice.tag create mode 100644 quanta/data/dtep/relaxng/data.tag create mode 100644 quanta/data/dtep/relaxng/define.tag create mode 100644 quanta/data/dtep/relaxng/description.rc create mode 100644 quanta/data/dtep/relaxng/div.tag create mode 100644 quanta/data/dtep/relaxng/element.tag create mode 100644 quanta/data/dtep/relaxng/empty.tag create mode 100644 quanta/data/dtep/relaxng/except.tag create mode 100644 quanta/data/dtep/relaxng/externalRef.tag create mode 100644 quanta/data/dtep/relaxng/grammar.tag create mode 100644 quanta/data/dtep/relaxng/group.tag create mode 100644 quanta/data/dtep/relaxng/include.tag create mode 100644 quanta/data/dtep/relaxng/interleave.tag create mode 100644 quanta/data/dtep/relaxng/list.tag create mode 100644 quanta/data/dtep/relaxng/mixed.tag create mode 100644 quanta/data/dtep/relaxng/name.tag create mode 100644 quanta/data/dtep/relaxng/notAllowed.tag create mode 100644 quanta/data/dtep/relaxng/nsName.tag create mode 100644 quanta/data/dtep/relaxng/oneOrMore.tag create mode 100644 quanta/data/dtep/relaxng/optional.tag create mode 100644 quanta/data/dtep/relaxng/param.tag create mode 100644 quanta/data/dtep/relaxng/parentRef.tag create mode 100644 quanta/data/dtep/relaxng/ref.tag create mode 100644 quanta/data/dtep/relaxng/start.tag create mode 100644 quanta/data/dtep/relaxng/text.tag create mode 100644 quanta/data/dtep/relaxng/value.tag create mode 100644 quanta/data/dtep/relaxng/zeroOrMore.tag create mode 100644 quanta/data/dtep/schema/Makefile.am create mode 100644 quanta/data/dtep/schema/all.tag create mode 100644 quanta/data/dtep/schema/annotation.tag create mode 100644 quanta/data/dtep/schema/any.tag create mode 100644 quanta/data/dtep/schema/anyAttribute.tag create mode 100644 quanta/data/dtep/schema/appInfo.tag create mode 100644 quanta/data/dtep/schema/attribute.tag create mode 100644 quanta/data/dtep/schema/attributeGroup.tag create mode 100644 quanta/data/dtep/schema/choice.tag create mode 100644 quanta/data/dtep/schema/complexContent.tag create mode 100644 quanta/data/dtep/schema/complexType.tag create mode 100644 quanta/data/dtep/schema/description.rc create mode 100644 quanta/data/dtep/schema/documentation.tag create mode 100644 quanta/data/dtep/schema/element.tag create mode 100644 quanta/data/dtep/schema/enumeration.tag create mode 100644 quanta/data/dtep/schema/extension.tag create mode 100644 quanta/data/dtep/schema/field.tag create mode 100644 quanta/data/dtep/schema/fractionDigits.tag create mode 100644 quanta/data/dtep/schema/group.tag create mode 100644 quanta/data/dtep/schema/import.tag create mode 100644 quanta/data/dtep/schema/include.tag create mode 100644 quanta/data/dtep/schema/key.tag create mode 100644 quanta/data/dtep/schema/keyref.tag create mode 100644 quanta/data/dtep/schema/length.tag create mode 100644 quanta/data/dtep/schema/list.tag create mode 100644 quanta/data/dtep/schema/maxExclusive.tag create mode 100644 quanta/data/dtep/schema/maxInclusive.tag create mode 100644 quanta/data/dtep/schema/maxLength.tag create mode 100644 quanta/data/dtep/schema/minExclusive.tag create mode 100644 quanta/data/dtep/schema/minInclusive.tag create mode 100644 quanta/data/dtep/schema/minLength.tag create mode 100644 quanta/data/dtep/schema/notation.tag create mode 100644 quanta/data/dtep/schema/pattern.tag create mode 100644 quanta/data/dtep/schema/redefine.tag create mode 100644 quanta/data/dtep/schema/restriction.tag create mode 100644 quanta/data/dtep/schema/schema.tag create mode 100644 quanta/data/dtep/schema/selector.tag create mode 100644 quanta/data/dtep/schema/sequence.tag create mode 100644 quanta/data/dtep/schema/simpleContent.tag create mode 100644 quanta/data/dtep/schema/simpleType.tag create mode 100644 quanta/data/dtep/schema/totalDigits.tag create mode 100644 quanta/data/dtep/schema/union.tag create mode 100644 quanta/data/dtep/schema/unique.tag create mode 100644 quanta/data/dtep/schema/whiteSpace.tag create mode 100644 quanta/data/dtep/tagxml/Makefile.am create mode 100644 quanta/data/dtep/tagxml/attr.tag create mode 100644 quanta/data/dtep/tagxml/childstop.tag create mode 100644 quanta/data/dtep/tagxml/description.rc create mode 100644 quanta/data/dtep/tagxml/location.tag create mode 100644 quanta/data/dtep/tagxml/nonparams.tag create mode 100644 quanta/data/dtep/tagxml/spacer.tag create mode 100644 quanta/data/dtep/tagxml/tag.tag create mode 100644 quanta/data/dtep/tagxml/vpl.tag create mode 100644 quanta/data/dtep/wml-1-2/Makefile.am create mode 100644 quanta/data/dtep/wml-1-2/a.tag create mode 100644 quanta/data/dtep/wml-1-2/access.tag create mode 100644 quanta/data/dtep/wml-1-2/anchor.tag create mode 100644 quanta/data/dtep/wml-1-2/br.tag create mode 100644 quanta/data/dtep/wml-1-2/card.tag create mode 100644 quanta/data/dtep/wml-1-2/common.tag create mode 100644 quanta/data/dtep/wml-1-2/description.rc create mode 100644 quanta/data/dtep/wml-1-2/do.tag create mode 100644 quanta/data/dtep/wml-1-2/fieldset.tag create mode 100644 quanta/data/dtep/wml-1-2/go.tag create mode 100644 quanta/data/dtep/wml-1-2/img.tag create mode 100644 quanta/data/dtep/wml-1-2/input.tag create mode 100644 quanta/data/dtep/wml-1-2/meta.tag create mode 100644 quanta/data/dtep/wml-1-2/noop.tag create mode 100644 quanta/data/dtep/wml-1-2/onevent.tag create mode 100644 quanta/data/dtep/wml-1-2/optgroup.tag create mode 100644 quanta/data/dtep/wml-1-2/option.tag create mode 100644 quanta/data/dtep/wml-1-2/p.tag create mode 100644 quanta/data/dtep/wml-1-2/postfield.tag create mode 100644 quanta/data/dtep/wml-1-2/pre.tag create mode 100644 quanta/data/dtep/wml-1-2/select.tag create mode 100644 quanta/data/dtep/wml-1-2/setvar.tag create mode 100644 quanta/data/dtep/wml-1-2/table.tag create mode 100644 quanta/data/dtep/wml-1-2/template.tag create mode 100644 quanta/data/dtep/wml-1-2/timer.tag create mode 100644 quanta/data/dtep/wml-1-2/wml.tag create mode 100644 quanta/data/dtep/xhtml-basic/Makefile.am create mode 100644 quanta/data/dtep/xhtml-basic/a.tag create mode 100644 quanta/data/dtep/xhtml-basic/base.tag create mode 100644 quanta/data/dtep/xhtml-basic/blockquote.tag create mode 100644 quanta/data/dtep/xhtml-basic/body.tag create mode 100644 quanta/data/dtep/xhtml-basic/br.tag create mode 100644 quanta/data/dtep/xhtml-basic/common.tag create mode 100644 quanta/data/dtep/xhtml-basic/description.rc create mode 100644 quanta/data/dtep/xhtml-basic/div.tag create mode 100644 quanta/data/dtep/xhtml-basic/form.tag create mode 100644 quanta/data/dtep/xhtml-basic/head.tag create mode 100644 quanta/data/dtep/xhtml-basic/headings.tag create mode 100644 quanta/data/dtep/xhtml-basic/html.tag create mode 100644 quanta/data/dtep/xhtml-basic/input.tag create mode 100644 quanta/data/dtep/xhtml-basic/li.tag create mode 100644 quanta/data/dtep/xhtml-basic/link.tag create mode 100644 quanta/data/dtep/xhtml-basic/meta.tag create mode 100644 quanta/data/dtep/xhtml-basic/ol.tag create mode 100644 quanta/data/dtep/xhtml-basic/option.tag create mode 100644 quanta/data/dtep/xhtml-basic/p.tag create mode 100644 quanta/data/dtep/xhtml-basic/select.tag create mode 100644 quanta/data/dtep/xhtml-basic/table.tag create mode 100644 quanta/data/dtep/xhtml-basic/td.tag create mode 100644 quanta/data/dtep/xhtml-basic/textarea.tag create mode 100644 quanta/data/dtep/xhtml-basic/th.tag create mode 100644 quanta/data/dtep/xhtml-basic/tr.tag create mode 100644 quanta/data/dtep/xhtml-basic/ul.tag create mode 100644 quanta/data/dtep/xhtml-frameset/Makefile.am create mode 100644 quanta/data/dtep/xhtml-frameset/a.tag create mode 100644 quanta/data/dtep/xhtml-frameset/abbr.tag create mode 100644 quanta/data/dtep/xhtml-frameset/acronym.tag create mode 100644 quanta/data/dtep/xhtml-frameset/address.tag create mode 100644 quanta/data/dtep/xhtml-frameset/applet.tag create mode 100644 quanta/data/dtep/xhtml-frameset/area.tag create mode 100644 quanta/data/dtep/xhtml-frameset/b.tag create mode 100644 quanta/data/dtep/xhtml-frameset/base.tag create mode 100644 quanta/data/dtep/xhtml-frameset/basefont.tag create mode 100644 quanta/data/dtep/xhtml-frameset/bdo.tag create mode 100644 quanta/data/dtep/xhtml-frameset/big.tag create mode 100644 quanta/data/dtep/xhtml-frameset/blockquote.tag create mode 100644 quanta/data/dtep/xhtml-frameset/body.tag create mode 100644 quanta/data/dtep/xhtml-frameset/br.tag create mode 100644 quanta/data/dtep/xhtml-frameset/button.tag create mode 100644 quanta/data/dtep/xhtml-frameset/caption.tag create mode 100644 quanta/data/dtep/xhtml-frameset/center.tag create mode 100644 quanta/data/dtep/xhtml-frameset/cite.tag create mode 100644 quanta/data/dtep/xhtml-frameset/code.tag create mode 100644 quanta/data/dtep/xhtml-frameset/col.tag create mode 100644 quanta/data/dtep/xhtml-frameset/colgroup.tag create mode 100644 quanta/data/dtep/xhtml-frameset/common.tag create mode 100644 quanta/data/dtep/xhtml-frameset/dd.tag create mode 100644 quanta/data/dtep/xhtml-frameset/del.tag create mode 100644 quanta/data/dtep/xhtml-frameset/description.rc create mode 100644 quanta/data/dtep/xhtml-frameset/dfn.tag create mode 100644 quanta/data/dtep/xhtml-frameset/dir.tag create mode 100644 quanta/data/dtep/xhtml-frameset/div.tag create mode 100644 quanta/data/dtep/xhtml-frameset/dl.tag create mode 100644 quanta/data/dtep/xhtml-frameset/dt.tag create mode 100644 quanta/data/dtep/xhtml-frameset/em.tag create mode 100644 quanta/data/dtep/xhtml-frameset/fieldset.tag create mode 100644 quanta/data/dtep/xhtml-frameset/font.tag create mode 100644 quanta/data/dtep/xhtml-frameset/form.tag create mode 100644 quanta/data/dtep/xhtml-frameset/frame.tag create mode 100644 quanta/data/dtep/xhtml-frameset/frameset.tag create mode 100644 quanta/data/dtep/xhtml-frameset/head.tag create mode 100644 quanta/data/dtep/xhtml-frameset/headings.tag create mode 100644 quanta/data/dtep/xhtml-frameset/hr.tag create mode 100644 quanta/data/dtep/xhtml-frameset/html.tag create mode 100644 quanta/data/dtep/xhtml-frameset/i.tag create mode 100644 quanta/data/dtep/xhtml-frameset/iframe.tag create mode 100644 quanta/data/dtep/xhtml-frameset/img.tag create mode 100644 quanta/data/dtep/xhtml-frameset/input.tag create mode 100644 quanta/data/dtep/xhtml-frameset/ins.tag create mode 100644 quanta/data/dtep/xhtml-frameset/isindex.tag create mode 100644 quanta/data/dtep/xhtml-frameset/kbd.tag create mode 100644 quanta/data/dtep/xhtml-frameset/label.tag create mode 100644 quanta/data/dtep/xhtml-frameset/legend.tag create mode 100644 quanta/data/dtep/xhtml-frameset/li.tag create mode 100644 quanta/data/dtep/xhtml-frameset/link.tag create mode 100644 quanta/data/dtep/xhtml-frameset/map.tag create mode 100644 quanta/data/dtep/xhtml-frameset/menu.tag create mode 100644 quanta/data/dtep/xhtml-frameset/meta.tag create mode 100644 quanta/data/dtep/xhtml-frameset/noframes.tag create mode 100644 quanta/data/dtep/xhtml-frameset/noscript.tag create mode 100644 quanta/data/dtep/xhtml-frameset/object.tag create mode 100644 quanta/data/dtep/xhtml-frameset/ol.tag create mode 100644 quanta/data/dtep/xhtml-frameset/optgroup.tag create mode 100644 quanta/data/dtep/xhtml-frameset/option.tag create mode 100644 quanta/data/dtep/xhtml-frameset/p.tag create mode 100644 quanta/data/dtep/xhtml-frameset/param.tag create mode 100644 quanta/data/dtep/xhtml-frameset/pre.tag create mode 100644 quanta/data/dtep/xhtml-frameset/q.tag create mode 100644 quanta/data/dtep/xhtml-frameset/s.tag create mode 100644 quanta/data/dtep/xhtml-frameset/samp.tag create mode 100644 quanta/data/dtep/xhtml-frameset/script.tag create mode 100644 quanta/data/dtep/xhtml-frameset/select.tag create mode 100644 quanta/data/dtep/xhtml-frameset/small.tag create mode 100644 quanta/data/dtep/xhtml-frameset/span.tag create mode 100644 quanta/data/dtep/xhtml-frameset/strike.tag create mode 100644 quanta/data/dtep/xhtml-frameset/strong.tag create mode 100644 quanta/data/dtep/xhtml-frameset/style.tag create mode 100644 quanta/data/dtep/xhtml-frameset/sub.tag create mode 100644 quanta/data/dtep/xhtml-frameset/sup.tag create mode 100644 quanta/data/dtep/xhtml-frameset/table.tag create mode 100644 quanta/data/dtep/xhtml-frameset/tbody.tag create mode 100644 quanta/data/dtep/xhtml-frameset/td.tag create mode 100644 quanta/data/dtep/xhtml-frameset/textarea.tag create mode 100644 quanta/data/dtep/xhtml-frameset/tfoot.tag create mode 100644 quanta/data/dtep/xhtml-frameset/th.tag create mode 100644 quanta/data/dtep/xhtml-frameset/thead.tag create mode 100644 quanta/data/dtep/xhtml-frameset/title.tag create mode 100644 quanta/data/dtep/xhtml-frameset/tr.tag create mode 100644 quanta/data/dtep/xhtml-frameset/tt.tag create mode 100644 quanta/data/dtep/xhtml-frameset/u.tag create mode 100644 quanta/data/dtep/xhtml-frameset/ul.tag create mode 100644 quanta/data/dtep/xhtml-frameset/var.tag create mode 100644 quanta/data/dtep/xhtml-strict/Makefile.am create mode 100644 quanta/data/dtep/xhtml-strict/a.tag create mode 100644 quanta/data/dtep/xhtml-strict/abbr.tag create mode 100644 quanta/data/dtep/xhtml-strict/acronym.tag create mode 100644 quanta/data/dtep/xhtml-strict/address.tag create mode 100644 quanta/data/dtep/xhtml-strict/area.tag create mode 100644 quanta/data/dtep/xhtml-strict/b.tag create mode 100644 quanta/data/dtep/xhtml-strict/base.tag create mode 100644 quanta/data/dtep/xhtml-strict/bdo.tag create mode 100644 quanta/data/dtep/xhtml-strict/big.tag create mode 100644 quanta/data/dtep/xhtml-strict/blockquote.tag create mode 100644 quanta/data/dtep/xhtml-strict/body.tag create mode 100644 quanta/data/dtep/xhtml-strict/br.tag create mode 100644 quanta/data/dtep/xhtml-strict/button.tag create mode 100644 quanta/data/dtep/xhtml-strict/caption.tag create mode 100644 quanta/data/dtep/xhtml-strict/cite.tag create mode 100644 quanta/data/dtep/xhtml-strict/code.tag create mode 100644 quanta/data/dtep/xhtml-strict/col.tag create mode 100644 quanta/data/dtep/xhtml-strict/colgroup.tag create mode 100644 quanta/data/dtep/xhtml-strict/common.tag create mode 100644 quanta/data/dtep/xhtml-strict/dd.tag create mode 100644 quanta/data/dtep/xhtml-strict/del.tag create mode 100644 quanta/data/dtep/xhtml-strict/description.rc create mode 100644 quanta/data/dtep/xhtml-strict/dfn.tag create mode 100644 quanta/data/dtep/xhtml-strict/div.tag create mode 100644 quanta/data/dtep/xhtml-strict/dl.tag create mode 100644 quanta/data/dtep/xhtml-strict/dt.tag create mode 100644 quanta/data/dtep/xhtml-strict/em.tag create mode 100644 quanta/data/dtep/xhtml-strict/empty.tag create mode 100644 quanta/data/dtep/xhtml-strict/fieldset.tag create mode 100644 quanta/data/dtep/xhtml-strict/form.tag create mode 100644 quanta/data/dtep/xhtml-strict/head.tag create mode 100644 quanta/data/dtep/xhtml-strict/headings.tag create mode 100644 quanta/data/dtep/xhtml-strict/hr.tag create mode 100644 quanta/data/dtep/xhtml-strict/html.tag create mode 100644 quanta/data/dtep/xhtml-strict/i.tag create mode 100644 quanta/data/dtep/xhtml-strict/img.tag create mode 100644 quanta/data/dtep/xhtml-strict/input.tag create mode 100644 quanta/data/dtep/xhtml-strict/ins.tag create mode 100644 quanta/data/dtep/xhtml-strict/kbd.tag create mode 100644 quanta/data/dtep/xhtml-strict/label.tag create mode 100644 quanta/data/dtep/xhtml-strict/legend.tag create mode 100644 quanta/data/dtep/xhtml-strict/li.tag create mode 100644 quanta/data/dtep/xhtml-strict/link.tag create mode 100644 quanta/data/dtep/xhtml-strict/map.tag create mode 100644 quanta/data/dtep/xhtml-strict/meta.tag create mode 100644 quanta/data/dtep/xhtml-strict/noscript.tag create mode 100644 quanta/data/dtep/xhtml-strict/object.tag create mode 100644 quanta/data/dtep/xhtml-strict/ol.tag create mode 100644 quanta/data/dtep/xhtml-strict/optgroup.tag create mode 100644 quanta/data/dtep/xhtml-strict/option.tag create mode 100644 quanta/data/dtep/xhtml-strict/p.tag create mode 100644 quanta/data/dtep/xhtml-strict/param.tag create mode 100644 quanta/data/dtep/xhtml-strict/pre.tag create mode 100644 quanta/data/dtep/xhtml-strict/q.tag create mode 100644 quanta/data/dtep/xhtml-strict/samp.tag create mode 100644 quanta/data/dtep/xhtml-strict/script.tag create mode 100644 quanta/data/dtep/xhtml-strict/select.tag create mode 100644 quanta/data/dtep/xhtml-strict/small.tag create mode 100644 quanta/data/dtep/xhtml-strict/span.tag create mode 100644 quanta/data/dtep/xhtml-strict/strong.tag create mode 100644 quanta/data/dtep/xhtml-strict/style.tag create mode 100644 quanta/data/dtep/xhtml-strict/sub.tag create mode 100644 quanta/data/dtep/xhtml-strict/sup.tag create mode 100644 quanta/data/dtep/xhtml-strict/table.tag create mode 100644 quanta/data/dtep/xhtml-strict/tbody.tag create mode 100644 quanta/data/dtep/xhtml-strict/td.tag create mode 100644 quanta/data/dtep/xhtml-strict/textarea.tag create mode 100644 quanta/data/dtep/xhtml-strict/tfoot.tag create mode 100644 quanta/data/dtep/xhtml-strict/th.tag create mode 100644 quanta/data/dtep/xhtml-strict/thead.tag create mode 100644 quanta/data/dtep/xhtml-strict/title.tag create mode 100644 quanta/data/dtep/xhtml-strict/tr.tag create mode 100644 quanta/data/dtep/xhtml-strict/tt.tag create mode 100644 quanta/data/dtep/xhtml-strict/ul.tag create mode 100644 quanta/data/dtep/xhtml-strict/var.tag create mode 100644 quanta/data/dtep/xhtml/Makefile.am create mode 100644 quanta/data/dtep/xhtml/a.tag create mode 100644 quanta/data/dtep/xhtml/abbr.tag create mode 100644 quanta/data/dtep/xhtml/acronym.tag create mode 100644 quanta/data/dtep/xhtml/address.tag create mode 100644 quanta/data/dtep/xhtml/applet.tag create mode 100644 quanta/data/dtep/xhtml/area.tag create mode 100644 quanta/data/dtep/xhtml/b.tag create mode 100644 quanta/data/dtep/xhtml/base.tag create mode 100644 quanta/data/dtep/xhtml/basefont.tag create mode 100644 quanta/data/dtep/xhtml/bdo.tag create mode 100644 quanta/data/dtep/xhtml/big.tag create mode 100644 quanta/data/dtep/xhtml/blockquote.tag create mode 100644 quanta/data/dtep/xhtml/body.tag create mode 100644 quanta/data/dtep/xhtml/br.tag create mode 100644 quanta/data/dtep/xhtml/button.tag create mode 100644 quanta/data/dtep/xhtml/caption.tag create mode 100644 quanta/data/dtep/xhtml/center.tag create mode 100644 quanta/data/dtep/xhtml/cite.tag create mode 100644 quanta/data/dtep/xhtml/code.tag create mode 100644 quanta/data/dtep/xhtml/col.tag create mode 100644 quanta/data/dtep/xhtml/colgroup.tag create mode 100644 quanta/data/dtep/xhtml/common.tag create mode 100644 quanta/data/dtep/xhtml/dd.tag create mode 100644 quanta/data/dtep/xhtml/del.tag create mode 100644 quanta/data/dtep/xhtml/description.rc create mode 100644 quanta/data/dtep/xhtml/dfn.tag create mode 100644 quanta/data/dtep/xhtml/dir.tag create mode 100644 quanta/data/dtep/xhtml/div.tag create mode 100644 quanta/data/dtep/xhtml/dl.tag create mode 100644 quanta/data/dtep/xhtml/dt.tag create mode 100644 quanta/data/dtep/xhtml/em.tag create mode 100644 quanta/data/dtep/xhtml/fieldset.tag create mode 100644 quanta/data/dtep/xhtml/font.tag create mode 100644 quanta/data/dtep/xhtml/form.tag create mode 100644 quanta/data/dtep/xhtml/head.tag create mode 100644 quanta/data/dtep/xhtml/headings.tag create mode 100644 quanta/data/dtep/xhtml/hr.tag create mode 100644 quanta/data/dtep/xhtml/html.tag create mode 100644 quanta/data/dtep/xhtml/i.tag create mode 100644 quanta/data/dtep/xhtml/iframe.tag create mode 100644 quanta/data/dtep/xhtml/img.tag create mode 100644 quanta/data/dtep/xhtml/input.tag create mode 100644 quanta/data/dtep/xhtml/ins.tag create mode 100644 quanta/data/dtep/xhtml/isindex.tag create mode 100644 quanta/data/dtep/xhtml/kbd.tag create mode 100644 quanta/data/dtep/xhtml/label.tag create mode 100644 quanta/data/dtep/xhtml/legend.tag create mode 100644 quanta/data/dtep/xhtml/li.tag create mode 100644 quanta/data/dtep/xhtml/link.tag create mode 100644 quanta/data/dtep/xhtml/map.tag create mode 100644 quanta/data/dtep/xhtml/menu.tag create mode 100644 quanta/data/dtep/xhtml/meta.tag create mode 100644 quanta/data/dtep/xhtml/noframes.tag create mode 100644 quanta/data/dtep/xhtml/noscript.tag create mode 100644 quanta/data/dtep/xhtml/object.tag create mode 100644 quanta/data/dtep/xhtml/ol.tag create mode 100644 quanta/data/dtep/xhtml/optgroup.tag create mode 100644 quanta/data/dtep/xhtml/option.tag create mode 100644 quanta/data/dtep/xhtml/p.tag create mode 100644 quanta/data/dtep/xhtml/param.tag create mode 100644 quanta/data/dtep/xhtml/pre.tag create mode 100644 quanta/data/dtep/xhtml/q.tag create mode 100644 quanta/data/dtep/xhtml/s.tag create mode 100644 quanta/data/dtep/xhtml/samp.tag create mode 100644 quanta/data/dtep/xhtml/script.tag create mode 100644 quanta/data/dtep/xhtml/select.tag create mode 100644 quanta/data/dtep/xhtml/small.tag create mode 100644 quanta/data/dtep/xhtml/span.tag create mode 100644 quanta/data/dtep/xhtml/strike.tag create mode 100644 quanta/data/dtep/xhtml/strong.tag create mode 100644 quanta/data/dtep/xhtml/style.tag create mode 100644 quanta/data/dtep/xhtml/sub.tag create mode 100644 quanta/data/dtep/xhtml/sup.tag create mode 100644 quanta/data/dtep/xhtml/table.tag create mode 100644 quanta/data/dtep/xhtml/tbody.tag create mode 100644 quanta/data/dtep/xhtml/td.tag create mode 100644 quanta/data/dtep/xhtml/textarea.tag create mode 100644 quanta/data/dtep/xhtml/tfoot.tag create mode 100644 quanta/data/dtep/xhtml/th.tag create mode 100644 quanta/data/dtep/xhtml/thead.tag create mode 100644 quanta/data/dtep/xhtml/title.tag create mode 100644 quanta/data/dtep/xhtml/tr.tag create mode 100644 quanta/data/dtep/xhtml/tt.tag create mode 100644 quanta/data/dtep/xhtml/u.tag create mode 100644 quanta/data/dtep/xhtml/ul.tag create mode 100644 quanta/data/dtep/xhtml/var.tag create mode 100644 quanta/data/dtep/xhtml11/Makefile.am create mode 100644 quanta/data/dtep/xhtml11/a.tag create mode 100644 quanta/data/dtep/xhtml11/abbr.tag create mode 100644 quanta/data/dtep/xhtml11/acronym.tag create mode 100644 quanta/data/dtep/xhtml11/address.tag create mode 100644 quanta/data/dtep/xhtml11/applet.tag create mode 100644 quanta/data/dtep/xhtml11/area.tag create mode 100644 quanta/data/dtep/xhtml11/b.tag create mode 100644 quanta/data/dtep/xhtml11/base.tag create mode 100644 quanta/data/dtep/xhtml11/bdo.tag create mode 100644 quanta/data/dtep/xhtml11/big.tag create mode 100644 quanta/data/dtep/xhtml11/blockquote.tag create mode 100644 quanta/data/dtep/xhtml11/body.tag create mode 100644 quanta/data/dtep/xhtml11/br.tag create mode 100644 quanta/data/dtep/xhtml11/button.tag create mode 100644 quanta/data/dtep/xhtml11/caption.tag create mode 100644 quanta/data/dtep/xhtml11/cite.tag create mode 100644 quanta/data/dtep/xhtml11/code.tag create mode 100644 quanta/data/dtep/xhtml11/col.tag create mode 100644 quanta/data/dtep/xhtml11/colgroup.tag create mode 100644 quanta/data/dtep/xhtml11/common.tag create mode 100644 quanta/data/dtep/xhtml11/dd.tag create mode 100644 quanta/data/dtep/xhtml11/del.tag create mode 100644 quanta/data/dtep/xhtml11/description.rc create mode 100644 quanta/data/dtep/xhtml11/dfn.tag create mode 100644 quanta/data/dtep/xhtml11/div.tag create mode 100644 quanta/data/dtep/xhtml11/dl.tag create mode 100644 quanta/data/dtep/xhtml11/dt.tag create mode 100644 quanta/data/dtep/xhtml11/em.tag create mode 100644 quanta/data/dtep/xhtml11/empty.tag create mode 100644 quanta/data/dtep/xhtml11/fieldset.tag create mode 100644 quanta/data/dtep/xhtml11/form.tag create mode 100644 quanta/data/dtep/xhtml11/head.tag create mode 100644 quanta/data/dtep/xhtml11/headings.tag create mode 100644 quanta/data/dtep/xhtml11/hr.tag create mode 100644 quanta/data/dtep/xhtml11/html.tag create mode 100644 quanta/data/dtep/xhtml11/i.tag create mode 100644 quanta/data/dtep/xhtml11/image.tag create mode 100644 quanta/data/dtep/xhtml11/input.tag create mode 100644 quanta/data/dtep/xhtml11/ins.tag create mode 100644 quanta/data/dtep/xhtml11/kbd.tag create mode 100644 quanta/data/dtep/xhtml11/label.tag create mode 100644 quanta/data/dtep/xhtml11/legend.tag create mode 100644 quanta/data/dtep/xhtml11/li.tag create mode 100644 quanta/data/dtep/xhtml11/link.tag create mode 100644 quanta/data/dtep/xhtml11/map.tag create mode 100644 quanta/data/dtep/xhtml11/meta.tag create mode 100644 quanta/data/dtep/xhtml11/noscript.tag create mode 100644 quanta/data/dtep/xhtml11/object.tag create mode 100644 quanta/data/dtep/xhtml11/ol.tag create mode 100644 quanta/data/dtep/xhtml11/optgroup.tag create mode 100644 quanta/data/dtep/xhtml11/option.tag create mode 100644 quanta/data/dtep/xhtml11/p.tag create mode 100644 quanta/data/dtep/xhtml11/param.tag create mode 100644 quanta/data/dtep/xhtml11/pre.tag create mode 100644 quanta/data/dtep/xhtml11/q.tag create mode 100644 quanta/data/dtep/xhtml11/rb.tag create mode 100644 quanta/data/dtep/xhtml11/rbc.tag create mode 100644 quanta/data/dtep/xhtml11/rp.tag create mode 100644 quanta/data/dtep/xhtml11/rt.tag create mode 100644 quanta/data/dtep/xhtml11/rtc.tag create mode 100644 quanta/data/dtep/xhtml11/ruby.tag create mode 100644 quanta/data/dtep/xhtml11/samp.tag create mode 100644 quanta/data/dtep/xhtml11/script.tag create mode 100644 quanta/data/dtep/xhtml11/select.tag create mode 100644 quanta/data/dtep/xhtml11/small.tag create mode 100644 quanta/data/dtep/xhtml11/span.tag create mode 100644 quanta/data/dtep/xhtml11/strong.tag create mode 100644 quanta/data/dtep/xhtml11/style.tag create mode 100644 quanta/data/dtep/xhtml11/sub.tag create mode 100644 quanta/data/dtep/xhtml11/sup.tag create mode 100644 quanta/data/dtep/xhtml11/table.tag create mode 100644 quanta/data/dtep/xhtml11/tbody.tag create mode 100644 quanta/data/dtep/xhtml11/td.tag create mode 100644 quanta/data/dtep/xhtml11/textarea.tag create mode 100644 quanta/data/dtep/xhtml11/tfoot.tag create mode 100644 quanta/data/dtep/xhtml11/th.tag create mode 100644 quanta/data/dtep/xhtml11/thead.tag create mode 100644 quanta/data/dtep/xhtml11/title.tag create mode 100644 quanta/data/dtep/xhtml11/tr.tag create mode 100644 quanta/data/dtep/xhtml11/tt.tag create mode 100644 quanta/data/dtep/xhtml11/ul.tag create mode 100644 quanta/data/dtep/xhtml11/var.tag create mode 100644 quanta/data/dtep/xslt/Makefile.am create mode 100644 quanta/data/dtep/xslt/apply-imports.tag create mode 100644 quanta/data/dtep/xslt/attribute-set.tag create mode 100644 quanta/data/dtep/xslt/attribute.tag create mode 100644 quanta/data/dtep/xslt/call-template.tag create mode 100644 quanta/data/dtep/xslt/choose.tag create mode 100644 quanta/data/dtep/xslt/comment.tag create mode 100644 quanta/data/dtep/xslt/copy-of.tag create mode 100644 quanta/data/dtep/xslt/decimal-format.tag create mode 100644 quanta/data/dtep/xslt/description.rc create mode 100644 quanta/data/dtep/xslt/element.tag create mode 100644 quanta/data/dtep/xslt/fallback.tag create mode 100644 quanta/data/dtep/xslt/for-each.tag create mode 100644 quanta/data/dtep/xslt/if.tag create mode 100644 quanta/data/dtep/xslt/import.tag create mode 100644 quanta/data/dtep/xslt/key.tag create mode 100644 quanta/data/dtep/xslt/message.tag create mode 100644 quanta/data/dtep/xslt/namespace-alias.tag create mode 100644 quanta/data/dtep/xslt/number.tag create mode 100644 quanta/data/dtep/xslt/otherwise.tag create mode 100644 quanta/data/dtep/xslt/output.tag create mode 100644 quanta/data/dtep/xslt/param.tag create mode 100644 quanta/data/dtep/xslt/preserve-space.tag create mode 100644 quanta/data/dtep/xslt/processing-instruction.tag create mode 100644 quanta/data/dtep/xslt/sort.tag create mode 100644 quanta/data/dtep/xslt/strip-space.tag create mode 100644 quanta/data/dtep/xslt/stylesheet.tag create mode 100644 quanta/data/dtep/xslt/template.tag create mode 100644 quanta/data/dtep/xslt/text.tag create mode 100644 quanta/data/dtep/xslt/transform.tag create mode 100644 quanta/data/dtep/xslt/value-of.tag create mode 100644 quanta/data/dtep/xslt/variable.tag create mode 100644 quanta/data/dtep/xslt/when.tag create mode 100644 quanta/data/dtep/xslt/with-param.tag create mode 100644 quanta/data/icons/16x16/Makefile.am create mode 100644 quanta/data/icons/16x16/debug_breakpoint.png create mode 100644 quanta/data/icons/16x16/debug_connect.png create mode 100644 quanta/data/icons/16x16/debug_currentline.png create mode 100644 quanta/data/icons/16x16/debug_disconnect.png create mode 100644 quanta/data/icons/16x16/debug_kill.png create mode 100644 quanta/data/icons/16x16/debug_pause.png create mode 100644 quanta/data/icons/16x16/delete.png create mode 100644 quanta/data/icons/16x16/empty16x16.png create mode 100644 quanta/data/icons/16x16/empty1x16.png create mode 100644 quanta/data/icons/16x16/java.png create mode 100644 quanta/data/icons/16x16/mini-book1.png create mode 100644 quanta/data/icons/16x16/mini-book2.png create mode 100644 quanta/data/icons/16x16/mini-modules.png create mode 100644 quanta/data/icons/16x16/tag_br_small.png create mode 100644 quanta/data/icons/16x16/tag_font_small.png create mode 100644 quanta/data/icons/16x16/tag_hr_small.png create mode 100644 quanta/data/icons/22x22/Makefile.am create mode 100644 quanta/data/icons/22x22/ball.png create mode 100644 quanta/data/icons/22x22/button.png create mode 100644 quanta/data/icons/22x22/check.png create mode 100644 quanta/data/icons/22x22/check_clear.png create mode 100644 quanta/data/icons/22x22/check_grey.png create mode 100644 quanta/data/icons/22x22/css.png create mode 100644 quanta/data/icons/22x22/date.png create mode 100644 quanta/data/icons/22x22/debug_leap.png create mode 100644 quanta/data/icons/22x22/debug_run.png create mode 100644 quanta/data/icons/22x22/debug_skip.png create mode 100644 quanta/data/icons/22x22/debug_stepinto.png create mode 100644 quanta/data/icons/22x22/debug_stepout.png create mode 100644 quanta/data/icons/22x22/debug_stepover.png create mode 100644 quanta/data/icons/22x22/div_center.png create mode 100644 quanta/data/icons/22x22/div_justify.png create mode 100644 quanta/data/icons/22x22/div_left.png create mode 100644 quanta/data/icons/22x22/div_right.png create mode 100644 quanta/data/icons/22x22/font_dec.png create mode 100644 quanta/data/icons/22x22/font_inc.png create mode 100644 quanta/data/icons/22x22/form.png create mode 100644 quanta/data/icons/22x22/frame.png create mode 100644 quanta/data/icons/22x22/ftab.png create mode 100644 quanta/data/icons/22x22/ftpclient.png create mode 100644 quanta/data/icons/22x22/lineedit.png create mode 100644 quanta/data/icons/22x22/linepas.png create mode 100644 quanta/data/icons/22x22/output_win.png create mode 100644 quanta/data/icons/22x22/preview.png create mode 100644 quanta/data/icons/22x22/ptab.png create mode 100644 quanta/data/icons/22x22/quick-screenshot.png create mode 100644 quanta/data/icons/22x22/quick_list.png create mode 100644 quanta/data/icons/22x22/quick_start.png create mode 100644 quanta/data/icons/22x22/quick_table.png create mode 100644 quanta/data/icons/22x22/radio.png create mode 100644 quanta/data/icons/22x22/replace.png create mode 100644 quanta/data/icons/22x22/reset.png create mode 100644 quanta/data/icons/22x22/select.png create mode 100644 quanta/data/icons/22x22/submit.png create mode 100644 quanta/data/icons/22x22/table_data.png create mode 100644 quanta/data/icons/22x22/table_head.png create mode 100644 quanta/data/icons/22x22/tag_a.png create mode 100644 quanta/data/icons/22x22/tag_a_url.png create mode 100644 quanta/data/icons/22x22/tag_access.png create mode 100644 quanta/data/icons/22x22/tag_all.png create mode 100644 quanta/data/icons/22x22/tag_amp.png create mode 100644 quanta/data/icons/22x22/tag_any.png create mode 100644 quanta/data/icons/22x22/tag_anyAttribute.png create mode 100644 quanta/data/icons/22x22/tag_appInfo.png create mode 100644 quanta/data/icons/22x22/tag_attr.png create mode 100644 quanta/data/icons/22x22/tag_attribute.png create mode 100644 quanta/data/icons/22x22/tag_attributeGroup.png create mode 100644 quanta/data/icons/22x22/tag_bold.png create mode 100644 quanta/data/icons/22x22/tag_br.png create mode 100644 quanta/data/icons/22x22/tag_caption.png create mode 100644 quanta/data/icons/22x22/tag_card.png create mode 100644 quanta/data/icons/22x22/tag_cdata.png create mode 100644 quanta/data/icons/22x22/tag_chapter.png create mode 100644 quanta/data/icons/22x22/tag_choice.png create mode 100644 quanta/data/icons/22x22/tag_comm.png create mode 100644 quanta/data/icons/22x22/tag_complexContent.png create mode 100644 quanta/data/icons/22x22/tag_complexType.png create mode 100644 quanta/data/icons/22x22/tag_dd.png create mode 100644 quanta/data/icons/22x22/tag_dl.png create mode 100644 quanta/data/icons/22x22/tag_do.png create mode 100644 quanta/data/icons/22x22/tag_documenation.png create mode 100644 quanta/data/icons/22x22/tag_dt.png create mode 100644 quanta/data/icons/22x22/tag_element.png create mode 100644 quanta/data/icons/22x22/tag_em.png create mode 100644 quanta/data/icons/22x22/tag_example.png create mode 100644 quanta/data/icons/22x22/tag_extension.png create mode 100644 quanta/data/icons/22x22/tag_field.png create mode 100644 quanta/data/icons/22x22/tag_font.png create mode 100644 quanta/data/icons/22x22/tag_font_base.png create mode 100644 quanta/data/icons/22x22/tag_footnote.png create mode 100644 quanta/data/icons/22x22/tag_footnoteref.png create mode 100644 quanta/data/icons/22x22/tag_fractionDigits.png create mode 100644 quanta/data/icons/22x22/tag_go.png create mode 100644 quanta/data/icons/22x22/tag_group.png create mode 100644 quanta/data/icons/22x22/tag_guimenu.png create mode 100644 quanta/data/icons/22x22/tag_guimenuitem.png create mode 100644 quanta/data/icons/22x22/tag_guisubmenu.png create mode 100644 quanta/data/icons/22x22/tag_h1.png create mode 100644 quanta/data/icons/22x22/tag_h2.png create mode 100644 quanta/data/icons/22x22/tag_h3.png create mode 100644 quanta/data/icons/22x22/tag_h4.png create mode 100644 quanta/data/icons/22x22/tag_h5.png create mode 100644 quanta/data/icons/22x22/tag_head.png create mode 100644 quanta/data/icons/22x22/tag_hr.png create mode 100644 quanta/data/icons/22x22/tag_i.png create mode 100644 quanta/data/icons/22x22/tag_image.png create mode 100644 quanta/data/icons/22x22/tag_imagedata.png create mode 100644 quanta/data/icons/22x22/tag_import.png create mode 100644 quanta/data/icons/22x22/tag_include.png create mode 100644 quanta/data/icons/22x22/tag_informalexample.png create mode 100644 quanta/data/icons/22x22/tag_inlinemediaobject.png create mode 100644 quanta/data/icons/22x22/tag_key.png create mode 100644 quanta/data/icons/22x22/tag_keycap.png create mode 100644 quanta/data/icons/22x22/tag_keycombo.png create mode 100644 quanta/data/icons/22x22/tag_keyref.png create mode 100644 quanta/data/icons/22x22/tag_label.png create mode 100644 quanta/data/icons/22x22/tag_li.png create mode 100644 quanta/data/icons/22x22/tag_link.png create mode 100644 quanta/data/icons/22x22/tag_list.png create mode 100644 quanta/data/icons/22x22/tag_listitem.png create mode 100644 quanta/data/icons/22x22/tag_loc.png create mode 100644 quanta/data/icons/22x22/tag_mail.png create mode 100644 quanta/data/icons/22x22/tag_member.png create mode 100644 quanta/data/icons/22x22/tag_menu.png create mode 100644 quanta/data/icons/22x22/tag_menuchoice.png create mode 100644 quanta/data/icons/22x22/tag_meta.png create mode 100644 quanta/data/icons/22x22/tag_misc.png create mode 100644 quanta/data/icons/22x22/tag_nbsp.png create mode 100644 quanta/data/icons/22x22/tag_noop.png create mode 100644 quanta/data/icons/22x22/tag_notation.png create mode 100644 quanta/data/icons/22x22/tag_ol.png create mode 100644 quanta/data/icons/22x22/tag_onevent.png create mode 100644 quanta/data/icons/22x22/tag_p.png create mode 100644 quanta/data/icons/22x22/tag_para.png create mode 100644 quanta/data/icons/22x22/tag_postfield.png create mode 100644 quanta/data/icons/22x22/tag_pre.png create mode 100644 quanta/data/icons/22x22/tag_procedure.png create mode 100644 quanta/data/icons/22x22/tag_redefine.png create mode 100644 quanta/data/icons/22x22/tag_restriction.png create mode 100644 quanta/data/icons/22x22/tag_schema.png create mode 100644 quanta/data/icons/22x22/tag_screenshot.png create mode 100644 quanta/data/icons/22x22/tag_screenshotinfo.png create mode 100644 quanta/data/icons/22x22/tag_sect1.png create mode 100644 quanta/data/icons/22x22/tag_sect2.png create mode 100644 quanta/data/icons/22x22/tag_sect3.png create mode 100644 quanta/data/icons/22x22/tag_sect4.png create mode 100644 quanta/data/icons/22x22/tag_sect5.png create mode 100644 quanta/data/icons/22x22/tag_selector.png create mode 100644 quanta/data/icons/22x22/tag_sequence.png create mode 100644 quanta/data/icons/22x22/tag_setvar.png create mode 100644 quanta/data/icons/22x22/tag_shortcut.png create mode 100644 quanta/data/icons/22x22/tag_simpleContent.png create mode 100644 quanta/data/icons/22x22/tag_simpleType.png create mode 100644 quanta/data/icons/22x22/tag_step.png create mode 100644 quanta/data/icons/22x22/tag_sub.png create mode 100644 quanta/data/icons/22x22/tag_substeps.png create mode 100644 quanta/data/icons/22x22/tag_sup.png create mode 100644 quanta/data/icons/22x22/tag_table.png create mode 100644 quanta/data/icons/22x22/tag_table_body.png create mode 100644 quanta/data/icons/22x22/tag_table_row.png create mode 100644 quanta/data/icons/22x22/tag_tag.png create mode 100644 quanta/data/icons/22x22/tag_tbody.png create mode 100644 quanta/data/icons/22x22/tag_td.png create mode 100644 quanta/data/icons/22x22/tag_term.png create mode 100644 quanta/data/icons/22x22/tag_tgroup.png create mode 100644 quanta/data/icons/22x22/tag_th.png create mode 100644 quanta/data/icons/22x22/tag_title.png create mode 100644 quanta/data/icons/22x22/tag_tr.png create mode 100644 quanta/data/icons/22x22/tag_u.png create mode 100644 quanta/data/icons/22x22/tag_ul.png create mode 100644 quanta/data/icons/22x22/tag_ulink.png create mode 100644 quanta/data/icons/22x22/tag_union.png create mode 100644 quanta/data/icons/22x22/tag_unique.png create mode 100644 quanta/data/icons/22x22/tag_variablelist.png create mode 100644 quanta/data/icons/22x22/tag_varlistentry.png create mode 100644 quanta/data/icons/22x22/tag_varlistitem.png create mode 100644 quanta/data/icons/22x22/tag_what.png create mode 100644 quanta/data/icons/22x22/tag_wml.png create mode 100644 quanta/data/icons/22x22/tag_xref.png create mode 100644 quanta/data/icons/22x22/textarea.png create mode 100644 quanta/data/icons/22x22/tree_win.png create mode 100644 quanta/data/icons/22x22/ttab.png create mode 100644 quanta/data/icons/22x22/view_text.png create mode 100644 quanta/data/icons/22x22/vpl.png create mode 100644 quanta/data/icons/22x22/vpl_text.png create mode 100644 quanta/data/icons/22x22/xmlval.png create mode 100644 quanta/data/icons/22x22/xsltproc.png create mode 100644 quanta/data/icons/Makefile.am create mode 100644 quanta/data/icons/files.png create mode 100644 quanta/data/icons/hi16-app-quanta.png create mode 100644 quanta/data/icons/hi16-app-quanta_be.png create mode 100644 quanta/data/icons/hi22-app-quanta.png create mode 100644 quanta/data/icons/hi22-app-quanta_be.png create mode 100644 quanta/data/icons/hi32-app-quanta.png create mode 100644 quanta/data/icons/hi32-app-quanta_be.png create mode 100644 quanta/data/icons/hi48-app-quanta.png create mode 100644 quanta/data/icons/hi48-app-quanta_be.png create mode 100644 quanta/data/pics/Makefile.am create mode 100644 quanta/data/pics/quantalogo.png create mode 100644 quanta/data/pics/quantalogo_be.png create mode 100644 quanta/data/pics/wiznewprjfin.png create mode 100644 quanta/data/pics/wiznewprjglb.png create mode 100644 quanta/data/pics/wiznewprjloc.png create mode 100644 quanta/data/pics/wiznewprjweb.png create mode 100644 quanta/data/templates/Makefile.am create mode 100644 quanta/data/templates/binaries/Makefile.am create mode 100644 quanta/data/templates/binaries/dirinfo create mode 100644 quanta/data/templates/binaries/images/Makefile.am create mode 100644 quanta/data/templates/binaries/images/jpg/Makefile.am create mode 100644 quanta/data/templates/binaries/images/jpg/demo.jpg create mode 100644 quanta/data/templates/binaries/images/others/Makefile.am create mode 100644 quanta/data/templates/binaries/images/others/demo.tif create mode 100644 quanta/data/templates/binaries/images/png/Makefile.am create mode 100644 quanta/data/templates/binaries/images/png/demo.png create mode 100644 quanta/data/templates/binaries/others/Makefile.am create mode 100644 quanta/data/templates/binaries/others/print.pdf create mode 100644 quanta/data/templates/documents/Makefile.am create mode 100644 quanta/data/templates/documents/dirinfo create mode 100644 quanta/data/templates/documents/html/Makefile.am create mode 100644 quanta/data/templates/documents/html/demo.html create mode 100644 quanta/data/templates/documents/others/Makefile.am create mode 100644 quanta/data/templates/documents/others/demo.txt create mode 100644 quanta/data/templates/documents/scripts/Makefile.am create mode 100644 quanta/data/templates/documents/scripts/demo.script create mode 100644 quanta/data/templates/images/Makefile.am create mode 100644 quanta/data/templates/images/banners/Makefile.am create mode 100644 quanta/data/templates/images/banners/demo.jpg create mode 100644 quanta/data/templates/images/buttons/Makefile.am create mode 100644 quanta/data/templates/images/buttons/ball.png create mode 100644 quanta/data/templates/images/dirinfo create mode 100644 quanta/data/templates/images/jpg/Makefile.am create mode 100644 quanta/data/templates/images/jpg/demo.jpg create mode 100644 quanta/data/templates/images/others/Makefile.am create mode 100644 quanta/data/templates/images/others/demo.tif create mode 100644 quanta/data/templates/images/png/Makefile.am create mode 100644 quanta/data/templates/images/png/demo.png create mode 100644 quanta/data/templates/pages/Makefile.am create mode 100644 quanta/data/templates/pages/dirinfo create mode 100644 quanta/data/templates/pages/docbook/Makefile.am create mode 100644 quanta/data/templates/pages/docbook/kde-doc-template.docbook create mode 100644 quanta/data/templates/pages/html/Makefile.am create mode 100644 quanta/data/templates/pages/html/html_4.0.1/Makefile.am create mode 100644 quanta/data/templates/pages/html/html_4.0.1/basic.html create mode 100644 quanta/data/templates/pages/html/special/Makefile.am create mode 100644 quanta/data/templates/pages/html/special/drag_n_drop_men.html create mode 100644 quanta/data/templates/pages/html/xhtml/Makefile.am create mode 100644 quanta/data/templates/pages/html/xhtml/Quanta_Times.html create mode 100644 quanta/data/templates/pages/html/xhtml/leftMen_BB.html create mode 100644 quanta/data/templates/pages/html/xhtml/leftMen_Quanta.html create mode 100644 quanta/data/templates/pages/html/xhtml/rightMen_BB.html create mode 100644 quanta/data/templates/pages/html/xhtml/rightMen_Quanta.html create mode 100644 quanta/data/templates/pages/html/xhtml/twoSideMen_BB.html create mode 100644 quanta/data/templates/pages/html/xhtml/twoSideMen_Quanta.html create mode 100644 quanta/data/templates/pages/php/Makefile.am create mode 100644 quanta/data/templates/pages/php/demo.php create mode 100644 quanta/data/templates/scripts/Makefile.am create mode 100644 quanta/data/templates/scripts/dirinfo create mode 100644 quanta/data/templates/scripts/javascript/Makefile.am create mode 100644 quanta/data/templates/scripts/javascript/email_validate.js create mode 100644 quanta/data/templates/scripts/javascript/overlib.js create mode 100644 quanta/data/templates/scripts/javascript/preload.js create mode 100644 quanta/data/templates/scripts/perl/Makefile.am create mode 100644 quanta/data/templates/scripts/perl/demo.perl create mode 100644 quanta/data/templates/scripts/php/Makefile.am create mode 100644 quanta/data/templates/scripts/php/demo.php create mode 100644 quanta/data/templates/text/Makefile.am create mode 100644 quanta/data/templates/text/dirinfo create mode 100644 quanta/data/templates/text/html/Makefile.am create mode 100644 quanta/data/templates/text/html/demo.html create mode 100644 quanta/data/templates/text/others/Makefile.am create mode 100644 quanta/data/templates/text/others/demo.txt create mode 100644 quanta/data/templates/text/scripts/Makefile.am create mode 100644 quanta/data/templates/text/scripts/demo.php create mode 100644 quanta/data/tips create mode 100644 quanta/data/toolbars/Makefile.am create mode 100644 quanta/data/toolbars/cfml/Makefile.am create mode 100644 quanta/data/toolbars/cfml/cfml.toolbar.tgz create mode 100644 quanta/data/toolbars/cfml/fonts.toolbar.tgz create mode 100644 quanta/data/toolbars/cfml/forms.toolbar.tgz create mode 100644 quanta/data/toolbars/cfml/lists.toolbar.tgz create mode 100644 quanta/data/toolbars/cfml/standard.toolbar.tgz create mode 100644 quanta/data/toolbars/cfml/tables.toolbar.tgz create mode 100644 quanta/data/toolbars/css/Makefile.am create mode 100644 quanta/data/toolbars/css/css.toolbar.tgz create mode 100644 quanta/data/toolbars/debug.toolbar.tgz create mode 100644 quanta/data/toolbars/docbook/Makefile.am create mode 100644 quanta/data/toolbars/docbook/docbook_code.toolbar.tgz create mode 100644 quanta/data/toolbars/docbook/docbook_ui.toolbar.tgz create mode 100644 quanta/data/toolbars/docbook/docbook_xml.toolbar.tgz create mode 100644 quanta/data/toolbars/docbook/xmltools.toolbar.tgz create mode 100644 quanta/data/toolbars/html/Makefile.am create mode 100644 quanta/data/toolbars/html/forms.toolbar.tgz create mode 100644 quanta/data/toolbars/html/lists.toolbar.tgz create mode 100644 quanta/data/toolbars/html/other.toolbar.tgz create mode 100644 quanta/data/toolbars/html/standard.toolbar.tgz create mode 100644 quanta/data/toolbars/html/style.toolbar.tgz create mode 100644 quanta/data/toolbars/html/tables.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/Makefile.am create mode 100644 quanta/data/toolbars/kde-docbook/kde-docbook-admonitions.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/kde-docbook-images.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/kde-docbook-list.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/kde-docbook-standard.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/kde-docbook-tables.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/kde-docbook-uielements.toolbar.tgz create mode 100644 quanta/data/toolbars/kde-docbook/kdexmltools.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/Makefile.am create mode 100644 quanta/data/toolbars/schema/attributes.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/complex.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/documentation.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/facets.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/main.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/misc.toolbar.tgz create mode 100644 quanta/data/toolbars/schema/simple.toolbar.tgz create mode 100644 quanta/data/toolbars/tagxml/Makefile.am create mode 100644 quanta/data/toolbars/tagxml/tagxml.toolbar.tgz create mode 100644 quanta/data/toolbars/wml-1-2/Makefile.am create mode 100644 quanta/data/toolbars/wml-1-2/deck.toolbar.tgz create mode 100644 quanta/data/toolbars/wml-1-2/forms.toolbar.tgz create mode 100644 quanta/data/toolbars/wml-1-2/misc.toolbar.tgz create mode 100644 quanta/data/toolbars/wml-1-2/table.toolbar.tgz create mode 100644 quanta/data/toolbars/wml-1-2/tasks.toolbar.tgz create mode 100644 quanta/data/toolbars/wml-1-2/text.toolbar.tgz create mode 100644 quanta/data/toolbars/xml/Makefile.am create mode 100644 quanta/data/toolbars/xml/fonts.toolbar.tgz create mode 100644 quanta/dialogs/Makefile.am create mode 100644 quanta/dialogs/actionconfigdialog.cpp create mode 100644 quanta/dialogs/actionconfigdialog.h create mode 100644 quanta/dialogs/actionconfigdialogs.ui create mode 100644 quanta/dialogs/casewidget.ui create mode 100644 quanta/dialogs/copyto.cpp create mode 100644 quanta/dialogs/copyto.h create mode 100644 quanta/dialogs/debuggeroptionss.ui create mode 100644 quanta/dialogs/dirtydialog.ui create mode 100644 quanta/dialogs/dirtydlg.cpp create mode 100644 quanta/dialogs/dirtydlg.h create mode 100644 quanta/dialogs/donationdialog.ui create mode 100644 quanta/dialogs/dtdselectdialog.ui create mode 100644 quanta/dialogs/dtepeditdlg.cpp create mode 100644 quanta/dialogs/dtepeditdlg.h create mode 100644 quanta/dialogs/dtepeditdlgs.ui create mode 100644 quanta/dialogs/dtepstructureeditdlgs.ui create mode 100644 quanta/dialogs/filecombo.cpp create mode 100644 quanta/dialogs/filecombo.h create mode 100644 quanta/dialogs/fourbuttonmessagebox.ui create mode 100644 quanta/dialogs/fourbuttonmessagebox.ui.h create mode 100644 quanta/dialogs/loadentitydlgs.ui create mode 100644 quanta/dialogs/settings/Makefile.am create mode 100644 quanta/dialogs/settings/abbreviation.cpp create mode 100644 quanta/dialogs/settings/abbreviation.h create mode 100644 quanta/dialogs/settings/abbreviations.ui create mode 100644 quanta/dialogs/settings/codetemplatedlgs.ui create mode 100644 quanta/dialogs/settings/filemasks.cpp create mode 100644 quanta/dialogs/settings/filemasks.h create mode 100644 quanta/dialogs/settings/filemaskss.ui create mode 100644 quanta/dialogs/settings/parseroptions.cpp create mode 100644 quanta/dialogs/settings/parseroptions.h create mode 100644 quanta/dialogs/settings/parseroptionsui.ui create mode 100644 quanta/dialogs/settings/previewoptions.cpp create mode 100644 quanta/dialogs/settings/previewoptions.h create mode 100644 quanta/dialogs/settings/previewoptionss.ui create mode 100644 quanta/dialogs/settings/styleoptionss.ui create mode 100644 quanta/dialogs/specialchardialog.cpp create mode 100644 quanta/dialogs/specialchardialog.h create mode 100644 quanta/dialogs/specialchardialogs.ui create mode 100644 quanta/dialogs/tagdialogs/Makefile.am create mode 100644 quanta/dialogs/tagdialogs/colorcombo.cpp create mode 100644 quanta/dialogs/tagdialogs/colorcombo.h create mode 100644 quanta/dialogs/tagdialogs/corewidgetdlg.cpp create mode 100644 quanta/dialogs/tagdialogs/listdlg.cpp create mode 100644 quanta/dialogs/tagdialogs/listdlg.h create mode 100644 quanta/dialogs/tagdialogs/pictureview.cpp create mode 100644 quanta/dialogs/tagdialogs/pictureview.h create mode 100644 quanta/dialogs/tagdialogs/tagattr.cpp create mode 100644 quanta/dialogs/tagdialogs/tagattr.h create mode 100644 quanta/dialogs/tagdialogs/tagdialog.cpp create mode 100644 quanta/dialogs/tagdialogs/tagdialog.h create mode 100644 quanta/dialogs/tagdialogs/tagimgdlg.cpp create mode 100644 quanta/dialogs/tagdialogs/tagimgdlg.h create mode 100644 quanta/dialogs/tagdialogs/tagimgdlgdata.cpp create mode 100644 quanta/dialogs/tagdialogs/tagmail.ui create mode 100644 quanta/dialogs/tagdialogs/tagmaildlg.cpp create mode 100644 quanta/dialogs/tagdialogs/tagmaildlg.h create mode 100644 quanta/dialogs/tagdialogs/tagmisc.ui create mode 100644 quanta/dialogs/tagdialogs/tagmiscdlg.cpp create mode 100644 quanta/dialogs/tagdialogs/tagmiscdlg.h create mode 100644 quanta/dialogs/tagdialogs/tagquicklistdlg.cpp create mode 100644 quanta/dialogs/tagdialogs/tagquicklistdlg.h create mode 100644 quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp create mode 100644 quanta/dialogs/tagdialogs/tagwidget.cpp create mode 100644 quanta/dialogs/tagdialogs/tagwidget.h create mode 100644 quanta/dialogs/tagdialogs/tagxml.cpp create mode 100644 quanta/dialogs/tagdialogs/tagxml.h create mode 100644 quanta/messages/Makefile.am create mode 100644 quanta/messages/annotationoutput.cpp create mode 100644 quanta/messages/annotationoutput.h create mode 100644 quanta/messages/messageitem.cpp create mode 100644 quanta/messages/messageitem.h create mode 100644 quanta/messages/messageoutput.cpp create mode 100644 quanta/messages/messageoutput.h create mode 100644 quanta/parsers/Makefile.am create mode 100644 quanta/parsers/dtd/Makefile.am create mode 100644 quanta/parsers/dtd/dtd.cpp create mode 100644 quanta/parsers/dtd/dtd.h create mode 100644 quanta/parsers/dtd/dtdparser.cpp create mode 100644 quanta/parsers/dtd/dtdparser.h create mode 100644 quanta/parsers/dtd/dtepcreationdlg.ui create mode 100644 quanta/parsers/node.cpp create mode 100644 quanta/parsers/node.h create mode 100644 quanta/parsers/parser.cpp create mode 100644 quanta/parsers/parser.h create mode 100644 quanta/parsers/parsercommon.cpp create mode 100644 quanta/parsers/parsercommon.h create mode 100644 quanta/parsers/qtag.cpp create mode 100644 quanta/parsers/qtag.h create mode 100644 quanta/parsers/sagroupparser.cpp create mode 100644 quanta/parsers/sagroupparser.h create mode 100644 quanta/parsers/saparser.cpp create mode 100644 quanta/parsers/saparser.h create mode 100644 quanta/parsers/tag.cpp create mode 100644 quanta/parsers/tag.h create mode 100644 quanta/parts/Makefile.am create mode 100644 quanta/parts/kafka/ChangeLog create mode 100644 quanta/parts/kafka/DESIGN create mode 100644 quanta/parts/kafka/Makefile.am create mode 100644 quanta/parts/kafka/configure.in.in create mode 100644 quanta/parts/kafka/cursors.cpp create mode 100644 quanta/parts/kafka/cursors.h create mode 100644 quanta/parts/kafka/domtreeview.cpp create mode 100644 quanta/parts/kafka/domtreeview.h create mode 100644 quanta/parts/kafka/entities create mode 100644 quanta/parts/kafka/htmldocumentproperties.cpp create mode 100644 quanta/parts/kafka/htmldocumentproperties.h create mode 100644 quanta/parts/kafka/htmldocumentpropertiesui.ui create mode 100644 quanta/parts/kafka/htmlenhancer.cpp create mode 100644 quanta/parts/kafka/htmlenhancer.h create mode 100644 quanta/parts/kafka/kafkacommon.cpp create mode 100644 quanta/parts/kafka/kafkacommon.h create mode 100644 quanta/parts/kafka/kafkadragobject.cpp create mode 100644 quanta/parts/kafka/kafkadragobject.h create mode 100644 quanta/parts/kafka/kafkahtmlpart.cpp create mode 100644 quanta/parts/kafka/kafkahtmlpart.h create mode 100644 quanta/parts/kafka/kafkaresource.h create mode 100644 quanta/parts/kafka/kafkasyncoptions.cpp create mode 100644 quanta/parts/kafka/kafkasyncoptions.h create mode 100644 quanta/parts/kafka/kafkasyncoptionsui.ui create mode 100644 quanta/parts/kafka/nodeenhancer.h create mode 100644 quanta/parts/kafka/nodeproperties.cpp create mode 100644 quanta/parts/kafka/nodeproperties.h create mode 100644 quanta/parts/kafka/pics/Makefile.am create mode 100644 quanta/parts/kafka/pics/comment.png create mode 100644 quanta/parts/kafka/pics/php.png create mode 100644 quanta/parts/kafka/undoredo.cpp create mode 100644 quanta/parts/kafka/undoredo.h create mode 100644 quanta/parts/kafka/wkafkapart.cpp create mode 100644 quanta/parts/kafka/wkafkapart.h create mode 100644 quanta/parts/preview/Makefile.am create mode 100644 quanta/parts/preview/whtmlpart.cpp create mode 100644 quanta/parts/preview/whtmlpart.h create mode 100644 quanta/plugins/Makefile.am create mode 100644 quanta/plugins/pluginconfig.ui create mode 100644 quanta/plugins/plugineditor.ui create mode 100644 quanta/plugins/quantaplugin.cpp create mode 100644 quanta/plugins/quantaplugin.h create mode 100644 quanta/plugins/quantapluginconfig.cpp create mode 100644 quanta/plugins/quantapluginconfig.h create mode 100644 quanta/plugins/quantaplugineditor.cpp create mode 100644 quanta/plugins/quantaplugineditor.h create mode 100644 quanta/plugins/quantaplugininterface.cpp create mode 100644 quanta/plugins/quantaplugininterface.h create mode 100644 quanta/project/Makefile.am create mode 100644 quanta/project/eventconfigurationdlg.cpp create mode 100644 quanta/project/eventconfigurationdlg.h create mode 100644 quanta/project/eventconfigurationdlgs.ui create mode 100644 quanta/project/eventeditordlg.cpp create mode 100644 quanta/project/eventeditordlg.h create mode 100644 quanta/project/eventeditordlgs.ui create mode 100644 quanta/project/membereditdlg.cpp create mode 100644 quanta/project/membereditdlg.h create mode 100644 quanta/project/membereditdlgs.ui create mode 100644 quanta/project/project.cpp create mode 100644 quanta/project/project.h create mode 100644 quanta/project/projectlist.cpp create mode 100644 quanta/project/projectlist.h create mode 100644 quanta/project/projectnewfinal.cpp create mode 100644 quanta/project/projectnewfinal.h create mode 100644 quanta/project/projectnewfinals.ui create mode 100644 quanta/project/projectnewgeneral.cpp create mode 100644 quanta/project/projectnewgeneral.h create mode 100644 quanta/project/projectnewgenerals.ui create mode 100644 quanta/project/projectnewlocal.cpp create mode 100644 quanta/project/projectnewlocal.h create mode 100644 quanta/project/projectnewlocals.ui create mode 100644 quanta/project/projectnewweb.cpp create mode 100644 quanta/project/projectnewweb.h create mode 100644 quanta/project/projectnewwebs.ui create mode 100644 quanta/project/projectoptions.ui create mode 100644 quanta/project/projectoptions.ui.h create mode 100644 quanta/project/projectprivate.cpp create mode 100644 quanta/project/projectprivate.h create mode 100644 quanta/project/projectupload.cpp create mode 100644 quanta/project/projectupload.h create mode 100644 quanta/project/projectuploads.ui create mode 100644 quanta/project/projecturl.h create mode 100644 quanta/project/rescanprj.cpp create mode 100644 quanta/project/rescanprj.h create mode 100644 quanta/project/rescanprjdir.ui create mode 100644 quanta/project/subprojecteditdlgs.ui create mode 100644 quanta/project/teammembersdlg.cpp create mode 100644 quanta/project/teammembersdlg.h create mode 100644 quanta/project/teammembersdlgs.ui create mode 100644 quanta/project/uploadprofiledlgs.ui create mode 100644 quanta/project/uploadprofiles.cpp create mode 100644 quanta/project/uploadprofiles.h create mode 100644 quanta/project/uploadprofilespage.ui create mode 100644 quanta/project/uploadprofilespage.ui.h create mode 100644 quanta/quanta.kdevelop create mode 100644 quanta/quanta.lsm create mode 100644 quanta/quanta_uml.xmi create mode 100644 quanta/scripts/Makefile.am create mode 100644 quanta/scripts/TemplateMagic.pl create mode 100644 quanta/scripts/TemplateMagic.pl.info create mode 100755 quanta/scripts/checkxml.kmdr create mode 100644 quanta/scripts/checkxml.kmdr.info create mode 100755 quanta/scripts/docbook_table.kmdr create mode 100755 quanta/scripts/dwt.kmdr create mode 100644 quanta/scripts/dwt.kmdr.info create mode 100644 quanta/scripts/dwt.pl create mode 100644 quanta/scripts/dwt.pl.info create mode 100644 quanta/scripts/externalpreview.sh create mode 100644 quanta/scripts/externalpreview.sh.info create mode 100755 quanta/scripts/gubed_install.kmdr create mode 100644 quanta/scripts/gubed_install.kmdr.info create mode 100755 quanta/scripts/htmlquickstart.kmdr create mode 100644 quanta/scripts/htmlquickstart.kmdr.info create mode 100644 quanta/scripts/info.css create mode 100644 quanta/scripts/info.xsl create mode 100755 quanta/scripts/listwizard.kmdr create mode 100755 quanta/scripts/meinproc.kmdr create mode 100644 quanta/scripts/meinproc.kmdr.info create mode 100755 quanta/scripts/picturewizard.kmdr create mode 100755 quanta/scripts/scriptinfo.kmdr create mode 100644 quanta/scripts/scriptinfo.kmdr.info create mode 100755 quanta/scripts/tablewizard.kmdr create mode 100755 quanta/scripts/tidy.kmdr create mode 100644 quanta/scripts/tidy.kmdr.info create mode 100755 quanta/scripts/xmlval.kmdr create mode 100644 quanta/scripts/xmlval.kmdr.info create mode 100755 quanta/scripts/xsltproc.kmdr create mode 100644 quanta/scripts/xsltproc.kmdr.info create mode 100644 quanta/src/Makefile.am create mode 100644 quanta/src/dcopquanta.cpp create mode 100644 quanta/src/dcopquanta.h create mode 100644 quanta/src/dcopquantaif.h create mode 100644 quanta/src/dcopsettings.cpp create mode 100644 quanta/src/dcopsettings.h create mode 100644 quanta/src/dcopsettingsif.h create mode 100644 quanta/src/dcopwindowmanagerif.h create mode 100644 quanta/src/document.cpp create mode 100644 quanta/src/document.h create mode 100644 quanta/src/dtds.cpp create mode 100644 quanta/src/dtds.h create mode 100644 quanta/src/kqapp.cpp create mode 100644 quanta/src/kqapp.h create mode 100644 quanta/src/main.cpp create mode 100644 quanta/src/quanta.cpp create mode 100644 quanta/src/quanta.desktop create mode 100644 quanta/src/quanta.h create mode 100644 quanta/src/quanta_be.desktop create mode 100644 quanta/src/quanta_init.cpp create mode 100644 quanta/src/quanta_init.h create mode 100644 quanta/src/quantadoc.cpp create mode 100644 quanta/src/quantadoc.h create mode 100644 quanta/src/quantaview.cpp create mode 100644 quanta/src/quantaview.h create mode 100644 quanta/src/viewmanager.cpp create mode 100644 quanta/src/viewmanager.h create mode 100644 quanta/src/x-webprj.desktop create mode 100644 quanta/treeviews/Makefile.am create mode 100644 quanta/treeviews/basetreeview.cpp create mode 100644 quanta/treeviews/basetreeview.h create mode 100644 quanta/treeviews/docfolder.cpp create mode 100644 quanta/treeviews/docfolder.h create mode 100644 quanta/treeviews/docitem.cpp create mode 100644 quanta/treeviews/docitem.h create mode 100644 quanta/treeviews/doctreeview.cpp create mode 100644 quanta/treeviews/doctreeview.h create mode 100644 quanta/treeviews/fileinfodlg.ui create mode 100644 quanta/treeviews/filestreeview.cpp create mode 100644 quanta/treeviews/filestreeview.h create mode 100644 quanta/treeviews/newtemplatedirdlg.cpp create mode 100644 quanta/treeviews/newtemplatedirdlg.h create mode 100644 quanta/treeviews/projecttreeview.cpp create mode 100644 quanta/treeviews/projecttreeview.h create mode 100644 quanta/treeviews/quantapropertiespage.ui create mode 100644 quanta/treeviews/scripttreeview.cpp create mode 100644 quanta/treeviews/scripttreeview.h create mode 100644 quanta/treeviews/servertreeview.cpp create mode 100644 quanta/treeviews/servertreeview.h create mode 100644 quanta/treeviews/structtreetag.cpp create mode 100644 quanta/treeviews/structtreetag.h create mode 100644 quanta/treeviews/structtreeview.cpp create mode 100644 quanta/treeviews/structtreeview.h create mode 100644 quanta/treeviews/tagattributeitems.cpp create mode 100644 quanta/treeviews/tagattributeitems.h create mode 100644 quanta/treeviews/tagattributetree.cpp create mode 100644 quanta/treeviews/tagattributetree.h create mode 100644 quanta/treeviews/templatedirform.ui create mode 100644 quanta/treeviews/templatestreeview.cpp create mode 100644 quanta/treeviews/templatestreeview.h create mode 100644 quanta/treeviews/uploadtreefile.cpp create mode 100644 quanta/treeviews/uploadtreefile.h create mode 100644 quanta/treeviews/uploadtreefolder.cpp create mode 100644 quanta/treeviews/uploadtreefolder.h create mode 100644 quanta/treeviews/uploadtreeview.cpp create mode 100644 quanta/treeviews/uploadtreeview.h create mode 100644 quanta/utility/Makefile.am create mode 100644 quanta/utility/myprocess.h create mode 100644 quanta/utility/newstuff.cpp create mode 100644 quanta/utility/newstuff.h create mode 100644 quanta/utility/qpevents.cpp create mode 100644 quanta/utility/qpevents.h create mode 100644 quanta/utility/quantabookmarks.cpp create mode 100644 quanta/utility/quantabookmarks.h create mode 100644 quanta/utility/quantacommon.cpp create mode 100644 quanta/utility/quantacommon.h create mode 100644 quanta/utility/quantanetaccess.cpp create mode 100644 quanta/utility/quantanetaccess.h create mode 100644 quanta/utility/resource.h create mode 100644 quanta/utility/tagaction.cpp create mode 100644 quanta/utility/tagaction.h create mode 100644 quanta/utility/tagactionmanager.cpp create mode 100644 quanta/utility/tagactionmanager.h create mode 100644 quanta/utility/tagactionset.cpp create mode 100644 quanta/utility/tagactionset.h create mode 100644 quanta/utility/toolbartabwidget.cpp create mode 100644 quanta/utility/toolbartabwidget.h create mode 100644 quanta/utility/toolbarxmlgui.cpp create mode 100644 quanta/utility/toolbarxmlgui.h (limited to 'quanta') diff --git a/quanta/AUTHORS b/quanta/AUTHORS new file mode 100644 index 00000000..2b381791 --- /dev/null +++ b/quanta/AUTHORS @@ -0,0 +1,11 @@ +Current maintainers: + Eric Laffoon + Andras Mantia + +Original authors: + Dmitry Poplavsky + Alexander Yakovlev + +Home page: http://kdewebdev.org/ +Download: http://sourceforge.net/projects/quanta +Bug form: http://bugs.kde.org diff --git a/quanta/ChangeLog b/quanta/ChangeLog new file mode 100644 index 00000000..ca7f3124 --- /dev/null +++ b/quanta/ChangeLog @@ -0,0 +1,1172 @@ +This files contains the changes since Quanta 2.0 until the current 3.5.x series. + +Version 3.5.9: + - bugfixes: + - fix crashes when using XDebug + - fix problem with not stopping on breakpoints when using XDebug + - do not keep an empty, Untitled document opened when opening new files [#151682] + - fix crash when closing a plugin and no other document is opened [#156728] + - insert literal character entities if possible [#129520] + - make HTML forms work in the internal preview + - fix deadlock in CSS editor when the propery contains ":" [#153221] +- improvements: + - list plugins in the Open With... menu. + +Version 3.5.8 (Release date: 07-10-2006) + - bugfixes: + - fix recursive symlink handling [#145651] + - fix add to project when saving a new file into a symlinked directory [#148529] + - do not lose CSS selectors after editing inside the dialog if they are + repeated [#145413] + - avoid crashes in various (random) cases + - make the parser as fast as it was in 3.5.6 and before + - fix help button in the New Project wizard [#145324] + - do not add the same entry over and over to the completion list + +Version 3.5.7 (Release date: xx-xx-2006; Started 06-02-2006) + - bugfixes: + - fix directory creation when certain ftp servers are used [#141232] + - fix crash when dropping a document template on an Untitled empty document [#141908] + - fix crash after using Close Other Tabs for a tab holding a plugin + - improvements: + - autocompletion for member variables. Patch by Andrew Lowe + . + +Version 3.5.6 (Release date: 26-01-2006; Started 12-10-2006): + - bugfixes: + - show Find in Files menu if KFileReplace is installed [related to #132530] + - fix various crashes in the debugger [#137483] + - fix crash when editing a + - other CSS editor invocation fixes + - don't change the tab name if saving under a new name failed (needs KDE 3.2.2 or later) + - use the correct quotation and case when inserting a link to a file from the treeviews [#76663] + - fix preview when preview prefix is used + - don't crash when parsing an included file.[#76478] + - give an error message when saving to remote files failed + + - performance: + - parse the included files less often + + - behavioral changes: + - remove the < and > from the misc. tag + + +Version 3.2.1 (Release date: 09-03-2004; Started 26-01-2004): + - bugfixes: + - VPL: + - put messageBoxes for cut/copy/paste/undo/redo instead of disabling the actions (was confusing) + - fix editing in the attribute editor of tags which contain special areas + - increase timeout for network operations to 60s [#73173] + - don't crash on upload if the current tab holds a plugin [#72912] + - don't try to copy the same file twice if it's dropped to the templates tree view + - fix crash when clicking on an item of the structure tree which point to an included file + - always enable the Open and Open Project buttons + - don't let the attribute tree to grow if the tag name is very long + - creation of templates directory failed in some cases when using the new project wizard + - don't crash the CSS editor on invalid CSS + - don't crash when setting table/body/header/footer attributes for newly created tables [#74949] + - don't crash the table editor on invalid nested tables + - don't crash the table editor when invoked on a table without + - make the spellchecker actually replace the wrongly spelled words [#75106] + - don't switch to the parent node when clicking on a node in the structure tree and Follow Cursor is enabled [# + - don't crash when trying to drag the No Project text in the project tree + - fix saving of files with fish:// [#74716] + - make insertion and renaming in the project tree view work as expected + - fix opening of documentation pages with references [#70345] + - fix creation of remote projects [#73172] + - fix creation of project when the main directory starts with a protocol name + - various parsing fixes + - performance: + - delayed parsing: reparse only if there was no keypress for some time [#63000 and its duplicates] + - background parsing: allow user input while parsing [#63000 and its duplicates] + - load DTEPs only on demand: improves startup performance, uses less memory. + - behavioral changes: + - remove unusable menu items from the RMB menus instead of disabling them + - enhancements: + - improve document type recognition (treat escaped quote marks as normal quotes) [#61873] + - improve namespace support in the autocompletion + +Version 3.2.0 (Release date: 05-02-2004): + - well, mostly the below ones. Check also the KDE 3.2 feature plan. + +Version 3.2-CVS-1 (Release Date: xx-xx-200x; Started: 25-11-2002) +NOTE: Minimum KDE 3.1 is required. + [3.2] means that KDE 3.2 (CVS HEAD) is required for the feature to work +correctly, or to work at all. + - bugfixes: + - some makefile cleanup, including fixing of --with-kommander option + - some fixes for compilation and running under KDE 3.0.x + - 0(=disable) for structure tree refreshing frequency was not handled + correctly on the next startup of Quanta, slowing it down + - autoselect the renamed files in the Upload Project dialog + - make the Apply button in Configure Toolbars dialog work as expected + - replace > with > when pasting as HTML quoted [#56234] + - opening project views or multiple files on startup is much faster + - don't close quanta, if the user cancelled the toolbar saving [#59952] + - shortcut to Misc. Tag changed to Ctrl-Shift-T [#60616] + - don't toggle the KPart plugin action, if the plugin can't be loaded + - keep the permissions on upload [#63671] + + - new features: + - "Replace selection" for script actions replaces the selection if + there was some text selected + - new option (Tag Style->Update opening/closing tags automatically) to + automatically change the closing/opening tag if the opening/closing tag + is modified + - new options in Parser: + - Show empty tag nodes + - Show closing tags + - Instant update (updates the structure tree as you type) + - possibility to define file patterns to be excluded from project added + to the Project Options. + - "Rename User Toolbar" menu item added + - context menus (Rename Toolbar, Remove Toolbar, Edit Toolbar, + Remove Action, Edit Action) to user toolbars added [3.2] + - abbreviation support added + - heuristics to guess the closest matching DTD for the opened document + added. Implements wish #53787. + - Add New Folder dialog to add local/remote folders to the Files Tree + - CSS pseudo DTD added (basic version, only for parsing) + - filtering possibility through a script action for templates added + - show an error message if the DTD tag files are broken + - support opening of linked, included files from the Structure Tree or from + the editor RMB menu + - upload current file action added + - input source setting for KPart plugins + - readonly setting for KPart plugins added + - entering "/" after "<" fills up the correct closing tag name + - parse the included files in pseudo DTD's for structure groups + - fix disappearing status bar bug after switching away from a plugin + - new Attribute Tree View added. You can view/edit the attributes of a tag + here. + - new option: set different pre-defined layouts + - offer the possibility to Save, Save As, Don't save the modified user + toolbars on their removal [#59952] + - basic namespace support in autocompletion and the Attribute Tree + - frame wizard + - DTD for XMLSchema 1.0 + - DTD for ColdFusion added + - autocompletion for some &char; like entities added + - Reload current file menu added + - autofill mandatory child tags + - note with an icon if there is some parsing problem (like using a tag + without it's mandatory child elements). Give a description of the problem in the + message window. + - skip the html tags when spell-checking [#56586] [3.2] + - project documentation in the documentation tree + - script management facility: a new scrip treeview + - a lot of script helping XML development + - XSLT debugger: kxsldbg by Keith Isdale + - KFileReplace: search & replace in files + - new DTD menu with the following new items: + - DTD->DTEP converter + - Load DTEP + - Send DTEP in Email + - Reload, Upload and Close Other Tabs added to the context menu + - added the possibility of changing the case of tags/attributes + - preview the NOFRAMES area of a document + + - usability enhancements: + - added KTip dialog on start up and help menu + - new Output Window options for KPart plugins: + - Editor Tab + - Editor Frame + - Message Frame + - reworked Configure Actions dialog + - allow the user to decide about opening of files with unknown type + - show the Insert/Overwrite status in the status bar + - show detailed descriptions in the special chars combobox + - restructured editor context menu + - default to the document or project dir when opening a new document + - load the global plugins config file after the local one. This is + important after an update when the global plugin config file contains + new plugins. + - warn the users if the plugins are not accessible. + - new Quick Start dialog for HTML/XHTML DTD variants + - up to 10 times faster project handling + - new, more powerful HTML table editor + - new DCOP interfaces: + - changed behavior: + - in the RMB menu of Structure Tree View, the "Parse As" is renamed to + "Show Groups For". You can select the DTD to show the groups for. + - the "Create new file as" options are removed. The default DTD is used + for new and unrecognized files + - the "Default DTD" option has been moved from "Parser" to "Environment" + - the "Always hide DTD toolbar" option is removed + - the old weblint syntax checker is dropped. HTML Tidy is used, but not shipped + with Quanta. You can still use the weblint if you download and set up an + action for it + - synched the File and Grep dialog code with Kate + - learning of unknown, user entered tags (and functions) + - enhanced structure tree building; more general code + - changed description.rc structure + - the treeviews look and behave the same as the rest of KDE + - using KDevelop 3.0 (Gideon) for developing + - sort DTD lists in selection combo boxes + - on startup load the files from the default project view and the last opened files + - completely new parsing routine (faster, better, nicer) + - copyright dates and information updated + - updated README + - UML diagram file added to repository (quanta_uml.xmi) + - TODO file added + + +Version 3.1.4 (Release date: xx-xx-2003) + - bugfixes: + - resolve symlinks before opening a file [#60860] + - don't insert the ") + - enable copying from documentation/preview even if the user uses separate clipboard + and selection + - warn about existing files on rename [#60187] + - encode the subject in a mailto url [#60275] + + - usability enhancements: + - default to the project dir when saving a new document [#57654] + - don't insert spaces before CSS values (it disturbs some browsers) [#41227] + - replace %pid with Quanta's pid in the script action line + - replace %input with the selected input source the script action line + +Version 3.1.2 (Release date: 12-05-2003) + - bugfixes: + - fix ocassional crash when pressing Ctrl-H while viewing the documentation + - fix user toolbar handling + - fix execution of script actions which does not have any argument [#56211] + - fix shortcut for Color dialog [#56235] + - store the upload options in the project file [#56237] + - closing the files (and closing Quanta) isn't slow anymore [#56233] + - store and use the spell checking settings [#56561] + - fix the Insert/Overwrite mode handling [#56382] + - fix the height of the toolbar tab + - fix failure of re-opening a file from File->Open Recent + - do not crash when accessing the Plugins menu after a plugin was removed, but + the Edit dialog was closed with Cancel (thanks to Laurent Montel) + - don't use the preview prefix after the project is closed + - show the directory selection dialogs in the project options [#56698] + - allow selection of empty directories in Rescan/Upload/New project dialogs + [#56778] + - fix Quanta tagxml DTD + - fix the DTD tag files, add warning if they contain syntax errors + - use the Attribute Quotation setting + - allow opening of empty local files [#57718] + - show files with : inside their names correctly in the Project Tree [#56639] + - don't close a modified document if saving has failed [#58013] + - fix the selection of modified files in the upload dialog. Should be more + accurate now. + - do not truncate the file after a preview + - usability enhancements: + - bring up the message output window, when and action/plugin wants to printed + some message. Implements wish #55645. + - show files with relative path to the current document in "url" + autocompletion [#55989] + - switch to the first editable widget when the tag editing dialog appears + - changed behavior: + - and is inserted instead of and for HTML documents + - new DCOP interfaces: + - WindowManagerIf::projectURL() + - WindowManagerIf::openedURLs() + - new features: + -DocBook 4.2 DTD added + +Version 3.1.1 (Release date: 17-03-2003) +NOTE: Released together with KDE 3.1.1. + - bugfixes: + - insert valid DTD definitions [#53274] + - Select Tag Area behavior fixed for optional tags + - insert non-translated string in CSS code parts + - honor the View Default settings from Settings->Configure Editor [#53569] + - be less braindead regarding the Show DTD Toolbar setting [#53739] + - don't quote the script line more than once in the action configuration dialog + - memory leak: editor parts were not deleted when a file was closed + - fix insertion of img tags in HTML documents + - upload/rescan project/add to new project tree view behavior fixed (really) + - fix renaming of file in the Project Tree, when a file with the new name was + already present in the project + - use the correct encoding for newly created files + - be able to select also directories in tag dialogs [#54819] + - insert "border-top", "border-right", etc. correctly in CSS + - rename only what has to be renamed in the project and enable project saving + after a rename + - saving of Author and E-Mail project options was broken in some cases + - fix numbering of new documents + - do not complain about text files being binary ones on a system with broken + mimetypes [#54924] + - fix session restoration [#53012] + - do not save the full path for action icons, only the icon name + - crash when deleting an action fixed + - insert valid single XML tags from the toolbar + - fix running of actions + - fix plugin placements and plugin window disappearing after a preview + - fix crash when Tag Edit Dialog was requested for an unknown tag action + - fix "mainwindow is not resizeable due to large toolbars" bug [#53230] + - bring up the file changed dialog, only when the file content has really changed [#55678] + - be able to run Quanta in every case by several users on the same machine + - usability enhancements: + - show the tag attributes (Alt-Down) menu lower than the current line + - the dialog layouts are corrected, so they should be usable with + every language. Should fix #51438, #53410, #53544, #54910. + - changed features: + - "Insert in cursor position" for script actions replaces the selection if + there was some text selected + - new DCOP interfaces: + - WindowManagerIf: + - currentEditorIfNum(): returns the editor if number for the active + document + - currentURL():returns the URL of the active document + - new features: + - DTD for Quanta tags (DTD definition) added + - XHTML 1.0 Strict DTD tags added + +Version 3.1 (Release date: 14-01-2003 (?); Started: 29-10-2002) + - released together with KDE 3.1 + - bugfixes: + - Selector combo was disabled when inserting a new CSS + - Preview Position setting is handled correctly for Right/Bottom. + - Show DTD Toolbar setting handling corrected + - startup bug with an old quantarc corrected (thanks to Ben Burton) + - corrected the handling of the Show Line Number and Show Icon Borders setting + - Edit Current Tag menu item re-added to popup menu + - Remove Folder From Top was not removing the folders permanently + - Fix behavior when using the "--unique" switch (SF #635850) + - possible crash when using broken script DTDs fixed + - Top Folders show the location of the folder near the name + - added a Dynamic Word Wrap item to View menu + - README updated + - temporary files go into a "quanta" subdir + - directory structure changes: + - Php and ColdFusion highlighting files moved to Kate + - documentation moved to doc/quanta + - translation files moved to kde-i18n + +Version 3.1-RC-1 (Release date: 28-10-2002; Started 27-09-2002) + - bugfixes: + - crash when configuring toolbars/action and running plugins fixed [Thanks to Simon Hausmann ] + - some possible startup bugs corrected + - annoying closing of files tree view items corrected + - annoying switching/flashing of tabs when upload/quit/save all was called removed + - annoying menu reordering after toolbars and actions configuration fixed (really) + - disappearing cursor fix + - remove the invalid files from the recent menu lists correctly + - add the projects to the recent project list correctly + - possibility to select project default DTD on creation now is possible + - Alt-Left and Alt-Right behavior corrected + - Insert Files in project bugfix when the selection contained directories [#48959] + - script actions located under paths containing spaced were not working correctly + - saving of project toolbars corrected + - line numbers and icon border setting is valid for all documents and saved correctly + - menu shortcuts fixed + - config saving on non-English platforms saved + - bug fixed when uploading in a non-existent dir structure + - no error was displayed if wget was missing [#49463] + - frames in preview were not working correctly [#49502] + - returning from context help restores the treeviews correctly + - Save As->Close->Open was not working correctly [SF #629172] + - preview position option is handled + - usability enhancements: + - faster project loading + - faster editing even with autocompletion turned on + - faster editing of large files + - redesigned project upload dialog + - redesigned New Project wizard + - adding of non-local directories is possible [requires KDE 3.1 (beta2 is not enough)] + - new features: + - plugins can be accessed via actions (so you can put them on toolbars) + - Kommander script dialog builder/executor tool added to Quanta. + Use --without-kommander to disable it's compilation. + - the Files and Templates tree view updates itself automatically if the listed + directory has changed + - extended network transparency: + - remote projects + - remote files in projects + - remote toolbars + - new "Rescan Project Directory" dialog + - progress indicator in the statusbar for various tasks + - project views (a set of files and toolbars): + - save / open views + - autoload a view on startup (configurable in the project options dialog) + - possibility to convert the document to the selected DTD added + - new items in the Project Tree View RMB menu + - project default language encoding setting added + - Clean Indentation menu item re-added + - basic DTD tag inheritance added (see the html-frameset directory) + - URL information supported in the DTD definition file + - Send DTD in E-Mail menu + - new DTD's added: + - HTML 4.01 Frameset (may not be according to the standard) + - HTML 4.01 Strict (may not be according to the standard) + - WML-1-2 (created by George Moody ) + - updated README file + - lots of code cleanup + - spellchecker updated to work with KDE 3.1 + - Files List View disabled for now (it was not working correctly) + +Version 3.0 (Release date: 27-09-2002 ; Started at: 12-09-2002) + - bugfixes: + - menus and toolbars were reordered after Configure Actions & Configure Toolbars + - editor options were not saved in some cases + - crash when entering "Quanta Homepage menu + - Help->Make a Donation menu + - View->Show DTD Toolbar menu + - Environment setting page (instead of File Masks) with: + - file masks selection + - default encoding selection combo box + - always hide DTD toolbar setting + - Parse As... menu for Structure Tree View + - warning and reload/merge possibility if a document was changed outside of Quanta + - new FTP upload dialog + - dynamic, DTD dependent toolbars + - project default DTD setting + - CSS Editor also edits now ;-) + - D&D from editor to templates tree saves the dragged selection to a template file + - XHTML tags added (in early phase) + - XSLT tags added + - XML style single tag support () + - plugin support (general, and specific like Cervisia) + - CVS management support with the Cervisia part + - usability changes: + - Tags menu instead of the old Insert menu. Holds the actions available on the toolbars. + - "Save To Template" instead of "Save As Template" (to avoid confusion) + - Italian and Polish translation files added + + +Version 3.0 pr2a (Release date: 11-09-2002 ; Started at: 10-09-2002): + - bugfixes: + - CTRL+Space autocompletion: completion box disappeared after the first keystroke + - no crash when there is an old local quantaui.rc found + - no crash on startup after showing: + "A toolbar with the same name already exists. + Please rename the loaded toolbar." + - Files Tree View sorting error fixed + - Files Tree & List View is much faster now + - correctly open documents with different encodings + - CTRL+Space completion fixes for markup languages + - DTD, tag definition changes: + - a tag file can have definitions for more than one tag (less files are required) + - extended tag file format for script languages + - faster parsing routine (with 30-40%) + - new options: + - auto-close optional tags + - auto-close all tags (except single ones) + - structure tree refresh frequency setting + - items in the autocompletion box are sorted + +Version 3.0 pr2 (Release date: 09-09-2002; Started at: 01-08-2002): + - bugfixes: + - MimeType handling bug + - unexpected file deletion bug [#36095] + - insertion of closing tag bug + - editor toolbar GUI bugfix [#45854] + - editing toolbars after deleting an action crashed Quanta. It's fixed now. + - Find in File function fixes + - editor options related fixes + - the behavior of the editor tabs is fixed (same QT bug as in 2.0pr2) + - XML commenting fix + - fix for external filter "eating" characters [SF #492587] + - fix for wrong inserting of tags when indentation with TAB was used [SF #601865] + - fixed some possible memory leaks + - updated Find in Files dialog [closes SF #584469] + - the "File list" dialog box shows the correct relative paths when no project is opened + - more closed bugs: #47371 + - autocompletion enhancements: + - new option to enable/disable the auto-completion feature + - script languages autocompletion (function names, function argument hints) + - CTRL+Space invokes manually the autocompletion + - CTRL+SHIFT+Spaces invokes arguments hints for script functions + - autocompletion is DTD sensitive + - editor enhancements: + - printing source documents is now supported + - extended file open/save dialog (from Kate) and encoding support + - updated "search in files" dialog + - Non-braking space insertion is ALT+Space + - editor tabs show only the filenames. Names with path are shown in the tooltip. + - "File list" dialog box is available via ALT+0 and right mouse menu + - DTD, tag definition changes: + - the .tag file structure has changed a lot. Check out the documentation. + - DTD recognition and DTD switching partially added + - new DTD dependent document parsing and structure tree + - tag editing is DTD dependent + - other changes: + - new homepage at the old location: http://quanta.sourceforge.net (Eric Laffoon) + - new documentation/help (Robert Nickel) + - new CSS creator / editor (Andrea Bergia) + - debian dir added to CVS (Ben Burton) + +Version 3.0 pr1 (Release date: 27-07-2002; Started at: 23-05-2002): + - actions can be assigned to toolbar directly from the Configure Actions dialog + - Alt-Down menu re-enable and basic autocompletion added. Thanks to Jason P. Hanley . + - possibility to save/load/add/remove/customize the toolbars + - D&D between Templates Tree View and the editor [Marc Britton ] + - new pages for the Properties dialog: Quanta directory, Quanta file info. Thanks to . + for the later. + - files are not saved anymore during internal preview, syntax checking + - preview prefix is used also when viewing with an external browser + - new dialog & shortcut for inserting misc. tags + - possibility to keep the upload password in the memory + - rescan project tree will find the hidden files + - support for local, global and project templates + - more cleanup of Makefile.am-s (to work with automake 1.5) + - new quick table dialog + - ported to KDE 3.0 + - the --with-ktabbar option is removed as it is no longer needed + - the internal editor uses KTextEditor interfaces + - improved PHP syntax highlighting file (will be also included in KDE 3.1 release) + +Version 2.0.1 (Release date: 12-12-2001; Started at: 06-12-2001): + - fix for libktexteditor linking errors + - fix for a crash when doing syntax check for a correct html + - fixed the saving and restoring of the project options + - added the DocPath entry to the .desktop file + - file preview for file from a subdir is fixed + - more fixes for relative paths + - removing of invalid files from the recent file lists added + - "--nologo" switch added to disable the splash screen during startup + +Version 2.0 (Release date: 06-12-2001; Started at: 23-11-2001): + - contains the below changes + +Changes made since Quanta+ 2.0-PR2 (by Andras Mantia): + - rename possibility of files/folders in the project tree view added + - mailto inserting dialog added (with KAB support) + - CSS syntax highlighting added + - tooltips added for the tree views + - inserting of empty directories is possible + - improved "New project" wizard + - rescan project tree will also find the empty dirs, and remove the missing ones + - save project menuitem added + - you can select the active opened file also from a list + - it's possible to use KDE (e.g. KDevelop) style tabbars. Use the --with-ktabbar switch + when you configure Quanta + - the behavior of the tabbar is somewhat fixed + - handling of directories with spaces in the name is fixed + - Open recent project list menu behavior fixed + - Show toolbar/statusbar/message output menu behavior fixed + - Save All behavior fixed + - links/images are inserted with correct relative paths + - compilation error fixes (mainly for Solaris) + - other possible crash fixes + + +23 Nov. 2001: + - Quanta+ project is still alive. Fixing and improving it has started. + - We should keep a ChangeLog, so I started it. :) (Andras) diff --git a/quanta/DESIGN b/quanta/DESIGN new file mode 100644 index 00000000..c2b6e68b --- /dev/null +++ b/quanta/DESIGN @@ -0,0 +1,338 @@ +This document tries to give a little overview about Quanta classes and their +interactions. The document is for Quanta+ 3.3 as of 27-05-2004. + +1. src directory +----------------- +- the main classes + +KSplash: the splash screen class (used only for KDE < 3.2.3). Called from the + KQApplication classes. + +KQApplicationPrivate: the common class for the unique and non-unique mode + Quanta application. + +KQApplication: the non-unique version of the Quanta application. + +KQUniqueApplication: the unique version of the Quanta application. + +QuantaApp: the main window class of Quanta. The main purpose is to handle + general user events and to process and provide general informations. + As it inherits from KMdiMainFrm it also does some window managing + jobs. + There is one global object of this type called quantaApp, but it's + recommended that you use the signal/slot mechanism instead of + calling directly the QuantaApp methods. It interacts almost with + every other class. + +QuantaInit: a class used only on startup to build the user interface, load the options, + set up the signal/slot connections, etc. It has a very short life and can be + imagined as a part of QuantaApp. + +QuantaDoc: an old class inherited from the pre-KMDI design of Quanta. The methods + from it most probably belong somewhere else (eg. QuantaApp). The main + tasks now are related to document opening and handling of some user + events. There is only one object of this type. + +QuantaView: a QuantaView can be imagined as a visual representation of a document, + plugin, part. It's the widget on a "tab" in the user interface. Each object + may hold either a Document (real document), QuantaPlugin (a plugin) and/or + a common widget (anything, like the preview part, documentation part). + It has methods to save the document, switch between different view modes + (VPL, source) and reacts to some events, like getting the focus. + The views are managed by the ViewManager. + +ViewManager: singleton object which manages the QuantaView's. It has methods to + create, remove, save views, reacts to view change, handles the + tab context menus and the D&D of tabs. Interacts with QuantaApp and + QuantaView. + +Document: an editable (KTextEditor) document with advanced, Quanta specific features. + There is a 1-1 relation between a Document and QuantaView. Each view can + have one Document and each Document can have only one view. Multiple + views of the same document is not supported by Quanta at this moment. + The class has methods to manipulate the KTextEditor::Document and + KTextEditor::View via the various KTextEditor interfaces in an editor + independent mode. Main tasks are: + - react to user keypresses + - handle autocompletion (when it should appear, what should appear in the + completion box, autocompleting of child tags) + - react to changes in the document and ask for a rebuild of the node tree + - modify the closing/opening tags based on the node tree + - create temporary files of opened documents (and after each save) + - create backups of documents + - handle text and tag insertion + - handling tag modifications + - react to changes made to the document outside of Quanta + - detect the main DTD of the document. Each Document has a main DTD, + but may contain other pseudo-DTDs inside. + - provides convenience methods to work with text documents (find, + findRev, findWordRev, currentWord, text selection) + - keeps track of untitled and modified status + +DTDs: stores and loads the DTEPs from disk as they are requested. Works with + DTDStruct classes (structures). Interacts with every class which works with + DTEPs. Singleton. + +DCOP* classes: the DCOP interfaces of Quanta. WindowManagerIf is the general + purpose interface working mainly with views and files, implemented in the + QuantaApp class. SettingsIf is an interfaces towards various Quanta settings and + QuantaIf is an interface towards Quanta internals like selectors, used in some + of the DTEP definition files. The interfaces (except WindowManagerIf) have a separate implementation class. + + +2. parsers directory +--------------------- +- parsing and node tree related classes (yes, QTag might not belong here) + +Parser: parses a document and builds the node tree. It does a quick parsing of XML + tags, special areas are not parsed in detail, only their start and end region is + determined. For XML areas it parses also for groups and does a quick + parsing of included (XML) files as well. It has a method to parse only the + changed area of the document (rebuild) and a method to find the node from + the tree corresponding for a place in the document (nodeAt). It calls + the detailed special area parser in the background via a singleshot timer. + Interacts with the SAParser, StructureTreeView and any other class requesting + information from the node tree. + There is usually only one Parser object in the memory, but it is not a singleton + as it's used in the table editor as well. + +SAParser: special area (pseudo DTEP) parser. Parses scripts, CSS, etc. Can do a quick + or detailed parsing in synchronous or asynchronous mode. The later means that + the parsing is done in small steps, using singleshot timers to call the next step, so + the user interface is not blocked while the detailed, time consuming parsing is + done. The parsing is context based. Calls the special area group parser for + every special area node. Emits signals to indicate the ending of parsing and + the need of the structure tree rebuilding. + +SAGroupParser: the special area group parser called from SAParser. This can behave + asynchronously as well. Emits signals to indicate the ending of parsing and + the need of the rebuilding of the group part of the structure tree. + +ParserCommon: common (static) methods used by the Parser and SAParser, and holds + parser-global data structures as well. + +Node: an element of the Node tree. Each Node has a parent, child, next and previous + Node (of course they can be NULL) and a Tag. The Tag cannot be NULL. + Each node appears at least once under the visual structure tree (mainListItem), + but can appear more than once if it's part of some structure groups (listItems) + There are convenience methods which helps navigating through the node tree and + some flags noting the status of the node. See the description of the class + attributes. + +Tag: a parsed tag. Each node has a tag. A tag can be a real XML tags from the + document or some other special tag noting text, empty area, structure begin, + structure end, comment, etc. XML tags are parsed and it's possible to read + the available attributes and attribute values, modify them, etc. Each tag has a + DTD associated with it, meaning that "this tag was parsed and should be + interpreted as part of this DTD", holds the position in the document, the + original text found at that position, a cleaned version of that text (without + comments), etc. A Tag is not necessary a valid tag of the DTD. + is a tag in any DTD. + +QTag: a valid DTD tag. When the tagXML files are read, each DTDStruct will contain many + QTag objects describing the valid tags in that DTD. The QTag gives us the + possible attributes and their values, the relationship regarding other QTags and + some other status information (single, optional, etc.). A QTag can hold + information about pseudo-DTD tags, which are not real XML tags, but they can + describe methods, classes, functions, etc. + +DTDParser: parses a real DTD definition file and converts to tagXML. + + +3. utility directory +------------------- +- helper, convenience classes; other classes not belonging anywhere else + +QuantaCommon: static convenience methods, used in many places. + +QConfig: holds the Quanta configuration settings. + +QuantaToolBar/ToolbarTabWidget/ToolbarXMLGUI: classes needed to make the + user toolbars work. + +TagAction: an extended KAction, which can be modified in Quanta. May be of three + types: Tag, Script, Text. Script actions can be executed in synchronous + (execute) or async. mode (insertTag). TagActions are usually put on the + user toolbars and under Tags menu, but they can be plugged anywhere + just like the normal KActions. + + +4. treeviews directory +----------------------- +- classes dealing with the different treeviews + +FilesTreeView/FilesTreeBranch/FilesTreeViewItem: shows the file and directory + structure in a tree. Can show more than one tree at once. By default + it shows a tree starting with the root directory (/) and one starting with the + $HOME directory of the current user. It's possible to specify other + such top-level directories. The toplevel directories can be remote directories + as well. The class handles the events of the file and folder context menus and + communicates using signals with QuantaApp, for example to indicate that + a file must be opened. + It's an extension of the KFileTreeView. + +ProjectTree* : an extension of the FilesTree* classes to show the project files in a + tree. The project files are not what are under the project directory, but + only those that are listed in the .webprj file. Communicates with QuantaApp + and the Project object via signals. It's a singleton class. + +TemplatesTree*: an extension of the FilesTree* classes to show the three special + template directories (global, local and project template directory). Handles + template specific actions (insert, template settings, send in email), D&D. + It's a singleton. + +ScriptTreeView: an extension of FilesTreeView class which shows the global and + local script directories, makes possible to execute or edit the scripts, + view or edit their descriptions. + +StructTreeView: the visual representation of the internal node tree. Build the visual + tree from the node tree, makes possible to navigate through the document + using the tree. + +StructTreeTag: an element of the structure tree. Every element has an associated Node + and the element is included in the listItems of the Node. + The problem checker is done in the constructor of the StructTreeTag element, + by verifying if the Node associated with the element holds a valid Tag for the + current DTD and the relation between the Node and the surrounding nodes + are valid in this DTD. + +UploadTree*: a treeview and it's file/folder elements with a special look. There is a + column with a 3 state checkbox. In case of folders checked means that + every element under the folder is checked, un-checked means that none + of the elements under the folder are checked and grayed means that some + elements (but not all) are checked. Used in the project upload dialog, the + project folder scanning dialog and in the new project wizard. + +TagAttributeTree/EnhancedTagAttributeTree/EditableTree/ +DualEditableTree/TopLevelItem/Attribute*: classes used to edit the attributes of a tag. + +DocTreeView/DocItem/DocFolder: the treeview and it's elements which show the + different loaded documentation files, including the project documentation. + The tree shows the documentation titles and the content is opened in a + HTML part embedded in a QuantaView or a separated toolview. + + +5. project directory +--------------------- +- project management related classes + +Project: the main project management class. Loads, stores, modifies the .webprj file. + Project related actions like project rescan, new project, project upload, + project properties, adding/removing files to the project are handled here. + It's a singleton. + +ProjectNew*: classes for different stages of the new project wizard. They are + instantiated from the Project object. + +ProjectUpload: class that handles uploading of project files. It has also a special mode + when the UI is minimized and in this mode the class can be used to modify + the upload profiles. + +RescanPrj: class that handles rescanning of the project directory and marking the + files that are under the directory but not in the .webprj file. It does not show + or mark the files that are excluded from the project in the project options. + +ProjectURL: an extended KURL with some status informations including description, + upload status and a note if the URL is a document-base folder or not. + Used inside Project and the other classes dealing with the project files (ProjectUpload, ProjectTreeView) + + +6. plugins directory +--------------------- +- (mainly) classes related to the plugin system + +QuantaPlugin: manages a configured Quanta plugin (a KPart). Takes care of loading and + unloading of the part, embedding it in a widget and calling the part's + openURL method with the configured argument. Special plugins that + needs to have a more detailed communication with Quanta can have + a plugin class inherited from QuantaPlugin. + +QuantaPluginInterface: the interface between QuantaApp and the QuantaPlugins. Reads + the plugins, returns pointers to them on request, validates them, etc. + +QuantaPluginEditor and QuantaPluginConfig: classes which helps configuring the plugins. + +SpellChecker: Quanta specific spellchecker. Not a real QuantaPlugin and most probably + it belongs to the utility directory. + + +7. parts directory +------------------ +- KParts used inside Quanta. + +WHTMLPart: simple KHTML based class which can display HTML pages. Used in preview + and documentation. + +kafka directory: VPL related classes + + +8. messages directory +------------------------ +- messaging system + +MessageOutput/MessageItem: widget to show messages from external applications or + from Quanta. Used to display the result of actions, but used by the + Problem reporter as well. It has a methods to find the line and column + number inside a message and clicking on a text containing the line and + column moves the cursor in the editor to that position. + + +9. dialogs directory +--------------------- +- some dialog implementations used in Quanta. The settings subdirectory contains the +widget implementations for the different Quanta setting pages, the tagdialog directory +contains classes dealing with the tagXML dialogs. + +ActionConfigDialog: makes TagAction configuration possible. Displays all possible + actions (not just TagActions) in a tree, all loaded user toolbars with + the actions on them. TagActions can be created, deleted, modified and + plugged/unplugged in a user toolbar. + +CopyTo: class which is used in many places to do asynchronous file copy. It signals + when the file copy is done and the object can be deleted. Mainly used + inside the Project* classes to add files to the project. + +DirtyDlg: dialog offering some possibilities for the user when a document was changed + outside of Quanta. In case of comparing the files it launches Kompare, waits + until it finishes and returns afterwards, this way blocking Quanta while Kompare + is running. + +FileCombo: widget class offering a combobox and a button to select files. Used in the + Tagxml class. + +SpecialCharDialog: a dialog which offers the user a list of special characters. + +AbbreviationDlg: handles the code abbreviations (adding/removing/editing them) + +FileMasks: a badly named class. Currently takes care of editing the environment settings. + +ParserOptions: make possible to finetune the parser and the structure tree behavior. + +PreviewOptions: another not so well named class, as currently it makes possible to + configure the UI look and behavior. Between others it offers possibility to + change the preview and documentation location, the tab and toolview + behavior, etc. + +tagdialogs directory: classes and widgets used to build a dialog from a tagXML file, which + makes possible to edit a tag in a document. Based on a Tag and the + corresponding QTag. + + +10. components directory +--------------------------- +- holds classes dealing with specific functions, many are DTD specific. + +csseditor directory: classes for the visual CSS editor + +cvsservice directory: a classes providing CVS functions for different context menus + (document context menu, treeview context menus) using cvsservice from + Cervisia. + +debugger directory: classes providing interface towards different debuggers, including + the Gubed PHP debugger. + +framewizard directory: classes for the visual HTML framewizard (frame editor) + +tableeditor directory: dialog to visually edit HTML tables + + diff --git a/quanta/HACKING b/quanta/HACKING new file mode 100644 index 00000000..6e46dedb --- /dev/null +++ b/quanta/HACKING @@ -0,0 +1,55 @@ + Quanta's coding style is a real mess as it was written by many persons, and +some had changed their style on-the-fly. ;-) From now on, if you add new code +to Quanta please follow the below rules: + +1. Use spaces instead of tabs. +2. Indent with 2 spaces. +3. Do not put spaces around parentheses, except in one case (grouping multiple + expressions): if ( (A || B) && (C || D) ) +4. Do not put spaces around "->", use: object->methodname(). +5. No extra spaces between parameters/arguments, just after commas: method(arg1, arg2, ...) +6. Put spaces around =, >, <, !=, +, -, /, *: a = b * c / d +7. Name the member variables as m_variablename if they are not public. See #8. +8. Try to avoid public member variables. Write instead set/get methods. See #9. +9. Don't put the "get" prefix ahead of the get method. Example: + Variable: m_foo + Get method: foo() + Set method: setFoo() +10. Mention the argument names also in header files. Signals may be an exception. +11. Use 0L when setting a pointer to NULL. +12. I prefer to put the opening { in a new line, but I'm not strongly against putting + it in the same line as the expression, like: if (a) { +13. Avoid inclusions in header files. Use forward declarations instead, like: + Header file: + class Foo; + class Foo2{ + Foo* m_foo; + } + Implementation file: + #include "foo.h" +14. Use .h and .cpp for file extension. +15. Use layouts when creating UI files, otherwise the UI components are not resized when you + resize the main widget, translated interfaces or when you use another widget style the + dialog might look bad. The simple way to do this is in Qt Designer: click on an empty space + and Ctrl-G. Do it first for every container style widget (boxes, frames, tabwidget tabs, etc.) + Try to resize the dialog after you preview it. +16. Make the tab order in widgets logical. Preview it and press tabs to see in which order are the + components focused. +17. 15 and 16 is valid for Kommander scripts as well. +18. Include the moc files in the .cpp files: use + #include "qobject_derivated_class_file.moc" + at the end of the cpp files. +19. Avoid the usage of .ui.h files (implementing the slots in Designer). The reasons behind this rule + are: + - the automake/autoconf framework won't detect if you make a change in the .ui.h file and the + file won't be recompiled if you modify it. Aside of being annoying can lead to unexpected + runtime and linking errors. + - it's nicer to edit the sources in KDevelop. ;-) + So instead of using .ui.h, create a derived class, and implement the slots/methods there. You can + still create and connect slots in Designer. +20. Create a new file for each (non-trivial) class. +21. Use forward declarations. +22. Put the inclusion for the class's header file as the first inclusion in the implemenetation file. + + +Last, but not least read the howto's and faq's on http://developer.kde.org diff --git a/quanta/Makefile.am b/quanta/Makefile.am new file mode 100644 index 00000000..a56b2bce --- /dev/null +++ b/quanta/Makefile.am @@ -0,0 +1,24 @@ +SUBDIRS = data utility dialogs components parsers treeviews messages plugins parts project src scripts + +#extract messages from sources, toolbars, data files and the toplevel lib directory +messages: rc.cpp + find . -name "*.cpp" -print > files ;\ + find . -name "*.cc" -print >> files ;\ + find . -name "*.h" -print >> files ;\ + find ../lib -name "*.h" -print >> files ;\ + find ../lib -name "*.cpp" -print >> files ;\ + toolbars=`find . -name "*.toolbar.tgz"`;\ + for toolbar in $$toolbars; do \ + tar Oxfz $$toolbar >> extrafiles ; \ + done ;\ + cat data/config/actions.rc >> extrafiles; \ + $(EXTRACTRC) `find . -name "*.ui"` >> rc.cpp ;\ + $(EXTRACTRC) `find . -name "*.rc"` >> rc.cpp ;\ + $(EXTRACTRC) `find . -name "*.kmdr"` >> rc.cpp ;\ + cat data/chars | perl -e 'while() { chomp ; s/\"/\\\"/ ; print "i18n(\"$$_\");\n"; }' >> rc.cpp ;\ + $(EXTRACTRC) extrafiles >> rc.cpp ;\ + cat extrafiles | perl -e 'while() { if (/\> rc.cpp + (cd data && $(PREPARETIPS) >> ../tips.cpp) + find . -name "*.tag" -print | xargs cat | perl -e 'while() { if (/\> rc.cpp + $(XGETTEXT) rc.cpp tips.cpp `cat files` -o $(podir)/quanta.pot + rm -f extrafiles tips.cpp files dirs diff --git a/quanta/NEWS b/quanta/NEWS new file mode 100644 index 00000000..9bc63f17 --- /dev/null +++ b/quanta/NEWS @@ -0,0 +1,4 @@ + For the latest new features and bugfixes in Quanta+ take a look at the ChangeLog file. + +The Quanta team. +http://kdewebdev.org diff --git a/quanta/Quanta-3.3-plan.kno b/quanta/Quanta-3.3-plan.kno new file mode 100644 index 00000000..fc22ca65 --- /dev/null +++ b/quanta/Quanta-3.3-plan.kno @@ -0,0 +1,106 @@ +\NewEntry 0 Change Log + +

Initial Version 2004-01-21 Eric Laffoon
(this is semi obsoleted by being in CVS)

Please list the topics and date you add or change like so...

Date Who Where What
03-12 McC New Features::Script Debug - changed
01-21 ELL Plugins::Knowit Planner - added
01-21 ELL New Features::KMDI - added
01-21 ELL FE::Toolbars::Phase 2 explanation - added

+ + +\NewEntry 0 Feature Enhancements + +\NewEntry 1 Actions + +

Actions should get new triggers.
* File Save
* Project open
* Project close
* cron

+ + +\NewEntry 1 DCOP + +

More things should be exported to DCOP
* CSS selectors
* DTEP Groups?

+ + +\NewEntry 1 KHTML + +

Use XSLT file indicated in (enhanced) project file to preview XML

+ + +\NewEntry 1 Toolbars + +

Toolbars need serious attention!
Phase 1:
1) Clean up for current usage
2) Create quick "add this tag to a toolbar" RMB function
3) Make toolbars abide by tag relationships like auto complete

Phase 2:
1) Add drop down icon group ability to manage larger sets (like on file folder icons) This will require a new type on the action dialog with a new sub dialog to list tags
2) Create toolbar modalities. Allow for recognition of edting type like tables, forms, data, layout and user defined tasks where entering a portion of a document, opening a view or directly selecting the mode changes selected toolbar or even toolbars and groupings.

The idea is that the user could teach Quanta how to provide optimal tools for various tasks and instead of a static layout the layout and presentation become dynamic. This will require balance and good icons to be more productive.

+ + +\NewEntry 2 Phase 2 explanation + +

> - Phase 2/2 sounds a little complicated to me and I'm also not sure that I understood it completely.

+

Think of it as personalities. The idea is that Quanta could interpret some aspects of what I am doing and offer toolbar presentations based on that. How to best go about it is not totally clear. Initially I had thought to have Quanta offer the relevent toolbar so the user didn't have to select it, but this is not completely effective it you think about it. Another possibility is to construct a toolbar on the fly from relevent tags... intriguing but probably not very fast or fluid. The advantage to the toolbars we have is that you know where the icons are. The disadvantage is you could end up switching between 3-4 of them building a formatted data form, which is not intuitive.

+

In balancing these several concepts seem to offer counterpoints.
familiar layout <-> specifically applicable actions
pre-made toolbars <-> dynamicly created toolbars
feature oriented toolbars <-> task oriented toolbars

+

Currently Quanta is solidly to the left and only to the left on all three of these points. I began considering adding task oriented toolbars. Which is better? If you could be certain that the toolbar would do the following you would have perfection:

+

1) orient correctly to every task
2) retain familiarity of layout for variations and segue to next task
3) offer only proper tag relationships

+

Inherently some tasks cannot be discerned from context but could be defined by the user. Selecting a task modality could convert all toolbars to the applicable tagging, not just one. However you may want to be in a standard layout in one situation (certainly in a blank page) but assume modal personalities in others (common data design scenarios).

+

So we can say this about the ultimate solution:

+

1) I don't think anybody is really anal enough to already be doing it.

+

2) If it could be accomplished it would be very very cool and get a lot of press.

+

3) It cannot be a single solution, thus it's multiple "personalities"

+

4) Basic structure and layout will take experimentation, and user feedback. In fact it would take a fair amount of study and refinement.

+

5) No single solution is possible so it must allow for easy user extensibility

+

Because we hope to be able to make VPL play a larger role we cannot discount the importance of good toolbar layout. Making toolbars load with a DTEP is a good start as are user toolbars. Extending intelligent context sensitive task extentions will make a big difference, especially when dealing with the huge diversity of tasks and preponderance of tags out there.

+

My vision is not just someone saving a toolbar for a task, but saving a whole personality. Imagine these as dowloadable resources. ;-)

+

+ + +\NewEntry 1 Templates + +

This was never really finished.
1) Linked information needs to be managed so that linked files are uploaded maintaining the links
2) tgz groupings need to be added as a new type
3) I need to search for the rest of the list I had assembled

+ + +\NewEntry 1 projects + +

Projects have several needs besides group abilities.
1) Project root can be below display root
2) Files can be marked for upload as normal (default), only with specific confirmation and never
3) CVS integration should at least add files to CVS when adding to the project to reduce duplication of user effort. Duplicating effort is bad!
4) Project views need to be reviewed and discussed. Originally I intended they would not close all other files on open and could be closed as a view. Now I am not sure if the current behavior is actually adequate.
5) Additional data will be available and the file will have local and remote entities. This will be covered in new features.

+ + +\NewEntry 1 VPL + +

Undoubtably there will be many things we want to do here. I'll start the list... This is not really prioritized.

1) Visual Table editor
2) Integration of visual CSS using our dialogs and tools
3) XSLT translation layer for XML
4) Script integration edit mode - very tricky but we should conceptually explore being able to interpret and edit elements of PHP in a loop for instance to create a visual mode for editing the layout or CSS visually in data layout. I'm suggesting merely exploring what is possible here as something exceptional if we had any degree of success.

+ + +\NewEntry 0 New Features + +\CurrentEntry 1 Script Debug + +


The TODO list is for Gubed integration is now kept and managed at the Gubed SF page,
http://sourceforge.net/projects/gubed/ (tracker and tasks)

+ + + +\NewEntry 1 KMDI + +

We need to bring this feature to Quanta ASAP.

+ + +\NewEntry 1 Form Debug + +

KDE 2 had a program called getvars which provided some interesting form debugging solutions. We need to get creative here because forms are a hassle.

1) load and save form data for testing
2) flyover info on form fields
3) RMB functionality (I wish I coudllremember all getvars did) to view and edit element values
4) indicate hidden values
5) show variables passed to and from form
6) create multi page form dumps to review order systems
7) Automated test - Insure no name duplication errors, etc.
8) Receiver creation dump - Take a created form and have it dump all the element names in various formats to ease creation of processing script

+ + +\NewEntry 1 Cookie Test + +

Use the excellent cookie management integrated into Quanta to test cookies - we probably just need to call the cookies dialog from Quanta.

+ + +\NewEntry 1 Annotations + +

Amaya has come up witha way to do annotations. We need to review and create one or use theirs.

+ + +\NewEntry 1 Group Projects + +

This is extensive! Andras and I have exchanged emails on this. In simple terms...

1) Complete redesign of project files
2) Private and project areas of file
3) Local and shared files provide full information
4) Permission and authorization systems with owner
5) Various methodologies for accomplishing group efforts

+ + +\NewEntry 1 RAD Site + +

This has largely been under wraps except a few teasers. It's going to be my baby.

RAD design has not come to web development because of the diverse approaches. It's rather difficult to even use code other people build in PHP because it's largely built with the assumption that it's the only systematic approach on your site intstead of a good object model as a part of what exists that abstracts well and plays together well. If I build it you won't use it because it's not your style and vice versa. That's where this is different.

1) Based on templates - this allows the user to develop the framework in layers
2) User defines abstractions - when you have a modular element in your design you define what the public and private interface is to it
3) Learning ability - because creating something like this is complex and involved the burden is lessened by enabling the system to assist in creation by learning
4) New abstract interface - the key to integrate this is an interface that uses "set"definitions starting with a page and defined elements in the page where the user defines relationships. Then there are the physical aspects in directory relationships (which are tracked) and group set assignments for style or layout which assist in painting an even interface.
5) The interface can be viewed panning various levels and perspectives and remembering view arrangements. Perspective would be things such as
- physical layout
- conceptual group
- style grouping
- layout grouping
Level views would include
- overview
- concept/style/layout group
- page elements/relationships
- element definitions
- various configuration dialogs

The concept here is that extremely anal content management can be done with tight control of abstrated design elements... or you could ease particular elements of a basic site design with nominal effort. Results would be up to the user and their design base.

Some aspects:
* moving files automatically manages links
* Minimal application speeds development and manages framework
* Page component templates function dynamically
* Would use comment system and or generated file to manage elements
* would be able to offer limited functionaliy directly importing existing sites
* Extreme application could completely manage an abstracted site where a site manager could request elements from contributors - combined with group projects and versioning a good manager can take skilled crafts people and clueless fools and weave a quality project. ;-)

+ + +\NewEntry 0 Plug Ins + +\NewEntry 1 Knowit Planner + +

I would like to see multiple view abilities in Knowit but over all it's a great tool. I'd like to see it made into a part and integrate it with Quanta for planning. I've discussed this with the author and he likes the idea.

It would also be nice if Knowit self annotated. ;-)

+ + diff --git a/quanta/README b/quanta/README new file mode 100644 index 00000000..5592bf65 --- /dev/null +++ b/quanta/README @@ -0,0 +1,250 @@ + Quanta Plus - a WEB Development tool for the K Desktop Environment. + Version: 3.5 line + Last updated: 2006-03-16 + +Table of contents +----------------- + + 1. Introduction + 2. Requirements + 3. Release notes + 4. Getting Quanta Plus + 5. Installation + 5.1 Installing two versions in parallel + 5.2 Common installation and compilation problems + 6. Common runtime problems + 7. Reporting bugs + 8. Developer info + 9. Contactins us, mailing lists + + +1. Introduction: +---------------- + It is more than a HTML editor, altough currently the majority of the users +are using Quanta+ to create web pages (HTML and PHP). Quanta+ supports a +lot of markup and script languages, and the number of supported languages +can be easily extended, even by the user. + + Our objective is to product a complete web development environment! +We are well on our way to those objectives, supporting basic HTML that now +assists you to write compliant mark up, as well as XML support. Our newest +features allow for the DTD to be read in on the fly and for visual page layout. + + Look for active development with a focus on supporting professional level +development. This means full HTML/XML support including cascading style +sheets and lots of time saving features. + Also improved support is planned for Perl, Javascript and PHP. + +2. Requirements +--------------- + Quanta Plus 3.5 was developed for KDE 3.5. We do our best to support running it +on KDE 3.4.x, but you should understand that as it is part of KDE 3.5, it's best +working under this version. Under KDE 3.4.x some of the new features are not +available or they may not work as expected. + Check out the KDE webpage (http://www.kde.org) for the requirements +running and compiling KDE 3.5 software. Generally for KDE 3.5.x you will +need at least QT 3.3.2 or above. Quanta also has some other runtime and +compile time (optional) dependencies as described in the toplevel PACKAGING file. + Don't forget that for compilation you need an environment set up for +developing. This means that aside from the compiler (usually GCC) and the +make tools (autoconf, automake, gmake/make and so) you need some additional +libraries and the _header_ files for those libraries. The headers are +usually located in the so called "-devel" or "-dev" packages in RPM based +distros, but this depends on the distribution you use. Some distributions +put the .la files for libraries to the devel packages, resulting in a linker +error at the end of the make process if you don't have the devel package installed. + For some more information about what do you need and how to compile KDE +(and KDE applications) read the documents from the following site: + http://developer.kde.org/build/index.html + +3. Release notes +---------------- + No known issues at this time. + +4. Getting Quanta Plus +---------------------- + Starting from version 3.1, you can download Quanta Plus from the same +place as the rest of KDE. Start to browse at http://www.kde.org. + The homepage of Quanta Plus is located at http://quanta.kdewebdev.org, +and here you can find the latest news regarding the development, +announcements, merchandise and you can make some donation to support +Quanta. + An alternative way to use the latest and greatest version is to get it +from the Subversion repository. More info about getting the sources from +KDE SVN can be found at: http://developer.kde.org/source/. The module name +for Quanta is "kdewebdev". + +5. Installation +--------------- + In order to install Quanta Plus on your computer do the following: + +./configure +make +make install (as root) + +Should you have trouble during ./configure or the make process, try the +following: + - export KDEDIRS=:$KDEDIRS + - export QTDIR= + - run "make -f Makefile.cvs" + - run "./configure" + + The recommended place where to install Quanta is your $KDEDIR. To find out, use +"kde-config --prefix" or simply configure Quanta with: + +./configure --prefix `kde-config --prefix` + + If you use Quanta+ from SVN, or your ./configure script is missing, run +"make -f Makefile.cvs" and you will get it. + + For more information regarding the configuration and make process read the +instructions from the INSTALL file, and run the ./configure --help command. + +5.1. Installing two versions in parallel +---------------------------------------- + If you wish to install Quanta BE and still keep your stable Quanta, you don't have +to do anything special, just follow the above instructions. The Quanta BE executable +name is quanta_be and all the resource directories and files are under a different +name than for the stable Quanta. + If you wish to install two stable versions in parallel, you have to install them using +different prefixes (see above). Before running the one installed outside of the +KDE tree, you should do: +export KDEDIRS=$prefix-of-second-instace:$KDEDIRS +export PATH=$prefix-of-second-instace/bin:$PATH +export LD_LIBRARY_PATH=$prefix-of-second-instace/lib:$LD_LIBRARY_PATH +export KDEHOME=home-for-second-version +and run "quanta". + +An example would be: +./configure --prefix=/opt/new-quanta +make +make install +mkdir ~/.new-quanta +export KDEDIRS=/opt/new-quanta:$KDEDIRS +export PATH=/opt/new-quanta/bin:$PATH +export LD_LIBRARY_PATH=/opt/new-quanta/lib:$LD_LIBRARY_PATH +export KDEHOME=~/.new-quanta +quanta + +You can put the lines starting with the first "export" into a separate file, +call it "new-quanta", make it executable, put it in your PATH and when you +run "new-quanta" the version installed into /opt/new-quanta will be run. + +NOTE: In case of BE releases, only the Quanta BE executable name is +different of the stable version, for the other applications when installing into +the same directory as the old versions are, the old versions will be upgraded. +To avoid this, use the way descibed above for the whole kdewebdev module. +NOTE2: There is no newer BE release than 3.3.0. Please don't use BE1 or BE2, +they are much older than 3.3.0. + + +5.2. Common installation and compilation problems +------------------------------------------------- +Possible problem sources can be: + - old autoconf was used (2.52 or newer is required). Check with + "autoconf --version". + - old automake was used (1.5 or newer is required). Check with + "automake --version". + - wrong --prefix given to ./configure + - "make install" process was forgotten or failed + - you have an old quantarc file in $KDEHOME/share/config + - you have old files in $KDEHOME/share/apps/quanta + +In the latter two cases backup the old files, then remove them and try +to start Quanta again. + + For those having compilation errors like: + +copytos.cpp:47: invalid use of undefined type `class KURLRequester' +copytos.h:17: forward declaration of `class KURLRequester' + +(or the same error in other files for other K... classes), try the following: + - check if there is a kdewidgets.so (and kdewidgets.la) in your + $KDEDIR/lib/kde3/plugins/designer. If there isn't, you have a broken + KDE (kdelibs) install. + - check your $HOME/.qt/qtrc file. Add the above path as the first entry to + the libraryPath (like: + libraryPath=/opt/kde-cvs/lib/kde3/plugins/:/home/user/cvs/head/qt-copy/plugins). + You can use the qtconfig tool to do this. + - recompile the QT tools (uic, designer) if you have upgraded kdelibs + (or QT). + - check that your $KDEDIR and $QTDIR path is set correctly. + - do an + export kde_widgetdir="$KDEDIR/lib/kde3/plugins/designer" + (or whatever command your shell uses for environment variable setting) + before running make. +In most cases one of the above is the problem (and the solution). + +6. Common runtime problems +-------------------------- + + a) In case Quanta refuses to open a source file from it's treeviews, saying +that the file is a binary one, check in Control Center->File Associations that +the mimetype corresponding to this file extension is under the text node. There +were reports that Mandrake 9.0 puts the mimetype for php under the application +node, so users could not open PHP files from Quanta... This shouldn't be a problem +with Quanta 3.2 on KDE 3.1.1 or newer. + b) If Quanta crashes on startup then rename your local quantarc file +(in $KDEHOME/share/config) and send this file to me, so I can find out why does +it crash. In case of any crash, please send me a backtrace. One known cause of such +crash is if you use the same $KDEHOME for Quanta 3.2 and Quanta 3.3. Due to some +incompatible changes in the quantarc file regarding the user interface, Quanta 3.2 +cannot interpret the settings correctly and will crash. See section 5.1 how to deal +with different $KDEHOME directories. + c) If you removed the editor/treeviews from the main window and you cannot dock +them back anymore, do one of the following (in order of preference): + - check the Settings->Configure Quanta->User Intreface->Reset window layout + to the default on the next startup and restart Quanta + - start Quanta with the --resetlayout command line switch (quanta ---resetlayout) + - as a last resort, locate your local quantarc file, and remove the whole + [dock_setting_default] group. + +7. Reporting bugs +----------------- + Good reports make my work easier. I usually cannot locate the problem and fix +it, if the report is bad or incomplete. Some rules: + + a) Report ALL your bugs and wishes on http://bugs.kde.org (or use + Help->Report Bug). If it is not possible, than report in E-Mail to the + amantia@kde.org address. As this is my private address, please use the + KDE bug reporting system if you can. + b) Specify the Quanta version in your report. "quanta --version" will tell + it to you, or you can find it from Help->About Quanta. In case of + compilation errors, look at the quanta.lsm file. + c) Specify the KDE and QT version. "quanta --version" is your friend here. + d) Specify the used package (if it is a pre-built binary package). + e) Tell me the compiler version. (g++ --version) + f) Tell me how the bug can be reproduced. This is essentially. + g) In case of crashes re-configure Quanta with the --enable-debug switch and + generate a backtrace. You must have gdb installed to do so. Send me the + backtrace. + h) Send me the document which caused the problem, or the quantarc file if + it's a startup crash. (See 6/b.) + +I'm waiting your bugs and wishes. + +8. Developer info +----------------- + If you are a C++ developer, first of all read the HACKING file about coding rules. + If you are interested in getting involved with the development of Quanta +contact us on our developer list (quanta-devel@kde.org). You can contribute in +more ways than just coding in C++. For example you can create templates, XML +files to adapt new languages and more. + If you would like to make a contribution to the project to help defer our +very real development expenses you may use PayPal and send to Eric Laffoon +sequitur@easystreet.com. Bank transfers are also possible. + +9. Contacting us, mailing lists +------------------------------- + We have two mailing lists. For the general users there is the Quanta user +mailing lists at http://mail.kde.org/mailman/listinfo/quanta . + If you would like to become a Quanta developer, you may want to subscribe to +the Quanta developer list at http://mail.kde.org/mailman/listinfo/quanta-devel +Subscription to this list is moderated. + In case of urgent issues, and if the above isn't good for you, contact the +current maintainers using their addresses found at Help->About Quanta->Authors. + + +Enjoy Quanta+! + +The Quanta team diff --git a/quanta/TODO b/quanta/TODO new file mode 100644 index 00000000..b3bbb25a --- /dev/null +++ b/quanta/TODO @@ -0,0 +1,42 @@ +Some items that needs to be done: + +Urgent fixes: + +GUI/framework: + +Parsing: + - do not reparse the whole document when a or similar thing is + added. Now the whole reparse is triggered if the parsed (invalid) area has a + special block without end, like or . + This will speed up Quanta, but is quite complicated. If the current solution is good + for users, don't bother with it. + - do not reparse the whole special area when something is changed inside. + Reparse only the changed nodes. This will speed up Quanta, but I saw that it can be + very complicated. + - do not reparse the whole file when a text is moved inside the document + (cut&paste in one step, like when doing d&d). I don't have any idea how to do + it... This will speed up Quanta. + - get rid of the global baseNode + - write a DESIGN file about the parser (and add more documentation to the header files) + - write a parser regression tester + +Structure tree: + - do not delete and rebuild the structure tree when it's not necessary. Delete and rebuild + only the changed nodes. This will speed up Quanta. + +Plugins: + - Kallery + - config dialog rework + +Misc: + - WYSIWYG: table editing? layouting? + - remove unneeded header file dependencies (work in progress) + +Bugs discovered: + - autoclosing closes also single (unknown) tags + - autoclosing does not always closes a tag + - attribute tree is updated and redrew on every keypress in case of PHP + +DTEP: + - in feature try to use the WEML for storing the DTEP tags + - better document type recognition, namespace recognition () diff --git a/quanta/VERSION b/quanta/VERSION new file mode 100644 index 00000000..77742ddb --- /dev/null +++ b/quanta/VERSION @@ -0,0 +1 @@ +Quanta v3.5.9 diff --git a/quanta/components/Makefile.am b/quanta/components/Makefile.am new file mode 100644 index 00000000..654571d1 --- /dev/null +++ b/quanta/components/Makefile.am @@ -0,0 +1,5 @@ +if include_cvsservice +CVSSERVICE = cvsservice +endif + +SUBDIRS = csseditor framewizard tableeditor debugger $(CVSSERVICE) diff --git a/quanta/components/csseditor/Makefile.am b/quanta/components/csseditor/Makefile.am new file mode 100644 index 00000000..3b888e32 --- /dev/null +++ b/quanta/components/csseditor/Makefile.am @@ -0,0 +1,18 @@ +SUBDIRS = data + +noinst_LTLIBRARIES = libcsseditor.la + +libcsseditor_la_SOURCES = fontfamilychoosers.ui cssselectors.ui csseditors.ui \ + fontfamilychooser.cpp cssselector.cpp csseditor.cpp specialsb.cpp doubleeditors.cpp \ + qmyhighlighter.cpp colorrequester.cpp propertysetter.cpp shorthandformer.cpp colorslider.cpp \ + csseditor_globals.cpp tlpeditors.cpp styleeditor.cpp stylesheetparser.cpp cssshpropertyparser.cpp percentageeditor.cpp + +libcsseditor_la_METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/lib \ + $(KMDI_INCLUDES) $(all_includes) +noinst_HEADERS = styleeditor.h diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp new file mode 100644 index 00000000..1333a48e --- /dev/null +++ b/quanta/components/csseditor/colorrequester.cpp @@ -0,0 +1,129 @@ +/*************************************************************************** + colorrequester.cpp - description + ------------------- + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "colorrequester.h" +#include +#include +#include +#include +#include +#include +#include +#include + +#include "propertysetter.h" + +class colorRequester::colorRequesterPrivate{ + public: + KLineEdit *edit; + colorRequesterPrivate() { edit = 0L; } + void setText( const QString& text ) { edit->setText( text ); } + void connectSignals( QObject *receiver ) { connect( edit, SIGNAL( textChanged( const QString& )),receiver, SIGNAL( textChanged( const QString& ))); } +}; + +colorRequester::colorRequester(QWidget *parent, const char* name) : miniEditor(parent,name){ + d = new colorRequesterPrivate; + init(); +} + +colorRequester::~colorRequester(){ + delete myColorDialog; + delete d; +} + +void colorRequester::connectToPropertySetter(propertySetter* p){ + connect( this, SIGNAL(textChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); +} + +void colorRequester::init() +{ + myColorDialog = 0L; + + if ( !d->edit ) + d->edit = new KLineEdit( this, "line edit" ); + + myButton = new KPushButton( this, "kfile button"); + QIconSet iconSet = SmallIconSet(QString::fromLatin1("colorize")); + QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + myButton->setIconSet( iconSet ); + myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); + QToolTip::add(myButton, i18n("Open color dialog")); + + setSpacing( KDialog::spacingHint() ); + + QWidget *widget = (QWidget*) d->edit; + setFocusProxy( widget ); + + d->connectSignals( this ); + connect( myButton, SIGNAL( clicked() ), this, SLOT( openColorDialog() )); + connect( d->edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( setInitialValue(/*const QString&*/ ) )); + + KAccel *accel = new KAccel( this ); + accel->insert( KStdAccel::Open, this, SLOT( openColorDialog() )); + accel->readSettings(); + } + +void colorRequester::openColorDialog(){ + KColorDialog dlg(this,"dlg",true); + dlg.setColor(QColor(m_initialValue)); + if(dlg.exec()){ + QColor myColor(dlg.color()); + d->edit->setText(myColor.name()); + emit textChanged(myColor.name()); + } +} + +KLineEdit * colorRequester::lineEdit() const{ + return d->edit; +} +#include +void colorRequester::setInitialValue(/*const QString& s*/){ + QString temp = d->edit->text(); + temp.remove(" "); + if( temp.contains("#") != 0){ + temp.remove("#"); + if(temp.length() == 3) { + QString temp2; + temp2.append(temp[0]); + temp2.append(temp[0]); + temp2.append(temp[1]); + temp2.append(temp[1]); + temp2.append(temp[2]); + temp2.append(temp[2]); + temp = temp2; + } + bool ok; + int r = temp.left(2).toInt( &ok, 16 ); + int g = temp.mid(2,2).toInt( &ok, 16 ); + int b = temp.right(2).toInt( &ok, 16 ); + m_initialValue.setRgb(r,g,b); + } + else + + if( temp.contains("rgb(") != 0){ + temp.remove("rgb(").remove(")"); + QStringList rgbValues = QStringList::split(",",temp); +// bool ok; + int r = rgbValues[0].toInt(); + int g = rgbValues[1].toInt(); + int b = rgbValues[2].toInt(); + m_initialValue.setRgb(r,g,b); + } + else + m_initialValue.setNamedColor(d->edit->text()); +} + +#include "colorrequester.moc" diff --git a/quanta/components/csseditor/colorrequester.h b/quanta/components/csseditor/colorrequester.h new file mode 100644 index 00000000..e0b4be4f --- /dev/null +++ b/quanta/components/csseditor/colorrequester.h @@ -0,0 +1,50 @@ +/*************************************************************************** + colorrequester.h - description + ------------------- + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#ifndef COLORREQUESTER_H +#define COLORREQUESTER_H + +#include +#include + +#include "minieditor.h" + +class KLineEdit; +class KColorDialog; +class colorRequester : public miniEditor{ + Q_OBJECT + public: + colorRequester(QWidget *parent, const char* name=0); + ~colorRequester(); + KLineEdit * lineEdit() const; + KPushButton * button() const { return myButton; } + virtual void connectToPropertySetter(propertySetter* p); + //void setInitialValue(const QString&); + public slots: + void openColorDialog(); + void setInitialValue(/*const QString&*/); + protected: + void init(); + signals: + void selectedColor(QColor); + void textChanged(const QString&); + private: + mutable KColorDialog * myColorDialog; + KPushButton *myButton; + class colorRequesterPrivate; + colorRequesterPrivate *d; + QColor m_initialValue; +}; +#endif diff --git a/quanta/components/csseditor/colorslider.cpp b/quanta/components/csseditor/colorslider.cpp new file mode 100644 index 00000000..436c7e21 --- /dev/null +++ b/quanta/components/csseditor/colorslider.cpp @@ -0,0 +1,85 @@ +/*************************************************************************** + colorslider.cpp - description + ------------------- + begin : lun ago 9 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include + +#include + +#include "colorslider.h" +#include "propertysetter.h" + +/** + *@author gulmini luciano + */ + + + +colorSlider::colorSlider(const QString& fn,const QString& l,const QString& c,const QString& r,QWidget *parent, const char *name) : miniEditor(parent,name) { + m_functionName = fn; + QVBox *leftBox = new QVBox(this); + QVBox *centerBox = new QVBox(this); + QVBox *rightBox = new QVBox(this); + QLabel *leftLabel = new QLabel("" + l +"",leftBox); + QLabel *centerLabel = new QLabel(("" + c +""),centerBox); + QLabel *rightLabel = new QLabel(("" + r +""),rightBox); + leftLabel->setAlignment(Qt::AlignHCenter); + centerLabel->setAlignment(Qt::AlignHCenter); + rightLabel->setAlignment(Qt::AlignHCenter); + leftLabel->setTextFormat (Qt::RichText ) ; + centerLabel->setTextFormat ( Qt::RichText ) ; + rightLabel->setTextFormat (Qt::RichText ) ; + m_leftValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox); + m_centerValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox); + m_rightValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox); + setSpacing(10); + connect(m_leftValue, SIGNAL(valueChanged ( int)), this, SLOT(convertLeftValue(int))); + connect(m_centerValue, SIGNAL(valueChanged ( int)), this, SLOT(convertCenterValue(int))); + connect(m_rightValue, SIGNAL(valueChanged ( int)), this, SLOT(convertRightValue(int))); +} + +colorSlider::~colorSlider(){ + //delete m_redValue; + //delete m_greenValue; + //delete m_blueValue; +} + +void colorSlider::connectToPropertySetter(propertySetter* p){ + connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); +} + +void colorSlider::convertLeftValue(int i){ + emit valueChanged(m_functionName + "(" + QString::number(i,10) + "," + QString::number(m_centerValue->value(),10) + "," +QString::number(m_rightValue->value(),10) +")"); +} + +void colorSlider::convertCenterValue(int i){ + emit valueChanged(m_functionName + "(" + QString::number(m_leftValue->value(),10) + "," + QString::number(i,10) + "," + QString::number(m_rightValue->value(),10) +")"); +} + +void colorSlider::convertRightValue(int i){ + emit valueChanged(m_functionName + "(" + QString::number(m_leftValue->value(),10) + "," + QString::number(m_centerValue->value(),10) + "," + QString::number(i,10) +")"); +} + +RGBcolorSlider::RGBcolorSlider(QWidget *parent, const char *name) : colorSlider("rgb",i18n("Red"),i18n("Green"),i18n("Blue"),parent,name){ +} + +//FOR CSS3 +/*HSLcolorSlider::HSLcolorSlider(QWidget *parent, const char *name) : colorSlider("hsl",i18n("Hue"),i18n("Saturation"),i18n("Lightness"),parent,name){ +} +*/ + +#include "colorslider.moc" diff --git a/quanta/components/csseditor/colorslider.h b/quanta/components/csseditor/colorslider.h new file mode 100644 index 00000000..41a78fa9 --- /dev/null +++ b/quanta/components/csseditor/colorslider.h @@ -0,0 +1,69 @@ +/*************************************************************************** + colorslider.h - description + ------------------- + begin : lun ago 9 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef COLORSLIDER_H +#define COLORSLIDER_H + +#include + +#include "minieditor.h" + + + +/** + *@author gulmini luciano + */ + +class colorSlider : public miniEditor { + Q_OBJECT + private : + QString m_functionName; + protected: + QSlider *m_leftValue, + *m_centerValue, + *m_rightValue; + public: + colorSlider(const QString& functionName,const QString& l=QString::null,const QString& c=QString::null,const QString& r=QString::null,QWidget *parent=0, const char *name=0); + virtual ~colorSlider(); + virtual void connectToPropertySetter(propertySetter* p); + + private slots: + void convertLeftValue(int i); + void convertCenterValue(int i); + void convertRightValue(int i); + + signals: + void valueChanged(const QString&); +}; + +class RGBcolorSlider : public colorSlider { + Q_OBJECT + public: + RGBcolorSlider(QWidget *parent=0, const char *name=0); + ~RGBcolorSlider(){} +}; + +//FOR CSS3 +/*class HSLcolorSlider : public colorSlider { + Q_OBJECT + public: + HSLcolorSlider(QWidget *parent=0, const char *name=0); + ~HSLcolorSlider(); +};*/ + + +#endif diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp new file mode 100644 index 00000000..692a8edf --- /dev/null +++ b/quanta/components/csseditor/csseditor.cpp @@ -0,0 +1,697 @@ +/*************************************************************************** + csseditor.cpp - description + ------------------- + begin : mer lug 23 11:20:17 CEST 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "csseditor.h" +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "propertysetter.h" +#include "qmyhighlighter.h" +#include "cssshpropertyparser.h" +#include "shorthandformer.h" +#include "percentageeditor.h" +#include "colorslider.h" +#include "tlpeditors.h" +#include "doubleeditors.h" +#include "specialsb.h" +#include "colorrequester.h" + + + +myCheckListItem::myCheckListItem(QListView * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){ + m_sig = new QSignal; +} + +myCheckListItem::myCheckListItem(QCheckListItem * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){ + m_sig = new QSignal; +} + +myCheckListItem::~myCheckListItem(){ + delete m_sig; +} + +void myCheckListItem::connect( QObject *receiver, const char *member ){ + m_sig->connect( receiver, member ); +} + +void myCheckListItem::activate(){ + if(isOn()) QCheckListItem::activate(); +} + +void myCheckListItem::addCheckedChild() { + m_checkedChildren++; +} + +void myCheckListItem::stateChange (bool b){ + + if(!b) { + if(childCount()) { + QListViewItem * child = firstChild(); + while( child ) { + m_sig->setValue(QVariant(child->text(0))); + m_sig->activate(); + static_cast(child)->setOn(false); + child = child->nextSibling(); + } + m_checkedChildren = 0; + } + else { + if(parent()){ + myCheckListItem *p = static_cast(parent()); + while( p ) { + if( p->m_checkedChildren != 1) { + p->m_checkedChildren--; + m_sig->setValue(QVariant(text(0))); + m_sig->activate(); + break; + } + else { + m_sig->setValue(QVariant(text(0))); + m_sig->activate(); + p->setOn(false); + } + p = static_cast(p->parent()); + } + } + else { + m_sig->setValue(QVariant(text(0))); + m_sig->activate(); + } + } + } + else { + if(parent()) static_cast(parent())->addCheckedChild(); + } +} + +void CSSEditor::appendSub(QDomNodeList l, myCheckListItem *cli){ + unsigned int i; + for(i=0;iconnect(this,SLOT(removeProperty(const QVariant&))); + if(l.item(i).toElement().attribute("hasSub") == "yes") + appendSub(l.item(i).childNodes(),item); + } +} + +void CSSEditor::buildListView(QDomNodeList l, QListView *lv){ + unsigned int i; + for(i=0;iconnect(this,SLOT(removeProperty(const QVariant&))); + if(l.item(i).toElement().attribute("hasSub") == "yes") { + QDomNodeList listSub = l.item(i).childNodes(); + appendSub(listSub,item); + } + } +} + +void CSSEditor::setCurrentPropOn(const QString& s){ + if( (m_currentProp = static_cast(lvVisual->findItem( s,0 )) )) + m_currentProp->setOn(true); + else + if( (m_currentProp = static_cast(lvAll->findItem( s,0 )) )) + m_currentProp->setOn(true); + else + if( (m_currentProp = static_cast(lvAural->findItem( s,0 )) )) + m_currentProp->setOn(true); + else + if( (m_currentProp = static_cast(lvInteractive->findItem( s,0 )) )) + m_currentProp->setOn(true); + else + if( (m_currentProp = static_cast(lvPaged->findItem( s,0 )) )) + m_currentProp->setOn(true); + + if( m_currentProp && m_currentProp->depth() ) { + myCheckListItem *p = static_cast(m_currentProp->parent()); + while(p) { + p->setOn(true); + p=static_cast(p->parent()); + } + } +} + + + void CSSEditor::addAndSetPropertyOn(const QString& property, const QString& value){ + addProperty(property,value); + setCurrentPropOn(property); + } + + void CSSEditor::setSidesOfPropertyBorderOn(const QString& s){ + static_cast(lvVisual->findItem( "border-top",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-right",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-bottom",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-left",0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-top-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-right-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-bottom-"+s,0 ))->setOn(true); + static_cast(lvVisual->findItem( "border-left-"+s,0 ))->setOn(true); + } + +void CSSEditor::hidePreviewer(){ + fPreview->hide(); + } + +void CSSEditor::initialize(){ + + m_config = kapp->config(); + connect(pbOk, SIGNAL(clicked()), this, SLOT(toggleShortendForm())); + m_config->setGroup("CSSEditor Options"); + SHckb->setChecked(m_config->readBoolEntry("Shorthand form enabled",false)); + + QString configFile = locate("appdata", "csseditor/config.xml"); + + m_myhi = new QMyHighlighter(display); + + QBoxLayout *fPreviewLayout = new QBoxLayout(fPreview,QBoxLayout::LeftToRight); + m_previewer=new KHTMLPart(fPreview); + + fPreviewLayout->addWidget(m_previewer->view()); + + QFile file( configFile ); + if ( !file.open( IO_ReadOnly ) ) { + return; + } + if ( !m_doc.setContent( &file ) ) { + file.close(); + return; + } + file.close(); + + QDomElement docElem = m_doc.documentElement(); + + QDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + QDomElement e = n.toElement(); + if( !e.isNull() ) { + if( e.attribute("type") == "visual") { + lvVisual->setRootIsDecorated(true); + buildListView(e.childNodes(), lvVisual); + } + if( e.attribute("type") == "paged") { + lvPaged->setRootIsDecorated(true); + buildListView(e.childNodes(), lvPaged); + } + if( e.attribute("type") == "interactive") { + lvInteractive->setRootIsDecorated(true); + buildListView(e.childNodes(), lvInteractive); + } + if( e.attribute("type") == "aural") { + lvAural->setRootIsDecorated(true); + buildListView(e.childNodes(), lvAural); + } + if( e.attribute("type") == "all"){ + lvAll->setRootIsDecorated(true); + buildListView(e.childNodes(), lvAll); + } + } + n = n.nextSibling(); + } // end while + + Connect(); + + QBoxLayout *fEditingLayout = new QBoxLayout(fEditing,QBoxLayout::LeftToRight); + + m_ps = new propertySetter(fEditing); + fEditingLayout->addWidget(m_ps); + connect(m_ps, SIGNAL(valueChanged(const QString&)), this, SLOT(checkProperty(const QString&))); + + QStringList props; + QString temp; + bool normalMode = true; + + if( !m_selectorName.isEmpty() ){ //the cssselector has been called + m_initialProperties = m_initialProperties.stripWhiteSpace(); + props=QStringList::split(";",m_initialProperties); + temp= m_selectorName + " {\n\t" ; + } + + else { + m_InlineStyleContent = m_InlineStyleContent.stripWhiteSpace(); + normalMode = false; + props=QStringList::split(";",m_InlineStyleContent); + temp="\n\t"; + } + + for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) { + const QString propertyName((*it).section(":",0,0).stripWhiteSpace()); + const QString propertyValue((*it).section(":",1)); + + if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) { + temp+= propertyName + " : " + propertyValue +";\n\t"; + addAndSetPropertyOn(propertyName,propertyValue); + } + else{ + ShorthandFormer decompressor; + QMap expandedProperties = decompressor.expand(propertyName, propertyValue ); + QMap::Iterator it; + + for ( it = expandedProperties.begin(); it != expandedProperties.end(); ++it ) { + addAndSetPropertyOn( it.key(), it.data() ); + temp += ( it.key() + " : " + it.data() + ";\n\t"); + } + } + } + temp.truncate(temp.length()-1); + //temp.chop(1); + if(normalMode)//normal mode editing + temp+="}"; + display->setText(temp); + activatePreview(); +} + +void CSSEditor::toggleShortendForm() +{ + m_config->setGroup("CSSEditor Options"); + m_config->writeEntry("Shorthand form enabled", SHckb->isChecked()); + m_config->sync(); +} + +CSSEditor::CSSEditor(QListViewItem *i, QWidget *parent, const char *name) : CSSEditorS(parent, name){ + m_selectorName = i->text(0); + m_initialProperties = i->text(1); +} + +CSSEditor::~CSSEditor() { + delete m_myhi; + delete m_ps; + delete m_previewer; +} + +void CSSEditor::setMiniEditors(QListViewItem* i){ + + m_ps->reset(); + + if(i->childCount()==0) { + m_currentProp = static_cast(i); + QDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes(); + unsigned int i; + for(i=0; isetComboBox(); + QStringList values = QStringList::split(",",curr.attribute("value")); + m_ps->ComboBox()->insertStringList(values); + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + if( values.contains(m_currentProp->text(0))) + m_ps->ComboBox()->setCurrentText(m_properties[m_currentProp->text(0)]); + if(curr.attribute("editable") == "yes"){ + m_ps->ComboBox()->setEditable(true); + /*if(m_properties.contains(m_currentProp->text(0)) !=0 ) + m_ps->ComboBox()->setEditText(m_properties[m_currentProp->text(0)]); */ + } + } + else + + /*if( typeName == "spinbox") { + m_ps->setSpinBox("0", values.item(k).toElement().attribute("minValue"), + values.item(k).toElement().attribute("maxValue"), + values.item(k).toElement().attribute("suffix")); + } + + else*/ + if( valueTypeName == "number") m_ps->setLineEdit(); + else + if( valueTypeName == "integer") { + if(m_properties.contains(m_currentProp->text(0)) !=0 ) { + if(!curr.attribute("minValue").isNull()) + m_ps->setSpinBox(m_properties[m_currentProp->text(0)],curr.attribute("minValue")); + else + m_ps->setSpinBox(m_properties[m_currentProp->text(0)]); + } + else + if(!curr.attribute("minValue").isNull()) + m_ps->setSpinBox("0",curr.attribute("minValue")); + else + m_ps->setSpinBox(); + } + else + if( valueTypeName == "length") { + lengthEditor *editor = new lengthEditor(m_ps); + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + editor->setInitialValue(m_properties[m_currentProp->text(0)]); + else + editor->setInitialValue(QString::null); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "percentage") { + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ + percentageEditor *editor = new percentageEditor(m_properties[m_currentProp->text(0)],m_ps); + m_ps->installMiniEditor(editor); + } + else { + percentageEditor *editor = new percentageEditor("0",m_ps); + m_ps->installMiniEditor(editor); + } + } + else + if( valueTypeName == "doubleLength") { + doubleLengthEditor *editor = new doubleLengthEditor(m_ps); + + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ + QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), + sx(temp.section(" ",0,0)), + dx(temp.section(" ",1,1)); + + editor->setInitialValue(sx,dx); + } + else editor->setInitialValue(QString::null,QString::null); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "doublePercentage") { + doublePercentageEditor *editor = new doublePercentageEditor(m_ps); + + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ + QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), + sx(temp.section(" ",0,0)), + dx(temp.section(" ",1,1)); + + editor->setInitialValue(sx,dx); + } + else editor->setInitialValue(QString::null,QString::null); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "frequency") { + frequencyEditor *editor = new frequencyEditor(m_ps); + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + editor->setInitialValue(m_properties[m_currentProp->text(0)]); + else + editor->setInitialValue(QString::null); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "time") { + timeEditor *editor = new timeEditor(m_ps); + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + editor->setInitialValue(m_properties[m_currentProp->text(0)]); + else + editor->setInitialValue(QString::null); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "angle") { + angleEditor *editor = new angleEditor(m_ps); + if(m_properties.contains(m_currentProp->text(0)) !=0 ) + editor->setInitialValue(m_properties[m_currentProp->text(0)]); + else + editor->setInitialValue(QString::null); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "freeedit") { + m_ps->setLineEdit(); + } + else + if( valueTypeName == "uri") { + URIEditor *editor = new URIEditor(m_ps); + + if(curr.attribute("mode") == "multi") editor->setMode(URIEditor::Multi); + else editor->setMode(URIEditor::Single); + + if( curr.attribute("resourceType") == "audio") editor->setResourceType(URIEditor::audio); + else + if( curr.attribute("resourceType") == "image") editor->setResourceType(URIEditor::image); + else + if( curr.attribute("resourceType") == "mousePointer") editor->setResourceType(URIEditor::mousePointer); + + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "colors") { + RGBcolorSlider *RGBeditor = new RGBcolorSlider(m_ps); + colorRequester *CReditor = new colorRequester(m_ps); + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ + CReditor->lineEdit()->setText(m_properties[m_currentProp->text(0)]); + CReditor->setInitialValue(); + + } + + m_ps->installMiniEditor(CReditor); + m_ps->setPredefinedColorListEditor(); + m_ps->installMiniEditor(RGBeditor); + } + else + if( valueTypeName =="doubleList") { + doubleComboBoxEditor *editor = new doubleComboBoxEditor(m_ps); + editor->cbSx()->insertStringList(QStringList::split(",",curr.firstChild().toElement().attribute("value"))); + editor->cbDx()->insertStringList(QStringList::split(",",curr.lastChild().toElement().attribute("value"))); + m_ps->installMiniEditor(editor); + } + else + if( valueTypeName == "fontDialog" ){ + fontEditor *editor = new fontEditor(m_ps); + if(m_properties.contains(m_currentProp->text(0)) !=0 ){ + editor->setInitialValue(m_properties[m_currentProp->text(0)]); + } + else editor->setInitialValue(QString::null); + m_ps->installMiniEditor(editor); + } + } + m_ps->addButton(); + m_ps->Show(); + } +} + +void CSSEditor::checkProperty(const QString& v){ + if(!m_currentProp->isOn()) + m_currentProp->setOn(true); + + if( m_currentProp->depth() ){ + myCheckListItem *p = static_cast(m_currentProp->parent()); + while(p){ + p->setOn(true); + p=static_cast(p->parent()); + } + } + + if(m_currentProp->text(0) =="border-style" ){ + setSidesOfPropertyBorderOn("style"); + QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + addProperty("border-top-style",values[0]); + switch(values.count()) { + case 1: + addProperty("border-right-style",values[0]); + addProperty("border-bottom-style",values[0]); + addProperty("border-left-style",values[0]); + break; + + case 2: + addProperty("border-right-style",values[1]); + addProperty("border-bottom-style",values[0]); + addProperty("border-left-style",values[1]); + break; + + case 3: + addProperty("border-right-style",values[1]); + addProperty("border-bottom-style",values[2]); + addProperty("border-left-style",values[1]); + break; + + case 4: + addProperty("border-right-style",values[1]); + addProperty("border-bottom-style",values[2]); + addProperty("border-left-style",values[3]);break; + } + } + else + if(m_currentProp->text(0) =="border-width" ){ + setSidesOfPropertyBorderOn("width"); + QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + addProperty("border-top-width",values[0]); + switch(values.count()) { + case 1: + addProperty("border-right-width",values[0]); + addProperty("border-bottom-width",values[0]); + addProperty("border-left-width",values[0]); + break; + + case 2: + addProperty("border-right-width",values[1]); + addProperty("border-bottom-width",values[0]); + addProperty("border-left-width",values[1]); + break; + + case 3: + addProperty("border-right-width",values[1]); + addProperty("border-bottom-width",values[2]); + addProperty("border-left-width",values[1]); + break; + + case 4: + addProperty("border-right-width",values[1]); + addProperty("border-bottom-width",values[2]); + addProperty("border-left-width",values[3]);break; + } + } + else + if(m_currentProp->text(0) =="border-color" ){ + setSidesOfPropertyBorderOn("color"); + QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + addProperty("border-top-color",values[0]); + switch(values.count()) { + case 1: + addProperty("border-right-color",values[0]); + addProperty("border-bottom-color",values[0]); + addProperty("border-left-color",values[0]); + break; + + case 2: + addProperty("border-right-color",values[1]); + addProperty("border-bottom-color",values[0]); + addProperty("border-left-color",values[1]); + break; + + case 3: + addProperty("border-right-color",values[1]); + addProperty("border-bottom-color",values[2]); + addProperty("border-left-color",values[1]); + break; + + case 4: + addProperty("border-right-style",values[1]); + addProperty("border-bottom-style",values[2]); + addProperty("border-left-style",values[3]);break; + } + } + else addProperty(m_currentProp->text(0),v); + emit signalUpdatePreview(); +} + +void CSSEditor::Connect(){ + connect(this, SIGNAL(signalUpdatePreview()), this, SLOT(updatePreview())); + connect(lvVisual,SIGNAL(selectionChanged ( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); + connect(lvAll,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); + connect(lvAural,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); + connect(lvInteractive,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); + connect(lvPaged,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); +} + +void CSSEditor::removeProperty(const QVariant& v){ + m_properties.remove(v.toString()); + updatePreview(); +} + +QString CSSEditor::generateProperties(){ + QString props; + QMap::Iterator it; + if(!SHckb->isChecked()) { + for ( it = m_properties.begin(); it != m_properties.end(); ++it ) + props+= it.key() + " : " + it.data().stripWhiteSpace() + "; " ; + props.truncate(props.length()-1);//the last white space creates some problems: better remove it + //props.chop(1); + return props; + } + else { + ShorthandFormer sf(m_properties); + return sf.compress(); + } +} + +void CSSEditor::updatePreview(){ + updateDisplay(); + activatePreview(); +} + +void CSSEditor::activatePreview() { + if(!m_isFileToPreviewExternal){ + QString testHeader, + testFooter, + testBody; + + if(!m_selectorName.isEmpty()) { + testHeader += m_selectorName + " { \n "; + testFooter = "\n}" + m_Selectors; + } + else { + testHeader += " style=\"" ; + testFooter = "\"" ; + } + + QMap::Iterator it; + for ( it = m_properties.begin(); it != m_properties.end(); ++it ) + testBody+= it.key() + " : " + it.data() + ";"; + + m_previewer->begin( KURL(m_fileToPreview) ); + m_previewer->write( m_Header + testHeader + testBody+ testFooter+ m_Footer); + m_previewer->end(); + + + } + else { + QString tmp("{"); + QFile file(m_fileToPreview); + if ( file.open( IO_ReadOnly ) ) { + QMap::Iterator it; + for ( it = m_properties.begin(); it != m_properties.end(); ++it ) + tmp+= it.key() + " : " + it.data() + ";"; + + + QFileInfo fi(m_fileToPreview); + KParts::URLArgs a; + if(fi.extension().lower() == "xml" || fi.extension().lower() == "xhtml") + a.serviceType="text/xml"; + if(fi.extension().lower() == "html" || fi.extension().lower() == "html") + a.serviceType="text/xml"; + m_previewer->browserExtension()->setURLArgs(a); + QTextStream stream( &file ); + + m_previewer->begin(KURL(m_fileToPreview)); + m_previewer->write(stream.read()); + m_previewer->end(); + m_previewer->setUserStyleSheet(m_externalStyleSheetDefinition + " " + m_selectorName+" "+ tmp +"}"); + file.close(); + } + //else KMessageBox::sorry(this,i18n("The css file you want to edit can't be opened")); + } +} + +void CSSEditor::updateDisplay(){ + QString toDisplay; + QMap::Iterator it; + for ( it = m_properties.begin(); it != m_properties.end(); ++it ) + toDisplay += it.key() + " : " + it.data() + ";\n\t"; + + if(!m_selectorName.isEmpty()){// we're working on block + toDisplay.prepend(m_selectorName +" {\n\t"); + toDisplay+="}"; + } + else toDisplay.prepend("\n\t"); + + display->setText(toDisplay); +} + +#include "csseditor.moc" diff --git a/quanta/components/csseditor/csseditor.h b/quanta/components/csseditor/csseditor.h new file mode 100644 index 00000000..6994a686 --- /dev/null +++ b/quanta/components/csseditor/csseditor.h @@ -0,0 +1,117 @@ +/*************************************************************************** + csseditor.h - description + ------------------- + begin : mer lug 23 11:20:17 CEST 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef CSSEDITOR_H +#define CSSEDITOR_H + +#include +#include "csseditors.h" +#include +#include +#include +#include + +class propertySetter; +class KConfig; +class KHTMLPart; +class QListViewItem; +class QDomNodeList; +class QVariant; +class QMyHighlighter; + + +class myCheckListItem : public QCheckListItem +{ + private: + QSignal *m_sig; + unsigned int m_checkedChildren; + + public : + myCheckListItem(QCheckListItem * parent, const QString & text); + myCheckListItem(QListView * parent, const QString & text); + ~myCheckListItem(); + void connect( QObject *receiver, const char *member ); + void addCheckedChild(); + + protected : + virtual void activate(); + virtual void stateChange (bool); +}; + +/** CSSEditor is the base class of the project */ +class CSSEditor : public CSSEditorS +{ + Q_OBJECT + private: + QMyHighlighter *m_myhi; + propertySetter *m_ps; + myCheckListItem *m_currentProp; + KHTMLPart *m_previewer; + QDomDocument m_doc; + QMap m_properties; + QString m_selectorName, + m_initialProperties, + m_Selectors, + m_Header, + m_Footer, + + m_InlineStyleContent, + m_externalStyleSheetDefinition, + m_fileToPreview; + + bool m_isFileToPreviewExternal; + KConfig *m_config; + + //sourceFileName; + + void Connect(); + void appendSub(QDomNodeList, myCheckListItem *); + void buildListView(QDomNodeList, QListView *); + void updateDisplay(); + void activatePreview(); + void setCurrentPropOn(const QString& s); + void addProperty(const QString& property, const QString& value) { m_properties[property] = value; } + void addAndSetPropertyOn(const QString& property, const QString& value); + void setSidesOfPropertyBorderOn(const QString& s); + + private slots: + void checkProperty(const QString&); + void removeProperty(const QVariant&); + void updatePreview(); + void setMiniEditors(QListViewItem*); + void toggleShortendForm(); + + public: + + CSSEditor(QWidget* parent=0, const char *name=0): CSSEditorS(parent, name), m_config(0L){} + CSSEditor( QListViewItem * i, QWidget* parent=0, const char *name=0); + ~CSSEditor(); + void initialize(); + void setSelectors( const QString& s) { m_Selectors = s; } + void setHeader( const QString& s) { m_Header = s; } + void setFooter( const QString& s) { m_Footer = s;} + void setInlineStyleContent( const QString& s){ m_InlineStyleContent = s; } + QString generateProperties(); + void hidePreviewer(); + void setFileToPreview(const QString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;} + void setExternalStyleSheetDefinition(const QString& s) { m_externalStyleSheetDefinition = s;} + + signals: + void signalUpdatePreview(); +}; + +#endif diff --git a/quanta/components/csseditor/csseditor_globals.cpp b/quanta/components/csseditor/csseditor_globals.cpp new file mode 100644 index 00000000..a73cb876 --- /dev/null +++ b/quanta/components/csseditor/csseditor_globals.cpp @@ -0,0 +1,50 @@ +/*************************************************************************** + csseditor_globals.cpp - description + ------------------- + begin : dom ago 3 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include "csseditor_globals.h" + +mySpinBox::mySpinBox(QWidget * parent , const char * name ) : QSpinBox (parent, name){ + connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & ))); + connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & ))); +} + +mySpinBox::mySpinBox( int minValue, int maxValue, int step, QWidget * parent, const char * name ) : QSpinBox( minValue, maxValue, step, parent,name ){ + connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & ))); + connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & ))); +} + +mySpinBox::~mySpinBox(){} + +void mySpinBox::checkSuffix(const QString&){// check if the suffix is present and how many times : it normalizes these times to one + if(!suffix().isEmpty()){ + const QString suf(suffix()); + QString t(editor()->text()); + if( t.contains(suf) ==0 ) { + editor()->setText( t + suf); + editor()->setCursorPosition(editor()->cursorPosition() - 1); + } + else + if( t.contains(suf) >1 ) { + editor()->setText( t.remove(suf) + suf); + editor()->setCursorPosition(editor()->cursorPosition() - 1); + } + } +} + + +#include "csseditor_globals.moc" diff --git a/quanta/components/csseditor/csseditor_globals.h b/quanta/components/csseditor/csseditor_globals.h new file mode 100644 index 00000000..fefae7c8 --- /dev/null +++ b/quanta/components/csseditor/csseditor_globals.h @@ -0,0 +1,63 @@ +/*************************************************************************** + csseditor_globals.h - description + ------------------- + begin : dom ago 3 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef CSSEDITOR_GLOBALS_H +#define CSSEDITOR_GLOBALS_H +#include +#include +#include + +namespace CSSEditorGlobals { +const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond," + "blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue," + "cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen," + "darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon," + "darkseagreen,darkslateblue,darkslategray,darkturquoise,darkviolet,deeppink," + "deepskyblue,dimgray,dodgerblue,firebrick,floralwhite,forestgreen,fuchsia,gainsboro," + "ghostwhite,gold,goldenrod,gray,green,greenyellow,honeydew,hotpink,indianred," + "indigo,ivory,khaki,lavender,lavenderblush,lawngreen,lemonchiffon,lightblue,lightcoral," + "lightcyan,lightgoldenrodyellow,lightgreen,lightgrey,lightpink,lightsalmon,lightseagreen," + "lightskyblue,lightslategray,lightsteelblue,lightyellow,lime,limegreen,linen,magenta," + "maroon,mediumaquamarine,mediumblue,mediumorchid,mediumpurple,mediumseagreen," + "mediumslateblue,mediumspringgreen,mediumturquoise,mediumvioletred,midnightblue," + "mintcream,mistyrose,moccasin,navajowhite,navy,oldlace,olive,olivedrab,orange," + "orangered,orchid,palegoldenrod,palegreen,paleturquoise,palevioletred,papayawhip," + "peachpuff,peru,pink,plum,powderblue,purple,red,rosybrown,royalblue,saddlebrown," + "salmon,sandybrown,seagreen,seashell,sienna,silver,skyblue,slateblue,slategray,snow," + "springgreen,steelblue,tan,teal,thistle,tomato,turquoise,violet,wheat,white,whitesmoke," + "yellow,yellowgreen"))); + + + const QStringList lengthUnits(QStringList::split(",",QString("cm,em,ex,in,mm,pc,pt,px"))); + const QStringList frequencyUnits(QStringList::split(",",QString("Hz,kHz"))); + const QStringList angleUnits(QStringList::split(",",QString("deg,rad,grad"))); + const QStringList timeUnits(QStringList::split(",",QString("s,ms"))); +} + + +class mySpinBox : public QSpinBox{ + Q_OBJECT + public: + mySpinBox(QWidget * parent = 0, const char * name = 0 ); + mySpinBox( int minValue, int maxValue, int step = 1, QWidget * parent = 0, const char * name = 0 ); + ~mySpinBox(); + public slots: + void checkSuffix(const QString&); +}; + + +#endif diff --git a/quanta/components/csseditor/csseditors.ui b/quanta/components/csseditor/csseditors.ui new file mode 100644 index 00000000..de99118f --- /dev/null +++ b/quanta/components/csseditor/csseditors.ui @@ -0,0 +1,411 @@ + +CSSEditorS + + + CSSEditorS + + + + 0 + 0 + 631 + 490 + + + + CSS Editor + + + true + + + + unnamed + + + + spacer1 + + + Horizontal + + + Expanding + + + + 280 + 20 + + + + + + layout6 + + + + unnamed + + + + pbOk + + + + 0 + 0 + 0 + 0 + + + + &OK + + + + + pbCancel + + + + 0 + 0 + 0 + 0 + + + + &Cancel + + + + + + + SHckb + + + Use shorthand form + + + false + + + + + splitter3 + + + NoFrame + + + Plain + + + Horizontal + + + + twMediaGroup + + + + 0 + 7 + 0 + 0 + + + + + 33 + 7 + + + + + 290 + 32767 + + + + + tab + + + Visual + + + + unnamed + + + 0 + + + + + Properties + + + false + + + false + + + + lvVisual + + + 13 + + + LastColumn + + + + + + + tab + + + Paged + + + + unnamed + + + 0 + + + + + Properties + + + true + + + true + + + + lvPaged + + + AllColumns + + + + + + + tab + + + Interactive + + + + unnamed + + + 0 + + + + + Properties + + + true + + + true + + + + lvInteractive + + + AllColumns + + + + + + + tab + + + Aural + + + + unnamed + + + 0 + + + + + Properties + + + true + + + true + + + + lvAural + + + AllColumns + + + + + + + tab + + + All + + + + unnamed + + + 0 + + + + + Properties + + + true + + + true + + + + lvAll + + + AllColumns + + + + + + + + splitter3 + + + Vertical + + + + fEditing + + + StyledPanel + + + Raised + + + + + fPreview + + + + 7 + 7 + 0 + 0 + + + + + 0 + 200 + + + + StyledPanel + + + Raised + + + + + display + + + + 7 + 7 + 0 + 0 + + + + + 32766 + 32766 + + + + true + + + + + + + pbHelp + + + false + + + &Help + + + + + + + + + pbCancel + clicked() + CSSEditorS + reject() + + + pbOk + clicked() + CSSEditorS + accept() + + + + + kpushbutton.h + + diff --git a/quanta/components/csseditor/cssselector.cpp b/quanta/components/csseditor/cssselector.cpp new file mode 100644 index 00000000..1425102f --- /dev/null +++ b/quanta/components/csseditor/cssselector.cpp @@ -0,0 +1,395 @@ +/*************************************************************************** + cssselector.cpp - description + ------------------- + begin : mer ago 6 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "cssselector.h" +#include "csseditor.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include "project.h" +#include "stylesheetparser.h" + + +CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) { + + m_currentItem = 0L; + + Connect(); + + kurApplyToFile->fileDialog()->setURL(Project::ref()->projectBaseURL().url()); + kurApplyToFile->fileDialog()->setFilter( "*.html *.htm |" + i18n("HTML Files") +" (*.html *.htm)\n*.xhtml |" + i18n("XHTML Files")+" (*.xhtml)\n*.xml |" + i18n("XML Files")+" (*.xml)\n*.*|" + i18n("All Files")+" (*.*)" ); + QWhatsThis::add((QLineEdit*)(kurApplyToFile->lineEdit()),"With this line edit you can insert the URL of the file you want to use to preview the style sheet you are editing"); + + /*QString configDir = locate("appdata", "csseditor/config.xml"); + configDir = QFileInfo(configDir).dirPath() + "/";*/ + + QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; + + QDomDocument doc; + QFile file( configDir+"pseudo.xml" ); + if ( !file.open( IO_ReadOnly ) ) + return; + if ( !doc.setContent( &file ) ) { + file.close(); + return; + } + file.close(); + + QDomElement docElem = doc.documentElement(); + + QDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + QDomElement e = n.toElement(); + if( !e.isNull() ) { + cbPseudo->insertItem(e.attribute("name")); + } + n = n.nextSibling(); + } + + file.setName( configDir+"dtdTags.xml" ); + if ( !file.open( IO_ReadOnly ) ) + return; + if ( !doc.setContent( &file ) ) { + file.close(); + return; + } + file.close(); + + QStringList dtdNames, + dtdNickNames; + docElem = doc.documentElement(); + n = docElem.firstChild(); + while( !n.isNull() ) { + QDomElement e = n.toElement(); + if( !e.isNull() ) { + dtdNames.append(e.attribute("name")); + dtdNickNames.append(e.attribute("nickName")); + if(e.attribute("default") == "yes") { + QStringList tagList = QStringList::split( ',',e.text() ); + tagList.sort(); + cbTag->insertStringList( tagList ); + cbTag->setAutoCompletion(true); + } + } + n = n.nextSibling(); + } + cbDTD->insertStringList( dtdNickNames ); +} + +CSSSelector::~CSSSelector(){ +} + +void CSSSelector::Connect(){ + + connect(cbDTD,SIGNAL(activated(const QString&)),this,SLOT(setDTDTags(const QString&))); + + connect(pbAddTag,SIGNAL(clicked()), this ,SLOT(addTag())); + connect(pbAddClass,SIGNAL(clicked()), this ,SLOT(addClass())); + connect(pbAddID,SIGNAL(clicked()), this ,SLOT(addID())); + connect(pbAddPseudo,SIGNAL(clicked()), this ,SLOT(addPseudo())); + + connect(lvTags, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); + connect(lvClasses, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); + connect(lvIDs, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); + connect(lvPseudo, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); + + connect(lvTags, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); + connect(lvClasses, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); + connect(lvIDs, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); + connect(lvPseudo, SIGNAL( selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); + + connect(pbRemoveSelectedTag,SIGNAL(clicked()), this ,SLOT(removeSelected())); + connect(pbRemoveSelectedClass,SIGNAL(clicked()), this ,SLOT(removeSelected())); + connect(pbRemoveSelectedID,SIGNAL(clicked()), this ,SLOT(removeSelected())); + connect(pbRemoveSelectedPseudo,SIGNAL(clicked()), this ,SLOT(removeSelected())); + + connect(twSelectors,SIGNAL(currentChanged ( QWidget * )), this ,SLOT(setCurrentListView( QWidget * ))); + + connect(pbRemoveAllTags,SIGNAL(clicked()), this ,SLOT(removeAll())); + connect(pbRemoveAllClasses,SIGNAL(clicked()), this ,SLOT(removeAll())); + connect(pbRemoveAllIDs,SIGNAL(clicked()), this ,SLOT(removeAll())); + connect(pbRemoveAllPseudo,SIGNAL(clicked()), this ,SLOT(removeAll())); +} + +void CSSSelector::setDTDTags(const QString& s){ + + QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; + + QDomDocument doc; + + QFile file( configDir+"dtdTags.xml" ); + if ( !file.open( IO_ReadOnly ) ) + return; + if ( !doc.setContent( &file ) ) { + file.close(); + return; + } + file.close(); + + QStringList dtdNames; + QDomElement docElem = doc.documentElement(); + QDomNode n = docElem.firstChild(); + while( !n.isNull() ) { + if( n.toElement().attribute("nickName") == s ) + break; + n = n.nextSibling(); + } + QStringList tagList = QStringList::split( ',',n.toElement().text() ); + tagList.sort(); + cbTag->clear(); + cbTag->insertStringList( tagList ); + cbTag->setAutoCompletion(true); +} + +void CSSSelector::addTag(){ + QListViewItem *item = new QListViewItem(lvTags); + if(!cbTag->currentText().isEmpty()){ + item->setText(0,cbTag->currentText()); + QPair tmp(QString::null,++m_orderNumber); + m_currentStylesheetStructure[item->text(0)]=tmp; + } +} + +void CSSSelector::addClass(){ + QListViewItem *item = new QListViewItem(lvClasses); + if(!leClass->text().isEmpty()){ + item->setText(0,leClass->text()); + QPair tmp(QString::null,++m_orderNumber); + m_currentStylesheetStructure[item->text(0)]=tmp; + } +} + +void CSSSelector::addID(){ + QListViewItem *item = new QListViewItem(lvIDs); + if(!leID->text().isEmpty()){ + item->setText(0,leID->text()); + QPair tmp(QString::null,++m_orderNumber); + m_currentStylesheetStructure[item->text(0)]=tmp; + } +} + +void CSSSelector::addPseudo(){ + QListViewItem *item = new QListViewItem(lvPseudo); + item->setText(0,(lePseudoSelector->text()+":"+cbPseudo->currentText()).stripWhiteSpace()); + QPair tmp(QString::null,++m_orderNumber); + m_currentStylesheetStructure[item->text(0)]=tmp; +} + +void CSSSelector::openCSSEditor(QListViewItem * i){ + if(!m_stopProcessingStylesheet){ + QListView *lv = i->listView(); + QListViewItem *temp; + QString s; + QObjectList *l = queryList( "QListView" ); + QObjectListIt it( *l ); // iterate over the listviews + QObject *obj; + + while ( (obj = it.current()) != 0 ) { + QListView *lvTemp = (QListView*)obj; + if( lv != lvTemp){ + temp = lvTemp->firstChild(); + while(temp){ + s+=(temp->text(0)+" { "+temp->text(1)+" } "); + temp = temp->nextSibling(); + } + } + ++it; + } + delete l; // delete the list, not the objects + + temp = lv->firstChild(); + + while(temp){ + if(temp != i) s+=(temp->text(0)+" { "+temp->text(1)+" } "); + temp = temp->nextSibling(); + } + + CSSEditor dlg(i); + if(m_callingFrom == "XHTML"){ + dlg.setHeader(m_header); + dlg.setSelectors(s); + dlg.setFooter(m_footer); + dlg.setFileToPreview(m_fileToPreview,false); + } + else if(m_callingFrom == "CSS"){ + if(kurApplyToFile->url().isEmpty()) + dlg.hidePreviewer(); + else { + dlg.setFileToPreview(kurApplyToFile->url(),true); + + QString tmp; + QListViewItem *item = lvTags->firstChild(); + while( item ) { + if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace()) + tmp += item->text(0) + " {" + item->text(1) + "}"; + item = item->nextSibling(); + } + + item = lvClasses->firstChild(); + while( item ) { + if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace()) + tmp += item->text(0) + " {" + item->text(1) + "}"; + item = item->nextSibling(); + } + + item = lvIDs->firstChild(); + while( item ) { + if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace()) + tmp += item->text(0) + " {" + item->text(1) + "}"; + item = item->nextSibling(); + } + + item = lvPseudo->firstChild(); + while( item ) { + if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace()) + tmp += item->text(0) + " {" + item->text(1) + "}"; + item = item->nextSibling(); + } + + dlg.setExternalStyleSheetDefinition(tmp); + } + } + + dlg.initialize(); + + if(dlg.exec()) { + i->setText(1,dlg.generateProperties()); + QPair tmp(m_currentStylesheetStructure[i->text(0)]); + tmp.first = dlg.generateProperties(); + m_currentStylesheetStructure[i->text(0)] = tmp; + } + } +} + +void CSSSelector::setCurrentListView(QWidget* w){ + QObjectList *l = w->queryList( "QListView" ); + m_currentListView = static_cast(l->first()); +} + +void CSSSelector::removeAll(){ + QListViewItemIterator it( m_currentListView ); + while ( it.current() ) { + QListViewItem *item = it.current(); + m_currentStylesheetStructure.remove(item->text(0)); + ++it; + } + m_currentListView->clear(); +} + +void CSSSelector::removeSelected(){ + if( m_currentItem ) { + m_currentStylesheetStructure.remove(m_currentItem->text(0)); + delete m_currentItem; + m_currentItem = 0L; + } +} + +void CSSSelector::loadCSSContent(const QString& s){ + stylesheetParser p(s); + connect(&p,SIGNAL(errorOccurred(const QString&)), this, SLOT(setStylesheetProcessing(const QString&))); + p.parse(); + m_orderNumber = p.orderNumber(); + + QMap >::Iterator it; + m_currentStylesheetStructure = p.stylesheetStructure(); + for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) { + if(!it.key().startsWith("@rule") && !it.key().startsWith("/*")){ + QListViewItem *item; + if(it.key().contains(":")){ + item = new QListViewItem(lvPseudo); + } + else + if(it.key().contains("#")){ + item = new QListViewItem(lvIDs); + } + else + if(it.key().contains(".")){ + item = new QListViewItem(lvClasses); + } + else { + item = new QListViewItem(lvTags); + } + + item->setText(0,it.key()); + item->setText(1,it.data().first); + + } + } +} + +QString CSSSelector::generateFormattedStyleSection(){ + QMap< QString,QPair >::Iterator it; + QString styleSection,tmpStr; + unsigned int indentWidth, + indentDisplacement = 2; + for ( unsigned int i=0;i<=m_orderNumber;i++ ) { + for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) { + QString key = it.key(); + if(it.data().second == i){ + if(key.startsWith("@rule")) + styleSection += it.data().first; + else if(key.startsWith("/*")) + styleSection += it.data().first; + else { + key.remove(QRegExp("-v[\\d]+$")); + styleSection += "\n" + key + " {\n"; + indentWidth = indentDisplacement + 2; + QStringList props = QStringList::split(";",it.data().first.simplifyWhiteSpace()); + QString indentStr; + indentStr.fill(' ',indentWidth); + for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) { + if((*it).startsWith(" ")) + tmpStr += indentStr + (*it).remove(0,1) + ";\n"; + else + tmpStr += indentStr + (*it) + ";\n"; + } + indentStr.fill(' ', indentDisplacement); + styleSection += tmpStr + indentStr + "}\n\n"; + tmpStr = QString::null; + } + } + } + } + return "\n"+styleSection; +} + +void CSSSelector::enableApplyToFile(){ + tlApplyToFile->setEnabled(true); + kurApplyToFile->setEnabled(true); +} + +void CSSSelector::setStylesheetProcessing(const QString& msg) { + m_stopProcessingStylesheet=true; + KMessageBox::error (0L, msg ); +} + +#include "cssselector.moc" diff --git a/quanta/components/csseditor/cssselector.h b/quanta/components/csseditor/cssselector.h new file mode 100644 index 00000000..f4d42e89 --- /dev/null +++ b/quanta/components/csseditor/cssselector.h @@ -0,0 +1,74 @@ +/*************************************************************************** + cssselector.h - description + ------------------- + begin : mer ago 6 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef CSSSELECTOR_H +#define CSSSELECTOR_H + +#include +#include +#include "cssselectors.h" + +class QListViewItem; +class QStringList; +/** + *@author gulmini luciano + */ + +class CSSSelector : public CSSSelectorS { + Q_OBJECT + + private: + QListViewItem *m_currentItem; + QListView *m_currentListView; + QString m_header, + m_footer, + m_callingFrom, + m_fileToPreview; + QMap > m_currentStylesheetStructure; + unsigned int m_orderNumber; + bool m_stopProcessingStylesheet; + + void Connect(); + + public: + CSSSelector(QWidget *parent=0, const char* name=0); + ~CSSSelector(); + void loadCSSContent(const QString& s); + void setHeader(const QString& h) { m_header = h; } + void setFooter(const QString& f) { m_footer = f; } + void enableApplyToFile(); + void setCallingFrom(const QString& cf){ m_callingFrom = cf ;} + void setFileToPreview(const QString& s){ m_fileToPreview=s;} + bool errorOnProcessingStylesheet() const { return m_stopProcessingStylesheet; } + QString generateFormattedStyleSection(); + + private slots: + void openCSSEditor(QListViewItem *); + void addTag(); + void addClass(); + void addID(); + void addPseudo(); + void removeAll(); + void removeSelected(); + void setCurrentItem(QListViewItem* i) { m_currentItem = i; } + void setCurrentListView(QWidget*); + void setDTDTags(const QString&); + void setStylesheetProcessing(const QString&); +}; + +#endif + diff --git a/quanta/components/csseditor/cssselectors.ui b/quanta/components/csseditor/cssselectors.ui new file mode 100644 index 00000000..1119ccdb --- /dev/null +++ b/quanta/components/csseditor/cssselectors.ui @@ -0,0 +1,985 @@ + +CSSSelectorS + + + CSSSelectorS + + + + 0 + 0 + 621 + 496 + + + + CSS Selector Dialog + + + true + + + + unnamed + + + + layout11 + + + + unnamed + + + + tlApplyToFile + + + false + + + Apply to file: + + + + + kurApplyToFile + + + false + + + + + + + spacer19_2 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + layout1 + + + + unnamed + + + + pbOk + + + &OK + + + + + pbCancel + + + &Cancel + + + + + + + twSelectors + + + + tab + + + Tags + + + + unnamed + + + + layout13 + + + + unnamed + + + + spacer6_2 + + + Vertical + + + Expanding + + + + 20 + 16 + + + + + + groupBox1 + + + + 5 + 5 + 1 + 0 + + + + Remove Selector + + + + unnamed + + + + pbRemoveSelectedTag + + + + + + + Selected + + + + + pbRemoveAllTags + + + All + + + + + + + spacer6 + + + Vertical + + + Expanding + + + + 20 + 16 + + + + + + groupBox2 + + + DTD Selection + + + + unnamed + + + + cbDTD + + + + + + + spacer7_3 + + + Vertical + + + Expanding + + + + 20 + 24 + + + + + + groupBox3 + + + Add Selector + + + + unnamed + + + + cbTag + + + true + + + + + pbAddTag + + + Add + + + + + + + spacer6_3 + + + Vertical + + + Expanding + + + + 20 + 16 + + + + + + + + + Selector + + + true + + + true + + + + + Properties + + + true + + + true + + + + lvTags + + + + 7 + 7 + 1 + 0 + + + + true + + + true + + + LastColumn + + + + + spacer15 + + + Horizontal + + + Minimum + + + + 40 + 20 + + + + + + + + tab + + + IDs + + + + unnamed + + + + + Selector + + + true + + + true + + + + + Properties + + + true + + + true + + + + lvIDs + + + + 7 + 7 + 1 + 0 + + + + true + + + true + + + LastColumn + + + + + spacer18 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + layout14 + + + + unnamed + + + + spacer12 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + groupBox4_2 + + + Remove Selector + + + + unnamed + + + + pbRemoveSelectedID + + + + + + + Selected + + + + + pbRemoveAllIDs + + + All + + + + + + + spacer13 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + groupBox7_2 + + + Add Selector + + + + unnamed + + + + leID + + + + + pbAddID + + + Add + + + + + + + spacer14 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + + + tab + + + Classes + + + + unnamed + + + + + Selector + + + true + + + true + + + + + Properties + + + true + + + true + + + + lvClasses + + + + 7 + 7 + 1 + 0 + + + + true + + + true + + + LastColumn + + + + + spacer19 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + layout13 + + + + unnamed + + + + spacer9 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + groupBox4_3 + + + Remove Selector + + + + unnamed + + + + pbRemoveSelectedClass + + + + + + + Selected + + + + + pbRemoveAllClasses + + + All + + + + + + + spacer11 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + groupBox7 + + + Add Selector + + + + unnamed + + + + leClass + + + + + pbAddClass + + + Add + + + + + + + spacer10 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + + + tab + + + Pseudo + + + + unnamed + + + + + Selector + + + true + + + true + + + + + Properties + + + true + + + true + + + + lvPseudo + + + + 7 + 7 + 1 + 0 + + + + true + + + true + + + LastColumn + + + + + spacer7 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + layout17 + + + + unnamed + + + + spacer15_2 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + groupBox4 + + + Remove Selector + + + + unnamed + + + + pbRemoveAllPseudo + + + All + + + + + pbRemoveSelectedPseudo + + + + + + + Selected + + + + + + + spacer16 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + groupBox7_3 + + + Add Selector + + + + unnamed + + + + lePseudoSelector + + + + + cbPseudo + + + true + + + + + pbAddPseudo + + + Add + + + + + + + spacer17 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 380 + 20 + + + + + + pbHelp + + + false + + + &Help + + + + + + + + + pbOk + clicked() + CSSSelectorS + accept() + + + pbCancel + clicked() + CSSSelectorS + reject() + + + + + kurlrequester.h + klineedit.h + kpushbutton.h + kpushbutton.h + + diff --git a/quanta/components/csseditor/cssshpropertyparser.cpp b/quanta/components/csseditor/cssshpropertyparser.cpp new file mode 100644 index 00000000..d02c39a5 --- /dev/null +++ b/quanta/components/csseditor/cssshpropertyparser.cpp @@ -0,0 +1,127 @@ +/*************************************************************************** + * Copyright (C) 2003 by Gulmini Luciano * + * gulmini.luciano@student.unife.it * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "cssshpropertyparser.h" +#include +//#include + +CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){ + QStringList l1, + l2=QStringList::split(",",s); + + for ( QStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) { + QString temp; + temp=removeBeginningWhiteSpaces((*it)); + temp=removeEndingWhiteSpaces(temp); + l1.append(temp); + } + + m_propertyToParse = l1.join(",");// we eliminte blanks before after a comma in things like "something" , something , serif +} + +CSSSHPropertyParser::~CSSSHPropertyParser(){} + +QString CSSSHPropertyParser::removeEndingWhiteSpaces(const QString& s){ + int index = s.length()-1; + while(s[index] == ' ' ) index--; + return s.left(index+1); +} + +QString CSSSHPropertyParser::removeBeginningWhiteSpaces(const QString& s){ + int index = 0; + while(s[index] == ' ' ) index++; + return s.right(s.length()-index); +} + +QString CSSSHPropertyParser::extractFunctionList(){ + QRegExp functionListPattern("\\s*([a-zA-Z0-9_]*\\([\\W\\w]*\\))\\s*"); + functionListPattern.search(m_propertyToParse); + return functionListPattern.cap(1); +} + +QString CSSSHPropertyParser::extractQuotedStringList(){ + QString temp; + bool stop = false; + unsigned int i=0; + while(!stop && i + +class CSSSHPropertyParser{ + + public: + CSSSHPropertyParser(const QString& s); + ~CSSSHPropertyParser(); + QStringList parse(); + + private: + QString m_propertyToParse; + + private: + QString extractURIList(); + QString extractFunctionList(); + QString extractQuotedStringList(); + QString removeBeginningWhiteSpaces(const QString& s); + QString removeEndingWhiteSpaces(const QString& s); +}; + +#endif diff --git a/quanta/components/csseditor/data/Makefile.am b/quanta/components/csseditor/data/Makefile.am new file mode 100644 index 00000000..01ddeee5 --- /dev/null +++ b/quanta/components/csseditor/data/Makefile.am @@ -0,0 +1,3 @@ +cssxmldir= ${quanta_datadir}/csseditor +cssxml_DATA = config.xml pseudo.xml atrules.xml dtdTags.xml + diff --git a/quanta/components/csseditor/data/atrules.xml b/quanta/components/csseditor/data/atrules.xml new file mode 100644 index 00000000..4d9f0d38 --- /dev/null +++ b/quanta/components/csseditor/data/atrules.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/components/csseditor/data/config.xml b/quanta/components/csseditor/data/config.xml new file mode 100644 index 00000000..15fd659f --- /dev/null +++ b/quanta/components/csseditor/data/config.xml @@ -0,0 +1,609 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/quanta/components/csseditor/data/dtdTags.xml b/quanta/components/csseditor/data/dtdTags.xml new file mode 100644 index 00000000..1ce44d82 --- /dev/null +++ b/quanta/components/csseditor/data/dtdTags.xml @@ -0,0 +1,19 @@ + + + style,link,h1,h2,h3,h4,h5,h6,ul,pre,tt,i,b,big,em,strong,dfn,code,samp,kbd,var,cite,abbr,acronym,img,br,script,map,span,bdo,select,textarea,label,button,p,dl,div,noscript,blockquote,hr,table,fieldset,body,address,a,area,object,param,small,sub,sup,q,dt,dd,ol,li,form,text,password,checkbox,radio,submit,reset,file,hidden,input,optgroup,option,legend,caption,thead,tfoot,tbody,colgroup,col,tr,th,td,head,title,base,meta,html + a,abbr,acronym,address,applet,area,b,base,basefont,bdo,big,blockquote,body,br,button,caption,center,cite,code,col,colgroup,div,dfn,del,dl,dt,dd,dir,em,fieldset,frameset,frame,font,form,kbd,head,html,hr,h1,h2,h3,h4,h5,h6,i,iframe,img,input,ins,isindex,label,legend,li,link,map,menu,meta,noframes,noscript,object,ol,optgroup,option,p,param,pre,q,s,samp,script,select,small,span,strike,strong,style,sub,sup,table,textarea,tt,thead,tfoot,tbody,tr,th,td,title,u,ul,usemap,var + mi,mn,mo,mtext,mspace,ms,mglyph,mrow,mfrac,msrqt,mroot,mstyle,merror,mpadded,mphantom,mfenced,menclose,msub,msup,msubsup,munder,mover,munderover,nmultiscripts,mtable,mtr,mlabeldtr,mtd,maction + + + + + + + + + + + + + + diff --git a/quanta/components/csseditor/data/pseudo.xml b/quanta/components/csseditor/data/pseudo.xml new file mode 100644 index 00000000..354544ff --- /dev/null +++ b/quanta/components/csseditor/data/pseudo.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/components/csseditor/doubleeditors.cpp b/quanta/components/csseditor/doubleeditors.cpp new file mode 100644 index 00000000..6fab0547 --- /dev/null +++ b/quanta/components/csseditor/doubleeditors.cpp @@ -0,0 +1,120 @@ +/*************************************************************************** + doubleeditors.cpp - description + ------------------- + begin : dom ago 3 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + #include "doubleeditors.h" + #include "specialsb.h" + #include + #include "csseditor_globals.h" + #include "propertysetter.h" + #include + + + +doubleEditorBase::doubleEditorBase(QWidget *parent, const char *name) : miniEditor(parent,name){ +} + +void doubleEditorBase::sxValueSlot(const QString& v){ + m_sxValue=v; + emit valueChanged( m_sxValue +" " + m_dxValue); +} + +void doubleEditorBase::dxValueSlot(const QString& v){ + m_dxValue=v; + emit valueChanged( m_sxValue +" " + m_dxValue); +} + + doubleLengthEditor::doubleLengthEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ + + m_ssbSx = new specialSB(this); + m_ssbSx->insertItem("cm"); + m_ssbSx->insertItem("em"); + m_ssbSx->insertItem("ex"); + m_ssbSx->insertItem("in"); + m_ssbSx->insertItem("mm"); + m_ssbSx->insertItem("pc"); + m_ssbSx->insertItem("pt"); + m_ssbSx->insertItem("px"); + + m_ssbDx = new specialSB(this); + m_ssbDx->insertItem("cm"); + m_ssbDx->insertItem("em"); + m_ssbDx->insertItem("ex"); + m_ssbDx->insertItem("in"); + m_ssbDx->insertItem("mm"); + m_ssbDx->insertItem("pc"); + m_ssbDx->insertItem("pt"); + m_ssbDx->insertItem("px"); + + connect(m_ssbSx, SIGNAL(valueChanged(const QString&)), this, SLOT(sxValueSlot(const QString&))); + connect(m_ssbDx, SIGNAL(valueChanged(const QString&)), this, SLOT(dxValueSlot(const QString&))); +} + +doubleLengthEditor::~doubleLengthEditor(){ + delete m_ssbSx; + delete m_ssbDx; +} + +void doubleLengthEditor::connectToPropertySetter(propertySetter* p){ + connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); +} + +void doubleLengthEditor::setInitialValue(const QString& sx, const QString& dx){ + m_ssbSx->setInitialValue(sx); + m_ssbDx->setInitialValue(dx); +} + +doubleComboBoxEditor::doubleComboBoxEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ + m_cbSx = new QComboBox(this); + m_cbDx = new QComboBox(this); + connect(m_cbSx, SIGNAL(activated ( const QString & )), this, SLOT(sxValueSlot(const QString&))); + connect(m_cbDx, SIGNAL(activated ( const QString & )), this, SLOT(dxValueSlot(const QString&))); +} + +doubleComboBoxEditor::~doubleComboBoxEditor(){ + delete m_cbSx; + delete m_cbDx; +} + +void doubleComboBoxEditor::connectToPropertySetter(propertySetter* p){ + connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); +} + +doublePercentageEditor::doublePercentageEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ + m_sbSx = new mySpinBox(this); + m_sbDx = new mySpinBox(this); + m_sbSx->setSuffix("%"); + m_sbDx->setSuffix("%"); + connect(m_sbSx,SIGNAL(valueChanged(const QString&)),this,SLOT(sxValueSlot(const QString&))); + connect(m_sbDx,SIGNAL(valueChanged(const QString&)),this,SLOT(dxValueSlot(const QString&))); +} + +doublePercentageEditor::~doublePercentageEditor(){ + delete m_sbSx; + delete m_sbDx; +} + +void doublePercentageEditor::connectToPropertySetter(propertySetter* p){ + connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); +} + +void doublePercentageEditor::setInitialValue(const QString& a_sx, const QString& a_dx){ + QString sx = a_sx; + QString dx = a_dx; + m_sbSx->setValue(sx.remove("%").toInt()); + m_sbDx->setValue(dx.remove("%").toInt()); +} + +#include "doubleeditors.moc" diff --git a/quanta/components/csseditor/doubleeditors.h b/quanta/components/csseditor/doubleeditors.h new file mode 100644 index 00000000..6496a6fa --- /dev/null +++ b/quanta/components/csseditor/doubleeditors.h @@ -0,0 +1,86 @@ +/*************************************************************************** + doubleeditors.h - description + ------------------- + begin : dom ago 3 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + #ifndef DOUBLEEDITORS_H + #define DOUBLEEDITORS_H + #include "minieditor.h" + + class mySpinBox; + class specialSB; + class QSpinBox; + class QComboBox; + +class doubleEditorBase : public miniEditor { + Q_OBJECT + protected: + QString m_sxValue, + m_dxValue; + + public: + doubleEditorBase(QWidget *parent=0, const char *name=0); + virtual ~doubleEditorBase(){} + virtual void setInitialValue(){} + virtual void connectToPropertySetter(propertySetter* /*p*/){} + + public slots: + void sxValueSlot(const QString&); + void dxValueSlot(const QString&); + + signals: + void valueChanged(const QString&); +}; + +class doublePercentageEditor : public doubleEditorBase { + Q_OBJECT + private: + mySpinBox *m_sbSx, + *m_sbDx; + + public: + doublePercentageEditor(QWidget *parent=0, const char *name=0); + virtual ~doublePercentageEditor(); + virtual void setInitialValue(const QString& sx, const QString& dx); + virtual void connectToPropertySetter(propertySetter* p); +}; + +class doubleComboBoxEditor : public doubleEditorBase { + Q_OBJECT + private: + QComboBox *m_cbSx, + *m_cbDx; + + public: + doubleComboBoxEditor(QWidget *parent=0, const char *name=0); + virtual ~doubleComboBoxEditor(); + QComboBox* cbSx() const { return m_cbSx;} + QComboBox* cbDx() const { return m_cbDx;} + virtual void connectToPropertySetter(propertySetter* p); +}; + +class doubleLengthEditor : public doubleEditorBase { + Q_OBJECT + private: + specialSB *m_ssbSx, + *m_ssbDx; + + public: + doubleLengthEditor(QWidget *parent=0, const char *name=0); + virtual ~doubleLengthEditor(); + virtual void setInitialValue(const QString& sx, const QString& dx); + virtual void connectToPropertySetter(propertySetter* p); +}; + +#endif diff --git a/quanta/components/csseditor/encodingselector.cpp b/quanta/components/csseditor/encodingselector.cpp new file mode 100644 index 00000000..3eeb593b --- /dev/null +++ b/quanta/components/csseditor/encodingselector.cpp @@ -0,0 +1,47 @@ +/*************************************************************************** + encodingselector.cpp - description + ------------------- + begin : mer ago 6 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + + +#include "encodingselector.h" +#include +#include +#include + +/** + *@author gulmini luciano + */ + +encodingSelector::encodingSelector(QWidget *parent, const char* name) : encodingSelectorS(parent,name){ + QStringList encodings (KGlobal::charsets()->availableEncodingNames()); + int insert = 0; + for (uint i=0; i < encodings.count(); i++) { + bool found = false; + QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found); + + if (found){ + cbEncoding->insertItem (encodings[i]); + insert++; + } + } +} + +encodingSelector::~encodingSelector(){} + + + +#include "encodingselector.moc" diff --git a/quanta/components/csseditor/encodingselector.h b/quanta/components/csseditor/encodingselector.h new file mode 100644 index 00000000..3b10fa23 --- /dev/null +++ b/quanta/components/csseditor/encodingselector.h @@ -0,0 +1,40 @@ +/*************************************************************************** + encodingselector.h - description + ------------------- + begin : mer ago 6 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef ENCODINGSELECTOR_H +#define ENCODINGSELECTOR_H + + +#include "encodingselectors.h" +#include + +/** + *@author gulmini luciano + */ + +class encodingSelector : public encodingSelectorS { + Q_OBJECT + + public: + encodingSelector(QWidget *parent=0, const char* name=0); + ~encodingSelector(); + QString encodingSet() const { return cbEncoding->currentText();} + + }; + +#endif + diff --git a/quanta/components/csseditor/encodingselectors.ui b/quanta/components/csseditor/encodingselectors.ui new file mode 100644 index 00000000..45d269de --- /dev/null +++ b/quanta/components/csseditor/encodingselectors.ui @@ -0,0 +1,115 @@ + +encodingSelectorS + + + encodingSelectorS + + + + 0 + 0 + 228 + 109 + + + + Encoding Selector + + + + unnamed + + + + layout3 + + + + unnamed + + + + layout1 + + + + unnamed + + + + textLabel1 + + + Select encoding: + + + + + cbEncoding + + + + + + + layout2 + + + + unnamed + + + + pbOk + + + &OK + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + pbCancel + + + &Cancel + + + + + + + + + + + pbOk + clicked() + encodingSelectorS + accept() + + + pbCancel + clicked() + encodingSelectorS + reject() + + + + diff --git a/quanta/components/csseditor/fontfamilychooser.cpp b/quanta/components/csseditor/fontfamilychooser.cpp new file mode 100644 index 00000000..d42139f8 --- /dev/null +++ b/quanta/components/csseditor/fontfamilychooser.cpp @@ -0,0 +1,175 @@ +/*************************************************************************** + fontfamilychooser.cpp - description + ------------------- + begin : mer lug 23 11:20:17 CEST 2003 + copyright : (C) |YEAR| by si2003 email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "fontfamilychooser.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFamilyChooserS(parent,name){ + + QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black ); + lePreview->setMinimumHeight( lePreview->fontMetrics().lineSpacing() ); + lePreview->setAlignment(Qt::AlignCenter); + QFont font; + font.setPointSize(20); + lePreview->setFont(font); + lePreview->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); + + QFontDatabase fdb; + QStringList families = fdb.families(); + for ( QStringList::Iterator it = families.begin(); it != families.end(); ++it ) { + if( (*it).contains('[') !=0 ) + it = families.remove(it); + } + + if( families.count() != 0 ) lbAvailable->insertStringList(families); + + + QIconSet iconSet = SmallIconSet(QString::fromLatin1("forward")); + QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + pbAdd->setIconSet(iconSet); + pbAdd->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); + + iconSet = SmallIconSet(QString::fromLatin1("back")); + pbRemove->setIconSet(iconSet); + pbRemove->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); + + iconSet = SmallIconSet(QString::fromLatin1("up")); + pbMoveUp->setIconSet(iconSet); + pbMoveUp->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); + + iconSet = SmallIconSet(QString::fromLatin1("down")); + pbMoveDown->setIconSet(iconSet); + pbMoveDown->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); + + connect(pbAdd, SIGNAL(clicked()), this ,SLOT( addFont() )); + connect( lbAvailable, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) ); + connect( lbAvailable, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedAvailableFamilyFont( const QString&) ) ); + connect( lbGeneric, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) ); + connect( lbGeneric, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedGenericFamilyFont( const QString&) ) ); + connect( lbSelected, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) ); + connect( lbSelected, SIGNAL( highlighted( int ) ), this, SLOT( setCurrentSelectedFont( int ) ) ); + connect( lbSelected, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedFont( const QString&) ) ); + connect( pbRemove, SIGNAL( clicked() ), this, SLOT( removeFont() ) ); + connect( pbMoveUp, SIGNAL( clicked() ), this, SLOT( moveFontUp() ) ); + connect( pbMoveDown, SIGNAL( clicked() ), this, SLOT( moveFontDown() ) ); + + QWhatsThis::add(lbAvailable,i18n("These are the names of the available fonts on your system")); + QWhatsThis::add(lbGeneric,i18n("These are the names of the generic fonts ")); + QWhatsThis::add(lbSelected,i18n("These are the names of the generic fonts you have selected ")); + QWhatsThis::add(pbAdd,i18n("Click this to add a font to your style sheet")); + QWhatsThis::add(pbRemove,i18n("Click this to remove a font from your style sheet")); + QWhatsThis::add(pbMoveUp,i18n("Click this to make the font more preferable than the preceeding one")); + QWhatsThis::add(pbMoveDown,i18n("Click this to make the font less preferable than the following one")); + +} + +fontFamilyChooser::~fontFamilyChooser(){} + +void fontFamilyChooser::updatePreview(const QString& s){ + lePreview->setFont(QFont(s,20)); +} + +void fontFamilyChooser::addFont(){ + lbSelected->insertItem( m_currentSelectedFont ); + switch(m_fontOrigin) { + case available: lbAvailable->removeItem(lbAvailable->index(lbAvailable->findItem(m_currentSelectedFont))); + break; + case generic : lbGeneric->removeItem(lbGeneric->index(lbGeneric->findItem(m_currentSelectedFont))); + break; + } +} + +void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const QString& f){ + m_fontOrigin = available; + m_currentSelectedFont = f; + m_selectedFontMap[f] = available; +} + +void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const QString& f){ + m_fontOrigin = generic; + m_currentSelectedFont =f; + m_selectedFontMap[f] = generic; +} + +void fontFamilyChooser::moveFontUp(){ + if(m_currentSelectedFontIndex == 0) return; + int dummyIndex = m_currentSelectedFontIndex; + lbSelected->insertItem( lbSelected->text(m_currentSelectedFontIndex ), dummyIndex -1); + lbSelected->removeItem(dummyIndex + 1); + lbSelected->setSelected( dummyIndex -1, true); +} + +void fontFamilyChooser::moveFontDown(){ + if((unsigned int)m_currentSelectedFontIndex == lbSelected->count()) return; + int dummyIndex = m_currentSelectedFontIndex; + lbSelected->insertItem( lbSelected->text(m_currentSelectedFontIndex ), dummyIndex + 2); + lbSelected->removeItem(dummyIndex); + lbSelected->setSelected(dummyIndex +1, true); +} + +void fontFamilyChooser::removeFont(){ + QString dummyFont(m_currentSelectedFont);// since removeItem emits highlighted signal, after + // removeItem call the value of m_currentSelectedFont + // is actually the font after m_currentSelectedFont and so + // we must save m_currentSelectedFont value in dummyFont + lbSelected->removeItem( m_currentSelectedFontIndex ); + switch(m_selectedFontMap[dummyFont]) { + case available: lbAvailable->insertItem(dummyFont); + lbAvailable->sort(); + break; + case generic : lbGeneric->insertItem(dummyFont); + lbGeneric->sort(); + break; + } + +} + +QStringList fontFamilyChooser::fontList(){ + QStringList list; + QListBoxItem *item = lbSelected->firstItem(); + while( item != 0 ){ + if( item->text().contains( QRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); + else list.append( item->text() ); + item = item->next(); + } + return list; +} + +void fontFamilyChooser::setInitialValue(const QString& s){ + QStringList familyList = QStringList::split(",",s); + for ( QStringList::Iterator it = familyList.begin(); it != familyList.end(); ++it ) { + (*it).remove("'"); + (*it).remove("\""); + lbSelected->insertItem((*it).stripWhiteSpace()); + } +} + +#include "fontfamilychooser.moc" diff --git a/quanta/components/csseditor/fontfamilychooser.h b/quanta/components/csseditor/fontfamilychooser.h new file mode 100644 index 00000000..c812e774 --- /dev/null +++ b/quanta/components/csseditor/fontfamilychooser.h @@ -0,0 +1,52 @@ +/*************************************************************************** + fontfamilychooser.h - description + ------------------- + begin : mer lug 23 11:20:17 CEST 2003 + copyright : (C) |YEAR| by si2003 email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FONTFAMILYCHOOSER_H +#define FONTFAMILYCHOOSER_H + +#include "fontfamilychoosers.h" +#include +class QStringList; + +class fontFamilyChooser : public fontFamilyChooserS +{ + Q_OBJECT + private: + enum FontOrigin { available, generic }; + QString m_currentSelectedFont; + FontOrigin m_fontOrigin; + int m_currentSelectedFontIndex; + QMap m_selectedFontMap; + + private slots: + void updatePreview(const QString &); + void setCurrentSelectedAvailableFamilyFont(const QString&); + void setCurrentSelectedGenericFamilyFont(const QString&); + void setCurrentSelectedFont( int i) { m_currentSelectedFontIndex = i; } + void setCurrentSelectedFont( const QString& f ) { m_currentSelectedFont = f; } + void addFont(); + void removeFont(); + void moveFontUp(); + void moveFontDown(); + + public: + fontFamilyChooser(QWidget* parent, const char *name=0); + ~fontFamilyChooser(); + QStringList fontList(); + void setInitialValue(const QString& s); +}; + +#endif diff --git a/quanta/components/csseditor/fontfamilychoosers.ui b/quanta/components/csseditor/fontfamilychoosers.ui new file mode 100644 index 00000000..1b846446 --- /dev/null +++ b/quanta/components/csseditor/fontfamilychoosers.ui @@ -0,0 +1,441 @@ + +fontFamilyChooserS + + + fontFamilyChooserS + + + + 0 + 0 + 487 + 399 + + + + + 5 + 5 + 0 + 0 + + + + Font Family Chooser + + + true + + + + unnamed + + + + layout42 + + + + unnamed + + + + layout40 + + + + unnamed + + + + layout39 + + + + unnamed + + + + layout36 + + + + unnamed + + + + layout20 + + + + unnamed + + + + textLabel1 + + + Available system font families: + + + + + lbAvailable + + + + + + + layout15 + + + + unnamed + + + + textLabel3 + + + Generic family: + + + + + + cursive + + + + + fantasy + + + + + monospace + + + + + sans-serif + + + + + serif + + + + lbGeneric + + + + 7 + 7 + 0 + 0 + + + + + + + + + + layout38 + + + + unnamed + + + 0 + + + + spacer20 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + buttonGroup1 + + + true + + + NoFrame + + + Plain + + + 2 + + + 0 + + + + + + AlignCenter + + + false + + + false + + + -1 + + + + unnamed + + + 0 + + + 0 + + + + pbMoveUp + + + + 22 + 22 + + + + + 22 + 22 + + + + + + + + + pbAdd + + + + 22 + 22 + + + + + 22 + 22 + + + + + + + + + pbRemove + + + + 22 + 22 + + + + + 22 + 22 + + + + + + + + + pbMoveDown + + + + 22 + 22 + + + + + 22 + 22 + + + + + + + + + + + spacer21 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + layout6 + + + + unnamed + + + + textLabel2 + + + Selected font families: + + + + + lbSelected + + + + 7 + 7 + 0 + 0 + + + + + + + + + + lePreview + + + + + + + layout41 + + + + unnamed + + + + spacer1 + + + Horizontal + + + Expanding + + + + 313 + 20 + + + + + + layout9 + + + + unnamed + + + + pbOK + + + &OK + + + + + pbCancel + + + &Cancel + + + + + + + + + + + + + + + pbCancel + clicked() + fontFamilyChooserS + reject() + + + pbOK + clicked() + fontFamilyChooserS + accept() + + + + + kpushbutton.h + kpushbutton.h + kpushbutton.h + kpushbutton.h + kpushbutton.h + kpushbutton.h + + diff --git a/quanta/components/csseditor/minieditor.h b/quanta/components/csseditor/minieditor.h new file mode 100644 index 00000000..773ed285 --- /dev/null +++ b/quanta/components/csseditor/minieditor.h @@ -0,0 +1,37 @@ +/*************************************************************************** + minieditor.h - description + ------------------- + begin : lun ago 9 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef MINIEDITOR_H +#define MINIEDITOR_H + +#include + +/** + *@author gulmini luciano + */ + +class propertySetter; + +class miniEditor : public QHBox{ + public: + miniEditor(QWidget *parent=0, const char *name=0):QHBox(parent,name){} + ~miniEditor(){} + virtual void connectToPropertySetter(propertySetter* p)=0; +}; + + +#endif diff --git a/quanta/components/csseditor/percentageeditor.cpp b/quanta/components/csseditor/percentageeditor.cpp new file mode 100644 index 00000000..0c8a9d6c --- /dev/null +++ b/quanta/components/csseditor/percentageeditor.cpp @@ -0,0 +1,38 @@ +/*************************************************************************** + percentageeditor.cpp - description + ------------------- + begin : lun ago 9 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "percentageeditor.h" +#include "propertysetter.h" + +percentageEditor::percentageEditor(const QString& initialValue, QWidget *parent, const char *name) : miniEditor(parent,name) +{ + QString temp(initialValue); + m_sb = new mySpinBox(0,9999,1,this); + m_sb->setValue(temp.remove("%").toInt()); + m_sb->setSuffix("%"); + connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SIGNAL(valueChanged(const QString&))); +} + +percentageEditor::~percentageEditor() +{ + delete m_sb; +} + +void percentageEditor::connectToPropertySetter(propertySetter* p){ + connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); +} + +#include "percentageeditor.moc" diff --git a/quanta/components/csseditor/percentageeditor.h b/quanta/components/csseditor/percentageeditor.h new file mode 100644 index 00000000..d6931aec --- /dev/null +++ b/quanta/components/csseditor/percentageeditor.h @@ -0,0 +1,52 @@ +/*************************************************************************** + percentageeeditor.h - description + ------------------- + begin : lun ago 9 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PERCENTAGEEDITOR_H +#define PERCENTAGEEDITOR_H + +#include +#include +#include "doubleeditors.h" +#include +#include + +#include "csseditor_globals.h" +#include "minieditor.h" + +class KPushButton; + + +/** + *@author gulmini luciano + */ + +class propertySetter; + +class percentageEditor : public miniEditor { + Q_OBJECT + private: + mySpinBox *m_sb; + public: + percentageEditor(const QString& initialValue="0",QWidget *parent=0, const char *name=0); + ~percentageEditor(); + virtual void connectToPropertySetter(propertySetter* p); + signals: + void valueChanged(const QString&); +}; + + +#endif diff --git a/quanta/components/csseditor/propertysetter.cpp b/quanta/components/csseditor/propertysetter.cpp new file mode 100644 index 00000000..683320ae --- /dev/null +++ b/quanta/components/csseditor/propertysetter.cpp @@ -0,0 +1,129 @@ +/*************************************************************************** + propertysetter.cpp - description + ------------------- + begin : gio lug 24 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "propertysetter.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + + +#include "csseditor_globals.h" +#include "minieditor.h" + +propertySetter::propertySetter(QWidget *parent, const char *name ) : QHBox(parent,name) { + m_ind = 0; + m_cb = 0L; + m_list.setAutoDelete(true); + m_pb = 0L; + setSpacing( KDialog::spacingHint() ); +} + +propertySetter::~propertySetter(){ + reset(); +} + +void propertySetter::reset(){ + if(!m_list.isEmpty()) m_list.clear(); + if(m_pb) { + delete m_pb; + m_pb=0L; + } + m_ind=0; +} + +void propertySetter::setComboBox() +{ + m_cb = new QComboBox(this); + connect(m_cb, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&))); + connect(m_cb, SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged(const QString&))); + m_list.append(m_cb); +} + +void propertySetter::setSpinBox(const QString& initialValue, const QString& min, const QString& max, const QString& s) +{ + mySpinBox *editor = new mySpinBox(min.toInt(), max.toInt(), 1, this); + editor->setSuffix(s); + editor->setValue(initialValue.toInt()); + connect(editor, SIGNAL(valueChanged(const QString&)), this ,SIGNAL(valueChanged(const QString&))); + m_list.append(editor); +} + +void propertySetter::setLineEdit() +{ + QLineEdit *editor = new QLineEdit(this); + connect(editor,SIGNAL(textChanged ( const QString & )), this, SIGNAL(valueChanged ( const QString & ))); + m_list.append(editor); +} + +void propertySetter::setPredefinedColorListEditor() +{ + QComboBox *editor = new QComboBox(this); + editor->insertStringList(CSSEditorGlobals::HTMLColors); + connect(editor, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&))); + m_list.append(editor); +} + +void propertySetter::Show(){ + QWidget *w; + for ( w = m_list.first(); w; w = m_list.next() ) + w->hide(); + + m_list.at(m_ind)->show(); + + if(m_list.count() == 1) { + if(m_pb) + m_pb->hide(); + } + else + if(m_ind<(m_list.count()-1)) { + m_ind++; + m_pb->show(); + } + else + m_ind=0; +} + +void propertySetter::addButton(){ + + m_pb = new KPushButton(this); + QToolTip::add(m_pb, i18n( "More..." )); + QIconSet iconSet = SmallIconSet(QString::fromLatin1("2rightarrow")); + QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + m_pb->setIconSet(iconSet); + m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); + m_pb->hide(); + connect(m_pb, SIGNAL(clicked()), this ,SLOT(Show())); +} + +void propertySetter::installMiniEditor(miniEditor *m){ + m->connectToPropertySetter(this); + m_list.append(m); +} + +#include "propertysetter.moc" diff --git a/quanta/components/csseditor/propertysetter.h b/quanta/components/csseditor/propertysetter.h new file mode 100644 index 00000000..3f13b8ba --- /dev/null +++ b/quanta/components/csseditor/propertysetter.h @@ -0,0 +1,64 @@ +/*************************************************************************** + propertysetter.h - description + ------------------- + begin : gio lug 24 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PROPERTYSETTER_H +#define PROPERTYSETTER_H + +#include +#include +#include + + +class miniEditor; +class KPushButton; + + +/** + *@author gulmini luciano + */ + +class propertySetter : public QHBox { + Q_OBJECT + + private: + unsigned int m_ind; + QPtrList m_list; + QComboBox *m_cb; + KPushButton *m_pb; + + public: + propertySetter(QWidget *parent=0, const char *name=0); + ~propertySetter(); + + void installMiniEditor(miniEditor *m); + + void setComboBox(); + void setSpinBox(const QString& initialValue="0", const QString& min="0", const QString& max="9999", const QString& s=QString::null); + void setLineEdit(); + void setPredefinedColorListEditor(); + void reset(); + void addButton(); + QComboBox* ComboBox() const { return m_cb; } + + public slots: + void Show(); + + signals: + void valueChanged(const QString&); +}; + +#endif diff --git a/quanta/components/csseditor/qmyhighlighter.cpp b/quanta/components/csseditor/qmyhighlighter.cpp new file mode 100644 index 00000000..431bf6a5 --- /dev/null +++ b/quanta/components/csseditor/qmyhighlighter.cpp @@ -0,0 +1,65 @@ +/*************************************************************************** + bashhighlighter.cpp - description + ------------------- + begin : dom mar 16 2003 + copyright : (C) 2003 by Emiliano Gulmini + email : emi_barbarossa@yahoo.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "qmyhighlighter.h" +#include +QMyHighlighter::QMyHighlighter(QTextEdit* Qtxt):QSyntaxHighlighter(Qtxt){ +} +/*****************************************************************************/ +QMyHighlighter::~QMyHighlighter(){ +} + +/*****************************************************************************/ +int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLastPara*/ ) +{ + //QRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*"); + QRegExp pattern("([#:\\.\\w]*)\\s*\\{"); + int pos=pattern.search(text,0); + int l=int(pattern.cap(1).length()); + + setFormat(pos,l,QColor("red")); + + if( pos== -1) + pos = 0; + + const int npos = pos+l; + + pattern.setPattern("\\s*([\\s\\w\\d-]*)\\s*:"); + pos=npos; + while ( pos >= 0 ) { + pos = pattern.search( text, pos ); + if ( pos > -1 ) { + l = pattern.matchedLength(); + + setFormat(pos,l,QColor("mediumvioletred")); + pos += pattern.matchedLength(); + } + } + pattern.setPattern(":\\s*([\\.\\#\\w\\s\\d-\\(\\)\",%/]*)\\s*;"); + pattern.setPattern(":\\s*([\\W\\w]*)\\s*;"); + pos=npos; + while ( pos >= 0 ) { + pos = pattern.search( text, pos ); + if ( pos > -1 ) { + l = pattern.cap(1).length(); + setFormat(pos + 2 ,l,QColor("steelblue")); + pos += pattern.matchedLength(); + } + } + return 0; +} + diff --git a/quanta/components/csseditor/qmyhighlighter.h b/quanta/components/csseditor/qmyhighlighter.h new file mode 100644 index 00000000..a75d6d00 --- /dev/null +++ b/quanta/components/csseditor/qmyhighlighter.h @@ -0,0 +1,36 @@ +/*************************************************************************** + bashhighlighter.h - description + ------------------- + begin : dom mar 16 2003 + copyright : (C) 2003 by Emiliano Gulmini + email : emi_barbarossa@yahoo.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef QMYHIGHLIGHTER_H +#define QMYHIGHLIGHTER_H + +#include + +/** + *@author Emiliano Gulmini + */ + +class QMyHighlighter : public QSyntaxHighlighter { +public: + QMyHighlighter(QTextEdit* Qtxt); + + ~QMyHighlighter(); + int highlightParagraph ( const QString & text, int endStateOfLastPara ); + +}; + +#endif diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp new file mode 100644 index 00000000..e8b7a837 --- /dev/null +++ b/quanta/components/csseditor/shorthandformer.cpp @@ -0,0 +1,781 @@ +/*************************************************************************** + * Copyright (C) 2003 by Gulmini Luciano * + * gulmini.luciano@student.unife.it * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "shorthandformer.h" +#include +#include "cssshpropertyparser.h" +#include +#include "csseditor_globals.h" + +QRegExp globalPercentagePattern("\\d%"), + globalLengthPattern("\\d(ex|em|px|cm|pt|pc|in|mm)"), + globalColorPattern("#[\\w\\d]*"), + globalNumberPattern("\\d*"); + +static const QString borderStyleValueString("none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"); +static const QString widthValueString("thin,medium,thick,inherit"); +static const QString listTypeValueString("disc,circle,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,armenian,georgian,cjk-ideographic,hiragana,katakana,hiragana-iroha,katakana-iroha,none,inherit"); +static const QString fontSizeValueString("smaller,larger,xx-large,x-large,large,medium,small,x-small,xx-small,inherit"); +static const QString fontWeightValueString("900,800,700,600,500,400,300,200,100,lighter,bolder,normal,bold,inherit"); +static const QString fontVariantValueString("normal,small-caps,inherit"); +static const QString fontStyleValueString("oblique,italic,normal,inherit"); +static const QString backgroundRepeatValueString("repeat,repeat-x,repeat-y,no-repeat,inherit"); + + +static const QStringList borderStyleValueList = QStringList::split(",",borderStyleValueString); +static const QStringList widthValueList = QStringList::split(",",widthValueString); +static const QStringList listTypeValueList = QStringList::split(",",listTypeValueString); +static const QStringList fontSizeValueList = QStringList::split(",",fontSizeValueString); +static const QStringList fontWeightValueList = QStringList::split(",",fontWeightValueString); +static const QStringList fontStyleValueList = QStringList::split(",",fontStyleValueString); +static const QStringList fontVariantValueList = QStringList::split(",",fontVariantValueString); +static const QStringList backgroundRepeatValueList = QStringList::split(",",backgroundRepeatValueString); + + + +ShorthandFormer::ShorthandFormer( QMap m){ + + m_properties = m; + if(m_properties.contains("cue-after")){ + cue_after= m_properties["cue-after"]; + m_properties.remove("cue-after"); + } + if(m_properties.contains("cue-before")){ + cue_before = m_properties["cue-before"]; + m_properties.remove("cue-before"); + } + if(m_properties.contains("pause-before")){ + pause_before= m_properties["pause-before"]; + m_properties.remove("pause-before"); + } + if(m_properties.contains("pause-after")){ + pause_after = m_properties["pause-after"]; + m_properties.remove("pause-after"); + } + if(m_properties.contains("background-color")){ + background_color = m_properties["background-color"]; + m_properties.remove("background-color"); + } + if(m_properties.contains("background-image")){ + background_image = m_properties["background-image"]; + m_properties.remove("background-image"); + } + if(m_properties.contains("background-repeat")){ + background_repeat = m_properties["background-repeat"]; + m_properties.remove("background-repeat"); + } + if(m_properties.contains("background-attachment")){ + background_attachment = m_properties["background-attachment"]; + m_properties.remove("background-attachment"); + } + if(m_properties.contains("background-position")){ + background_position = m_properties["background-position"]; + m_properties.remove("background-position"); + } + if(m_properties.contains("border-top-style")){ + border_top_style = m_properties["border-top-style"]; + m_properties.remove("border-top-style"); + } + if(m_properties.contains("border-top-color")){ + border_top_color = m_properties["border-top-color"]; + m_properties.remove("border-top-color"); + } + if(m_properties.contains("border-top-width")){ + border_top_width = m_properties["border-top-width"]; + m_properties.remove("border-top-width"); + } + if(m_properties.contains("border-left-style")){ + border_left_style = m_properties["border-left-style"]; + m_properties.remove("border-left-style"); + } + if(m_properties.contains("border-left-color")){ + border_left_color = m_properties["border-left-color"]; + m_properties.remove("border-left-color"); + } + if(m_properties.contains("border-left-width")){ + border_left_width = m_properties["border-left-width"]; + m_properties.remove("border-left-width"); + } + if(m_properties.contains("border-right-style")){ + border_right_style = m_properties["border-right-style"]; + m_properties.remove("border-right-style"); + } + if(m_properties.contains("border-right-color")){ + border_right_color = m_properties["border-right-color"]; + m_properties.remove("border-right-color"); + } + if(m_properties.contains("border-right-width")){ + border_right_width= m_properties["border-right-width"]; + m_properties.remove("border-right-width"); + } + if(m_properties.contains("border-bottom-style")){ + border_bottom_style = m_properties["border-bottom-style"]; + m_properties.remove("border-bottom-style"); + } + if(m_properties.contains("border-bottom-color")){ + border_bottom_color = m_properties["border-bottom-color"]; + m_properties.remove("border-bottom-color"); + } + if(m_properties.contains("border-bottom-width")){ + border_bottom_width = m_properties["border-bottom-width"]; + m_properties.remove("border-bottom-width"); + } + if(m_properties.contains("outline-style")){ + outline_style = m_properties["outline-style"]; + m_properties.remove("outline-style"); + } + if(m_properties.contains("outline-color")){ + outline_color = m_properties["outline-color"]; + m_properties.remove("outline-color"); + } + if(m_properties.contains("outline-width")){ + outline_width = m_properties["outline-width"]; + m_properties.remove("outline-width"); + } + if(m_properties.contains("list-style-type")){ + list_style_type= m_properties["list-style-type"]; + m_properties.remove("list-style-type"); + } + if(m_properties.contains("list-style-image")){ + list_style_image = m_properties["list-style-image"]; + m_properties.remove("list-style-image"); + } + if(m_properties.contains("list-style-position")){ + list_style_position = m_properties["list-style-position"]; + m_properties.remove("list-style-position"); + } + if(m_properties.contains("font-style")){ + font_style = m_properties["font-style"]; + m_properties.remove("font-style"); + } + if(m_properties.contains("font-variant")){ + font_variant = m_properties["font-variant"]; + m_properties.remove("font-variant"); + } + if(m_properties.contains("font-weight")){ + font_weight = m_properties["font-weight"]; + m_properties.remove("font-weight"); + } + if(m_properties.contains("font-size")){ + font_size = m_properties["font-size"]; + m_properties.remove("font-size"); + } + if(m_properties.contains("line-height")){ + line_height= m_properties["line-height"]; + m_properties.remove("line-height"); + } + if(m_properties.contains("font-family")){ + font_family = m_properties["font-family"]; + m_properties.remove("font-family"); + } + if(m_properties.contains("margin-top")){ + margin_top = m_properties["margin-top"]; + m_properties.remove("margin-top"); + } + if(m_properties.contains("margin-bottom")){ + margin_bottom = m_properties["margin-bottom"]; + m_properties.remove("margin-bottom"); + } + if(m_properties.contains("margin-left")){ + margin_left = m_properties["margin-left"]; + m_properties.remove("margin-left"); + } + if(m_properties.contains("margin-right")){ + margin_right = m_properties["margin-right"]; + m_properties.remove("margin-right"); + } + if(m_properties.contains("padding-top")){ + padding_top = m_properties["padding-top"]; + m_properties.remove("padding-top"); + } + if(m_properties.contains("padding-bottom")){ + padding_bottom = m_properties["padding-bottom"]; + m_properties.remove("padding-bottom"); + } + if(m_properties.contains("padding-left")){ + padding_left = m_properties["padding-left"]; + m_properties.remove("padding-left"); + } + if(m_properties.contains("padding-right")){ + padding_right = m_properties["padding-right"]; + m_properties.remove("padding-right"); + } +} + +QString ShorthandFormer::compress(){ + QString props; + + props += compressCueProp(); + props += compressPauseProp(); + props += compressBackgroundProp(); + props += compressFontProp(); + props += compressPaddingProp(); + props += compressMarginProp(); + props += compressOutlineProp(); + props += compressListStyleProp(); + props += compressBorderProp(); + + QMap::Iterator it; + for ( it = m_properties.begin(); it != m_properties.end(); ++it ) + props += it.key() + " : " + it.data().stripWhiteSpace() + "; " ; + + props.truncate(props.length()-1);//the last white space creates some problem: better remove it + //props.chop(1); + return props; +} + +QString ShorthandFormer::compressBorderProp(){ + QString props; + + bool allColorSidesSet = false, + allStyleSidesSet = false, + allWidthSidesSet = false; + + if(!border_left_color.isEmpty()) + if( ( border_left_color == border_top_color ) && ( border_top_color == border_right_color ) && ( border_right_color == border_bottom_color ) ) + allColorSidesSet = true; + + if(!border_left_style.isEmpty()) + if( ( border_left_style == border_top_style ) && ( border_top_style == border_right_style ) && ( border_right_style == border_bottom_style ) ) + allStyleSidesSet = true; + + if(!border_left_width.isEmpty()) + if( ( border_left_width == border_top_width ) && ( border_top_width == border_right_width ) && ( border_right_width == border_bottom_width ) ) + allWidthSidesSet = true; + + if ( allColorSidesSet ) { + if ( allStyleSidesSet ) { + if ( allWidthSidesSet ) { + props += "border : " + border_left_color + " " + border_left_style + " " + border_left_width +"; "; + + } + else { + props += "border : " + border_left_color + " " + border_left_style +"; "; + props += compressBorderWidthProp(); + } + } + else { + if ( allWidthSidesSet ) { + props += "border : " + border_left_color + " " + border_left_width +"; "; + props += compressBorderStyleProp(); + } + else { + props += "border : " + border_left_color +"; "; + props += compressBorderWidthProp(); + props += compressBorderStyleProp(); + } + + } + } + else { // allColorSidesSet is false + if ( allStyleSidesSet ) { + if ( allWidthSidesSet ) { + props += "border : " + border_left_style + " " + border_left_width +"; "; + props += compressBorderColorProp(); + } + else { + props += compressBorderStyleProp(); + props += compressBorderWidthProp(); + props += compressBorderColorProp(); + } + } + else { + + props += compressBorderStyleProp(); + props += compressBorderWidthProp(); + props += compressBorderColorProp(); + } + } + + return props; +} + +QString ShorthandFormer::compressBorderStyleProp(){ + return compressImplementation( "border-style" ,border_top_style, border_bottom_style, border_right_style, border_left_style, "none"); +} + +QString ShorthandFormer::compressBorderWidthProp(){ + return compressImplementation( "border-width" ,border_top_width, border_bottom_width, border_right_width, border_left_width, "medium"); +} + +QString ShorthandFormer::compressBorderColorProp(){ +//because the default value of color property is browser dependant, this method doesn't compress the color value + QString props; + if( !border_top_color.isEmpty() ) + props += "border-top-color : " + border_top_color +"; "; + if( !border_right_color.isEmpty() ) + props += "border-right-color : " + border_right_color +"; "; + if( !border_bottom_color.isEmpty() ) + props += "border-bottom-color : " + border_bottom_color +"; "; + if( !border_left_color.isEmpty() ) + props += "border-left-color : " + border_left_color +"; "; + return props; +} + +QString ShorthandFormer::compressFontProp(){ + QString fontProp, + props; + //bool appendLineHeight = false; + + if( font_style.isEmpty() && font_variant.isEmpty() && font_weight.isEmpty() && font_size.isEmpty() && font_family.isEmpty() ) { + if( !line_height.isEmpty() ) + props += "line-height : " + line_height + "; "; + } + else { + if( !font_style.isEmpty() ) + fontProp += " " + font_style; + if( !font_variant.isEmpty() ) + fontProp += " " + font_variant; + if( !font_weight.isEmpty() ) + fontProp += " " + font_weight; + if( !font_size.isEmpty() ){ + fontProp += " " + font_size; + if( !line_height.isEmpty() ) + fontProp += "/" + line_height.stripWhiteSpace() ; + } + else { + fontProp += ( " medium"); + /*if( !line_height.isEmpty() ) + appendLineHeight = true; */ + if( !line_height.isEmpty() ) + fontProp += ( "/" + line_height.stripWhiteSpace() ); + } + + if( !font_family.isEmpty() ) + fontProp += ( " " + font_family); + else fontProp += " serif"; + if( !fontProp.isEmpty() ) + props += ( "font :" + fontProp + "; "); + /* if(appendLineHeight) + props += ( "line-height : " + line_height + "; ");*/ + } + return props; +} + +QString ShorthandFormer::compressCueProp(){ + return compressImplementation2( "cue", cue_after, cue_before, "none"); +} + +QString ShorthandFormer::compressPauseProp(){ + return compressImplementation2( "pause", pause_after, pause_before, "0"); +} + +QString ShorthandFormer::compressBackgroundProp(){ + QString backgroundProp; + if( !background_color.isEmpty() ) backgroundProp += (" " + background_color ); + if( !background_image.isEmpty() ) backgroundProp += (" " + background_image ); + if( !background_repeat.isEmpty() ) backgroundProp += (" " + background_repeat ); + if( !background_attachment.isEmpty() ) backgroundProp += (" " + background_attachment ); + if( !background_position.isEmpty() ) backgroundProp += (" " + background_position ); + if( !backgroundProp.isEmpty() ) return ( "background :" + backgroundProp + "; "); + return QString::null; +} + +QString ShorthandFormer::compressPaddingProp(){ + return compressImplementation( "padding" ,padding_top, padding_bottom, padding_right, padding_left, "0"); +} + +QString ShorthandFormer::compressMarginProp(){ + return compressImplementation( "margin" ,margin_top, margin_bottom, margin_right, margin_left, "0"); +} + +QString ShorthandFormer::compressOutlineProp(){ + return compressImplementation3("outline", outline_color, outline_style, outline_width); +} +QString ShorthandFormer::compressListStyleProp(){ + return compressImplementation3("list-style", list_style_type, list_style_image, list_style_position); +} + +QString ShorthandFormer::compressImplementation3( const QString& prop, const QString& p1, const QString& p2, const QString& p3){ + QString props; + if( !p1.isEmpty() ) props += (" " + p1 ); + if( !p2.isEmpty() ) props += (" " + p2 ); + if( !p3.isEmpty() ) props += (" " + p3 ); + if( !props.isEmpty() ) return ( prop + " :" + props + "; "); + return QString::null; +} + +QString ShorthandFormer::compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue){ + QString props; + if(after == before){ + if(!after.isEmpty()) props+=( prop + " : " + after + "; "); + } + else { + if(before.isEmpty()) props+=( prop + " : " + defValue + " " + after + "; "); + else + if(after.isEmpty()) props+=( prop + " : " + before + " " + defValue + "; "); + else props+=( prop + " : " + before + " " + after + "; "); + } + return props; +} + +QString ShorthandFormer::compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue){ + + QString props, + top(t.stripWhiteSpace()), + bottom(b.stripWhiteSpace()), + left(l.stripWhiteSpace()), + right(r.stripWhiteSpace()); + + if( top.isEmpty() ) top = defValue; + if( bottom.isEmpty() ) bottom = defValue; + if( left.isEmpty() ) left = defValue; + if( right.isEmpty() ) right = defValue; + + + if( top == defValue && bottom == defValue && right == defValue && left == defValue) + return QString::null; + + if( top == bottom && bottom == right && right == left ) + return ( prop +" : " + top + "; "); + + if( right == left ) { + if( top == bottom ) return ( prop +" : " + top + " " + right + "; "); + else return ( prop +" : " + top + " " + right + " " + bottom + "; "); + } + else return (prop +" : " + top + " " + right + " " + bottom + " " + left + "; "); +} + + +//+++++++++++++++++++++EXPANDING METHODS+++++++++++++++++++++++++++++++++++ + + +QMap ShorthandFormer::expand( const QString& propertyName, const QString& propertyValue ){ + CSSSHPropertyParser parser(propertyValue); + QStringList foundValues = parser.parse(); + + if( propertyName == "cue" ) return expandCueProp(foundValues); + if( propertyName == "pause") return expandPauseProp(foundValues); + if( propertyName == "background") return expandBackgroundProp(foundValues); + if( propertyName == "border-color") return expandBox("color", foundValues); + if( propertyName == "border-style") return expandBox("style", foundValues); + if( propertyName == "border-width") return expandBox("width", foundValues); + if( propertyName == "font") return expandFontProp(foundValues); + if( propertyName == "outline") return expandOutlineProp(foundValues); + if( propertyName == "list-style") return expandListstyleProp(foundValues); + if( propertyName == "border-bottom") return expandBoxSide("bottom",foundValues); + if( propertyName == "border-top") return expandBoxSide("top",foundValues); + if( propertyName == "border-left") return expandBoxSide("left",foundValues); + if( propertyName == "border-right") return expandBoxSide("right",foundValues); + if( propertyName == "border") return expandBorderProp(foundValues); + if( propertyName == "padding") return expandPaddingProp(foundValues); + if( propertyName == "margin") return expandMarginProp(foundValues); + return QMap();//dummy instruction avoiding a pedantic warning; can never be reached +} + +QMap ShorthandFormer::expandCueProp(const QStringList& l){ + return expandImplementation("cue",l); +} + +QMap ShorthandFormer::expandPauseProp(const QStringList& l){ + return expandImplementation("pause",l); +} + +QMap ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){ + QMap expandedProps; + if( l.count()==1) { + expandedProps[propertyName + "-before"] = l[0] ; + expandedProps[propertyName + "-after"] = l[0] ; + return expandedProps; + } + else + { + expandedProps[propertyName + "-before"] = l[0] ; + expandedProps[propertyName + "-after"] = l[1] ; + return expandedProps; + } +} + +QMap ShorthandFormer::expandBackgroundProp(const QStringList& l){ + QMap expandedProps; + if(l.count()==1 && l[0] == "inherit"){ // it works also as protection against wrong single value inserted + expandedProps["background-color"] = l[0]; + expandedProps["background-image"] = l[0]; + expandedProps["background-repeat"] = l[0]; + expandedProps["background-attachment"] =l[0]; + expandedProps["background-position"] = l[0]; + } + else { + + QStringList::ConstIterator it = l.begin(); + + while ( it != l.end() ) { + QString temp((*it).stripWhiteSpace()); + if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){ + expandedProps["background-image"] = (*it); + } + else + if( backgroundRepeatValueList.contains(temp)!=0 ) { + expandedProps["background-repeat"] = (*it); + } + else + if( temp == "scroll" || temp == "fixed" || temp == "inherit"){ + expandedProps["background-attachment"] = (*it); + } + else + if( (*it).contains("rgb(") || (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit" ){ + expandedProps["background-color"] = (*it); + } + else + if( temp == "top" || temp == "center" || temp == "bottom" || temp == "left" || temp == "right" || (*it).contains(globalPercentagePattern) || (*it).contains(globalLengthPattern) || temp == "inherit"){ + if( expandedProps.contains("background-position") ) + expandedProps["background-position"] = ( expandedProps["background-position"] + " " + (*it) ); + else + expandedProps["background-position"] = (*it); + } + + ++it; + } + } + return expandedProps; +} + +QMap ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){ + + QMap expandedProps; + expandedProps["border-top-" + subPropName] = l[0]; + switch(l.count()){ + case 1 : + expandedProps["border-right-" + subPropName] = l[0]; + expandedProps["border-bottom-" + subPropName] = l[0]; + expandedProps["border-left-" + subPropName] = l[0]; + break; + case 2 : + expandedProps["border-right-" + subPropName] = l[1]; + expandedProps["border-bottom-" + subPropName] = l[0]; + expandedProps["border-left-" + subPropName] = l[1]; + break; + case 3 : + expandedProps["border-right-" + subPropName] = l[1]; + expandedProps["border-bottom-" + subPropName] = l[2]; + expandedProps["border-left-" + subPropName] = l[1]; + break; + case 4 : + expandedProps["border-right-" + subPropName] = l[1]; + expandedProps["border-bottom-" + subPropName] = l[2]; + expandedProps["border-left-" + subPropName] = l[3]; + break; + default:break; + } + return expandedProps; +} + +QMap ShorthandFormer::expandFontProp(const QStringList& l){ + QMap expandedProps; + + QRegExp percentagePattern("/"+globalPercentagePattern.pattern()), + lengthPattern("/"+globalLengthPattern.pattern()), + numberPattern("/"+globalNumberPattern.pattern()); + + QStringList fontPseudoSHFormValues; + fontPseudoSHFormValues.append("caption"); + fontPseudoSHFormValues.append("icon"); + fontPseudoSHFormValues.append("menu"); + fontPseudoSHFormValues.append("message-box"); + fontPseudoSHFormValues.append("small-caption"); + fontPseudoSHFormValues.append("status-bar"); + if( l.count()==1 && fontPseudoSHFormValues.contains(l[0]) != 0) { + expandedProps["font"] = l[0]; + return expandedProps; + } + else { + QStringList::ConstIterator it = l.begin(); + while ( it != l.end() ) { + QString currentIt = (*it); + QString temp(currentIt.stripWhiteSpace()); + if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it); + else + if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; + else + if( fontWeightValueList.contains(temp)!=0) expandedProps["font-weight"] = currentIt; + else + if( (fontSizeValueList.contains(temp)!=0 || currentIt.contains(globalPercentagePattern)!=0 || currentIt.contains(globalLengthPattern)!=0) && expandedProps["font-size"].isEmpty() ) + { + expandedProps["font-size"] = currentIt; + } + else + if( currentIt.contains(percentagePattern)!=0 || currentIt.contains(numberPattern)!=0 || currentIt.contains(lengthPattern)!=0 || temp == "/normal" || temp == "/inherit" ) + { + expandedProps["line-height"] = (currentIt.remove('/')); + } + else expandedProps["font-family"] = currentIt; + ++it; + } + return expandedProps; + } +} + +QMap ShorthandFormer::expandListstyleProp( const QStringList& l){ + QMap expandedProps; + if( (l.count() == 1) && (l[0] == "inherit")){ + expandedProps["list-style-image"] ="inherit"; + expandedProps["list-style-type"] ="inherit"; + expandedProps["list-style-position"] ="inherit"; + return expandedProps; + } + + if( (l.count() == 1) && (l[0] == "none")){ + expandedProps["list-style-image"] ="none"; + expandedProps["list-style-type"] ="none"; + return expandedProps; + } + + + QStringList::ConstIterator it = l.begin(); + while ( it != l.end() ) { + QString temp((*it).stripWhiteSpace()); + if( listTypeValueList.contains(temp)!=0) { + expandedProps["list-style-type"] = (*it) ; + } + else + if( temp == "inside" || temp == "outside" || temp == "inherit") { + expandedProps["list-style-position"] = (*it); + } + else + if( (*it).contains("url(") || temp == "none" || temp == "inherit" ) + expandedProps["list-style-image"] = (*it); + + ++it; + } + return expandedProps; +} + +QMap ShorthandFormer::expandOutlineProp( const QStringList& l){ + QMap expandedProps; + QStringList::ConstIterator it = l.begin(); + while ( it != l.end() ) { + QString temp((*it).stripWhiteSpace()); + if( borderStyleValueList.contains(temp)!=0 ) expandedProps["outline-style"] = (*it); + else + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit") + expandedProps["outline-color"] = (*it) ; + else + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0) + expandedProps["outline-width"] = (*it); + ++it; + } + return expandedProps; +} + +QMap ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){ + QMap expandedProps; + + QStringList::ConstIterator it = l.begin(); + while ( it != l.end() ) { + QString temp((*it).stripWhiteSpace()); + if( borderStyleValueList.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it); + else + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit") + expandedProps[subPropName + "-color"] = (*it) ; + else + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0) + expandedProps[subPropName + "-width"] = (*it); + ++it; + } + return expandedProps; +} + +QMap ShorthandFormer::expandBorderProp(const QStringList& l){ + QMap expandedProps; + QStringList::ConstIterator it = l.begin(); + while ( it != l.end() ) { + QString temp((*it).stripWhiteSpace()); + if( borderStyleValueList.contains(temp)!=0 ){ + expandedProps["border-top-style"] = (*it); + expandedProps["border-left-style"] = (*it); + expandedProps["border-right-style"] = (*it); + expandedProps["border-bottom-style"] = (*it); + } + else + if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit"){ + expandedProps["border-top-color"] = (*it); + expandedProps["border-left-color"] = (*it); + expandedProps["border-right-color"] = (*it); + expandedProps["border-bottom-color"] = (*it); + } + else + if( (*it).contains(globalLengthPattern) || widthValueList.contains(temp)!=0){ + expandedProps["border-top-width"] = (*it); + expandedProps["border-left-width"] = (*it); + expandedProps["border-right-width"] = (*it); + expandedProps["border-bottom-width"] = (*it); + } + ++it; + } + return expandedProps; +} + +QMap ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){ + QMap expandedProps; + expandedProps[ propertyName + "-top" ] = l[0]; + switch(l.count()){ + case 1 : + expandedProps[ propertyName + "-right" ] = l[0]; + expandedProps[ propertyName + "-bottom" ] = l[0]; + expandedProps[ propertyName + "-left" ] = l[0]; + break; + case 2 : + expandedProps[ propertyName + "-right" ] = l[1]; + expandedProps[ propertyName + "-bottom" ] = l[0]; + expandedProps[ propertyName + "-left" ] = l[1]; + break; + case 3 : + expandedProps[ propertyName + "-right" ] = l[1]; + expandedProps[ propertyName + "-bottom" ] = l[2]; + expandedProps[ propertyName + "-left" ] = l[1]; + break; + case 4 : + expandedProps[ propertyName + "-right" ] = l[1]; + expandedProps[ propertyName + "-bottom" ] = l[2]; + expandedProps[ propertyName + "-left" ] = l[3]; + break; + default:break; + } + return expandedProps; + } + + QMap ShorthandFormer::expandPaddingProp(const QStringList& l){ + return expandImplementation2("padding", l); +} + + QMap ShorthandFormer::expandMarginProp(const QStringList& l){ + return expandImplementation2("margin", l); + } + +QStringList ShorthandFormer::SHFormList() { + QStringList l; + l.append("cue"); + l.append("pause"); + l.append("font"); + l.append("background"); + l.append("border"); + l.append("border-top"); + l.append("border-bottom"); + l.append("border-left"); + l.append("border-right"); + l.append("border-color"); + l.append("border-style"); + l.append("border-width"); + l.append("outline"); + l.append("list-style"); + l.append("padding"); + l.append("margin"); + return l; +} + diff --git a/quanta/components/csseditor/shorthandformer.h b/quanta/components/csseditor/shorthandformer.h new file mode 100644 index 00000000..f5b0f291 --- /dev/null +++ b/quanta/components/csseditor/shorthandformer.h @@ -0,0 +1,117 @@ +/*************************************************************************** + * Copyright (C) 2003 by Gulmini Luciano * + * gulmini.luciano@student.unife.it * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef SHORTHANDFORMER_H +#define SHORTHANDFORMER_H + +/** +@author Gulmini Luciano +*/ +#include +class QString; +class QStringList; + +class ShorthandFormer{ +public: + ShorthandFormer(){} + ShorthandFormer( QMap m ); + ~ShorthandFormer(){} + QString compress(); + QMap expand(const QString& propertyName, const QString& propertyValue); + static QStringList SHFormList(); + +private: + QMap m_properties; + QString cue_after, + cue_before, + pause_before, + pause_after, + background_color, + background_image, + background_repeat, + background_attachment, + background_position, + border_top_style, + border_top_color, + border_top_width, + border_left_style, + border_left_color, + border_left_width, + border_right_style, + border_right_color, + border_right_width, + border_bottom_style, + border_bottom_color, + border_bottom_width, + outline_style, + outline_color, + outline_width, + list_style_type, + list_style_image, + list_style_position, + font_style, + font_variant, + font_weight, + font_size, + line_height, + font_family, + margin_top, + margin_bottom, + margin_left, + margin_right, + padding_top, + padding_bottom, + padding_left, + padding_right; + +private: + QString compressCueProp(); + QString compressPauseProp(); + QString compressPaddingProp(); + QString compressMarginProp(); + QString compressFontProp(); + QString compressBackgroundProp(); + QString compressOutlineProp(); + QString compressListStyleProp(); + QString compressBorderStyleProp(); + QString compressBorderWidthProp(); + QString compressBorderColorProp(); + QString compressBorderProp(); + + QString compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue); + QString compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue); + QString compressImplementation3( const QString& prop, const QString& p1, const QString& p2, const QString& p3); + + QMap expandCueProp(const QStringList& l); + QMap expandPauseProp(const QStringList& l); + QMap expandBackgroundProp(const QStringList& l); + QMap expandFontProp(const QStringList& l); + QMap expandOutlineProp(const QStringList& l); + QMap expandListstyleProp(const QStringList& l); + QMap expandBoxSide(const QString& subPropName, const QStringList& l); + QMap expandBorderProp(const QStringList& l); + QMap expandBox(const QString& subPropName, const QStringList& l); + QMap expandPaddingProp(const QStringList& l); + QMap expandMarginProp(const QStringList& l); + + QMap expandImplementation(const QString& propertyName, const QStringList& l); + QMap expandImplementation2(const QString& propertyName, const QStringList& l); + }; + +#endif diff --git a/quanta/components/csseditor/specialsb.cpp b/quanta/components/csseditor/specialsb.cpp new file mode 100644 index 00000000..eb26e05f --- /dev/null +++ b/quanta/components/csseditor/specialsb.cpp @@ -0,0 +1,127 @@ +/*************************************************************************** + specialsb.cpp - description + ------------------- + begin : dom ago 3 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "specialsb.h" +#include "propertysetter.h" +#include "csseditor_globals.h" + +#include + +specialSB::specialSB(QWidget *parent, const char *name, bool useLineEdit ) : miniEditor(parent,name) { + if (useLineEdit) + { + m_lineEdit = new KLineEdit(this); + m_sb = 0L; + connect(m_lineEdit, SIGNAL(textChanged ( const QString & )), this, SLOT(lineEditValueSlot ( const QString & ))); + } + else + { + m_sb=new mySpinBox(this); + connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SLOT(sbValueSlot(const QString&))); + m_lineEdit = 0L; + } + m_cb = new QComboBox(this); + connect(m_cb, SIGNAL(activated ( const QString & )), this, SLOT(cbValueSlot(const QString&))); +} + +specialSB::~specialSB(){ + delete m_cb; + delete m_sb; + delete m_lineEdit; +} + +void specialSB::connectToPropertySetter(propertySetter* p){ + connect(this, SIGNAL(valueChanged(const QString&)), p,SIGNAL(valueChanged(const QString&))); +} + + +void specialSB::cbValueSlot(const QString& s){ + if (m_sb) + emit valueChanged( m_sb->text() +s ); + else + emit valueChanged( m_lineEdit->text() +s ); +} + +void specialSB::sbValueSlot(const QString& s){ + emit valueChanged( s + m_cb->currentText()); +} + +void specialSB::lineEditValueSlot(const QString& s){ + emit valueChanged( s + m_cb->currentText()); +} + +void specialSB::setInitialValue(const QString& s){ + + QRegExp pattern("\\d("+ cbValueList().join("|")+")"); + + if (pattern.search(s) != -1) { + QString temp(s.stripWhiteSpace()); + QString cbValue = pattern.cap(1); + + if (m_sb) + m_sb->setValue(temp.remove(cbValue).toInt()); + else + m_lineEdit->setText(temp.remove(cbValue)); + m_cb->setCurrentText(cbValue); + } + else return; +} + +QStringList specialSB::cbValueList(){ + QStringList l; + for(int i=0; icount();i++) l.append(m_cb->text(i)); + return l; +} + +frequencyEditor::frequencyEditor(QWidget *parent, const char *name ) : specialSB(parent,name) { + m_cb->insertItem("Hz"); + m_cb->insertItem("kHz"); + m_sb->setMaxValue(9999); +} + +angleEditor::angleEditor(QWidget *parent, const char *name) : specialSB(parent,name){ + m_cb->insertItem("deg"); + m_cb->insertItem("grad"); + m_cb->insertItem("rad"); + m_sb->setMaxValue(-400); + m_sb->setMaxValue(400); +} + +timeEditor::timeEditor(QWidget *parent, const char *name ) : specialSB(parent,name) { + m_cb->insertItem("ms"); + m_cb->insertItem("s"); + m_sb->setMaxValue(99999); +} + +lengthEditor::lengthEditor(QWidget *parent, const char *name ) : specialSB(parent,name, true) { + m_cb->insertItem("px"); + m_cb->insertItem("em"); + m_cb->insertItem("ex"); + m_cb->insertItem("in"); + m_cb->insertItem("cm"); + m_cb->insertItem("mm"); + m_cb->insertItem("pt"); + m_cb->insertItem("pc"); + if (m_sb) + m_sb->setMaxValue(99999); +} + + + + + +#include "specialsb.moc" diff --git a/quanta/components/csseditor/specialsb.h b/quanta/components/csseditor/specialsb.h new file mode 100644 index 00000000..43d6273e --- /dev/null +++ b/quanta/components/csseditor/specialsb.h @@ -0,0 +1,79 @@ +/*************************************************************************** + specialsb.h - description + ------------------- + begin : dom ago 3 2003 + copyright : (C) 2003 by Gulmini Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef SPECIALSB_H +#define SPECIALSB_H + +#include "minieditor.h" +#include +class mySpinBox; +class KLineEdit; + +/** + *@author gulmini luciano + */ + +class specialSB : public miniEditor { + Q_OBJECT + protected: + QComboBox *m_cb; + mySpinBox *m_sb; + KLineEdit *m_lineEdit; + + public: + specialSB(QWidget *parent=0, const char *name=0, bool useLineEdit = false); + ~specialSB(); + void insertItem(const QString& s){ m_cb->insertItem(s); } + void setInitialValue(const QString& s); + QStringList cbValueList(); + virtual void connectToPropertySetter(propertySetter* p); + + public slots: + void cbValueSlot(const QString&); + void sbValueSlot(const QString&); + void lineEditValueSlot(const QString&); + + signals: + void valueChanged(const QString&); + +}; + +class angleEditor : public specialSB { + Q_OBJECT + public: + angleEditor(QWidget *parent=0, const char *name=0); +}; + +class frequencyEditor : public specialSB { + Q_OBJECT + public: + frequencyEditor(QWidget *parent=0, const char *name=0); +}; + +class timeEditor : public specialSB { + Q_OBJECT + public: + timeEditor(QWidget *parent=0, const char *name=0); +}; + +class lengthEditor : public specialSB { + Q_OBJECT + public: + lengthEditor(QWidget *parent=0, const char *name=0); +}; + +#endif diff --git a/quanta/components/csseditor/styleeditor.cpp b/quanta/components/csseditor/styleeditor.cpp new file mode 100644 index 00000000..63d4af79 --- /dev/null +++ b/quanta/components/csseditor/styleeditor.cpp @@ -0,0 +1,109 @@ +/*************************************************************************** + styleeditor - implementation + begin : Wed Apr 7 2004 + copyright : (C) 2004 by Luciano Gulmini + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + ***************************************************************************/ + +//qt includes +#include +#include +#include +#include +#include + +//kde includes +#include +#include +#include +#include +#include +#include +#include + +//app includes +#include "parser.h" +#include "tag.h" +#include "node.h" +#include "project.h" +#include "resource.h" +#include "document.h" +#include "styleeditor.h" +#include "viewmanager.h" +#include "csseditor.h" + +StyleEditor::StyleEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){ + connect(m_pb, SIGNAL(clicked()), this, SLOT(openCSSEditor())); + setToolTip(i18n("Open css dialog")); + QIconSet iconSet = SmallIconSet(QString::fromLatin1("stylesheet")); + QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + m_pb->setIconSet(iconSet); + m_iconWidth = pixMap.width(); + m_iconHeight = pixMap.height(); + m_pb->setFixedSize( m_iconWidth+8, m_iconHeight+8 ); + m_label->hide(); +} + +void StyleEditor::setButtonIcon(int width, int height){ + m_pb->setFixedSize( m_iconWidth+width, m_iconHeight+height ); +} + +void StyleEditor::openCSSEditor(){ + Document *w = ViewManager::ref()->activeDocument(); + if (!w) return; + uint line, col; + int bLine, bCol, eLine, eCol; + bLine = bCol = eLine = eCol = 0; + w->viewCursorIf->cursorPositionReal(&line, &col); + if (line == 0 && col == 0) + col++; + //parser->rebuild(w); + Node *node = parser->nodeAt(line, col, false); + unsigned int lastLine = w->editIf->numLines() - 1; + unsigned int lastCol = w->editIf->lineLength(lastLine); + Node *styleNode = node; + + if (styleNode->tag->type == Tag::XmlTagEnd && styleNode->prev) + styleNode = styleNode->prev; + + QString fullDocument = w->editIf->text().stripWhiteSpace(); + + if (styleNode && (styleNode->tag->type == Tag::XmlTag || styleNode->tag->type == Tag::Empty) ) { + CSSEditor *dlg = new CSSEditor(this); + QFileInfo fi(ViewManager::ref()->currentURL()); + dlg->setFileToPreview(Project::ref()->projectBaseURL().path() + fi.baseName(),false); + + styleNode->tag->beginPos(bLine, bCol); + styleNode->tag->endPos(eLine, eCol); + dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol)); + + QString temp; + if (styleNode->tag->hasAttribute("style")) { + dlg->setInlineStyleContent(styleNode->tag->attributeValue("style")); + Tag tempTag(*(styleNode->tag)); + tempTag.deleteAttribute("style"); + temp = tempTag.toString(); + } + else { + dlg->setInlineStyleContent(QString::null); + temp = styleNode->tag->toString(); + } + + temp = temp.left(temp.length()-1);//remove > + temp = temp.right(temp.length()-1);//remove < + dlg->setHeader(w->text(0, 0, bLine, bCol) + temp); + + dlg->initialize(); + if( dlg->exec() ) m_le->setText(dlg->generateProperties()); + delete dlg; + } +} + +#include "styleeditor.moc" diff --git a/quanta/components/csseditor/styleeditor.h b/quanta/components/csseditor/styleeditor.h new file mode 100644 index 00000000..582ac848 --- /dev/null +++ b/quanta/components/csseditor/styleeditor.h @@ -0,0 +1,42 @@ +/*************************************************************************** + styleeditor - description + begin : Wed Apr 7 2004 + copyright : (C) 2004 by Luciano Gulmini + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + ***************************************************************************/ + +#ifndef STYLEEDITOR_H +#define STYLEEDITOR_H + +//qt includes +#include "tlpeditors.h" +//kde includes + +//app includes + +//forward declarations +class propertySetter; +class StyleEditor : public TLPEditor{ + Q_OBJECT + private: + int m_iconWidth, + m_iconHeight; +public: + StyleEditor(QWidget *parent=0, const char* name=0); + virtual void setButtonIcon(int width, int height); + +public slots: + void openCSSEditor(); + virtual void connectToPropertySetter(propertySetter* /*p*/){} + virtual void setInitialValue(const QString& /*s*/){} +}; + + +#endif //STYLEEDITOR_H diff --git a/quanta/components/csseditor/stylesheetparser.cpp b/quanta/components/csseditor/stylesheetparser.cpp new file mode 100644 index 00000000..b8cbf306 --- /dev/null +++ b/quanta/components/csseditor/stylesheetparser.cpp @@ -0,0 +1,245 @@ +/*************************************************************************** + stylesheetparser.cpp - description + ------------------- + begin : gio ago 19 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "stylesheetparser.h" +#include +#include + +static const QString msg1(i18n("has not been closed")), + msg2(i18n("needs an opening parenthesis ")); + +stylesheetParser::stylesheetParser(const QString& s){ + m_styleSheet = s; + m_styleSheet=m_styleSheet.right(m_styleSheet.length()-whiteSpaces(0)); + m_stopProcessing = false; + m_orderNumber = 0; +} + +int stylesheetParser::whiteSpaces(int d){ + int ws=0; + for( unsigned int i=d;i tmp(m_styleSheet.left(k+ws),++m_orderNumber); + m_stylesheetStructure["/*"+QString::number(m_orderNumber,10)]=tmp; + m_styleSheet=m_styleSheet.right(m_styleSheet.length()-k-ws); + parse(); + } + + else { + m_stopProcessing = true; + emit errorOccurred(i18n("The comment") + " :\n" +m_styleSheet.mid(0,20) + "...\n "+ msg1); + return; + } +} + +unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b){ + QChar searchFor = '{'; + if (p == closed) + searchFor = '}'; + int num = 0; + int len = b.length(); + bool ignore = false; + for (int i = 0; i < len; i++) + { + if (b[i] == '/' && (i + 1 < len) && b[i + 1] == '*') + ignore = true; + if (b[i] == '*' && (i + 1 < len) && b[i + 1] == '/') + ignore = false; + if (!ignore && b[i] == searchFor) + num++; + } + return num; +} + +int findParanthesis(const QString& string, const QChar &ch, int startPos = 0) +{ + int pos = -1; + int len = string.length(); + bool ignore = false; + for (int i = startPos; i < len; i++) + { + if (string[i] == '/' && (i + 1 < len) && string[i + 1] == '*') + ignore = true; + if (string[i] == '*' && (i + 1 < len) && string[i + 1] == '/') + ignore = false; + if (!ignore && string[i] == ch) + { + pos = i; + break; + } + } + return pos; +} + +void stylesheetParser::parseSelector(){ + int closingParenthesisPos = findParanthesis(m_styleSheet, '}'); + if(closingParenthesisPos==-1) { + m_stopProcessing = true; + emit errorOccurred(i18n("The selector") + " :\n" +m_styleSheet.mid(0,20) + "...\n "+ msg1); + return; + } + + QString temp(m_styleSheet.left(closingParenthesisPos+1)); + + if(numberOfParenthesisInAParenthesisBlock(closed,temp) < numberOfParenthesisInAParenthesisBlock(opened,temp)){ + m_stopProcessing = true; + emit errorOccurred(i18n("The selector") + " :\n" +m_styleSheet.mid(0,20) + "...\n "+ msg1); + return; + } + + if(numberOfParenthesisInAParenthesisBlock(closed,temp) > numberOfParenthesisInAParenthesisBlock(opened,temp)){ + m_stopProcessing = true; + emit errorOccurred(i18n("The selector") + " :\n" +m_styleSheet.mid(0,20) + "...\n "+ msg2); + return; + } + + int closingParentheses = 1, + openingParentheses = 0; + while(true){ + openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).contains("{"); + + if(openingParentheses==closingParentheses){ + QString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(), + selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/+1, closingParenthesisPos - m_styleSheet.find("{") -1); + + selectorName.remove("\n").remove("\t"); + selectorValue.remove("\n").remove("\t"); + QPair tmp(selectorValue,++m_orderNumber); + + if (m_stylesheetStructure.contains(selectorName)) + { + uint i = 2; + QString s = selectorName + QString("-v%1").arg(i); + while (m_stylesheetStructure.contains(s)) + { + i++; + s = selectorName + QString("-v%1").arg(i); + } + selectorName = s; + } + m_stylesheetStructure[selectorName]=tmp; + break; + } + else { + closingParenthesisPos = findParanthesis(m_styleSheet, '{',closingParenthesisPos+1)/*m_styleSheet.find("}",closingParenthesisPos+1)*/; + closingParentheses++; + } + } + + int ws=whiteSpaces(closingParenthesisPos+1); + m_styleSheet=m_styleSheet.right(m_styleSheet.length()-closingParenthesisPos-1-ws); + parse(); +} + +void stylesheetParser::parseAtRules1(){ +//TODO this needs to be fixed : in case the at rule is not properly closed the parser hangs + if(m_styleSheet.find("{") == -1) { + m_stopProcessing = true; + emit errorOccurred(m_styleSheet.mid(0,20) + "...\n " + msg2); + return; + } + + int closingParenthesisPos = m_styleSheet.find("}"), + closingParentheses = 0; + + if(closingParenthesisPos==-1) return; + else closingParentheses = 1; + + int openingParentheses=0; + while(true){ + openingParentheses = m_styleSheet.left(closingParenthesisPos+1).contains("{"); + + if(openingParentheses==closingParentheses) + break; + else { + closingParenthesisPos = m_styleSheet.find("}",closingParenthesisPos+1); + if( closingParenthesisPos!= -1 ) + closingParentheses++; + else { + m_stopProcessing = true; + emit errorOccurred(m_styleSheet.mid(0,20) + "...\n " + msg1); + return; + } + } + } + + int ws=whiteSpaces(closingParenthesisPos+1); + QPair tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber); + m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp; + m_styleSheet=m_styleSheet.right(m_styleSheet.length()-closingParenthesisPos-1-ws); + parse(); +} + +void stylesheetParser::parseAtRules2(){ +//TODO this needs to be fixed : in case the at rule is not properly closed the parser hangs + int semicolonPos = m_styleSheet.find(";"); + + if(semicolonPos==-1) { + m_stopProcessing = true; + emit errorOccurred(m_styleSheet.mid(0,20) + "...\n " + msg1); + return; + } + + int ws=whiteSpaces(semicolonPos+1); + QPair tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber); + m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp; + m_styleSheet=m_styleSheet.right(m_styleSheet.length()-semicolonPos-1-ws); + parse(); +} + +#include "stylesheetparser.moc" diff --git a/quanta/components/csseditor/stylesheetparser.h b/quanta/components/csseditor/stylesheetparser.h new file mode 100644 index 00000000..26d5fa3e --- /dev/null +++ b/quanta/components/csseditor/stylesheetparser.h @@ -0,0 +1,58 @@ +/*************************************************************************** + stylesheetparser.h - description + ------------------- + begin : gio ago 19 2004 + copyright : (C) 2004 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef STYLESHEETPARSER_H +#define STYLESHEETPARSER_H + +#include +#include +#include + +/** + *@author gulmini luciano + */ + +class stylesheetParser : public QObject{ + Q_OBJECT + private: + + enum parenthesisKind { opened, closed }; + QString m_styleSheet; + bool m_stopProcessing; + unsigned int m_orderNumber; + QMap > m_stylesheetStructure; + void parseComment(); + void parseSelector(); + void parseAtRules1(); + void parseAtRules2(); + int whiteSpaces(int); + unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b); + + public: + stylesheetParser(const QString& s); + ~stylesheetParser(){} + void parse(); + + QMap > stylesheetStructure() { return m_stylesheetStructure; } + unsigned int orderNumber() const {return m_orderNumber; } + + signals: + void errorOccurred(const QString&); +}; + +#endif + diff --git a/quanta/components/csseditor/tlpeditors.cpp b/quanta/components/csseditor/tlpeditors.cpp new file mode 100644 index 00000000..706ac518 --- /dev/null +++ b/quanta/components/csseditor/tlpeditors.cpp @@ -0,0 +1,174 @@ +/*************************************************************************** + tlpeditors.cpp - description + ------------------- + begin : gio apr 1 2004 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "qextfileinfo.h" +#include "tlpeditors.h" +#include "fontfamilychooser.h" +#include "project.h" + +TLPEditor::TLPEditor(QWidget *parent, const char* name) : miniEditor(parent,name){ + m_label = new QLabel(this); + m_le = new QLineEdit(this); + m_pb = new KPushButton(this); + setSpacing( KDialog::spacingHint() ); +} + +TLPEditor::~TLPEditor(){ + delete m_label; + delete m_le; + delete m_pb; +} + +void TLPEditor::setButtonIcon(QString s){ + QIconSet iconSet = SmallIconSet(QString::fromLatin1(s)); + QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + m_pb->setIconSet(iconSet); + m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); +} + +void TLPEditor::setLabelText(QString s){ + m_label->setText(s); +} + +void TLPEditor::setToolTip(QString s){ + QToolTip::add(m_pb, s); +} + +void TLPEditor::setWhatsThis(QString s){ + QWhatsThis::add(m_le,s); +} + +URIEditor::URIEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){ + QString whatsthis =i18n("With this line edit you can insert the URI of the resource you want to reach"); + setWhatsThis(whatsthis); + setLabelText(" Uri :"); + setButtonIcon("fileopen"); + setToolTip(i18n("Open the URI selector")); + + connect(m_pb, SIGNAL(clicked()), this, SLOT(openFileDialog())); +} + +void URIEditor::connectToPropertySetter(propertySetter* p){ + connect(this,SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); +} + +void URIEditor::setMode(const mode& m) { + m_Mode = m ; + if( m_Mode == Single ) + connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURI(const QString&))); + else{ + connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURIs(const QStringList&))); + } +} + +void URIEditor::selectedURI(const QString & s){ + KURL u; + u.setPath(s); + emit valueChanged("url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); +} + +void URIEditor::selectedURIs(const QStringList& s){ + KURL u; + QStringList selectedFiles = s, + selectedFilesWithURLFormat; + for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ + u.setPath(*it); + selectedFilesWithURLFormat.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); + } + emit valueChanged(selectedFilesWithURLFormat.join(",")); +} + +void URIEditor::openFileDialog(){ + + KFileDialog fd( Project::ref()->projectBaseURL().url(), "*.*", this, "file dialog", true ); + switch(m_resourceType) { + case image : { + fd.setFilter( "*.png *.gif *.jpg *.mng|" + i18n("Image Files") +" (*.png *.gif *.jpg *.mng)\n*.*|" + i18n("All Files")+(" (*.*)") ); + KImageFilePreview *ip = new KImageFilePreview( &fd ); + fd.setPreviewWidget( ip ); + } + break; + case audio : { + fd.setFilter( "*.au *.aiff *.wav|" + i18n("Audio Files")+" (*.au *.aiff *.wav)\n*.*|" + i18n("All Files")+(" (*.*)") ); + + + } + break; + //case mousePointer : fd.setFilter( "*.|" + i18n("Mouse Pointers (*.)")+"\n*.*|" + i18n("All Files (*.*)") );break; + case mousePointer : fd.setFilter( "*.*|" + i18n("All Files")+(" (*.*)") );break; + + default:; + } + + if( m_Mode == Single) + fd.setMode(KFile::File); + else + fd.setMode(KFile::Files); + + + if( fd.exec() ){ + if( fd.mode() == KFile::File ) + selectedURI( fd.selectedFile() ); + else { + selectedURIs( fd.selectedFiles() ); + /*QStringList selectedFiles = fd.selectedFiles(); + KURL u; + for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ + u.setPath(*it); + m_sFiles.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); + } + emit valueChanged(m_sFiles.join(","));*/ + } + } +} + +fontEditor::fontEditor(QWidget *parent, const char* name) : TLPEditor(parent,name), m_initialValue(QString::null){ + QString whatsthis =i18n("With this line edit you can insert the name of the font you want to use"); + setWhatsThis(whatsthis); + setLabelText(i18n("Font family:")); + setButtonIcon("fonts"); + setToolTip(i18n("Open font family chooser")); + connect(m_pb, SIGNAL(clicked()), this, SLOT(openFontChooser())); + connect(m_le, SIGNAL(textChanged ( const QString & )), this, SIGNAL( valueChanged( const QString& ) ) ); +} + +void fontEditor::connectToPropertySetter(propertySetter* p){ + connect(this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); +} + +void fontEditor::openFontChooser(){ + fontFamilyChooser dlg( this ); + dlg.setInitialValue(m_initialValue); + if( dlg.exec() ) + emit valueChanged( dlg.fontList().join(", ")); +} + +#include "tlpeditors.moc" diff --git a/quanta/components/csseditor/tlpeditors.h b/quanta/components/csseditor/tlpeditors.h new file mode 100644 index 00000000..d0e52d37 --- /dev/null +++ b/quanta/components/csseditor/tlpeditors.h @@ -0,0 +1,94 @@ +/*************************************************************************** + tlpeditors.h - description + ------------------- + begin : gio apr 1 2004 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TLPEDITORS_H +#define TLPEDITORS_H + +#include "minieditor.h" +#include "propertysetter.h" + +class KPushButton; +class QLineEdit; +class QLabel; +/** + *@author gulmini luciano + */ + + +class TLPEditor : public miniEditor { //editor with a line text and a button calling a dialog + Q_OBJECT + + protected: + QLineEdit *m_le; + QLabel *m_label; + KPushButton *m_pb; + + public: + TLPEditor(QWidget *parent, const char* name=0); + virtual ~TLPEditor(); + virtual void setButtonIcon(QString); + void setToolTip(QString); + void setLabelText(QString); + void setWhatsThis(QString); + QLineEdit* lineEdit() const { return m_le; } + KPushButton* button() const { return m_pb; } + virtual void setInitialValue(const QString& s)=0; + virtual void connectToPropertySetter(propertySetter* p)=0; + + signals: + void valueChanged(const QString&); +}; + +class fontEditor : public TLPEditor{ + Q_OBJECT + private: + QString m_initialValue; + + public: + fontEditor(QWidget *parent, const char* name=0); + virtual void setInitialValue(const QString& s) { m_initialValue = s; } + virtual void connectToPropertySetter(propertySetter* p); + + public slots: + void openFontChooser(); +}; + +class URIEditor : public TLPEditor { + Q_OBJECT + public: + enum mode{ Multi, Single }; + enum URIResourceType{ audio, image, mousePointer }; + + private: + mode m_Mode; + URIResourceType m_resourceType; + + public: + URIEditor(QWidget *parent, const char* name=0); + void setMode(const mode& m); + void setResourceType(const URIResourceType& r) { m_resourceType = r ; } + virtual void setInitialValue(const QString& /*s*/){} + virtual void connectToPropertySetter(propertySetter* p); + + public slots: + void selectedURI(const QString&); + void selectedURIs(const QStringList&); + void openFileDialog(); +}; + + +#endif diff --git a/quanta/components/cvsservice/Makefile.am b/quanta/components/cvsservice/Makefile.am new file mode 100644 index 00000000..79429348 --- /dev/null +++ b/quanta/components/cvsservice/Makefile.am @@ -0,0 +1,13 @@ +noinst_LTLIBRARIES = libcvsservice.la + +libcvsservice_la_SOURCES = cvsservice.cpp cvscommitdlgs.ui \ + cvsservicedcopif.skel cvsupdatetodlgs.ui +libcvsservice_la_METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/lib \ + $(KMDI_INCLUDES) $(all_includes) +noinst_HEADERS = cvsservicedcopif.h diff --git a/quanta/components/cvsservice/cvscommitdlgs.ui b/quanta/components/cvsservice/cvscommitdlgs.ui new file mode 100644 index 00000000..ce2c9fd0 --- /dev/null +++ b/quanta/components/cvsservice/cvscommitdlgs.ui @@ -0,0 +1,150 @@ + +CVSCommitDlgS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * +***************************************************************************/ + +(C) 2004 Andras Mantia <amantia@kde.org> + + + CVSCommitDlgS + + + + 0 + 0 + 600 + 480 + + + + CVS Commit + + + + unnamed + + + + fileList + + + + + textLabel1 + + + Commit the following files: + + + + + messageCombo + + + false + + + + + textLabel2 + + + Older &messages: + + + messageCombo + + + + + textLabel3 + + + &Log message: + + + logEdit + + + + + logEdit + + + + + cancelButton + + + &Cancel + + + + + okButton + + + &OK + + + true + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 80 + 20 + + + + + + + + + + okButton + clicked() + CVSCommitDlgS + accept() + + + cancelButton + clicked() + CVSCommitDlgS + reject() + + + messageCombo + activated(const QString&) + logEdit + setText(const QString&) + + + + fileList + messageCombo + logEdit + okButton + cancelButton + + + + klistbox.h + + diff --git a/quanta/components/cvsservice/cvsservice.cpp b/quanta/components/cvsservice/cvsservice.cpp new file mode 100644 index 00000000..043af54e --- /dev/null +++ b/quanta/components/cvsservice/cvsservice.cpp @@ -0,0 +1,555 @@ +/*************************************************************************** + cvsservice.cpp - description + ------------------------------ + begin : Sun May 16 17:50:25 2004 + copyright : (C) 2004, 2005 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 + * + ***************************************************************************/ + +//qt include +#include +#include +#include +#include +#include +#include + +//kde includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// CvsService +#include +#include +#include + +#include "cvsservice.h" +#include "cvscommitdlgs.h" +#include "cvsupdatetodlgs.h" + +#define CVSSERVICE_TIMEOUT 1000*60 + +CVSService::CVSService(KActionCollection *ac) +{ + m_menu = new KPopupMenu(); + KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, SLOT(slotCommit()), ac, "vcs_commit"); + action->plug(m_menu); + action = new KAction(i18n("&Update"), "vcs_update", 0, this, SLOT(slotUpdate()), ac, "vcs_update"); + action->plug(m_menu); + KPopupMenu *updateToMenu = new KPopupMenu(m_menu); + m_menu->insertItem(SmallIconSet("vcs_update"), i18n("Update &To"), updateToMenu); + action = new KAction(i18n("&Tag/Date..."), "vcs_update", 0, this, SLOT(slotUpdateToTag()), ac, "vcs_update_tag_date"); + action->plug(updateToMenu); + action = new KAction(i18n("&HEAD"), "vcs_update", 0, this, SLOT(slotUpdateToHead()), ac, "vcs_update_head"); + action->plug(updateToMenu); + action = new KAction(i18n("Re&vert"), "reload", 0, this, SLOT(slotRevert()), ac, "vcs_revert"); + action->plug(m_menu); + m_menu->insertSeparator(); + action = new KAction(i18n("&Add to Repository..."), "vcs_add", 0, this, SLOT(slotAdd()), ac, "vcs_add"); + action->plug(m_menu); + action = new KAction(i18n("&Remove From Repository..."), "vcs_remove", 0, this, SLOT(slotRemove()), ac, "vcs_remove"); + action->plug(m_menu); + action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, SLOT(slotAddToCVSIgnore()), ac); + action->plug(m_menu); + action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, SLOT(slotRemoveFromCVSIgnore()), ac); + action->plug(m_menu); + + m_menu->insertSeparator(); + action = new KAction(i18n("Show &Log Messages"), 0, this, SLOT(slotBrowseLog()), ac); + action->plug(m_menu); + + m_cvsJob = 0L; + m_repository = 0L; + m_cvsService =0L; + m_commitDlg = new CVSCommitDlgS(); + m_updateToDlg = new CVSUpdateToDlgS(); + m_timer = new QTimer(this); + connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); +} + +CVSService::~CVSService() +{ + if (m_cvsService) + m_cvsService->quit(); + delete m_cvsService; + delete m_menu; + delete m_repository; + m_repository = 0L; + m_cvsService = 0L; + delete m_commitDlg; + delete m_updateToDlg; +} + +void CVSService::setAppId(const QCString &id) +{ + m_appId = id; + m_cvsService = new CvsService_stub(m_appId, "CvsService"); + m_timer->start(CVSSERVICE_TIMEOUT, true); +} + +void CVSService::setRepository(const QString &repository) +{ + startService(); + delete m_repository; + m_repository = new Repository_stub(m_appId, "CvsRepository"); + if (m_repository->setWorkingCopy(repository)) + { + m_repositoryPath = repository; + if (!m_repositoryPath.endsWith("/")) + m_repositoryPath += "/"; + } +} + +void CVSService::slotUpdate() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotUpdate(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotUpdate(const QStringList &files) +{ + startService(); + if (m_repository && !m_appId.isEmpty()) + { + emit clearMessages(); + emit showMessage(i18n("Running CVS update...") + "\n", false); + m_files = files; + m_job = m_cvsService->update(files, true, true, true, ""); + m_cvsCommand = "update"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotUpdateToTag() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotUpdateToTag(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotUpdateToTag(const QStringList &files) +{ + startService(); + if (m_repository && !m_appId.isEmpty() && m_updateToDlg->exec()) + { + QString extraOpts; + QString commandStr; + if (m_updateToDlg->tagRadioButton->isChecked()) + { + extraOpts = "-r " + m_updateToDlg->tagCombo->currentText(); + commandStr = i18n("Updating to revision %1 ...").arg(m_updateToDlg->tagCombo->currentText()); + } else + { + extraOpts = "-D " + m_updateToDlg->dateLineEdit->text(); + commandStr = i18n("Updating to the version from %1 ...").arg(+ m_updateToDlg->dateLineEdit->text()); + } + emit clearMessages(); + emit showMessage(commandStr + "\n", false); + m_files = files; + m_job = m_cvsService->update(files, true, true, true, extraOpts); + m_cvsCommand = "update"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotUpdateToHead() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotUpdateToHead(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotUpdateToHead(const QStringList &files) +{ + startService(); + if (m_repository && !m_appId.isEmpty()) + { + emit clearMessages(); + emit showMessage(i18n("Updating to HEAD...") + "\n", false); + m_files = files; + m_job = m_cvsService->update(files, true, true, true, "-A"); + m_cvsCommand = "update"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotCommit() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotCommit(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotCommit(const QStringList &files) +{ + startService(); + m_commitDlg->fileList->clear(); + m_commitDlg->fileList->insertStringList(files); + m_commitDlg->logEdit->clear(); + m_commitDlg->messageCombo->insertItem(i18n("Current"), 0); + m_commitDlg->messageCombo->setCurrentItem(0); + + if (m_repository && !m_appId.isEmpty() && m_commitDlg->exec()) + { + m_commitDlg->messageCombo->removeItem(0); + QString message = m_commitDlg->logEdit->text(); + if (message != m_commitDlg->messageCombo->currentText()) + m_commitDlg->messageCombo->insertItem(message, 0); + emit clearMessages(); + emit showMessage(i18n("Running CVS commit...") + "\n", false); + m_files = files; + m_job = m_cvsService->commit(files, message, true); + m_cvsCommand = "commit"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotRevert() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotRevert(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotRevert(const QStringList &files) +{ + startService(); + if (m_repository && !m_appId.isEmpty()) + { + emit clearMessages(); + emit showMessage(i18n("Reverting to the version from the repository...") + "\n", false); + m_files = files; + m_job = m_cvsService->update(files, true, true, true, "-C"); + m_cvsCommand = "update"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotAdd() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotAdd(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotAdd(const QStringList &files) +{ + startService(); + if (m_repository && !m_appId.isEmpty() && (KMessageBox::questionYesNoList(0, i18n("Add the following files to repository?"), files, i18n("CVS Add"), KStdGuiItem::add(), i18n("Do Not Add")) == KMessageBox::Yes)) + { + emit clearMessages(); + emit showMessage(i18n("Adding file to the repository...") + "\n", false); + m_files = files; + m_job = m_cvsService->add(files, false); + m_cvsCommand = "add"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotRemove() +{ + QStringList files; + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + files += m_defaultFile.remove(m_repositoryPath); + slotRemove(files); + } else + { + notInRepository(); + } + } +} + +void CVSService::slotRemove(const QStringList &files) +{ + startService(); + if (m_repository && !m_appId.isEmpty() && (KMessageBox::warningContinueCancelList(0, i18n("Remove the following files from the repository?
This will remove your working copy as well.
"), files, i18n("CVS Remove")) == KMessageBox::Continue)) + { + emit clearMessages(); + emit showMessage(i18n("Removing files from the repository...") + "\n", false); + m_files = files; + m_job = m_cvsService->remove(files, true); + m_cvsCommand = "remove"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } +} + +void CVSService::slotBrowseLog() +{ + startService(); + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + QString file = m_defaultFile.remove(m_repositoryPath); + if (m_repository && !m_appId.isEmpty() ) + { + emit clearMessages(); + emit showMessage(i18n("Showing CVS log...") + "\n", false); + m_files += file; + m_job = m_cvsService->log(file); + m_cvsCommand = "log"; + m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); + + connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + m_cvsJob->execute(); + } + } else + { + notInRepository(); + } + } +} + +void CVSService::slotAddToCVSIgnore() +{ + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + emit clearMessages(); + QFileInfo fInfo(m_defaultFile); + QFile f(fInfo.dirPath()+ "/.cvsignore"); + if (f.open(IO_ReadWrite)) + { + bool found = false; + QTextStream str(&f); + str.setEncoding(QTextStream::UnicodeUTF8); + QString line; + while (!str.atEnd()) + { + line = str.readLine().stripWhiteSpace(); + if (line == fInfo.fileName()) + { + emit showMessage(i18n("\"%1\" is already in the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); + found = true; + break; + } + } + if (!found) + { + str << fInfo.fileName() << endl; + emit showMessage(i18n("\"%1\" added to the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); + } + f.close(); + } + + } else + { + notInRepository(); + } + } +} + +void CVSService::slotRemoveFromCVSIgnore() +{ + if (!m_defaultFile.isEmpty()) + { + if (m_defaultFile.startsWith(m_repositoryPath)) + { + emit clearMessages(); + QString content; + QFileInfo fInfo(m_defaultFile); + QFile f(fInfo.dirPath()+ "/.cvsignore"); + bool found = false; + if (f.open(IO_ReadWrite)) + { + QTextStream str(&f); + str.setEncoding(QTextStream::UnicodeUTF8); + QString line; + while (!str.atEnd()) + { + line = str.readLine().stripWhiteSpace(); + if (line != fInfo.fileName()) + { + content += line + "\n"; + } else + found = true; + } + if (!found) + { + emit showMessage(i18n("\"%1\" is not in the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); + } + f.close(); + } + if (found && f.open(IO_WriteOnly)) + { + QTextStream str(&f); + str.setEncoding(QTextStream::UnicodeUTF8); + str << content; + emit showMessage(i18n("\"%1\" removed from the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); + f.close(); + } + + } else + { + notInRepository(); + } + } +} + +void CVSService::slotJobExited(bool normalExit, int exitStatus) +{ + if (!normalExit) + { + KMessageBox::sorry(0, i18n("The CVS command %1 has failed. The error code was %2.").arg(m_cvsCommand).arg(exitStatus), i18n("Command Failed")); + } + if (exitStatus == 0) + { + emit commandExecuted(m_cvsCommand, m_files); + } + disconnectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)"); + //delete m_cvsJob; + //m_cvsJob = 0L; + emit showMessage(i18n("CVS command finished."), false); + emit showMessage(" ", false); +} + +void CVSService::slotReceivedStdout(QString output) +{ + emit showMessage(output, true); +} + +void CVSService::slotReceivedStderr(QString output) +{ + emit showMessage(output, true); +} + +void CVSService::notInRepository() +{ + emit clearMessages(); + emit showMessage(i18n("Error: \"%1\" is not part of the\n\"%2\" repository.").arg(m_defaultFile).arg(m_repositoryPath) + "\n", false); +} + +void CVSService::startService() +{ + if (!m_cvsService) + { + QString error; + KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, + &m_appId); + m_cvsService = new CvsService_stub(m_appId, "CvsService"); + } + m_timer->start(CVSSERVICE_TIMEOUT, true); +} + +void CVSService::slotTimeout() +{ + if (m_cvsService) + m_cvsService->quit(); + delete m_cvsService; + m_cvsService = 0L; +} + +#include "cvsservice.moc" diff --git a/quanta/components/cvsservice/cvsservice.h b/quanta/components/cvsservice/cvsservice.h new file mode 100644 index 00000000..ebfcb402 --- /dev/null +++ b/quanta/components/cvsservice/cvsservice.h @@ -0,0 +1,118 @@ +/*************************************************************************** + cvsservice.h - description + ------------------------------ + begin : Sun May 16 17:50:25 2004 + copyright : (C) 2004, 2005 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 + * + ***************************************************************************/ + +#ifndef CVSSERVICE_H +#define CVSSERVICE_H + +//qt includes +#include + +//kde includes +#include + +//own includes +#include "cvsservicedcopif.h" + +class QTimer; +class KPopupMenu; +class KActionCollection; +class CvsJob_stub; +class CvsService_stub; +class Repository_stub; + +class CVSCommitDlgS; +class CVSUpdateToDlgS; + +/** @short This class manages the CVS repositories from withing Quanta with the help of "cvsservice" + * + */ +class CVSService : public QObject, public CVSServiceDCOPIf +{ + Q_OBJECT + +public: + + /** + * since this class is a singleton you must use this function to access it + * @return the class pointer + */ + static CVSService* ref(KActionCollection *ac = 0L) + { + static CVSService *m_ref; + if (!m_ref) m_ref = new CVSService(ac); + return m_ref; + } + + ~CVSService(); + + void setAppId(const QCString& id); + /** Returns true if the cvsservice was found */ + bool exists() {return !m_appId.isEmpty();} + void setRepository(const QString &repository); + void setCurrentFile(const QString &file) {m_defaultFile = file;} + KPopupMenu *menu() {return m_menu;} + +public slots: + void slotUpdate(); + void slotUpdate(const QStringList &files); + void slotUpdateToTag(); + void slotUpdateToTag(const QStringList &files); + void slotUpdateToHead(); + void slotUpdateToHead(const QStringList &files); + void slotCommit(); + void slotCommit(const QStringList &files); + void slotRevert(); + void slotRevert(const QStringList &files); + void slotAdd(); + void slotAdd(const QStringList &files); + void slotRemove(); + void slotRemove(const QStringList &files); + void slotBrowseLog(); + void slotAddToCVSIgnore(); + void slotRemoveFromCVSIgnore(); + + virtual void slotJobExited(bool normalExit, int exitStatus); + virtual void slotReceivedStdout(QString output); + virtual void slotReceivedStderr(QString output); + +signals: + void clearMessages(); + void showMessage(const QString &msg, bool append); + void commandExecuted(const QString& command, const QStringList& files); + +private slots: + void slotTimeout(); + +private: + CVSService(KActionCollection *ac); + void notInRepository(); + void startService(); + + QCString m_appId; + KPopupMenu *m_menu; + Repository_stub *m_repository; + CvsJob_stub *m_cvsJob; + CvsService_stub *m_cvsService; + QString m_defaultFile; + QString m_repositoryPath; + QString m_cvsCommand; + QStringList m_files; + CVSCommitDlgS *m_commitDlg; + CVSUpdateToDlgS *m_updateToDlg; + DCOPRef m_job; + QTimer *m_timer; +}; + +#endif diff --git a/quanta/components/cvsservice/cvsservicedcopif.h b/quanta/components/cvsservice/cvsservicedcopif.h new file mode 100644 index 00000000..75c0434a --- /dev/null +++ b/quanta/components/cvsservice/cvsservicedcopif.h @@ -0,0 +1,30 @@ +/*************************************************************************** + cvsservicedcopif.h - description + ------------------------------ + begin : Sun May 16 22:50:25 2004 + copyright : (C) 2004 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 + * + ***************************************************************************/ + +#ifndef CVSSERVICEDCOPIF_H +#define CVSSERVICEDCOPIF_H + +#include +#include + +class CVSServiceDCOPIf : virtual public DCOPObject +{ + K_DCOP +k_dcop: + virtual void slotJobExited( bool normalExit, int exitStatus ) = 0; + virtual void slotReceivedStdout( QString someOutput ) = 0; +}; + +#endif diff --git a/quanta/components/cvsservice/cvsupdatetodlgs.ui b/quanta/components/cvsservice/cvsupdatetodlgs.ui new file mode 100644 index 00000000..ef646f92 --- /dev/null +++ b/quanta/components/cvsservice/cvsupdatetodlgs.ui @@ -0,0 +1,198 @@ + +CVSUpdateToDlgS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * +***************************************************************************/ + +(C) 2005 Andras Mantia <amantia@kde.org> + + + CVSUpdateToDlgS + + + + 0 + 0 + 499 + 213 + + + + CVS Update + + + + unnamed + + + + buttonGroup1 + + + NoFrame + + + Plain + + + + + + + unnamed + + + + dateRadioButton + + + Update to &date ('yyyy-mm-dd'): + + + + + tagRadioButton + + + Update to &tag/branch: + + + true + + + + + tagCombo + + + true + + + + + spacer2 + + + Horizontal + + + Fixed + + + + 40 + 20 + + + + + + dateLineEdit + + + + + spacer2_2 + + + Horizontal + + + Fixed + + + + 40 + 20 + + + + + + + + layout5 + + + + unnamed + + + + cancelButton + + + + 1 + 0 + 0 + 0 + + + + &Cancel + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 295 + 20 + + + + + + okButton + + + + 1 + 0 + 0 + 0 + + + + &OK + + + true + + + true + + + + + + + + + cancelButton + clicked() + CVSUpdateToDlgS + reject() + + + okButton + clicked() + CVSUpdateToDlgS + accept() + + + + diff --git a/quanta/components/debugger/Makefile.am b/quanta/components/debugger/Makefile.am new file mode 100644 index 00000000..f24e455d --- /dev/null +++ b/quanta/components/debugger/Makefile.am @@ -0,0 +1,25 @@ +SUBDIRS = interfaces gubed dbgp +METASOURCES = AUTO + + +noinst_LTLIBRARIES = libdebuggermanager.la + +libdebuggermanager_la_LDFLAGS = $(all_libraries) +libdebuggermanager_la_LIBADD = interfaces/libdebuggerinterface.la +libdebuggermanager_la_SOURCES = debuggermanager.cpp debuggerbreakpoint.cpp \ + quantadebuggerinterface.cpp debuggervariable.cpp debuggerui.cpp variableslistview.cpp \ + debuggerbreakpointlist.cpp debuggervariablesets.ui debuggerbreakpointview.cpp pathmapper.cpp \ + pathmapperdialogs.ui pathmapperdialog.cpp pathmapperdialog.h conditionalbreakpointdialogs.ui \ + conditionalbreakpointdialog.cpp conditionalbreakpointdialog.h backtracelistview.cpp + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/components/debuggerquanta \ + -I$(top_srcdir)/quanta/components/debugger/interfaces \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/parts/preview \ + -I$(top_srcdir)/quanta/messages \ + -I$(top_srcdir)/lib \ + $(KMDI_INCLUDES) $(all_includes) +noinst_HEADERS = pathmapper.h backtracelistview.h diff --git a/quanta/components/debugger/backtracelistview.cpp b/quanta/components/debugger/backtracelistview.cpp new file mode 100644 index 00000000..aa5c8c95 --- /dev/null +++ b/quanta/components/debugger/backtracelistview.cpp @@ -0,0 +1,128 @@ +/*************************************************************************** + backtracelistview.cpp + -------------------------- + begin : 2005-07-31 + copyright : (C) 2005 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// KDE Includes +#include +#include +#include +#include +#include + +// Quanta includes +#include "backtracelistview.h" +#include "debuggerclient.h" +#include "debuggermanager.h" +#include "resource.h" +#include "quanta.h" + +namespace BacktraceListviewColumns +{ + // The enums must correspond to the order of the columns + // If you change here, change the column adding + enum Columns + { + Level = 0, + Type, + File, + Line, + Function + }; +} + +BacktraceListviewItem::BacktraceListviewItem(BacktraceListview* view) + : KListViewItem(view) +{ +} + + +BacktraceListview::BacktraceListview(QWidget *parent, const char *name) + : KListView(parent, name) +{ + int charwidth = this->fontMetrics().width("0"); + // If you change the order here, change the BacktraceListviewColumns enums above + addColumn("#", charwidth * 3); + addColumn(i18n("Type"), charwidth * 10); + addColumn(i18n("File"), charwidth * 60); + addColumn(i18n("Line"), charwidth * 6); + addColumn(i18n("Function"), charwidth * 30); + + setSorting(BacktraceListviewColumns::Level); // Sort on the level column + setAllColumnsShowFocus(true); + + // Jump to bt + connect(this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int) ), this, SLOT(slotBacktraceDoubleClick( QListViewItem *, const QPoint &, int))); +} + + +BacktraceListview::~BacktraceListview() +{} + +void BacktraceListview::backtraceShow(int level, BacktraceType type, const QString& filename, long line, const QString& func) +{ + BacktraceListviewItem* item = new BacktraceListviewItem(this); + item->setLevel(level); + item->setType(type); + item->setFilename(filename); + item->setLine(line); + item->setFunc(func); + + item->setText(BacktraceListviewColumns::File, filename); + item->setText(BacktraceListviewColumns::Function, func); + item->setText(BacktraceListviewColumns::Level, QString::number(level)); + item->setText(BacktraceListviewColumns::Line, QString::number(line + 1)); + item->setText(BacktraceListviewColumns::Type, type == File ? i18n("File") : i18n("Eval")); + + insertItem(item); +} + +void BacktraceListview::keyPressEvent(QKeyEvent *e) +{ + if(e->key() != Qt::Key_Enter) + { + e->ignore(); + return; + } + + if(selectedItem()) + jumpHistory(selectedItem()); +} + +void BacktraceListview::clear() +{ + KListView::clear(); +} + +void BacktraceListview::slotBacktraceDoubleClick(QListViewItem *item, const QPoint &, int ) +{ + if(!item) + return; + + jumpHistory(item); +} + +void BacktraceListview::jumpHistory(QListViewItem *item) +{ + BacktraceListviewItem* btitem = dynamic_cast(item); + + if(btitem->type() == File) + { + quantaApp->gotoFileAndLine(btitem->filename(), btitem->line(), 0); + } + +} + +#include "backtracelistview.moc" diff --git a/quanta/components/debugger/backtracelistview.h b/quanta/components/debugger/backtracelistview.h new file mode 100644 index 00000000..e00d0afc --- /dev/null +++ b/quanta/components/debugger/backtracelistview.h @@ -0,0 +1,93 @@ +/*************************************************************************** + Backtracelistview.h + ------------------------ + begin : 2005-07-31 + copyright : (C) 2005 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef BACKTRACELISTVIEW_H +#define BACKTRACELISTVIEW_H + +#include +#include +#include + +class BacktraceListview; + + +enum BacktraceType +{ + File = 0, + Eval +}; + + +class BacktraceListviewItem : public KListViewItem +{ + private: + BacktraceType m_type; + QString m_filename; + QString m_func; + long m_line; + long m_level; + + public: + BacktraceListviewItem(); + BacktraceListviewItem(BacktraceListview* view); + + // Type + BacktraceType type() const { return m_type; } + void setType(BacktraceType type) { m_type = type; } + + // Filename + QString filename() const { return m_filename; } + void setFilename(const QString &filename) { m_filename = filename; } + + // Function + QString func() const { return m_func; } + void setFunc(const QString &func) { m_func = func; } + + // Line + long line() const { return m_line; } + void setLine(long line) { m_line= line; } + + // Level + long level() const { return m_level; } + void setLevel(long level) { m_level = level; } + +}; + +class BacktraceListview : public KListView +{ + Q_OBJECT + + public: + + BacktraceListview(QWidget *parent = 0, const char *name = 0); + ~BacktraceListview(); + + void backtraceShow(int level, BacktraceType type, const QString& filename, long line, const QString& func); + + void clear(); + + public slots: + void slotBacktraceDoubleClick(QListViewItem *item, const QPoint &point, int column); + + private: + void keyPressEvent(QKeyEvent *e); + void jumpHistory(QListViewItem *item); + +}; + +#endif diff --git a/quanta/components/debugger/conditionalbreakpointdialog.cpp b/quanta/components/debugger/conditionalbreakpointdialog.cpp new file mode 100644 index 00000000..943c33d4 --- /dev/null +++ b/quanta/components/debugger/conditionalbreakpointdialog.cpp @@ -0,0 +1,100 @@ +/*************************************************************************** + conditionalbreakpointdialog.cpp + -------------------- + begin : 2005-01-08 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include "conditionalbreakpointdialog.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "debuggerbreakpoint.h" + +ConditionalBreakpointDialog::ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction) + : ConditionalBreakpointDialogS(0, "ConditionalBreakpointDialog", false, 0) +{ + comboExpression->setCurrentText(expression); + lineFile->setText(inFile); + lineClass->setText(inClass); + lineFunction->setText(inFunction); + + buttonClearFile->setPixmap(SmallIcon("clear_left")); + buttonClearClass->setPixmap(SmallIcon("clear_left")); + buttonClearFunction->setPixmap(SmallIcon("clear_left")); + + connect(comboExpression, SIGNAL(textChanged(const QString&)), this, SLOT(slotExpressionChanged())); + + connect(buttonClearFile, SIGNAL(pressed()), this, SLOT(slotClearFile())); + connect(buttonClearClass, SIGNAL(pressed()), this, SLOT(slotClearClass())); + connect(buttonClearFunction, SIGNAL(pressed()), this, SLOT(slotClearFunction())); + + slotExpressionChanged(); +} + +ConditionalBreakpointDialog::~ConditionalBreakpointDialog() +{ +} + +void ConditionalBreakpointDialog::slotExpressionChanged() +{ + + if(comboExpression->currentText().find( QRegExp("[^=!]=[^=]"), 0 ) >= 0) + ledWarning->on(); + else + ledWarning->off(); + +} + +void ConditionalBreakpointDialog::slotClearFile() +{ + lineFile->setText(""); +} + +void ConditionalBreakpointDialog::slotClearClass() +{ + lineClass->setText(""); +} + +void ConditionalBreakpointDialog::slotClearFunction() +{ + lineFunction->setText(""); +} + +/*DebuggerBreakpoint::Types type()*/ + +DebuggerBreakpoint *ConditionalBreakpointDialog::breakpoint() +{ + if(comboExpression->currentText().isEmpty()) + return NULL; + + DebuggerBreakpoint *bp = new DebuggerBreakpoint( + (radioOnChange->isChecked() ? DebuggerBreakpoint::ConditionalChange : DebuggerBreakpoint::ConditionalTrue), + comboExpression->currentText(), + lineFile->text(), + lineClass->text(), + lineFunction->text()); + + return bp; +} + + +#include "conditionalbreakpointdialog.moc" + diff --git a/quanta/components/debugger/conditionalbreakpointdialog.h b/quanta/components/debugger/conditionalbreakpointdialog.h new file mode 100644 index 00000000..fdae39a3 --- /dev/null +++ b/quanta/components/debugger/conditionalbreakpointdialog.h @@ -0,0 +1,56 @@ +/*************************************************************************** + conditionalbreakpointdialog.h + ------------------ + begin : 2004-04-05 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef CONDITIONALBREAKPOINTDIALOG_H +#define CONDITIONALBREAKPOINTDIALOG_H + +#include "conditionalbreakpointdialogs.h" +#include "debuggerbreakpoint.h" + +class ConditionalBreakpointDialog : public ConditionalBreakpointDialogS +{ + Q_OBJECT + + public: + enum Break + { + OnTrue = 0, + OnChange + }; + + ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction); + ~ConditionalBreakpointDialog(); + +// QString expression(); +// QString inFile(); +// QString inClass(); +// QString inFunction(); +// DebuggerBreakpoint::Types type(); + + DebuggerBreakpoint *breakpoint(); + + public slots: + void slotExpressionChanged(); + void slotClearFile(); + void slotClearClass(); + void slotClearFunction(); + + private: + +}; + +#endif // CONDITIONALBREAKPOINTDIALOG_H + diff --git a/quanta/components/debugger/conditionalbreakpointdialogs.ui b/quanta/components/debugger/conditionalbreakpointdialogs.ui new file mode 100644 index 00000000..8e4a1bf2 --- /dev/null +++ b/quanta/components/debugger/conditionalbreakpointdialogs.ui @@ -0,0 +1,329 @@ + +ConditionalBreakpointDialogS + + + ConditionalBreakpointDialogS + + + + 0 + 0 + 564 + 432 + + + + Add Conditional Breakpoint + + + true + + + + unnamed + + + + lblExpression + + + + 4 + 5 + 0 + 0 + + + + Expression: + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + + + + true + + + true + + + + + buttonCancel + + + &Cancel + + + + + + true + + + + + + + buttonGroup1 + + + Break When + + + + unnamed + + + + radioOnTrue + + + When expression is true + + + + + radioOnChange + + + When expression changes + + + true + + + + + + + spacer8 + + + Vertical + + + Expanding + + + + 30 + 20 + + + + + + comboExpression + + + true + + + + + ledWarning + + + + 22 + 22 + + + + + 22 + 22 + + + + Off + + + + 255 + 0 + 0 + + + + Lit when a finding a single equal sign in expression (common error) + + + + + groupBox10 + + + Only Break In + + + + unnamed + + + + lblValue + + + + 5 + 5 + 0 + 0 + + + + File: + + + AlignVCenter + + + + + lblValue_2 + + + + 5 + 5 + 0 + 0 + + + + Objects of class: + + + AlignVCenter + + + + + lblValue_3 + + + + 5 + 5 + 0 + 0 + + + + Function: + + + AlignVCenter + + + + + lineFile + + + + + lineFunction + + + + + buttonClearFile + + + x + + + + + buttonClearFunction + + + x + + + + + buttonClearClass + + + x + + + + + lineClass + + + + + + + + + + + buttonOk + clicked() + ConditionalBreakpointDialogS + accept() + + + buttonCancel + clicked() + ConditionalBreakpointDialogS + reject() + + + + buttonOk + buttonCancel + + + + kcombobox.h + klineedit.h + kled.h + + diff --git a/quanta/components/debugger/dbgp/Makefile.am b/quanta/components/debugger/dbgp/Makefile.am new file mode 100644 index 00000000..fbff3bdf --- /dev/null +++ b/quanta/components/debugger/dbgp/Makefile.am @@ -0,0 +1,17 @@ +METASOURCES = AUTO + +kde_module_LTLIBRARIES = quantadebuggerdbgp.la + +quantadebuggerdbgp_la_SOURCES = quantadebuggerdbgp.cpp dbgpsettingss.ui \ + dbgpsettings.cpp dbgpnetwork.cpp qbytearrayfifo.cpp +quantadebuggerdbgp_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +quantadebuggerdbgp_la_LIBADD = ../interfaces/libdebuggerinterface.la $(LIB_KPARTS) +kde_services_DATA = quantadebuggerdbgp.desktop + +INCLUDES = -I$(top_srcdir)/quanta/components/debugger \ + -I$(top_srcdir)/quanta/components/debugger/interfaces -I$(top_srcdir)/quanta/components/debugger/dbgp \ + -I$(top_srcdir)/quanta/project -I$(top_srcdir)/quanta/utility $(all_includes) + + +noinst_HEADERS = dbgpsettings.h quantadebuggerdbgp.h dbgpnetwork.h \ + qbytearrayfifo.h diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.cpp b/quanta/components/debugger/dbgp/dbgpnetwork.cpp new file mode 100644 index 00000000..87306448 --- /dev/null +++ b/quanta/components/debugger/dbgp/dbgpnetwork.cpp @@ -0,0 +1,314 @@ +/* + * Copyright (C) 2005 by Linus McCabe, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "dbgpnetwork.h" + +#include +#include +#include +#include + +DBGpNetwork::DBGpNetwork() +: QObject() +{ + m_socket = NULL; + m_server = NULL; + m_datalen = -1; + m_transaction_id = 0; +} + +DBGpNetwork::~DBGpNetwork() +{ +} + +void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QString & service) +{ + + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + m_useproxy = useproxy; + + if(m_useproxy) + { + if(m_socket) + { +// m_socket->setBufferSize(-1); + connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); + connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KNetwork::KResolverEntry &))); + connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connect(m_socket, SIGNAL(destroyed()), this, SLOT(slotSocketDestroyed())); + m_socket->connect(); + emit active(false); + kdDebug(24002) << k_funcinfo << ", proxy:" << server << ", " << service << endl; + } + } + else + { + if(!m_server) + { + m_server = new KNetwork::KServerSocket(service); + + m_server->setAddressReuseable(true); + connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, SIGNAL(gotError(int)), this, SLOT(slotError(int))); + + if(m_server->listen()) + { + emit active(true); + emit networkError(i18n("Listening on port %1").arg(service), true); + } + else + { + delete m_server; + m_server = NULL; + emit active(false); + emit networkError(i18n("Unable to listen on port %1").arg(service), true); + } + } + } +} + + +void DBGpNetwork::sessionEnd() +{ + // Close socket + if(m_socket) + { + m_socket->flush(); + disconnect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + if (m_socket) + m_socket->close(); + delete m_socket; + m_socket = 0L; + } + + // Close the server + if(m_server) + { + m_server->close(); + delete m_server; + m_server = NULL; + } + + // Fake a connection closed signal + slotConnectionClosed(); + emit active(false); +} + + +// Socket errors +void DBGpNetwork::slotError(int) +{ + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + if(m_socket) + { + kdDebug(24002) << k_funcinfo << ", " << m_socket->errorString() << endl; + if(m_socket->error() == KNetwork::KSocketBase::RemotelyDisconnected) + { + slotConnectionClosed(); + emit networkError(i18n("Disconnected from remote host"), true); + return; + } + + if(m_socket->error()) + { + emit networkError(m_socket->errorString(), true); + } + } + + if(m_server && m_server->error()) + { + kdDebug(24002) << k_funcinfo << ", " << m_server->errorString() << endl; + emit networkError(m_server->errorString(), true); + } +} + +// slotReadyAccept +void DBGpNetwork::slotReadyAccept() +{ + + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + if(!m_socket) + { + disconnect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + + m_socket = (KNetwork::KStreamSocket *)m_server->accept(); // KSocketServer returns a KStreamSocket (!) + if(m_socket) + { + kdDebug(24002) << k_funcinfo << ", ready" << ", m_socket" << m_socket << endl; + m_socket->enableRead(true); + m_socket->setAddressReuseable(true); +// m_socket->setSocketFlags(KExtendedSocket::inetSocket | KExtendedSocket::inputBufferedSocket); +// m_socket->setBufferSize(-1); + connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); + connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connected(); + } + else + { + kdDebug(24002) << k_funcinfo << ", " << m_server->errorString() << endl; + } + } + +} + +// Connection established +void DBGpNetwork::slotConnected(const KResolverEntry &) +{ + connected(); +} + +bool DBGpNetwork::isConnected() +{ + return m_socket != NULL && m_socket->state() == KNetwork::KClientSocketBase::Connected; +} + +bool DBGpNetwork::isActive() +{ + return + (m_socket != NULL && m_socket->state() == KNetwork::KClientSocketBase::Connected) + || (m_server != NULL); +} + +void DBGpNetwork::connected() +{ + + kdDebug(24002) << k_funcinfo << endl; + emit connected(true); +// debuggerInterface()->enableAction("debug_disconnect", true); +// debuggerInterface()->enableAction("debug_request", false); +} + +// Connectio closed +void DBGpNetwork::slotConnectionClosed() +{ + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + + // Check if we have more data to read + slotReadyRead(); +// kdDebug(24002) << k_funcinfo << "buffer: " << m_buffer << endl; + + if(m_socket) + { + m_socket->flush(); + m_socket->close(); + delete m_socket; + m_socket = NULL; + } + + if(m_server) + connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + + // Disable all session related actions and enable connection action + emit connected(false); + emit active(m_server != NULL); + +} + + +//called when m_socket is destroyed either by deleting it or if XDebug disconnects from the client +void DBGpNetwork::slotSocketDestroyed() +{ + kdDebug(24002) << k_funcinfo << " , m_server: " << m_server << ", m_socket" << m_socket << endl; + + m_socket = NULL; //m_socket is already wrong, without this the app would crash on the next m_socket->close() or delete m_socket call. + slotConnectionClosed(); +} + + +// Data from socket +void DBGpNetwork::slotReadyRead() +{ + + // Data from dbgp + while(m_socket && (m_socket->bytesAvailable() > 0 || m_fifo.length() >= (unsigned long)m_datalen)) + { + int bytes; + QString data; + + if(m_socket && m_socket->bytesAvailable() > 0 ) + { + // Read all available bytes from socket and append them to the buffer + bytes = m_socket->bytesAvailable(); + char* buffer = new char[bytes]; + m_socket->readBlock(buffer, bytes); + + // Put it in the fifo buffer + m_fifo.append(buffer, bytes); + + delete[] buffer; + } + + while(1) + { + // If datalen == -1, we didnt read the size yet, otherwise we're reading data. + if(m_datalen == -1) + { + bytes = m_fifo.find('\0'); + if(bytes < 0) + break; + + data = m_fifo.retrieve(); + m_datalen = data.toLong(); + + } + if(m_datalen != -1 && (long)m_fifo.length() >= m_datalen + 1) + { + data = m_fifo.retrieve(); + m_datalen = -1; + emit command(data); + } + else + break; + } + } +} + +long DBGpNetwork::sendCommand(const QString & command) +{ + return sendCommand(command, ""); +} + +long DBGpNetwork::sendCommand(const QString & command, const QString & arguments) +{ + if(!isConnected()) + return false; + + m_transaction_id++; + QString commandline = command + QString(" -i %1").arg(m_transaction_id) + (!arguments.isEmpty() ? " " : "") + arguments; + + kdDebug(24002) << k_funcinfo << ", sending: " << commandline << endl; + + m_socket->writeBlock(commandline.latin1(), commandline.length() + 1); // Send string + NULL termination + + return m_transaction_id; +} + +long DBGpNetwork::sendCommand( const QString & command, const QString & arguments, const QString & data ) +{ + QByteArrayFifo buffer; + buffer.append(data.ascii(), data.length()); + return sendCommand(command, arguments + " -- " + buffer.base64Encoded()); +} + +// #include "dbgpnetwork.moc" + +#include "dbgpnetwork.moc" diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.h b/quanta/components/debugger/dbgp/dbgpnetwork.h new file mode 100644 index 00000000..0651bc08 --- /dev/null +++ b/quanta/components/debugger/dbgp/dbgpnetwork.h @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2005 by Linus McCabe, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef dbgpnetwork_H +#define dbgpnetwork_H + +#include +#include + +#include "qbytearrayfifo.h" + +//using namespace KNetwork; +class KResolverEntry; + +class DBGpNetwork : public QObject +{ + Q_OBJECT + + private: + KNetwork::KStreamSocket *m_socket; + KNetwork::KServerSocket *m_server; + QByteArrayFifo m_fifo; + bool m_useproxy; + long m_datalen; + long m_transaction_id; + + void connected(); + + signals: + void active(bool isOnline); + void connected(bool isConnected); + void networkError(const QString &error, bool log); + void command(const QString& data); + + public: + DBGpNetwork(); + ~DBGpNetwork(); + + virtual void sessionStart(bool useproxy, const QString& server, const QString & service); + virtual void sessionEnd(); + + bool isConnected(); + bool isActive(); + + long sendCommand(const QString & command); + long sendCommand(const QString & command, const QString & arguments); + long sendCommand(const QString & command, const QString & arguments, const QString & data); + + public slots: + // Socket slots + void slotConnected(const KResolverEntry &); + void slotConnectionClosed(); + void slotError(int); + void slotReadyRead(); + void slotReadyAccept(); + void slotSocketDestroyed(); +}; + + +#endif // dbgpnetwork_H diff --git a/quanta/components/debugger/dbgp/dbgpsettings.cpp b/quanta/components/debugger/dbgp/dbgpsettings.cpp new file mode 100644 index 00000000..80b7eaf1 --- /dev/null +++ b/quanta/components/debugger/dbgp/dbgpsettings.cpp @@ -0,0 +1,44 @@ +/*************************************************************************** + dbgpsettings.cpp + ------------------- + begin : 2004-04-05 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include "qlineedit.h" +#include "qcheckbox.h" +#include "dbgpsettings.h" +#include + +DBGpSettings::DBGpSettings(const QString &protocolversion) + : DBGpSettingsS(0, "DBGpSettings", false, 0) +{ + textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); + connect(checkLocalProject, SIGNAL(toggled(bool)), this, SLOT(slotLocalProjectToggle(bool))); +} + +DBGpSettings::~DBGpSettings() +{ +} + +void DBGpSettings::slotLocalProjectToggle( bool localproject) +{ + lineServerBasedir->setEnabled(!localproject); + lineLocalBasedir->setEnabled(!localproject); +} + + + + +#include "dbgpsettings.moc" + diff --git a/quanta/components/debugger/dbgp/dbgpsettings.h b/quanta/components/debugger/dbgp/dbgpsettings.h new file mode 100644 index 00000000..4f2721ff --- /dev/null +++ b/quanta/components/debugger/dbgp/dbgpsettings.h @@ -0,0 +1,35 @@ +/*************************************************************************** + dbgpsettings.h + ------------------- + begin : 2005-08-01 + copyright : (C) 2005 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef DBGPSETTINGS_H +#define DBGPSETTINGS_H + +#include "dbgpsettingss.h" + +class DBGpSettings : public DBGpSettingsS +{ + Q_OBJECT + + public: + DBGpSettings(const QString &protocolversion); + ~DBGpSettings(); + + public slots: + virtual void slotLocalProjectToggle(bool localproject); +}; + +#endif + diff --git a/quanta/components/debugger/dbgp/dbgpsettingss.ui b/quanta/components/debugger/dbgp/dbgpsettingss.ui new file mode 100644 index 00000000..2b846a7e --- /dev/null +++ b/quanta/components/debugger/dbgp/dbgpsettingss.ui @@ -0,0 +1,728 @@ + +DBGpSettingsS + + + DBGpSettingsS + + + + 0 + 0 + 569 + 467 + + + + DBGp Settings + + + true + + + + unnamed + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + + + + true + + + true + + + + + buttonCancel + + + Ca&ncel + + + true + + + + + + + tabWidget2 + + + true + + + + 5 + 5 + 1 + 1 + + + + + tab + + + &General + + + + unnamed + + + + groupBox2 + + + Connection Settings + + + + unnamed + + + + lblDebuggerServerListenPort + + + + 5 + 5 + 1 + 0 + + + + Listen port: + + + + + lineServerListenPort + + + + 7 + 0 + 4 + 0 + + + + + + lblRequest + + + + 5 + 5 + 1 + 0 + + + + Request URL: + + + + + lineStartSession + + + + 7 + 0 + 4 + 0 + + + + See "What's This?" for available variables + + + %afn - Filename of the current script +%afd - Absolute directory of the current script +%afp - Absolute path (directory + filename) of the current script + +%rfpd - Directory of the current script relative to project root +%rfpp - Path of the current script relative to project root + +%rfdd - Directory of the current script relative to document root +%rfdp - Path of the current script relative to document root + +%apd - Project root +%add - Document root of current script + + + + + + + spacer4 + + + Vertical + + + Expanding + + + + 21 + 40 + + + + + + groupBox1 + + + Directory Mapping + + + + unnamed + + + + lineServerBasedir + + + + 7 + 0 + 4 + 0 + + + + + + lblDebuggerServerBasedir + + + + 5 + 5 + 1 + 0 + + + + Server basedir: + + + + + lineLocalBasedir + + + + 7 + 0 + 4 + 0 + + + + + + + + + checkLocalProject + + + + 1 + 0 + 4 + 0 + + + + + + + + + + + + lblDebuggerLocalBasedir + + + + 5 + 5 + 1 + 0 + + + + Local basedir: + + + + + lblLocalProject + + + + 5 + 5 + 1 + 0 + + + + Local project: + + + + + + + groupBox3_2 + + + Profiling + + + + unnamed + + + + lineProfilerFilename + + + + 7 + 0 + 4 + 0 + + + + See "What's This?" for available variables + + + Path to the profiler output +%a - Appid as returned from the debugger +%c - CRC32 of the initial filepath + + + + + lblRequest_2 + + + + 5 + 5 + 1 + 0 + + + + Profiler output: + + + + + lblLocalProject_2 + + + + 5 + 5 + 1 + 0 + + + + Map profiler output: + + + + + checkProfilerMapFilename + + + + 1 + 0 + 4 + 0 + + + + + + + + + + If this checkbox is checked, the profiler output filename will be mapped using the basedirs just like the remote script files. + + + + + lblLocalProject_2_2 + + + + 5 + 5 + 1 + 0 + + + + Open automatically: + + + + + checkProfilerAutoOpen + + + + 1 + 0 + 4 + 0 + + + + + + + + + + If this checkbox is checked, the profiler output will be opened automatically once the session ends. + + + + + + + + + tab + + + Deb&ug Behavior + + + + unnamed + + + + groupBox4 + + + Error Handling + + + + unnamed + + + + checkBreakOnUserError + + + + 7 + 0 + 0 + 0 + + + + User errors + + + + + lblBreakOn + + + Break on: + + + AlignTop + + + + + checkBreakOnUserWarning + + + + 7 + 0 + 0 + 0 + + + + User warnings + + + + + checkBreakOnUserNotice + + + + 7 + 0 + 0 + 0 + + + + User notices + + + + + checkBreakOnNotice + + + + 7 + 0 + 0 + 0 + + + + Notices + + + + + checkBreakOnWarning + + + + 7 + 0 + 0 + 0 + + + + W&arnings + + + + + + + groupBox5 + + + Execution + + + + unnamed + + + + + Pause + + + image0 + + + + + Run + + + image1 + + + + comboDefaultExecutionState + + + + + lblDefaultExecutionMode + + + Default mode: + + + AlignVCenter + + + + + + + spacer4_3 + + + Vertical + + + Expanding + + + + 21 + 40 + + + + + + + + TabPage + + + &About + + + + unnamed + + + + textLabel1 + + + + 5 + 4 + 0 + 0 + + + + <h4>DBGp Plugin for Quanta +</h4> + + + + + textAbout + + + true + + + <html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Bitstream Vera Sans"> +<p><span style="font-weight:600">About</span></p> +<p>DBGp is a debugger protocol defined by the developers of Xdebug. This plugin integrates debuggers that supports the DBGp protocol with Quanta. </p> +<p>In order to use this plugin for PHP debugging, you need to get a supporting debugger. Currently, only <a href="http://xdebug.org">Xdebug</a> is tested.</p> +<p>For more info about Xdebug, please visit the Xdebug website at <a href="http://xdebug.org">http://xdebug.org</a> </p> +<p><span style="font-weight:600">Technical Details</span></p> +<p>This version of the debugger supports version %PROTOCOLVERSION% of the DBGp protocol. </p> +</body></html> + + + + + + + + + + 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000027f49444154388d7d93df4b53611cc69ff73de7ccb375dcdad46d2e3269036d21c4420a0b898484e82a08a2a02238a41741dd77e14dff4074d521efbae8a61b2f6a892062604e53117165e28f864dd73adb999e3cdb79cfe9c25a9c4dfa5e3e3ccfe7fdfee02538a412830b226075c3b662804d006b9567a5d4b4d2a7d77a494d5002c81370c20075797dc7fd157804139f77445846a14898fe9a67ead38f4aff661d2031b81006a1e3a16053c7ddcb3e5c3cc5c1ebe1000046c5c6a7af3a86c776b1b2bef3c3cdb2373ebcb83a5e052406e725103a9388473a1e5d13d1e8e60f9b0c1566e1655245727a3b2f19cb5d13c3b7bfff71da43a16073c7bd4b024667b56aa0b7cb0b009858fca75deff1622367357d59d58764597e481203332238317be74ad8d7798ca2ffacbf6a4eceaa00e0d0dea554ac6feb50deaabbc15f635d3c806e9728f9fc6e865cc172b49c2b9875633c1bf34033fca00db6a495a33d3c805840a2c8692638426a00953a40a9dc0000a0820842f9180f80941987cd3c0717ef04bc598ac02354f0b80642c8c1f6096cca03d66a51b791ce37d7bd06007a45a80b7304d8370db82c3d4379564a31a350a404a0f45086a3dc0283c83358fbea5e80a5e7e8b4d2a713a60f53238b36afe630c75b54c45b5487d6eed3408d2c04333712e437b608009c93937e2634a5cec79ba3019febbf1dfc2c9631b594cb448cd19b216e2d55ddda0579245a165adf9f89f94e76b649203517b16d1be9cd5dccafa8997065f241982c4f2a8aa2395cbdf75fb5eac289218fe7c8adf6904b3ada7870b242c9c07ab6bc67e8ea48c89c7a1ee2d6161545d1809adf0800b22cbbbe99a7231a17ed21948f11d894587a26c0d273417e630b405e5194f25fff6f6493fb9b9d8e82910000000049454e44ae426082 + + + 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000ac49444154388ded94c10dc33008453f5637ea061ec24cd2293289976083ce440f6d2262b012da5b95277188133f7f4560e0e2039dfc4eb39e621f164097894455c30280debbdb539c0180881c25dcd15a73f2509c8588c0cc3b795a4c445b0170bf65e596158f821969f19af4e8b02bf1f7e2b3890bf09eb8f145660223b63eb6a267ad00e209b47d6cfb39143f824be42e825aab5b4f27b6f2993483db2c223a4aa3db6b0633ff14e80f79015c6574466adcb13f0000000049454e44ae426082 + + + + + buttonOk + clicked() + DBGpSettingsS + accept() + + + buttonCancel + clicked() + DBGpSettingsS + reject() + + + + tabWidget2 + lineLocalBasedir + lineServerBasedir + lineServerListenPort + checkBreakOnNotice + checkBreakOnWarning + checkBreakOnUserNotice + checkBreakOnUserWarning + checkBreakOnUserError + comboDefaultExecutionState + buttonOk + buttonCancel + + + slotLocalProjectToggled(bool) + checkLocalProject_toggled(bool) + slotLocalProjectToggle(bool) + + + + ktextbrowser.h + + diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp new file mode 100644 index 00000000..3060e43d --- /dev/null +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2005 by Linus McCabe, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include "qbytearrayfifo.h" +#include +#include + +QByteArrayFifo::QByteArrayFifo( ) +{ + m_size = 0; + m_array.resize(0); +} + +QString QByteArrayFifo::retrieve( ) +{ + // See if there's a null teminator somewhere + QString str(m_array); + size_t size = str.length() + 1; + + // Decrease size and move bytes to the beginning of the array + m_size -= size; + for(size_t cnt = 0; cnt < m_size; cnt++) + m_array[cnt] = m_array[cnt + size]; + + // Resize array, needed for find() to work + m_array.resize(m_size); + + return str; +} + +bool QByteArrayFifo::append(const char * chars, size_t size ) +{ + // Resize the array, fail if not possible + if(!m_array.resize(m_size + size )) + return false; + + // Copy the elements + for(size_t cnt = 0; cnt < size; cnt++) + m_array[cnt + m_size] = chars[cnt]; + + // Increase size var + m_size += size; + + return true; +} + +long QByteArrayFifo::find( char character ) +{ + // If size is 0, find() outputs a warning for some reason + if(m_size == 0) + return -1; + + return m_array.find(character); +} + +QString QByteArrayFifo::base64Encoded() +{ + return KCodecs::base64Encode(m_array); +} + diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.h b/quanta/components/debugger/dbgp/qbytearrayfifo.h new file mode 100644 index 00000000..a422bc3d --- /dev/null +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2005 by Linus McCabe, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef qbytearrayfifo_H +#define qbytearrayfifo_H + +#include +#include + +class QByteArrayFifo +{ + + public: + QByteArrayFifo(); + bool append(const char * chars, size_t size); + QString retrieve(); + QString base64Encoded(); + long find(char character); + size_t length() { return m_size; } + + private: + QByteArray m_array; + size_t m_size; + +}; + +#endif // qbytearrayfifo_H diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp new file mode 100644 index 00000000..100ec9d3 --- /dev/null +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp @@ -0,0 +1,1042 @@ +/*************************************************************************** + quantadebuggerdbgp.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "debuggerclient.h" +#include "quantadebuggerdbgp.h" +#include "debuggerinterface.h" +#include "debuggerbreakpoint.h" +#include "dbgpsettings.h" +#include "debuggervariable.h" +#include "variableslistview.h" +#include "pathmapper.h" + + + +K_EXPORT_COMPONENT_FACTORY( quantadebuggerdbgp, + KGenericFactory("quantadebuggerdbgp")) + +const char QuantaDebuggerDBGp::protocolversion[] = "1.0"; + +QuantaDebuggerDBGp::QuantaDebuggerDBGp (QObject *parent, const char*, const QStringList&) + : DebuggerClient (parent, "DBGp") +{ + // Create a socket object and set up its signals + m_errormask = 1794; + m_supportsasync = false; + m_defaultExecutionState = Starting; + setExecutionState(m_defaultExecutionState); + emit updateStatus(DebuggerUI::NoSession); + + connect(&m_network, SIGNAL(command(const QString&)), this, SLOT(processCommand(const QString&))); + connect(&m_network, SIGNAL(active(bool)), this, SLOT(slotNetworkActive(bool))); + connect(&m_network, SIGNAL(connected(bool)), this, SLOT(slotNetworkConnected(bool))); + connect(&m_network, SIGNAL(networkError(const QString &, bool)), this, SLOT(slotNetworkError(const QString &, bool))); + +} + + +QuantaDebuggerDBGp::~QuantaDebuggerDBGp () +{ + +// kdDebug(24002) << k_funcinfo << endl; + + m_network.sessionEnd(); +} + +void QuantaDebuggerDBGp::slotNetworkActive(bool active) +{ + // debuggerInterface() might not be available, for example from project dialog + if(!debuggerInterface()) + return; + + debuggerInterface()->enableAction("debug_request", active); + debuggerInterface()->enableAction("debug_connect", !active); + debuggerInterface()->enableAction("debug_disconnect", active); + + setExecutionState(m_defaultExecutionState); + + if(active) + emit updateStatus(DebuggerUI::AwaitingConnection); + else + emit updateStatus(DebuggerUI::NoSession); + +} + +void QuantaDebuggerDBGp::slotNetworkConnected(bool connected) +{ + // debuggerInterface() might not be available, for example from project dialog + if(!debuggerInterface()) + return; + + m_active = connected; + + debuggerInterface()->enableAction("debug_run", connected); + debuggerInterface()->enableAction("debug_leap", connected); + debuggerInterface()->enableAction("debug_pause", connected); + debuggerInterface()->enableAction("debug_kill", connected); + + debuggerInterface()->enableAction("debug_stepinto", connected); + debuggerInterface()->enableAction("debug_stepover", connected); + debuggerInterface()->enableAction("debug_stepout", connected); + + debuggerInterface()->setActiveLine("", 0); + if(connected) + emit updateStatus(DebuggerUI::Connected); + else + { + setExecutionState(m_defaultExecutionState); + emit updateStatus(DebuggerUI::AwaitingConnection); + + profilerOpen(false); + } + +} + +void QuantaDebuggerDBGp::slotNetworkError(const QString &errormsg, bool log) +{ + debuggerInterface()->showStatus(errormsg, log); +} + + +// Try to make a connection to the dbgp server +void QuantaDebuggerDBGp::startSession() +{ + kdDebug(24002) << k_funcinfo << endl; + + m_network.sessionStart(m_useproxy, m_serverHost, m_useproxy ? m_serverPort : m_listenPort); +// setExecutionState(Starting); +} + + +void QuantaDebuggerDBGp::endSession() +{ + + kdDebug(24002) << k_funcinfo << endl; + + // Close the socket + m_network.sessionEnd(); + +// debuggerInterface()->enableAction("debug_request", false); +// debuggerInterface()->enableAction("debug_run", false); +// debuggerInterface()->enableAction("debug_leap", false); +// debuggerInterface()->enableAction("debug_pause", false); + +} + + +// Change executionstate of the script +void QuantaDebuggerDBGp::setExecutionState( const State & state, bool forcesend ) +{ + if(m_executionState != state || forcesend) + { + if(state == Running) + m_network.sendCommand("run"); + else if (state == Break) + m_network.sendCommand("break"); + } + m_executionState = state; + + if(debuggerInterface()) { + // The run action will be active if we're started, stopped or paused + debuggerInterface()->enableAction("debug_run", m_executionState == Break || m_executionState == Starting || m_executionState == Stopped); + + // The pause action will be enabled if we're running and either supports async or we're not connected (ie will start running) + debuggerInterface()->enableAction("debug_pause", m_executionState == Running && (m_supportsasync || !isActive())) ; + + // Kill is active if we're paused, just started of the debugger supports async, as long as we have an active session + debuggerInterface()->enableAction("debug_kill", isActive() && (m_executionState == Break || (m_executionState == Running && m_supportsasync) || m_executionState == Starting || m_executionState == Stopping )); + + // These are only activated when we have an active seesion and are paused + debuggerInterface()->enableAction("debug_stepinto", isActive() && (m_executionState == Break || m_executionState == Starting )); + debuggerInterface()->enableAction("debug_stepout", isActive() && (m_executionState == Break || m_executionState == Starting)); + debuggerInterface()->enableAction("debug_stepover", isActive() && (m_executionState == Break || m_executionState == Starting)); + } + +} + +// Change executionstate of the script +void QuantaDebuggerDBGp::setExecutionState(const QString &state) +{ + kdDebug(24002) << k_funcinfo << state << endl; + + if(state == "starting") + { + setExecutionState(Starting); + emit updateStatus(DebuggerUI::Paused); + } + else if(state == "stopping") + { + setExecutionState(Stopping); + emit updateStatus(DebuggerUI::Paused); + m_network.slotSocketDestroyed(); //XDebug disconnects when stopped and destroys our socket + } + else if(state == "stopped") + { + setExecutionState(Stopped); + emit updateStatus(DebuggerUI::Paused); + m_network.slotSocketDestroyed(); //XDebug disconnects when stopped and destroys our socket + } + else if(state == "running") + { + setExecutionState(Running); + emit updateStatus(DebuggerUI::Running); + } + else if(state == "break") + { + setExecutionState(Break); + emit updateStatus(DebuggerUI::Paused); + } + +} + +// Return capabilities of dbgp +const uint QuantaDebuggerDBGp::supports(DebuggerClientCapabilities::Capabilities cap) +{ + switch(cap) + { + case DebuggerClientCapabilities::LineBreakpoints: +// case DebuggerClientCapabilities::ConditionalBreakpoints: + case DebuggerClientCapabilities::StartSession: + case DebuggerClientCapabilities::EndSession: + case DebuggerClientCapabilities::Kill: + case DebuggerClientCapabilities::Pause: + case DebuggerClientCapabilities::Run: + //case DebuggerClientCapabilities::Skip: + case DebuggerClientCapabilities::StepOut: + case DebuggerClientCapabilities::StepInto: + case DebuggerClientCapabilities::StepOver: + case DebuggerClientCapabilities::Watches: + case DebuggerClientCapabilities::VariableSetValue: + case DebuggerClientCapabilities::ProfilerOpen: + return true; + + default: + return false; + } +} + + +// Process a dbgp command +void QuantaDebuggerDBGp::processCommand(const QString& datas) +{ + kdDebug(24002) << k_lineinfo << datas.left(50) << " (" << datas.length() << " bytes)" << endl; + + QDomDocument data; + data.setContent(datas); + kdDebug(24002) << datas << endl; + + // Did we get a normal response? + if(data.elementsByTagName("response").count() > 0) + { + QDomNode response = data.elementsByTagName("response").item(0); + QString command = attribute(response, "command"); + + // Status command + if(command == "status") + setExecutionState(attribute(response, "status")); + + // Callback stack + else if(command == "stack_get") + stackShow(response); + + // Reply from a user execution action + else if(command == "break" + || command == "step_over" + || command == "step_into" + || command == "step_out") + { + handleError(response); + // If this is the acknoledge of a step command, request the call stack + m_network.sendCommand("stack_get"); + setExecutionState(attribute(response, "status")); + handleError(response); + m_network.sendCommand("feature_get", "-n profiler_filename"); + sendWatches(); + } + + // Run + else if(command == "run" ) + { + setExecutionState(attribute(response, "status")); + handleError(response); + m_network.sendCommand("stack_get"); + } + + // Feature get replu + else if(command == "feature_get") + checkSupport(response); + + // Reply after adding a breakpoint + else if(command == "breakpoint_set") + setBreakpointKey(response); + + else if(command == "typemap_get") + typemapSetup(response); + + else if(command == "property_get") + showWatch(response); + + else if(command == "property_set") + propertySetResponse(response); + else if(command == "stop") + setExecutionState("stopped"); + + // Unknown command... + else + { + kdDebug(24002) << " * Unknown command: " << command << endl; + } + } + else if(data.elementsByTagName("init").count() > 0) + { + QDomNode init = data.elementsByTagName("init").item(0); + initiateSession(init); + return; + } + else + { + debuggerInterface()->showStatus(i18n("Unrecognized package: '%1%2'").arg(datas.left(50)).arg(datas.length() > 50 ? "..." : ""), true); + + kdDebug(24002) << datas << endl; + } + +} + +void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) +{ + if(attribute(initpacket, "protocol_version") != protocolversion) + { + debuggerInterface()->showStatus( + i18n("The debugger for %1 uses an unsupported protocol version (%2)") + .arg(attribute(initpacket, "language")) + .arg(attribute(initpacket, "protocol_version")) + , true); + + endSession(); + return; + } + QString path = attribute(initpacket, "fileuri"); + if (path.startsWith("file://")) + { + path.remove(0, 7); + } + debuggerInterface()->setActiveLine(mapServerPathToLocal(path), 0); + + // Store some vars + m_initialscript = attribute(initpacket, "fileuri"); + m_appid = attribute(initpacket, "appid"); + +// setExecutionState(Starting); +// m_network.sendCommand("feature_get", "-n encoding"); + m_network.sendCommand("feature_get", "-n supports_async"); +// m_network.sendCommand("feature_get", "-n breakpoint_types"); +// m_network.sendCommand("feature_get", "-n profiler_filename"); + m_network.sendCommand("feature_get", "-n breakpoint_set"); + m_network.sendCommand("feature_get", "-n supports_postmortem"); + m_network.sendCommand("typemap_get"); + m_network.sendCommand("feature_get", "-n quanta_initialized"); +} + +void QuantaDebuggerDBGp::stackShow(const QDomNode&node) +{ + bool foundlowlevel = false; + BacktraceType type; + QString typestr; + + // Clear backtrace + debuggerInterface()->backtraceClear(); + + // Add new one + for(QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) + { + // Type isnt currently correct with xdebug +// type = (attribute(child, "type") == "file" ? File : Eval); + typestr = attribute(child, "filename"); + if(typestr.find(QRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) + type = Eval; + else + type = File; + +// kdDebug(24002) << " * Stck " << attribute(child, "level") << ": " << attribute(child, "type") << " (" << type << ") = " << attribute(child, "filename") << ", " << attribute(child, "lineno") << endl; + + + // If this is the lowest level and the type + if(type == File && !foundlowlevel) + { + foundlowlevel = true; + debuggerInterface()->setActiveLine(mapServerPathToLocal(attribute(child, "filename")), attribute(child, "lineno").toLong() - 1); + } + + debuggerInterface()->backtraceShow( + attribute(child, "level").toLong(), + type, + attribute(child, "filename"), + attribute(child, "lineno").toLong() - 1, // Quanta lines are 0-based, DBGp is 1 based + attribute(child, "where")); + } + +} + +void QuantaDebuggerDBGp::checkSupport( const QDomNode & node ) +{ + QString feature = attribute(node, "feature_name"); + QString data = node.nodeValue(); + if(feature == "supports_async") + m_supportsasync = data.toLong(); + + // if the debugger supports breakpoints, we have to send all current ones + else if(feature == "breakpoint_set"/* && data.toLong()*/) + debuggerInterface()->refreshBreakpoints(); + + // Our own feature, probably not available but then we know we're done initiating + else if(feature == "quanta_initialized" ) + { + m_network.sendCommand("stack_get"); + if(m_executionState != Break) + setExecutionState(m_executionState, true); + } + +} + +QString QuantaDebuggerDBGp::attribute(const QDomNode&node, const QString &attribute) +{ + return node.attributes().namedItem(attribute).nodeValue(); +} + +// Turn on/off actions related to a debugging session +void QuantaDebuggerDBGp::debuggingState(bool enable) +{ + debuggerInterface()->enableAction("debug_kill", enable); + debuggerInterface()->enableAction("debug_stepout", enable); + debuggerInterface()->enableAction("debug_stepinto", enable); + debuggerInterface()->enableAction("debug_stepover", enable); + debuggerInterface()->enableAction("debug_skip", enable); +} + + +void QuantaDebuggerDBGp::sendWatches() +{ + for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + m_network.sendCommand("property_get", "-n " + (*it)); +} + +// Return name of debugger +QString QuantaDebuggerDBGp::getName() +{ + return "DBGp"; // no i18n on the name +} + + +// Send HTTP Request +void QuantaDebuggerDBGp::request() +{ + QString request; + request = debuggerInterface()->activeFileParts(m_startsession); + + //if(request.startsWith(m_localBasedir, false)) + // request.remove(0, m_localBasedir.length()); + + //request = m_startsession + request; + kdDebug(24002) << k_funcinfo << ", request: " << request << endl; + debuggerInterface()->sendRequest(request); +} + + +// Go as fast as possible and dont update current line or watches +void QuantaDebuggerDBGp::run() +{ + setExecutionState(Running); +// m_network.sendCommand("run"); +// m_network.sendCommand("status"); +} + +// Step into function +void QuantaDebuggerDBGp::stepInto() +{ + m_network.sendCommand("step_into"); +} + +// Step over function +void QuantaDebuggerDBGp::stepOver() +{ + if(m_executionState == Starting) + m_network.sendCommand("step_into"); + else + m_network.sendCommand("step_over"); +} + +// Step out of function +void QuantaDebuggerDBGp::stepOut() +{ + m_network.sendCommand("step_out"); +} + + +// Kill the running script +void QuantaDebuggerDBGp::kill() +{ + m_network.sendCommand("stop"); +} + +// Pause execution +void QuantaDebuggerDBGp::pause() +{ + if(isActive()) + setExecutionState(Break); + else + setExecutionState(Starting); +// m_network.sendCommand("break"); +// m_network.sendCommand("status"); +} + + +// Add a breakpoint +void QuantaDebuggerDBGp::addBreakpoint (DebuggerBreakpoint* breakpoint) +{ + QString type; + if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) + type = "line"; + else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) + type = "conditional"; + else + type = "watch"; + + long id = m_network.sendCommand( + "breakpoint_set", + "-t " + type + + " -f " + mapLocalPathToServer(breakpoint->filePath()) + + " -n " + QString::number(breakpoint->line() + 1) + , breakpoint->condition()); + + breakpoint->setKey(QString("id %1").arg(id)); +} + +void QuantaDebuggerDBGp::setBreakpointKey( const QDomNode & response ) +{ + long id; + + id = attribute(response, "transaction_id").toLong(); + if(id > 0) + { + QString oldkey = QString("id %1").arg(id); + DebuggerBreakpoint *bp = debuggerInterface()->findDebuggerBreakpoint(oldkey); + if(bp) + debuggerInterface()->updateBreakpointKey(*bp, attribute(response, "id")); + } +} + + +// Clear a breakpoint +void QuantaDebuggerDBGp::removeBreakpoint(DebuggerBreakpoint* bp) +{ + m_network.sendCommand("breakpoint_remove", "-d " + bp->key()); +} + +// A file was opened... +void QuantaDebuggerDBGp::fileOpened(const QString&) +{ +// sendCommand("reinitialize", 0); +} + +// Watch a variable +void QuantaDebuggerDBGp::addWatch(const QString & variable) +{ + if(m_watchlist.find(variable) == m_watchlist.end()) + m_watchlist.append(variable); + m_network.sendCommand("property_get", "-n " + variable); +} +// Remove watch +void QuantaDebuggerDBGp::removeWatch(DebuggerVariable *variable) +{ + if(m_watchlist.find(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.find(variable->name())); +} + +// Show conditional breakpoint state +void QuantaDebuggerDBGp::showCondition(const StringMap &) +{ + +// DebuggerBreakpoint *bp = debuggerInterface()->newDebuggerBreakpoint(); +// bp->setType(args["type"] == "true" ? DebuggerBreakpoint::ConditionalTrue : DebuggerBreakpoint::ConditionalChange); +// bp->setCondition(args["expression"]); +// bp->setFilePath(mapServerPathToLocal(args["filename"])); +// bp->setClass(args["class"]); +// bp->setFunction(args["function"]); +// bp->setValue(args["value"]); +// +// bp->setState(DebuggerBreakpoint::Undefined); +// +// debuggerInterface()->showBreakpoint(*bp); +} + +// Read configuration +void QuantaDebuggerDBGp::readConfig(QDomNode node) +{ + // Server + QDomNode valuenode = node.namedItem("serverhost"); + m_serverHost = valuenode.firstChild().nodeValue(); + if(m_serverHost.isEmpty()) + m_serverHost = "localhost"; + + valuenode = node.namedItem("serverport"); + m_serverPort = valuenode.firstChild().nodeValue(); + if(m_serverPort.isEmpty()) + m_serverPort = "9000"; + + valuenode = node.namedItem("localbasedir"); + m_localBasedir = valuenode.firstChild().nodeValue(); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setLocalBasedir(m_localBasedir); + + valuenode = node.namedItem("serverbasedir"); + m_serverBasedir = valuenode.firstChild().nodeValue(); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setServerBasedir(m_serverBasedir); + + valuenode = node.namedItem("listenport"); + m_listenPort = valuenode.firstChild().nodeValue(); + if(m_listenPort.isEmpty()) + m_listenPort = "9000"; + + valuenode = node.namedItem("startsession"); + m_startsession = valuenode.firstChild().nodeValue(); + if(m_startsession.isEmpty()) + m_startsession = "http://localhost/%rfpp?XDEBUG_SESSION_START=1&XDEBUG_PROFILE"; + + valuenode = node.namedItem("defaultexecutionstate"); + if(valuenode.firstChild().nodeValue().isEmpty()) + m_defaultExecutionState = Starting; + else + { + if(valuenode.firstChild().nodeValue() == "break") + m_defaultExecutionState = Starting; + else + m_defaultExecutionState = Running; + } + + valuenode = node.namedItem("useproxy"); + m_useproxy = valuenode.firstChild().nodeValue() == "1"; + + valuenode = node.namedItem("errormask"); + m_errormask = valuenode.firstChild().nodeValue().toLong(); + kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; + + // Profiler + valuenode = node.namedItem("profilerfilename"); + m_profilerFilename = valuenode.firstChild().nodeValue(); + if(m_profilerFilename.isEmpty()) + m_profilerFilename = "/tmp/cachegrind.out.%a"; + + valuenode = node.namedItem("profiler_autoopen"); + m_profilerAutoOpen = valuenode.firstChild().nodeValue().toLong(); + + valuenode = node.namedItem("profiler_mapfilename"); + m_profilerMapFilename = valuenode.firstChild().nodeValue().toLong(); + + +} + + +// Show configuration +void QuantaDebuggerDBGp::showConfig(QDomNode node) +{ + DBGpSettings set(protocolversion); + + readConfig(node); + + if(m_localBasedir == "/" && m_serverBasedir == "/") + set.checkLocalProject->setChecked(true); + set.lineLocalBasedir->setText(m_localBasedir); + set.lineServerBasedir->setText(m_serverBasedir); + set.lineServerListenPort->setText(m_listenPort); + set.lineStartSession->setText(m_startsession); + if(m_defaultExecutionState == Starting) + set.comboDefaultExecutionState->setCurrentItem(0); + else + set.comboDefaultExecutionState->setCurrentItem(1); + + set.checkBreakOnNotice->setChecked(QuantaDebuggerDBGp::Notice & m_errormask); + set.checkBreakOnWarning->setChecked(QuantaDebuggerDBGp::Warning & m_errormask); + set.checkBreakOnUserNotice->setChecked(QuantaDebuggerDBGp::User_Notice & m_errormask); + set.checkBreakOnUserWarning->setChecked(QuantaDebuggerDBGp::User_Warning & m_errormask); + set.checkBreakOnUserError->setChecked(QuantaDebuggerDBGp::User_Error & m_errormask); + + set.lineProfilerFilename->setText(m_profilerFilename); + if(m_profilerAutoOpen) + set.checkProfilerAutoOpen->setChecked(true); + if(m_profilerMapFilename) + set.checkProfilerMapFilename->setChecked(true); + + if(set.exec() == QDialog::Accepted ) + { + QDomElement el; + + el = node.namedItem("localproject").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("localproject"); + node.appendChild( el ); + if(set.checkLocalProject->isChecked()) + { + m_localBasedir = "/"; + m_serverBasedir = "/"; + } + else + { + m_localBasedir = set.lineLocalBasedir->text(); + m_serverBasedir = set.lineServerBasedir->text(); + if (!m_localBasedir.endsWith("/")) + m_localBasedir.append('/'); + if (!m_serverBasedir.endsWith("/")) + m_serverBasedir.append('/'); + } + + el = node.namedItem("localbasedir").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("localbasedir"); + node.appendChild( el ); + el.appendChild( node.ownerDocument().createTextNode(m_localBasedir) ); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setLocalBasedir(m_localBasedir); + + el = node.namedItem("serverbasedir").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("serverbasedir"); + node.appendChild( el ); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setServerBasedir(m_serverBasedir); + el.appendChild( node.ownerDocument().createTextNode(m_serverBasedir) ); + + el = node.namedItem("listenport").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("listenport"); + node.appendChild( el ); + m_listenPort = set.lineServerListenPort->text(); + el.appendChild( node.ownerDocument().createTextNode(m_listenPort) ); + + el = node.namedItem("startsession").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("startsession"); + node.appendChild( el ); + m_startsession = set.lineStartSession->text(); + el.appendChild(node.ownerDocument().createTextNode(m_startsession)); + + el = node.namedItem("defaultexecutionstate").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("defaultexecutionstate"); + node.appendChild( el ); + if(set.comboDefaultExecutionState->currentItem() == 0) + { + m_defaultExecutionState = Starting; + el.appendChild(node.ownerDocument().createTextNode("break")); + } + else + { + m_defaultExecutionState = Running; + el.appendChild(node.ownerDocument().createTextNode("run")); + + } + + el = node.namedItem("errormask").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("errormask"); + node.appendChild( el ); + m_errormask = (set.checkBreakOnNotice->isChecked() ? QuantaDebuggerDBGp::Notice : 0) + + (set.checkBreakOnWarning->isChecked() ? QuantaDebuggerDBGp::Warning : 0) + + (set.checkBreakOnUserNotice->isChecked() ? QuantaDebuggerDBGp::User_Notice : 0) + + (set.checkBreakOnUserWarning->isChecked() ? QuantaDebuggerDBGp::User_Warning : 0) + + (set.checkBreakOnUserError->isChecked() ? QuantaDebuggerDBGp::User_Error : 0); + kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; + el.appendChild( node.ownerDocument().createTextNode(QString::number(m_errormask))); + + // Profiler + el = node.namedItem("profilerfilename").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("profilerfilename"); + node.appendChild( el ); + m_profilerFilename = set.lineProfilerFilename->text(); + el.appendChild(node.ownerDocument().createTextNode(m_profilerFilename)); + + el = node.namedItem("profilerfilename_map").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("profilerfilename_map"); + node.appendChild( el ); + m_profilerMapFilename = (set.checkProfilerMapFilename->isChecked() ? true : false); + el.appendChild(node.ownerDocument().createTextNode(m_profilerMapFilename ? "1" : "0")); + + el = node.namedItem("profiler_autoopen").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("profiler_autoopen"); + node.appendChild( el ); + m_profilerAutoOpen = (set.checkProfilerAutoOpen->isChecked() ? true : false); + el.appendChild(node.ownerDocument().createTextNode(m_profilerAutoOpen ? "1" : "0")); + } +} + +// Map a server filepath to a local one using project settings +QString QuantaDebuggerDBGp::mapServerPathToLocal(const QString& serverpath) +{ + // Translate filename from server to local + return debuggerInterface()->Mapper()->mapServerPathToLocal(serverpath); +} + +// Map a local filepath to a server one using project settings +QString QuantaDebuggerDBGp::mapLocalPathToServer(const QString& localpath) +{ + // Translate filename from local to server + return debuggerInterface()->Mapper()->mapLocalPathToServer(localpath); +} + +void QuantaDebuggerDBGp::variableSetValue(const DebuggerVariable &variable) +{ + m_network.sendCommand("property_set", "-n " + variable.name(), variable.value()); + + for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + if((*it) == variable.name()) + { + m_network.sendCommand("property_get", "-n " + variable.name(), variable.value()); + return; + } + + return; +} + +void QuantaDebuggerDBGp::profilerOpen() +{ + profilerOpen(true); +} + +void QuantaDebuggerDBGp::profilerOpen(bool forceopen) +{ + QString profileroutput = m_profilerFilename; + profileroutput.replace("%a", m_appid); + profileroutput.replace("%c", m_initialscript); + + if(m_profilerMapFilename) + profileroutput = mapServerPathToLocal( profileroutput); + + bool exists = QFile::exists(profileroutput); + if(m_profilerAutoOpen || forceopen) + { + if(exists) + { + KRun *run = new KRun(profileroutput); + run->setAutoDelete(true); + } + else + { + if(forceopen) + KMessageBox::sorry(NULL, i18n("Unable to open profiler output (%1)").arg(profileroutput), i18n("Profiler File Error")); + else + debuggerInterface()->showStatus(i18n("Unable to open profiler output (%1)").arg(profileroutput), false); + } + } + else + { + debuggerInterface()->enableAction("debug_profiler_open", exists); + } +} + +void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) +{ + /* + + + + + + + + + */ + +// // First defaults in case they are not sent (which seems to be the case with hash and xdebug) +// m_variabletypes["bool"] = "bool"; +// m_variabletypes["int"] = "int"; +// m_variabletypes["float"] = "float"; +// m_variabletypes["string"] = "string"; +// m_variabletypes["null"] = "null"; +// m_variabletypes["array"] = "hash"; +// m_variabletypes["hash"] = "hash"; +// m_variabletypes["object"] = "object"; +// m_variabletypes["resource"] = "resource"; + + QDomNode child = typemapnode.firstChild(); + while(!child.isNull()) + { + if(child.nodeName() == "map") + { + m_variabletypes[attribute(child, "name")] = attribute(child, "type"); + } + child = child.nextSibling(); + } +} + + +void QuantaDebuggerDBGp::showWatch( const QDomNode & variablenode) +{ + debuggerInterface()->showVariable(buildVariable(variablenode.firstChild())); +} + +void QuantaDebuggerDBGp::propertySetResponse( const QDomNode & setnode) +{ + if(attribute(setnode, "success") == "0") + { + debuggerInterface()->showStatus(i18n("Unable to set value of variable."), true); + } +} + + +DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variablenode) +{ + /* + Sample: + + + + + + + + + + + + + + */ + QString name = attribute(variablenode, "name"); + QString type = m_variabletypes[attribute(variablenode, "type")]; + + if(type == "int") + { + QString value = variablenode.firstChild().nodeValue(); + return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Integer); + } + else if (type == "string") + { + QCString value = QCString(variablenode.firstChild().nodeValue()); + value = KCodecs::base64Decode(value); + return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::String); + } + else if (type == "bool") + { + QString value = variablenode.firstChild().nodeValue(); + return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Boolean); + } + else if (type == "resource") + { + QString value = variablenode.firstChild().nodeValue(); + return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Resource); + } + else if (type == "float") + { + QString value = variablenode.firstChild().nodeValue(); + return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Float); + } + else if (type == "null") + { + QString value = variablenode.firstChild().nodeValue(); + return debuggerInterface()->newDebuggerVariable( name, "", DebuggerVariableTypes::Undefined); + } + else if (type == "hash" || type == "array" || type == "object") + { + QDomNode child = variablenode.firstChild(); + QPtrList vars ; + while(!child.isNull()) + { + DebuggerVariable* var = buildVariable( child); + if(var) + vars.append(var); + + child = child.nextSibling(); + } + if(type == "object") + return debuggerInterface()->newDebuggerVariable(name, vars, DebuggerVariableTypes::Object); + else + return debuggerInterface()->newDebuggerVariable(name, vars, DebuggerVariableTypes::Array); + } + + return debuggerInterface()->newDebuggerVariable(name, "", DebuggerVariableTypes::Error);; +} + +void QuantaDebuggerDBGp::handleError(const QDomNode & statusnode ) +{ + + if(attribute(statusnode, "reason") == "error" || attribute(statusnode, "reason") == "aborted") + { + QDomNode errornode = statusnode.firstChild(); + while(!errornode.isNull()) + { + if(errornode.nodeName() == "error") + { + if(attribute(statusnode, "reason") == "error") + { + // Managable error + long error = attribute(errornode, "code").toLong(); + if(!(error & m_errormask)) + { + setExecutionState(Running); + } + else + { + emit updateStatus(DebuggerUI::HaltedOnError); + debuggerInterface()->showStatus(errornode.firstChild().nodeValue(), true); + } + break; + } + else + { + // Fatal error + emit updateStatus(DebuggerUI::HaltedOnError); + debuggerInterface()->showStatus(errornode.firstChild().nodeValue(), true); + } + } + errornode = errornode.nextSibling(); + } + } + +} + +#include "quantadebuggerdbgp.moc" diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.desktop b/quanta/components/debugger/dbgp/quantadebuggerdbgp.desktop new file mode 100644 index 00000000..3bebcf06 --- /dev/null +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Name=DBGp +Comment=DBGp debugger plugin, see http://xdebug.org +Comment[bg]=ПриÑтавка на дебъгер DBGp, http://xdebug.org +Comment[ca]=Connector de depuració DBGp, consulteu http://xdebug.org +Comment[cs]=DBGp debugger plugin, viz http://xdebug.org +Comment[da]=DBGp fejlretter-plugin, se http://xdebug.org +Comment[de]=DBGp Debugger Plugin, siehe http://xdebug.org +Comment[el]=ΠÏόσθετο αποσφαλματωτή DBGp, δείτε το http://xdebug.org +Comment[es]=Extensión para el depurador DBGp, vea http://xdebug.org +Comment[et]=DBGp siluri plugin, vaata http://xdebug.org +Comment[eu]=DBGp araztailearen plugina, ikusi http://xdebug.org +Comment[fa]=وصلۀ اشکال‌زدای DBGpØŒ http://xdebug.org را ببینید +Comment[fi]=DBGp-debugliitännäinen, katso http://xdebug.org +Comment[fr]=Module de débogage DBGp, consultez http://xdebug.org +Comment[ga]=Breiseán dífhabhtóra DBGp, féach ar http://xdebug.org +Comment[gl]=Extensión DBGp para o depurador, vexa tamén http://xdebug.org +Comment[hu]=DBGp nyomkövetÅ‘ modul, lásd: http://xdebug.org +Comment[is]=DBGp aflúsunaríforrit. Sjá http://xdebug.org +Comment[it]=Plugin di degub DBGp, vedi http://xdebug.org +Comment[ja]=DBGp デãƒãƒƒã‚¬ プラグイン。http://xdebug.org ã‚’ã”覧ãã ã•ã„。 +Comment[ka]=DBGp გáƒáƒœáƒ‘ზიკვის მáƒáƒ“ული, იხილეთ http://xdebug.org +Comment[lt]=DBGp derintuvÄ—s priedas, žr. http://xdebug.org +Comment[ms]=Plugin nyahpepijat DBGp, lihat http://xdebug.org +Comment[nds]=Fehlersöök-Moduul för't DBGp, kiek bi http://xdebug.org +Comment[ne]=DBGp तà¥à¤°à¥à¤Ÿà¤¿à¤®à¥‹à¤šà¤• पà¥à¤²à¤—इन, http://xdebug.org हेरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ +Comment[nl]=DBGp-debugger-plugin, zie http://xdebug.org +Comment[pl]=Wtyczka debugera DBGp, patrz http://xdebug.org +Comment[pt]='Plugin' de depuração DBGp, veja http://xdebug.org +Comment[pt_BR]=Plugin de depuração DBGp, veja http://xdebug.org +Comment[ru]=Модуль Ð´Ð»Ñ Ð¾Ñ‚Ð»Ð°Ð´Ñ‡Ð¸ÐºÐ° DBGp, http://xdebug.org +Comment[sk]=DBGp debuger modul, pozri http://xdebug.org +Comment[sl]=Vstavek za razhoroÅ¡Äevanje DBGp, glej http://xdebug.org +Comment[sr]=DBGp прикључак, види http://xdebug.org +Comment[sr@Latn]=DBGp prikljuÄak, vidi http://xdebug.org +Comment[sv]=DBGp-insticksprogram för felsökning, se http://xdebug.org +Comment[uk]=Втулок зневаджувача DBGp, див. http://xdebug.org +Comment[zh_CN]=DBGp 调试器æ’件,å‚看 http://xdebug.org +Comment[zh_HK]=DBGp 除錯器外掛程å¼ï¼Œè«‹åƒé–± http://xdebug.org +Comment[zh_TW]=DBGp 除錯器外掛程å¼ï¼Œè«‹åƒé–± http://xdebug.org +Icon=kdbg +ServiceTypes=Quanta/Debugger +X-KDE-Library=quantadebuggerdbgp diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.h b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h new file mode 100644 index 00000000..fd8eda22 --- /dev/null +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h @@ -0,0 +1,166 @@ +/*************************************************************************** + phpdebugdbgp.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef QUANTADEBUGGERGUBED_H +#define QUANTADEBUGGERGUBED_H + +#include +#include +#include +#include +#include + +#include "debuggerclient.h" +#include "dbgpnetwork.h" + +typedef QValueList WatchList; +typedef QMap StringMap; + +class QuantaDebuggerDBGp : public DebuggerClient +{ + Q_OBJECT + + public: + QuantaDebuggerDBGp(QObject *parent, const char* name, const QStringList&); + ~QuantaDebuggerDBGp(); + + // Execution states + enum State + { + Starting = 0, + Stopping, + Stopped, + Running, + Break + }; + // Error codes + enum Errors + { + Warning = 2, + Notice = 8, + User_Error = 256, + User_Warning = 512, + User_Notice = 1024 + }; + + // Protocol version + static const char protocolversion[]; + + // Manager interaction + const uint supports(DebuggerClientCapabilities::Capabilities); + + // Execution control + void request(); + void run(); + void stepInto(); + void stepOver(); + void stepOut(); + void pause(); + void kill(); + void setExecutionState(const QString &state); + void setExecutionState(const State &state, bool forcesend = false); + + // Connection + void startSession(); + void endSession(); + + // Return name of debugger + QString getName(); + + // Initiation + void checkSupport(const QDomNode&node); + + // New file opened in quanta + void fileOpened(const QString& file); + + // Settings + void readConfig(QDomNode node); + void showConfig(QDomNode node); + + // Breakpoints + void addBreakpoint(DebuggerBreakpoint* breakpoint); + void removeBreakpoint(DebuggerBreakpoint* breakpoint); + void showCondition(const StringMap &args); + + // Variables + void addWatch(const QString &variable); + void removeWatch(DebuggerVariable *var); + void variableSetValue(const DebuggerVariable &variable); + void propertySetResponse( const QDomNode & setnode); + + // Call stack + void stackShow(const QDomNode&node); + + private: + DBGpNetwork m_network; + + QString m_serverBasedir; + QString m_localBasedir; + QString m_serverPort; + QString m_serverHost; + QString m_startsession; + QString m_listenPort; + QString m_profilerFilename; + QString m_appid; + QString m_initialscript; + + bool m_useproxy; + bool m_profilerAutoOpen; + bool m_profilerMapFilename; + State m_executionState, m_defaultExecutionState; + long m_errormask; + long m_displaydelay; + bool m_supportsasync; + + // Variable type mapping + StringMap m_variabletypes; + + // Internal watchlist + WatchList m_watchlist; + + void sendWatches(); + void debuggingState(bool enable); + void connected(); + + void handleError(const QDomNode & statusnode ); + + QString mapServerPathToLocal(const QString& serverpath); + QString mapLocalPathToServer(const QString& localpath); + QString bpToDBGp(DebuggerBreakpoint* breakpoint); + void setBreakpointKey(const QDomNode& response); + + QString attribute(const QDomNode&node, const QString &attribute); + void initiateSession(const QDomNode& initpacket); + + void typemapSetup(const QDomNode& typemapnode); + void showWatch(const QDomNode& typemapnode); + DebuggerVariable* buildVariable(const QDomNode& typemapnode); + + // Profiler + void profilerOpen(bool forceopen); + void profilerOpen(); + + public slots: + void slotNetworkActive(bool active); + void slotNetworkConnected(bool connected); + void slotNetworkError(const QString &errormsg, bool log); + void processCommand(const QString&); + + signals: + void updateStatus(DebuggerUI::DebuggerStatus); +}; + +#endif diff --git a/quanta/components/debugger/debuggerbreakpoint.cpp b/quanta/components/debugger/debuggerbreakpoint.cpp new file mode 100644 index 00000000..ae8ed6cb --- /dev/null +++ b/quanta/components/debugger/debuggerbreakpoint.cpp @@ -0,0 +1,181 @@ +/*************************************************************************** + debuggerbreakpoint.cpp + ---------------------- + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "debuggerbreakpoint.h" +#include + +DebuggerBreakpoint::DebuggerBreakpoint() + : m_line(1)//, m_state(0) +{} + +DebuggerBreakpoint::DebuggerBreakpoint( const DebuggerBreakpoint & bp ) +{ + m_conditionExpr = bp.condition(); + m_filePath = bp.filePath(); + m_class = bp.inClass(); + m_function = bp.inFunction(); + m_line = bp.line(); + m_state = bp.state(); + m_key = bp.key(); + m_type = bp.type(); +} + +DebuggerBreakpoint::DebuggerBreakpoint( const DebuggerBreakpoint * bp ) +{ + m_conditionExpr = bp->condition(); + m_filePath = bp->filePath(); + m_class = bp->inClass(); + m_function = bp->inFunction(); + m_line = bp->line(); + m_state = bp->state(); + m_key = bp->key(); + m_type = bp->type(); +} + + +DebuggerBreakpoint::DebuggerBreakpoint(const QString& filePath, int line) +{ + m_filePath = filePath; + m_line = line; + m_type = DebuggerBreakpoint::LineBreakpoint; + m_state = DebuggerBreakpoint::Undefined; +} + +DebuggerBreakpoint::DebuggerBreakpoint(const Types type, + const QString& conditionExpr, const QString& filePath, + const QString& inClass, const QString& inFunction) +{ + m_conditionExpr = conditionExpr; + m_filePath = filePath; + m_class = inClass; + m_function = inFunction; + m_line = 0; + m_type = type; + m_state = DebuggerBreakpoint::Undefined; +} + +DebuggerBreakpoint::~DebuggerBreakpoint() +{} + +void DebuggerBreakpoint::setFilePath(const QString& filePath) +{ + m_filePath = filePath; +} + +void DebuggerBreakpoint::setClass(const QString& newclass) +{ + m_class = newclass; +} + +void DebuggerBreakpoint::setFunction(const QString& function) +{ + m_function = function; +} + +void DebuggerBreakpoint::setLine(int line) +{ + m_line = line; +} + +void DebuggerBreakpoint::setCondition(const QString& expression) +{ + m_conditionExpr = expression; +} + +void DebuggerBreakpoint::setValue(const QString& value) +{ + m_value = value; +} + +void DebuggerBreakpoint::setState(int state) +{ + m_state = state; +} + +void DebuggerBreakpoint::setType(DebuggerBreakpoint::Types type ) +{ + m_type = type; +} + +void DebuggerBreakpoint::setKey(const QString& value) +{ + m_key = value; +} + +const QString& DebuggerBreakpoint::key() const +{ + return m_key; +} + +const QString& DebuggerBreakpoint::filePath() const +{ + return m_filePath; +} + +const QString& DebuggerBreakpoint::value() const +{ + return m_value; +} + +const QString& DebuggerBreakpoint::inClass() const +{ + return m_class; +} +const QString& DebuggerBreakpoint::inFunction() const +{ + return m_function; +} + +DebuggerBreakpoint::Types DebuggerBreakpoint::type() const +{ + return m_type; +} + +int DebuggerBreakpoint::line() const +{ + return m_line; +} + +const QString& DebuggerBreakpoint::condition() const +{ + return m_conditionExpr; +} + +int DebuggerBreakpoint::state() const +{ + return m_state; +} + +bool DebuggerBreakpoint::operator == (DebuggerBreakpoint bp) const +{ + // If they key matches + if(!m_key.isEmpty() && bp.key() == m_key) + return true; + + // Or everything else... + if(bp.filePath() == m_filePath + && (bp.line() == m_line || m_type != DebuggerBreakpoint::LineBreakpoint) + && bp.type() == m_type + && bp.inClass() == m_class + && bp.inFunction() == m_function + && bp.condition() == m_conditionExpr + ) + return true; + return false; + +} + diff --git a/quanta/components/debugger/debuggerbreakpoint.h b/quanta/components/debugger/debuggerbreakpoint.h new file mode 100644 index 00000000..46e0950d --- /dev/null +++ b/quanta/components/debugger/debuggerbreakpoint.h @@ -0,0 +1,85 @@ +/*************************************************************************** + debuggerbreakpoint.h + -------------------- + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef DEBUGGERBREAKPOINT_H +#define DEBUGGERBREAKPOINT_H +#include + + +class DebuggerBreakpoint +{ + public: + enum Types + { + LineBreakpoint = 0, + ConditionalTrue, + ConditionalChange + }; + + enum States + { + Undefined = 0, + Unfulfilled, + Fulfilled, + Error + }; + + DebuggerBreakpoint(); + DebuggerBreakpoint(const DebuggerBreakpoint& bp); + DebuggerBreakpoint(const DebuggerBreakpoint* bp); + DebuggerBreakpoint(const QString& filePath, int line); // Line BP + DebuggerBreakpoint(const DebuggerBreakpoint::Types type, // Any kind + const QString& conditionExpr, const QString& filePath = "", + const QString& inClass = "", const QString& inFunction = ""); + + virtual ~DebuggerBreakpoint(); + + virtual void setFunction(const QString& filePath); + virtual void setClass(const QString& filePath); + virtual void setFilePath(const QString& filePath); + virtual void setLine(int line); + virtual void setCondition(const QString& expression); + virtual void setState(int state); + virtual void setType(Types type); + virtual void setValue(const QString& value); + virtual void setKey(const QString& value); + + virtual const QString& filePath() const; + virtual const QString& inClass() const; + virtual const QString& inFunction() const; + virtual int line() const; + virtual const QString& condition() const; + virtual int state() const; + virtual DebuggerBreakpoint::Types type() const; + virtual const QString& value() const; + virtual const QString& key() const; + + bool operator == (DebuggerBreakpoint) const; + + protected: + QString m_filePath; + QString m_class; + QString m_function; + int m_line; + QString m_conditionExpr; + int m_state; + Types m_type; + QString m_value; + QString m_key; +}; + +#endif diff --git a/quanta/components/debugger/debuggerbreakpointlist.cpp b/quanta/components/debugger/debuggerbreakpointlist.cpp new file mode 100644 index 00000000..ba117965 --- /dev/null +++ b/quanta/components/debugger/debuggerbreakpointlist.cpp @@ -0,0 +1,193 @@ +/*************************************************************************** + debuggerbreakpointlist.cpp + -------------------------- + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include + +#include "debuggerbreakpointlist.h" +#include "debuggerbreakpoint.h" +#include "debuggerclient.h" +#include "debuggermanager.h" +#include "debuggerui.h" +#include "resource.h" +#include "quanta.h" + +DebuggerBreakpointList::DebuggerBreakpointList() + : m_current(0) +{ + m_breakpointList = new BreakpointList_t(); +} + +DebuggerBreakpointList::~DebuggerBreakpointList() +{ + delete m_breakpointList; +} + +void DebuggerBreakpointList::add(DebuggerBreakpoint* bp) +{ + if(quantaApp->debugger()->UI()) + quantaApp->debugger()->UI()->showBreakpoint(*bp); + + m_breakpointList->push_front(bp); + if(bp->type() == DebuggerBreakpoint::LineBreakpoint) + quantaApp->debugger()->setMark(bp->filePath(), bp->line(), true, KTextEditor::MarkInterface::markType02); +} + +void DebuggerBreakpointList::remove(DebuggerBreakpoint* bp) +{ + BreakpointList_t::iterator it = find(*bp); + if(it == m_breakpointList->end()) + return; + +// DebuggerBreakpoint bp1(bp); + + if(*bp == (*bp)) + { + DebuggerBreakpoint* tmp; + + tmp = (*it); + // Remove it from the bp-list + if(quantaApp->debugger()->UI()) + quantaApp->debugger()->UI()->deleteBreakpoint(*bp); + + // Remove editor markpoint if there is one... + if(bp->type() == DebuggerBreakpoint::LineBreakpoint) + quantaApp->debugger()->setMark(bp->filePath(), bp->line(), false, KTextEditor::MarkInterface::markType02); + + it = m_breakpointList->remove(it); + delete tmp; + } +} + + + +DebuggerBreakpoint* DebuggerBreakpointList::retrieve(const QString& filePath, int line) +{ + BreakpointList_t::iterator it; + + for(it = m_breakpointList->begin(); it != m_breakpointList->end(); ++it) + { + if((filePath == (*it)->filePath()) && + line == (*it)->line()) + { + DebuggerBreakpoint* bp = new DebuggerBreakpoint(*it); + return bp; + } + } + return 0; +} + +void DebuggerBreakpointList::clear() +{ + BreakpointList_t::iterator it; + + for(it = m_breakpointList->begin(); it != m_breakpointList->end(); ++it) + { + + // Remove it from the bp-list + quantaApp->debugger()->UI()->deleteBreakpoint(*(*it)); + + // Remove editor markpoint if there is one... + quantaApp->debugger()->setMark((*it)->filePath(), (*it)->line(), false, KTextEditor::MarkInterface::markType02); + + if(quantaApp->debugger()->client()) + quantaApp->debugger()->client()->removeBreakpoint((*it)); + } + m_breakpointList->clear(); +} + +bool DebuggerBreakpointList::exists(DebuggerBreakpoint* bp) +{ + BreakpointList_t::iterator it = find(*bp); + if(it == m_breakpointList->end()) + return false; + + if(*bp == (*it)) + return true; + + return false; +} + + +BreakpointList_t::iterator DebuggerBreakpointList::find(const DebuggerBreakpoint &bp) +{ + BreakpointList_t::iterator it; + + for(it = m_breakpointList->begin(); it != m_breakpointList->end(); ++it) + { + if(bp == (*it)) + return it; + } + return m_breakpointList->end(); +} + +void DebuggerBreakpointList::rewind() +{ + m_current = 0; +} + +DebuggerBreakpoint* DebuggerBreakpointList::next() +{ + if(m_current == 0) + { + m_current = m_breakpointList->begin(); + } + else + { + ++m_current; + } + + if(m_current != m_breakpointList->end()) + { + return (*m_current); + } + else + { + return NULL; + } +} + +DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const QString & key ) +{ + BreakpointList_t::iterator it; + for(it = m_breakpointList->begin(); it != m_breakpointList->end(); ++it) + { + if((*it)->key() == key) + { + DebuggerBreakpoint *bp = new DebuggerBreakpoint((*it)); + return bp; + } + } + return NULL; +} + +void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +{ + //DebuggerBreakpoint *bpp = new DebuggerBreakpoint(bp); + BreakpointList_t::iterator it; + it = find(bp); + if(it != m_breakpointList->end()) + { + (*it)->setKey(newkey); + } +} + +size_t DebuggerBreakpointList::count( ) +{ + return m_breakpointList->count(); +} diff --git a/quanta/components/debugger/debuggerbreakpointlist.h b/quanta/components/debugger/debuggerbreakpointlist.h new file mode 100644 index 00000000..4ca26a95 --- /dev/null +++ b/quanta/components/debugger/debuggerbreakpointlist.h @@ -0,0 +1,58 @@ +/*************************************************************************** + debuggerbreakpointlist.h + ------------------------ + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef DEBUGGERBREAKPOINTLIST_H +#define DEBUGGERBREAKPOINTLIST_H + +#include +#include +#include + +class DebuggerBreakpoint; + typedef QValueList BreakpointList_t; + +class DebuggerBreakpointList +{ + + private: + BreakpointList_t* m_breakpointList; + BreakpointList_t::iterator m_current; + BreakpointList_t::iterator find(const DebuggerBreakpoint &bp); + + public: + DebuggerBreakpointList(); + ~DebuggerBreakpointList(); + + void add(DebuggerBreakpoint*); + void remove(DebuggerBreakpoint*); + //int remove(QString filePath, int line); + void clear(); + bool exists(DebuggerBreakpoint*); + //bool exists(QString filePath, int line); + + DebuggerBreakpoint* retrieve(const QString& filePath, int line); + + DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + + size_t count(); + void rewind(); + DebuggerBreakpoint* next(); + +}; + +#endif diff --git a/quanta/components/debugger/debuggerbreakpointview.cpp b/quanta/components/debugger/debuggerbreakpointview.cpp new file mode 100644 index 00000000..2f7eea36 --- /dev/null +++ b/quanta/components/debugger/debuggerbreakpointview.cpp @@ -0,0 +1,193 @@ +/*************************************************************************** + debuggerbreakpointview.cpp + -------------------------- + begin : 2004-06-27 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// KDE Includes +#include +#include +#include +#include +#include +#include + +// Quanta includes +#include "debuggerbreakpointview.h" +#include "debuggerbreakpoint.h" +#include "debuggerclient.h" +#include "debuggermanager.h" +#include "resource.h" +#include "quanta.h" + +namespace DebuggerBreakpointViewColumns +{ + // The enums must correspond to the order of the columns + // If you change here, change the column adding + enum Columns + { + Expression = 0, + File, + Class, + Function, + Line, + Value + }; +} + +DebuggerBreakpointViewItem::DebuggerBreakpointViewItem(DebuggerBreakpointView* view) + : KListViewItem(view) +{ +} + + +DebuggerBreakpointView::DebuggerBreakpointView(QWidget *parent, const char *name) + : KListView(parent, name) +{ + // If you change here, change the DebuggerBreakpointViewColumns enums above + addColumn(i18n("Expression")); + addColumn(i18n("File")); + addColumn(i18n("Class")); + addColumn(i18n("Function")); + addColumn(i18n("Line")); + addColumn(i18n("Value")); + + setResizeMode(QListView::AllColumns); + setAllColumnsShowFocus(true); + + m_breakpointPopup = new KPopupMenu(this); + m_breakpointPopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, SLOT(slotRemoveSelected())); + + connect(this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT(slotBreakpointContextMenu(KListView *, QListViewItem *, const QPoint &))); + + // Jump to bp + connect(this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int) ), this, SLOT(slotBreakpointDoubleClick( QListViewItem *, const QPoint &, int))); +} + + +DebuggerBreakpointView::~DebuggerBreakpointView() +{} + +void DebuggerBreakpointView::deleteBreakpoint(const DebuggerBreakpoint &bp) +{ + QListViewItem *item = findBreakpoint(bp, false); + if(item) + { + delete item; + } +} + + +void DebuggerBreakpointView::showBreakpoint(const DebuggerBreakpoint &bp) +{ + QListViewItem *item = findBreakpoint(bp); + if(!item) + return; + + if(bp.type() == DebuggerBreakpoint::LineBreakpoint) + { + item->setText(DebuggerBreakpointViewColumns::Value, ""); + item->setText(DebuggerBreakpointViewColumns::Line, QString::number(bp.line() + 1)); + } + else + { + item->setText(DebuggerBreakpointViewColumns::Value, bp.value()); + item->setText(DebuggerBreakpointViewColumns::Line, ""); + } + item->setText(DebuggerBreakpointViewColumns::File, bp.filePath()); + item->setText(DebuggerBreakpointViewColumns::Expression, bp.condition()); + item->setText(DebuggerBreakpointViewColumns::Class, bp.inClass()); + item->setText(DebuggerBreakpointViewColumns::Function, bp.inFunction()); +} + +QListViewItem* DebuggerBreakpointView::findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist) +{ + // Find the old item if its there + DebuggerBreakpointViewItem* item = dynamic_cast(firstChild()); + while(item) + { + if(item->breakpoint() == bp) + break; + + item = dynamic_cast(item->nextSibling()); + } + + // Insert a new item + if(!item && addIfNotExist) + { + item = new DebuggerBreakpointViewItem(this); + item->setBreakpoint(bp); + insertItem(item); + } + + return item; +} + + +DebuggerBreakpoint DebuggerBreakpointView::selected() +{ + DebuggerBreakpointViewItem* bpitem = dynamic_cast(selectedItem()); + + return bpitem->breakpoint(); +} + +void DebuggerBreakpointView::slotRemoveSelected() +{ + if(!selectedItem()) + return; + + DebuggerBreakpoint bp = selected(); + + emit removeBreakpoint(&bp); +} + +void DebuggerBreakpointView::keyPressEvent(QKeyEvent *e) +{ + if(e->key() != Qt::Key_Delete) + { + e->ignore(); + return; + } + + slotRemoveSelected(); +} + +void DebuggerBreakpointView::clear() +{ + KListView::clear(); +} + +void DebuggerBreakpointView::slotBreakpointDoubleClick(QListViewItem *item, const QPoint &, int ) +{ + if(!item) + return; + + DebuggerBreakpointViewItem* bpitem = dynamic_cast(item); + + if(!bpitem->breakpoint().filePath().isEmpty()) + { + quantaApp->gotoFileAndLine(bpitem->breakpoint().filePath(), bpitem->breakpoint().line(), 0); + } + +} + +void DebuggerBreakpointView::slotBreakpointContextMenu(KListView *, QListViewItem *, const QPoint& point) +{ + if(!selectedItem()) + return; + + m_breakpointPopup->exec(point); +} + +#include "debuggerbreakpointview.moc" diff --git a/quanta/components/debugger/debuggerbreakpointview.h b/quanta/components/debugger/debuggerbreakpointview.h new file mode 100644 index 00000000..1e3ca087 --- /dev/null +++ b/quanta/components/debugger/debuggerbreakpointview.h @@ -0,0 +1,74 @@ +/*************************************************************************** + Breakpoinlistview.h + ------------------------ + begin : 2004-06-27 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef DEBUGGERBREAKPOINTVIEW_H +#define DEBUGGERBREAKPOINTVIEW_H + +#include +#include +#include +#include "debuggerbreakpoint.h" + +// class DebuggerBreakpoint; +class DebuggerBreakpointView; + +class DebuggerBreakpointViewItem : public KListViewItem +{ + private: + DebuggerBreakpoint m_breakpoint; + + public: + DebuggerBreakpointViewItem(); + DebuggerBreakpointViewItem(DebuggerBreakpointView* view); + + DebuggerBreakpoint breakpoint() const { return m_breakpoint; } + void setBreakpoint(const DebuggerBreakpoint &bp) { m_breakpoint = bp; } + +}; + +class DebuggerBreakpointView : public KListView +{ + Q_OBJECT + + public: + DebuggerBreakpointView(QWidget *parent = 0, const char *name = 0); + ~DebuggerBreakpointView(); + + void showBreakpoint(const DebuggerBreakpoint& bp); + void deleteBreakpoint(const DebuggerBreakpoint& bp); + + DebuggerBreakpoint selected(); + + void clear(); + + public slots: + void slotRemoveSelected(); + void slotBreakpointContextMenu(KListView *list, QListViewItem * item, const QPoint& point); + void slotBreakpointDoubleClick(QListViewItem *item, const QPoint &point, int column); + + signals: + void removeBreakpoint(DebuggerBreakpoint*); + + private: + void keyPressEvent(QKeyEvent *e); + QListViewItem* findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist = true); + + KPopupMenu *m_breakpointPopup; +}; + +#endif diff --git a/quanta/components/debugger/debuggermanager.cpp b/quanta/components/debugger/debuggermanager.cpp new file mode 100644 index 00000000..bbc6336c --- /dev/null +++ b/quanta/components/debugger/debuggermanager.cpp @@ -0,0 +1,850 @@ +/*************************************************************************** + phpdebuggerinterface.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + Based on work by Mathieu Kooiman + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "quanta.h" +#include "document.h" +#include "resource.h" +#include "project.h" +#include "quantadebuggerinterface.h" +#include "debuggerclient.h" +#include "debuggerbreakpoint.h" +#include "debuggerbreakpointlist.h" +#include "debuggermanager.h" +#include "messageoutput.h" +#include "viewmanager.h" +#include "quantaview.h" +#include "debuggerui.h" +#include "debuggervariable.h" +#include "pathmapper.h" +#include "variableslistview.h" +#include "conditionalbreakpointdialog.h" + +// dialogs +#include "debuggervariablesets.h" + +DebuggerManager::DebuggerManager(QObject *myparent) + : QObject(myparent) +{ + initActions(); + + // Create objects + m_breakpointList = new DebuggerBreakpointList(); + m_pathmapper = new PathMapper(this, "pathmapper"); + m_debuggerui = NULL; + m_interface = new QuantaDebuggerInterface(this, "interface"); + m_client = NULL; +} + +void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KURL &, const KURL &) +{ + if(m_client) + { + + disconnect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + + delete m_client; + m_client = NULL; + } + enableAction("*", false); + + // Remove all breakpoints + m_breakpointList->clear(); + + if(m_debuggerui) + { + delete m_debuggerui; + m_debuggerui = NULL; + } + //kdDebug(24002) << "DebuggerManager::slotNewProjectLoaded " << projectname << ", " << Project::ref()->debuggerClient << endl; + + // Load new client + if(!projectname.isEmpty()) + { + + KTrader::OfferList offers = KTrader::self()->query("Quanta/Debugger"); + KTrader::OfferList::ConstIterator iterDbg; + for(iterDbg = offers.begin(); iterDbg != offers.end(); ++iterDbg) + { + KService::Ptr service = *iterDbg; + if(Project::ref()->debuggerClient() == service->name()) + { + int errCode = 0; +//Workaround for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2 +//The correct way should be a simple: +// m_client = KParts::ComponentFactory::createInstanceFromService(service, this, 0, QStringList(), &errCode); + QObject* obj = KParts::ComponentFactory::createInstanceFromService(service, this, 0, QStringList(), &errCode); + if (obj && obj->inherits("DebuggerClient")) + m_client = static_cast(obj); + + //kdDebug(24002) << service->name() << " (" << m_client << ")" << endl; + + if(!m_client) + { + emit hideSplash(); + KMessageBox::error(NULL, i18n("Unable to load the debugger plugin, error code %1 was returned: %2.").arg(errCode).arg(KLibLoader::self()->lastErrorMessage()), i18n("Debugger Error")); + } + break; + } + } + } + + // Tell client to load its settings + if (m_client) + { + QDomNode nodeThisDbg; + QDomDocument *dom = Project::ref()->sessionDom(); + QDomNode projectNode = dom->firstChild().firstChild(); + QDomNode nodeDbg = projectNode.namedItem("debuggers"); + if(nodeDbg.isNull()) + { + nodeDbg = dom->createElement("debuggers"); + projectNode.appendChild(nodeDbg); + } + + // Load this project's mapped paths + m_pathmapper->readConfig(); + + // Load this projects debugger's settings + nodeThisDbg = nodeDbg.namedItem(m_client->getName()); + if(nodeThisDbg.isNull()) + { + nodeThisDbg = dom->createElement(m_client->getName()); + nodeDbg.appendChild(nodeThisDbg); + } + + m_client->readConfig(nodeThisDbg); + + // recreate UI + m_debuggerui = new DebuggerUI(this, "debuggerui"); + connect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + + // Load saved breakpoints + if(Project::ref()->debuggerPersistentBreakpoints()) + { + QDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); + if(!nodeBreakpoints.isNull()) + { + QDomNode child = nodeBreakpoints.firstChild(); + while(!child.isNull()) + { + DebuggerBreakpoint* bp = new DebuggerBreakpoint(); + bp->setFilePath( child.attributes().namedItem("filepath").nodeValue()); + bp->setClass( child.attributes().namedItem("class").nodeValue()); + bp->setFunction( child.attributes().namedItem("function").nodeValue()); + bp->setCondition( child.attributes().namedItem("condition").nodeValue()); + bp->setLine( child.attributes().namedItem("line").nodeValue().toLong()); + if(child.attributes().namedItem("type").nodeValue() == "true") + bp->setType(DebuggerBreakpoint::ConditionalTrue); + else if(child.attributes().namedItem("type").nodeValue() == "change") + bp->setType(DebuggerBreakpoint::ConditionalChange); + else + bp->setType(DebuggerBreakpoint::LineBreakpoint); + + // Update client and ui + m_client->addBreakpoint(bp); + m_breakpointList->add(bp); + + // loop + child = child.nextSibling(); + } + } + } + + // Load saved Watches + if(Project::ref()->debuggerPersistentWatches()) + { + QDomNode nodeWatches = nodeDbg.namedItem("watches"); + if(!nodeWatches.isNull()) + { + QDomNode child = nodeWatches.firstChild(); + while(!child.isNull()) + { + QString watch = child.attributes().namedItem("name").nodeValue(); + DebuggerVariable *var = new DebuggerVariable(watch, "", DebuggerVariableTypes::Undefined); + m_debuggerui->addVariable(var); + m_client->addWatch(watch); + + child = child.nextSibling(); + } + } + } + + } + + initClientActions(); + + // Disable all debugactions that need a session (ie not breakpoints, etc) + slotDebugStartSession(); +} + +void DebuggerManager::initActions() +{ + KAction * newaction; + KActionCollection *ac = quantaApp->actionCollection(); + if(!ac) + return; + + //Debugger, breakpoint + newaction = new KAction(i18n("Toggle &Breakpoint"), SmallIcon("debug_breakpoint"), Qt::CTRL+Qt::SHIFT+Qt::Key_B, this, SLOT(toggleBreakpoint()), ac, "debug_breakpoints_toggle"); + newaction->setToolTip(i18n("Toggles a breakpoint at the current cursor location")); + + newaction = new KAction(i18n("&Clear Breakpoints"), 0, this, SLOT(clearBreakpoints()), ac, "debug_breakpoints_clear"); + newaction->setToolTip(i18n("Clears all breakpoints")); + + newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_break"); + newaction->setToolTip(i18n("Adds a new conditional breakpoint")); + + newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_breakdialog"); + newaction->setToolTip(i18n("Adds a new conditional breakpoint")); + + // Execution + newaction = new KAction(i18n("Send HTTP R&equest"), SmallIcon("debug_currentline"), 0, this, SLOT(slotDebugRequest()), ac, "debug_request"); + newaction->setToolTip(i18n("Initiate HTTP Request to the server with debugging activated")); + + newaction = new KAction(i18n("&Trace"), SmallIcon("debug_run"), 0, this, SLOT(slotDebugTrace()), ac, "debug_trace"); + newaction->setToolTip(i18n("Traces through the script. If a script is currently not being debugged, it will start in trace mode when started")); + + newaction = new KAction(i18n("&Run"), SmallIcon("debug_leap"), 0, this, SLOT(slotDebugRun()), ac, "debug_run"); + newaction->setToolTip(i18n("Runs the script. If a script is currently not being debugged, it will start in run mode when started")); + + newaction = new KAction(i18n("&Step"), SmallIcon("debug_stepover"), 0, this, SLOT(slotDebugStepOver()), ac, "debug_stepover"); + newaction->setToolTip(i18n("Executes the next line of execution, but does not step into functions or includes")); + + newaction = new KAction(i18n("Step &Into"), SmallIcon("debug_stepinto"), 0, this, SLOT(slotDebugStepInto()), ac, "debug_stepinto"); + newaction->setToolTip(i18n("Executes the next line of execution and steps into it if it is a function call or inclusion of a file")); + + newaction = new KAction(i18n("S&kip"), SmallIcon("debug_skip"), 0, this, SLOT(slotDebugSkip()), ac, "debug_skip"); + newaction->setToolTip(i18n("Skips the next command of execution and makes the next command the current one")); + + newaction = new KAction(i18n("Step &Out"), SmallIcon("debug_stepout"), 0, this, SLOT(slotDebugStepOut()), ac, "debug_stepout"); + newaction->setToolTip(i18n("Executes the rest of the commands in the current function/file and pauses when it is done (when it reaches a higher level in the backtrace)")); + + newaction = new KAction(i18n("&Pause"), SmallIcon("debug_pause"), 0, this, SLOT(slotDebugPause()), ac, "debug_pause"); + newaction->setToolTip(i18n("Pauses the scripts if it is running or tracing. If a script is currently not being debugged, it will start in paused mode when started")); + newaction = new KAction(i18n("Kill"), SmallIcon("debug_kill"), 0, this, SLOT(slotDebugKill()), ac, "debug_kill"); + newaction->setToolTip(i18n("Kills the currently running script")); + + newaction = new KAction(i18n("Start Session"), SmallIcon("debug_connect"), 0, this, SLOT(slotDebugStartSession()), ac, "debug_connect"); + newaction->setToolTip(i18n("Starts the debugger internally (Makes debugging possible)")); + + newaction = new KAction(i18n("End Session"), SmallIcon("debug_disconnect"), 0, this, SLOT(slotDebugEndSession()), ac, "debug_disconnect"); + newaction->setToolTip(i18n("Stops the debugger internally (debugging not longer possible)")); + + // Variables + newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, SLOT(slotAddWatch()), ac, "debug_addwatch"); + newaction->setToolTip(i18n("Adds a variable to the watch list")); + + newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, SLOT(slotAddWatch()), ac, "debug_addwatchdialog"); + newaction->setToolTip(i18n("Adds a variable to the watch list")); + + newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, SLOT(slotVariableSet()), ac, "debug_variable_set"); + newaction->setToolTip(i18n("Changes the value of a variable")); + + newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, SLOT(slotVariableSet()), ac, "debug_variable_setdialog"); + newaction->setToolTip(i18n("Changes the value of a variable")); + + newaction = new KAction(i18n("Open Profiler Output"), SmallIcon("launch"), 0, this, SLOT(slotProfilerOpen()), ac, "debug_profiler_open"); + newaction->setToolTip(i18n("Opens the profiler output file")); + + enableAction("*", false); + +} + +void DebuggerManager::initClientActions() +{ + enableAction("*", false); + + if(m_client) + { + // Get actioncollection and add appropriate actions depending on capabilities of the debugger + if(m_client->supports(DebuggerClientCapabilities::LineBreakpoints)) + enableAction("debug_breakpoints_toggle", true); + if(m_client->supports(DebuggerClientCapabilities::LineBreakpoints)) + enableAction("debug_breakpoints_clear", true); + } +} + +DebuggerManager::~DebuggerManager() +{ + delete m_breakpointList; + m_breakpointList = 0L; + + if(m_client) + { + + disconnect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + + delete m_client; + m_client = 0L; + } + + delete m_debuggerui; + m_debuggerui = 0L; + delete m_interface; + m_interface = 0L; + delete m_pathmapper; + m_pathmapper = 0L; +} + +void DebuggerManager::enableAction(const QString& action, bool enable) +{ + if(action == "*") + { + // Enable/Disable all session related actions + connect/disconnect + enableAction("debug_request", enable); + enableAction("debug_run", enable); + enableAction("debug_trace", enable); + enableAction("debug_pause", enable); + enableAction("debug_kill", enable); + enableAction("debug_stepover", enable); + enableAction("debug_stepinto", enable); + enableAction("debug_stepout", enable); + enableAction("debug_skip", enable); + + enableAction("debug_connect", enable); + enableAction("debug_disconnect", enable); + + enableAction("debug_breakpoints_toggle", enable); + enableAction("debug_breakpoints_clear", enable); + + enableAction("debug_profiler_open", enable); + + } + else + { + // The action may or may not exist, depending on capabilities of the debugger plugin + KActionCollection *ac = quantaApp->actionCollection(); + if(ac && ac->action(action)) + ac->action(action)->setEnabled(enable); + } +} + +void DebuggerManager::slotRemoveVariable(DebuggerVariable* var) +{ + if(!m_client) + return; + + m_client->removeWatch(var); + +} + +void DebuggerManager::slotRemoveBreakpoint(DebuggerBreakpoint* bp) +{ + if(!m_client) + return; + m_breakpointList->remove(bp); + m_client->removeBreakpoint(bp); + +} + + +void DebuggerManager::slotAddWatch() +{ + kdDebug(24002) << "DebuggerManager::slotAddWatch() " << endl; + if(!m_client) + return; + + + QString watch = KInputDialog::getText(i18n("Add Watch"), i18n("Specify variable to watch:"), quantaApp->popupWord); + quantaApp->popupWord = ""; + if(!watch.isEmpty()) + { + DebuggerVariable *var = new DebuggerVariable(watch, "", DebuggerVariableTypes::Undefined); + m_debuggerui->addVariable(var); + m_client->addWatch(watch); + } +} + +void DebuggerManager::slotVariableSet() +{ + kdDebug(24002) << "DebuggerManager::slotVariableSet(" << quantaApp->popupWord << ") " << endl; + if(!m_client) + return; + + + DebuggerVariableSetS dlg; + dlg.lineVariable->setText(quantaApp->popupWord); + quantaApp->popupWord = ""; + if(dlg.exec() == QDialog::Accepted) + { + DebuggerVariable var; + var.setName(dlg.lineVariable->text()); + var.setValue(dlg.lineValue->text()); + m_client->variableSetValue(var); + } +} + +void DebuggerManager::slotConditionalBreakpoint() +{ + QString file; + + kdDebug(24002) << "DebuggerManager::slotConditionalBreakpoint() " << quantaApp->popupWord << endl; + if(!m_client) + return; + + Document *w = ViewManager::ref()->activeDocument(); + if (w) + file = w->url().prettyURL(0, KURL::StripFileProtocol); + + ConditionalBreakpointDialog dlg(quantaApp->popupWord, file, "", ""); + quantaApp->popupWord = ""; + if(dlg.exec() == QDialog::Accepted) + { + DebuggerBreakpoint * bp = dlg.breakpoint(); + if(bp) + { + m_client->addBreakpoint(bp); + m_breakpointList->add(bp); + } + } +} + +void DebuggerManager::slotDebugStartSession() +{ + if(!m_client) + return; + + m_client->startSession(); +} + +void DebuggerManager::slotDebugEndSession() +{ + if(!m_client) + return; + + m_client->endSession(); +} + +void DebuggerManager::slotDebugRequest() +{ + if(!m_client) + return; + + m_client->request(); +} + +void DebuggerManager::slotDebugTrace() +{ + if(!m_client) + return; + + m_client->trace(); +} + +void DebuggerManager::slotDebugRun() +{ + if(!m_client) + return; + + m_client->run(); + +} +void DebuggerManager::slotDebugSkip() +{ + if(!m_client) + return; + + m_client->skip(); + +} +void DebuggerManager::slotDebugStepOver() +{ + if(!m_client) + return; + + m_client->stepOver(); + +} +void DebuggerManager::slotDebugStepInto() +{ + if(!m_client) + return; + + m_client->stepInto(); + +} +void DebuggerManager::slotDebugPause() +{ + if(!m_client) + return; + + m_client->pause(); + +} +void DebuggerManager::slotDebugKill() +{ + if(!m_client) + return; + + m_client->kill(); + +} +void DebuggerManager::slotDebugStepOut() +{ + if(!m_client) + return; + + m_client->stepOut(); + +} + +void DebuggerManager::slotProfilerOpen( ) +{ + if(!m_client) + return; + + m_client->profilerOpen(); +} + +// A new file was opened, tell the debugger so it can tell us about breakpoints etc +void DebuggerManager::fileOpened(const QString& file) +{ + + // Set breakpoint markers if we have a bp in the file + m_breakpointList->rewind(); + DebuggerBreakpoint* bp; + while((bp = m_breakpointList->next())) + { + if(bp->filePath() == file) + { + setMark(bp->filePath(), bp->line(), true, KTextEditor::MarkInterface::markType02); + } + } + + //lets keep the eye on toggling bp's through the editor margin + QuantaView *view = ViewManager::ref()->isOpened(KURL::fromPathOrURL(file)); + if (view) + { + ::Document* qdoc = view->document(); + if(qdoc) + { + connectBreakpointSignals(qdoc); + } + } + + // Also, if we have a debug-session, let the debugger know... + if(m_client) + m_client->fileOpened(file); +} + +// Check with editors if breakpoints changed and send all breakpoint (again) to client +void DebuggerManager::refreshBreakpoints() +{ + // Resend bps + m_breakpointList->rewind(); + DebuggerBreakpoint* bp; + while((bp = m_breakpointList->next())) + { + m_client->addBreakpoint(bp); + } + +} + + +// The debug server told us we have a breakpoint, mark it in the file +void DebuggerManager::haveBreakpoint (const QString& file, int line) +{ + setMark(file, line, true, KTextEditor::MarkInterface::markType02); +} + +// The debug server told us we DONT have a breakpoint, remove it +void DebuggerManager::havenoBreakpoint (const QString& file, int line) +{ + DebuggerBreakpoint* br = new DebuggerBreakpoint(file, line); + m_breakpointList->remove(br); + setMark(file, line, false, KTextEditor::MarkInterface::markType02); + m_breakpointList->remove(br); +} + +// New current line +bool DebuggerManager::setActiveLine (const QString& file, int line ) +{ + //Get local filename + QString filename = file; + + // Remove old active line mark + setMark(m_currentFile, m_currentLine, false, KTextEditor::MarkInterface::markType05); + + // Update vars with active line + m_currentFile = filename; + m_currentLine = line; + + // No new current position + if(filename.isEmpty() || quantaApp->previewVisible()) + return true; + + // Find new position in editor + if(ViewManager::ref()->isOpened(filename) || QExtFileInfo::exists(filename, true, 0L)) + quantaApp->gotoFileAndLine(filename, line, 0); + else + { + showStatus(i18n("Unable to open file %1, check your basedirs and mappings.").arg(filename), true); + } + + // Add new active line mark + setMark(filename, line, true, KTextEditor::MarkInterface::markType05); + return true; +} + +// Set/clear a mark in a document +void DebuggerManager::setMark(const QString& filename, long line, bool set, int mark) +{ + if((!filename.isEmpty()) && ViewManager::ref()->isOpened(filename)) + { + ::Document* qdoc = ViewManager::ref()->isOpened(filename)->document(); + if(qdoc) + { + disconnectBreakpointSignals(qdoc); + + KTextEditor::Document* doc = qdoc->doc(); + if(doc) + { + KTextEditor::MarkInterface *markIf = dynamic_cast(doc); + if(markIf) + { + if(set) + markIf->addMark(line, mark); + else + markIf->removeMark(line, mark); + } + } + connectBreakpointSignals(qdoc); + } + } +} + +void DebuggerManager::connectBreakpointSignals(Document* qdoc) +{ + connect(qdoc, SIGNAL(breakpointMarked(Document*, int)), + this, SLOT(slotBreakpointMarked(Document*, int))); + + connect(qdoc, SIGNAL(breakpointUnmarked(Document*, int)), + this, SLOT(slotBreakpointUnmarked(Document*, int))); +} + +void DebuggerManager::disconnectBreakpointSignals(Document* qdoc) +{ + disconnect(qdoc, SIGNAL(breakpointMarked(Document*, int)), + this, SLOT(slotBreakpointMarked(Document*, int))); + + disconnect(qdoc, SIGNAL(breakpointUnmarked(Document*, int)), + this, SLOT(slotBreakpointUnmarked(Document*, int))); +} + +// Show a status message and optionally put it on the log +bool DebuggerManager::showStatus(const QString& a_message, bool log) +{ + QString message = a_message; + quantaApp->slotStatusMsg(m_client->getName() + ": " + message); + + if(log) + { + if(!message.endsWith("\n")) + message.append("\n"); + quantaApp->messageOutput()->showMessage(m_client->getName() + ": " + message); + } + return true; +} + + +void DebuggerManager::toggleBreakpoint () +{ + Document *w = ViewManager::ref()->activeDocument(); + if (w) + { + uint line, col; + w->viewCursorIf->cursorPositionReal(&line, &col); + + DebuggerBreakpoint* br = m_breakpointList->retrieve(w->url().prettyURL(0, KURL::StripFileProtocol), line); + + if(!br) + { + DebuggerBreakpoint* br = new DebuggerBreakpoint(w->url().prettyURL(0, KURL::StripFileProtocol), line); + m_breakpointList->add(br); +// setMark(w->url().prettyURL(0, KURL::StripFileProtocol), br->line(), true, KTextEditor::MarkInterface::markType02); // FIXME Is this really needed? + if(m_client && m_client->isActive()) + { + DebuggerBreakpoint tmpbp = *br; + m_client->addBreakpoint(br); + + } + else + // Trigger pathmapper to make sure we have a valid translation... + m_pathmapper->mapLocalPathToServer(w->url().prettyURL(0, KURL::StripFileProtocol)); + } + else + { + m_breakpointList->remove(br); +// setMark(w->url().prettyURL(0, KURL::StripFileProtocol), br->line(), false, KTextEditor::MarkInterface::markType02); // FIXME Is this really needed? + + if(m_client && m_client->isActive()) + { + m_client->removeBreakpoint(br); + } + } + } +} +void DebuggerManager::clearBreakpoints () +{ + m_breakpointList->clear(); +} + +void DebuggerManager::slotBreakpointMarked(Document* qdoc, int line) +{ + DebuggerBreakpoint* br = new DebuggerBreakpoint(qdoc->url().prettyURL(0, KURL::StripFileProtocol), line); + + m_breakpointList->add(br); + if(m_client && m_client->isActive()) + { + m_client->addBreakpoint(br); + } +} + +void DebuggerManager::slotBreakpointUnmarked(Document* qdoc, int line) +{ + QString filePath = qdoc->url().prettyURL(0, KURL::StripFileProtocol); + + DebuggerBreakpoint* br = m_breakpointList->retrieve(filePath, line); + + if (br) + { + if(m_client && m_client->isActive()) + { + m_client->removeBreakpoint(br); + } + + m_breakpointList->remove(br); + } +} + +void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +{ + m_breakpointList->updateBreakpointKey(bp, newkey); + + // Update UI + m_debuggerui->deleteBreakpoint(bp); + DebuggerBreakpoint bpnew(bp); + bpnew.setKey(newkey); + m_debuggerui->showBreakpoint(bpnew); + +} + +DebuggerBreakpoint * DebuggerManager::findDebuggerBreakpoint( const QString & key ) +{ + return m_breakpointList->findDebuggerBreakpoint(key); +} + +void DebuggerManager::saveProperties( ) +{ + + if (m_client) + { + QDomDocument *dom = Project::ref()->sessionDom(); + QDomNode projectNode = dom->firstChild().firstChild(); + QDomNode nodeDbg = projectNode.namedItem("debuggers"); + if(nodeDbg.isNull()) + { + nodeDbg = dom->createElement("debuggers"); + projectNode.appendChild(nodeDbg); + } + + // Save breakpoints + if(Project::ref()->debuggerPersistentBreakpoints()) + { + // (Re)create breakpoints section + QDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); + if(!nodeBreakpoints.isNull()) + nodeBreakpoints.parentNode().removeChild(nodeBreakpoints); + + if(m_breakpointList->count() > 0) + { + nodeBreakpoints = dom->createElement("breakpoints"); + nodeDbg.appendChild(nodeBreakpoints); + + + // Loop breakpoints and save 'em + m_breakpointList->rewind(); + DebuggerBreakpoint* bp; + while((bp = m_breakpointList->next())) + { + QDomElement child = dom->createElement("breakpoint"); + child.setAttribute("filepath", bp->filePath()); + child.setAttribute("class", bp->inClass()); + child.setAttribute("function", bp->inFunction()); + child.setAttribute("condition", bp->condition()); + child.setAttribute("line", QString::number(bp->line())); + if(bp->type() == DebuggerBreakpoint::ConditionalTrue) + child.setAttribute("type", "true"); + else if(bp->type() == DebuggerBreakpoint::ConditionalChange) + child.setAttribute("type", "change"); + else + child.setAttribute("type", "line"); + + nodeBreakpoints.appendChild(child); + } + } + } + + // Save Watches + if(Project::ref()->debuggerPersistentWatches()) + { + // (Re)create watches section + QDomNode nodeWatches = nodeDbg.namedItem("watches"); + if(!nodeWatches.isNull()) + nodeWatches.parentNode().removeChild(nodeWatches); + + if(m_debuggerui->watches()->first()) + { + nodeWatches = dom->createElement("watches"); + nodeDbg.appendChild(nodeWatches); + + // Loop watches and save 'em + for( DebuggerVariable *v = m_debuggerui->watches()->first(); v; v = m_debuggerui->watches()->next()) + { + QDomElement child = dom->createElement("watch"); + child.setAttribute("name", v->name()); + + nodeWatches.appendChild(child); + } + } + } + } +} + +void DebuggerManager::slotHandleEvent( const QString & event, const QString &, const QString & ) +{ + if(event == "before_project_close") + saveProperties(); +} + + + + +#include "debuggermanager.moc" diff --git a/quanta/components/debugger/debuggermanager.h b/quanta/components/debugger/debuggermanager.h new file mode 100644 index 00000000..f7584bdf --- /dev/null +++ b/quanta/components/debugger/debuggermanager.h @@ -0,0 +1,128 @@ +/*************************************************************************** + phpdebuggerinterface.h + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + Based on work by Mathieu Kooiman + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PHPDEBUGGERINTERFACE_H +#define PHPDEBUGGERINTERFACE_H + +#include +#include + +class DebuggerClient; +class QuantaDebuggerInterface; +class DebuggerBreakpointList; +class DebuggerUI; +class DebuggerVariable; +class DebuggerBreakpoint; +class PathMapper; +class Document; + +class DebuggerManager : public QObject +{ + Q_OBJECT + private: + // client + DebuggerClient *m_client; + QuantaDebuggerInterface * m_interface; + DebuggerBreakpointList *m_breakpointList; + DebuggerUI * m_debuggerui; + PathMapper * m_pathmapper; + + // Internal help functions + void initActions(); + void initClientActions(); + void saveProperties(); + + void connectBreakpointSignals(Document*); + void disconnectBreakpointSignals(Document*); + + QString m_currentFile; + long m_currentLine; + + public: + DebuggerManager(QObject *myparent); + ~DebuggerManager(); + + // Access to memebers + DebuggerUI * UI() { return m_debuggerui; }; + DebuggerClient * client() { return m_client; }; + PathMapper * Mapper() { return m_pathmapper; }; + + // Breakpoints + void haveBreakpoint (const QString& file, int line); + void havenoBreakpoint (const QString& file, int line); + void refreshBreakpoints(); +// DebuggerBreakpoint *newDebuggerBreakpoint(); + DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + + // Public help functions + bool showStatus(const QString& message, bool log); + bool setActiveLine (const QString& file, int line); + void setMark(const QString& filename, long line, bool set, int mark); + + void enableAction(const QString& action, bool enable); + void fileOpened(const QString& file); + + bool hasClient() { return m_client != 0; }; + + public slots: + + // Execution control slots + void slotDebugRequest(); + void slotDebugRun(); + void slotDebugTrace(); + void slotDebugSkip(); + void slotDebugStepOver(); + void slotDebugStepInto(); + void slotDebugStepOut(); + void slotDebugPause(); + void slotDebugKill(); + + // Breakpoint + void toggleBreakpoint(); + void clearBreakpoints(); + void slotConditionalBreakpoint(); + void slotRemoveBreakpoint(DebuggerBreakpoint* bp); + + // Watches + void slotAddWatch(); + void slotRemoveVariable(DebuggerVariable* var); + void slotVariableSet(); + + // Connection related slots + void slotDebugStartSession(); + void slotDebugEndSession(); + + // Profiler + void slotProfilerOpen(); + + // Initiation + void slotNewProjectLoaded(const QString &, const KURL &, const KURL &); + + // Event handling + void slotHandleEvent(const QString &, const QString &, const QString &); + + private slots: + void slotBreakpointMarked(Document*, int); + void slotBreakpointUnmarked(Document*, int); + + signals: + void hideSplash(); +}; + +#endif + diff --git a/quanta/components/debugger/debuggerui.cpp b/quanta/components/debugger/debuggerui.cpp new file mode 100644 index 00000000..c290bd8a --- /dev/null +++ b/quanta/components/debugger/debuggerui.cpp @@ -0,0 +1,205 @@ +/*************************************************************************** + debuggerui.cpp + ------------------------ + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "debuggerui.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "variableslistview.h" +#include "debuggerbreakpointview.h" +#include "backtracelistview.h" +#include "debuggervariable.h" + +#include "quantacommon.h" +#include "quanta.h" +#include "resource.h" +#include "whtmlpart.h" + +DebuggerUI::DebuggerUI(QObject *parent, const char *name) + : QObject(parent, name), m_variablesListView(0) +{ + + // Variable watch tree + m_variablesListView = new VariablesListView(quantaApp->getMainDockWidget(), "debuggerVariables"); + m_variablesListView->setIcon(SmallIcon("math_brace")); + m_variablesListView->setCaption(i18n("Variables")); + m_variableListViewTVA = quantaApp->addToolWindow(m_variablesListView, quantaApp->prevDockPosition(m_variablesListView, KDockWidget::DockLeft), quantaApp->getMainDockWidget()); + + // Breakpointlist + m_debuggerBreakpointView = new DebuggerBreakpointView(quantaApp->getMainDockWidget(), "debuggerBreakpoints"); + m_debuggerBreakpointView->setIcon(SmallIcon("debug_breakpoint")); + m_debuggerBreakpointView->setCaption(i18n("Breakpoints")); + m_debuggerBreakpointViewTVA = quantaApp->addToolWindow(m_debuggerBreakpointView, quantaApp->prevDockPosition(m_debuggerBreakpointView, KDockWidget::DockBottom), quantaApp->getMainDockWidget()); + + // Backtrace + m_backtraceListview = new BacktraceListview(quantaApp->getMainDockWidget(), "debuggerBacktrace"); + m_backtraceListview->setIcon(SmallIcon("player_playlist")); + m_backtraceListview->setCaption(i18n("Backtrace")); + m_backtraceListviewTVA = quantaApp->addToolWindow(m_backtraceListview, quantaApp->prevDockPosition(m_backtraceListview, KDockWidget::DockBottom), quantaApp->getMainDockWidget()); + + // Debug HTML preview + m_preview = new WHTMLPart(quantaApp, "debug_output", true); + //m_preview->view()->resize(0, 0); + m_preview->view()->setIcon(UserIcon("debug_run")); + m_preview->view()->setCaption(i18n("Debug Output")); + m_previewTVA = quantaApp->addToolWindow(m_preview->view(), quantaApp->prevDockPosition(m_preview->view(), KDockWidget::DockBottom), quantaApp->getMainDockWidget()); + connect(m_preview, SIGNAL(openFile(const KURL&, const QString&, bool)), quantaApp, SLOT(slotFileOpen(const KURL&, const QString&, bool))); + + // Show debugger toolbar + quantaApp->toolBar("debugger_toolbar")->show(); + + connect(m_variablesListView, SIGNAL(removeVariable(DebuggerVariable* )), parent, SLOT(slotRemoveVariable(DebuggerVariable* ))); + + connect(m_debuggerBreakpointView, SIGNAL(removeBreakpoint(DebuggerBreakpoint* )), parent, SLOT(slotRemoveBreakpoint(DebuggerBreakpoint* ))); + showMenu(); +} + +DebuggerUI::~DebuggerUI() +{ + hideMenu(); + quantaApp->toolBar("debugger_toolbar")->hide(); + + // Remove Variable tree + quantaApp->deleteToolWindow(m_variableListViewTVA); + m_variableListViewTVA = 0L; + + // Remove breakpointlist + quantaApp->deleteToolWindow(m_debuggerBreakpointViewTVA); + m_debuggerBreakpointViewTVA = 0L; + + // Remove backtrace + quantaApp->deleteToolWindow(m_backtraceListviewTVA); + m_backtraceListviewTVA = 0L; + + // Remove output + quantaApp->deleteToolWindow(m_previewTVA); + m_previewTVA = 0L; +} + +void DebuggerUI::showMenu() +{ + QPopupMenu* debuggerMenu = (QPopupMenu*)(quantaApp->guiFactory())->container("debugger_menu", quantaApp); + if(debuggerMenu) + { + KMenuBar *mb = quantaApp->menuBar(); + mb->activateItemAt(-1); //needed as insertItem might crash if a menu is activated + m_debuggerMenuID = mb->insertItem(i18n("Deb&ug"), debuggerMenu, -1, 5); + } + else + m_debuggerMenuID = 0; + + // Status indicator + quantaApp->statusBar()->insertFixedItem(i18n("Debugger Inactive"), IDS_STATUS_DEBUGGER); + +} + +void DebuggerUI::hideMenu() +{ + if(m_debuggerMenuID != 0) + { + KMenuBar *mb = quantaApp->menuBar(); + mb->activateItemAt(-1); //needed as removeItem might crash if a menu is activated + mb->removeItem(m_debuggerMenuID); + } + m_debuggerMenuID = 0; + + // Status indicator + quantaApp->statusBar()->removeItem(IDS_STATUS_DEBUGGER); + +} + +void DebuggerUI::addVariable(DebuggerVariable* var) +{ + m_variablesListView->addVariable(var); +} + +void DebuggerUI::showBreakpoint(const DebuggerBreakpoint &bp) +{ + m_debuggerBreakpointView->showBreakpoint(bp); +} +void DebuggerUI::deleteBreakpoint(const DebuggerBreakpoint &bp) +{ + m_debuggerBreakpointView->deleteBreakpoint(bp); +} + +void DebuggerUI::sendRequest(const KURL &url) +{ + m_preview->openURL(url); +} + +void DebuggerUI::slotStatus( DebuggerStatus status ) +{ + switch(status) + { + case NoSession: + quantaApp->statusBar()->changeItem(i18n("No session"), IDS_STATUS_DEBUGGER); + break; + + case AwaitingConnection: + quantaApp->statusBar()->changeItem(i18n("Waiting"), IDS_STATUS_DEBUGGER); + break; + + case Connected: + quantaApp->statusBar()->changeItem(i18n("Connected"), IDS_STATUS_DEBUGGER); + break; + + case Paused: + quantaApp->statusBar()->changeItem(i18n("Paused"), IDS_STATUS_DEBUGGER); + break; + + case Running: + quantaApp->statusBar()->changeItem(i18n("Running"), IDS_STATUS_DEBUGGER); + break; + + case Tracing: + quantaApp->statusBar()->changeItem(i18n("Tracing"), IDS_STATUS_DEBUGGER); + break; + + case HaltedOnError: + quantaApp->statusBar()->changeItem(i18n("On error"), IDS_STATUS_DEBUGGER); + break; + + case HaltedOnBreakpoint: + quantaApp->statusBar()->changeItem(i18n("On breakpoint"), IDS_STATUS_DEBUGGER); + break; + + default: + quantaApp->statusBar()->changeItem("", IDS_STATUS_DEBUGGER); + } +} + +void DebuggerUI::backtraceClear( ) +{ + if(m_backtraceListview) + m_backtraceListview->clear(); +} + +void DebuggerUI::backtraceShow( long level, BacktraceType type, const QString & filename, long line, const QString & func ) +{ + if(m_backtraceListview) + m_backtraceListview->backtraceShow(level, type, filename, line, func); +} + + +#include "debuggerui.moc" diff --git a/quanta/components/debugger/debuggerui.h b/quanta/components/debugger/debuggerui.h new file mode 100644 index 00000000..a86e4706 --- /dev/null +++ b/quanta/components/debugger/debuggerui.h @@ -0,0 +1,90 @@ +/*************************************************************************** + debuggerui.h + ------------------------ + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef DEBUGGERUI_H +#define DEBUGGERUI_H + +#include +#include +#include +#include "backtracelistview.h" + +class VariablesListView; +class DebuggerBreakpointView; +class BacktraceListview; +class DebuggerBreakpoint; +class DebuggerVariable; +class WHTMLPart; +class KURL; + +class DebuggerUI : public QObject +{ + Q_OBJECT + + public: + enum DebuggerStatus + { + NoSession = 0, + AwaitingConnection, + Connected, + Paused, + Running, + Tracing, + HaltedOnError, + HaltedOnBreakpoint + }; + + DebuggerUI(QObject *parent = 0, const char *name = 0); + ~DebuggerUI(); + + // Watches + void addVariable(DebuggerVariable* var); + void showBreakpoint(const DebuggerBreakpoint& bp); + void deleteBreakpoint(const DebuggerBreakpoint& bp); + void parsePHPVariables(const QString &); + void sendRequest(const KURL &url); + VariablesListView* watches() { return m_variablesListView; }; + + void showMenu(); + void hideMenu(); + + void backtraceClear(); + void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func); + + private: + VariablesListView* m_variablesListView; + KMdiToolViewAccessor* m_variableListViewTVA; + KMdiToolViewAccessor* m_previewTVA; + + DebuggerBreakpointView* m_debuggerBreakpointView; + KMdiToolViewAccessor* m_debuggerBreakpointViewTVA; + + BacktraceListview* m_backtraceListview; + KMdiToolViewAccessor* m_backtraceListviewTVA; + + int m_debuggerMenuID; + + WHTMLPart *m_preview; + + public slots: + // Status indication + void slotStatus(DebuggerUI::DebuggerStatus status); + +}; + +#endif diff --git a/quanta/components/debugger/debuggervariable.cpp b/quanta/components/debugger/debuggervariable.cpp new file mode 100644 index 00000000..b6a4f76a --- /dev/null +++ b/quanta/components/debugger/debuggervariable.cpp @@ -0,0 +1,283 @@ +/*************************************************************************** + debuggervariable.cpp + ------------------------ + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "debuggervariable.h" +#include +#include + +DebuggerVariable::DebuggerVariable() + : m_isReference(false) + , m_size(0) + , m_type(DebuggerVariableTypes::Undefined) + , m_item(NULL) +{} + +DebuggerVariable::DebuggerVariable(const QString& name) + : m_isReference(false) + , m_size(0) + , m_type(DebuggerVariableTypes::Undefined) + , m_item(NULL) +{ + m_name = name; +} + +DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, int type) + : m_isReference(false) + , m_size(0) + , m_item(NULL) +{ + m_name = name; + m_value = value; + m_type = type; + if(type == DebuggerVariableTypes::String) + m_size = value.length(); +} + +DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, int type, int size) + : m_isReference(false) + , m_item(NULL) +{ + m_name = name; + m_value = value; + m_type = type; + m_size = size; +} + +DebuggerVariable::DebuggerVariable(const QString& name, const ValueList_t& values, int type) + : m_isReference(false) + , m_item(NULL) +{ + m_name = name; + m_valueList = values; + m_type = type; + m_size = values.count(); +} + +DebuggerVariable::DebuggerVariable(DebuggerVariable* v, bool copyitem ) +{ + m_name = v->name(); + m_size = v->size(); + m_value = v->value(); + m_type = v->type(); + m_isReference = v->isReference(); + if(copyitem) + { + m_item = v->item(); + v->setItem(NULL); + } + else + m_item = NULL; + + // We cant just assign m_valuelist to v->values(), it would make a shallow copy... + for(DebuggerVariable * v2 = v->values().first(); v2; v2 = v->values().next()) + m_valueList.append(new DebuggerVariable(v2, copyitem)); +} + + +void DebuggerVariable::setName(const QString& name) +{ + m_name = name; +} +QString DebuggerVariable::name() const +{ + return m_name; +} +void DebuggerVariable::setValue(const QString& value) +{ + m_value = value; +} + +QString DebuggerVariable::value() const +{ + if(isScalar()) + return m_value; + else + return i18n("Non scalar value"); +} + +bool DebuggerVariable::isScalar() const +{ + switch(m_type) + { + case DebuggerVariableTypes::Reference: + case DebuggerVariableTypes::Resource: + case DebuggerVariableTypes::String: + case DebuggerVariableTypes::Integer: + case DebuggerVariableTypes::Float: + case DebuggerVariableTypes::Boolean: + case DebuggerVariableTypes::Undefined: + case DebuggerVariableTypes::Error: + return true; + } + return false; +} + +void DebuggerVariable::setValues(const ValueList_t& valueList) +{ + m_valueList = valueList; +} + +ValueList_t DebuggerVariable::values() const +{ + return m_valueList; +} + +void DebuggerVariable::setType(int type) +{ + m_type = type; +} + +int DebuggerVariable::type() const +{ + return m_type; +} + +const QString DebuggerVariable::typeName() const +{ + switch(m_type) + { + case DebuggerVariableTypes::Array: + return i18n("Array"); + case DebuggerVariableTypes::Object: + return i18n("Object"); + case DebuggerVariableTypes::Reference: + return i18n("Reference"); + case DebuggerVariableTypes::Resource: + return i18n("Resource"); + case DebuggerVariableTypes::String: + return i18n("String"); + case DebuggerVariableTypes::Integer: + return i18n("Integer"); + case DebuggerVariableTypes::Float: + return i18n("Float"); + case DebuggerVariableTypes::Boolean: + return i18n("Boolean"); + case DebuggerVariableTypes::Undefined: + return i18n("Undefined"); + case DebuggerVariableTypes::Error: + return i18n("Error"); + default: + return i18n("Unknown"); + } +} + + +void DebuggerVariable::setSize(long size) +{ + m_size = size; +} + +long DebuggerVariable::size() const +{ + return m_size; +} + +QString DebuggerVariable::sizeName() const +{ + switch(m_type) + { + case DebuggerVariableTypes::Reference: + case DebuggerVariableTypes::Resource: + case DebuggerVariableTypes::Integer: + case DebuggerVariableTypes::Float: + case DebuggerVariableTypes::Boolean: + case DebuggerVariableTypes::Undefined: + case DebuggerVariableTypes::Error: + return ""; + } + return QString::number(m_size); +} + +void DebuggerVariable::setReference(bool ref) +{ + m_isReference = ref; +} +bool DebuggerVariable::isReference() const +{ + return m_isReference; +} + + +DebuggerVariable::~DebuggerVariable() +{ + DebuggerVariable * v; + while((v = m_valueList.first())) + { + m_valueList.remove(v); + delete v; + } + // If this variable is shown in the treeview, remove it + if(m_item) + delete m_item; + +} + + +void DebuggerVariable::deleteChild( DebuggerVariable * child ) +{ + + for(DebuggerVariable *v = m_valueList.first(); v; v = m_valueList.next()) + { + if(v->name() == child->name()) + { + m_valueList.remove(v); + delete v; + return; + } + } +} + +DebuggerVariable* DebuggerVariable::findItem( QListViewItem * item, bool traverse ) +{ + if(item == m_item) + return this; + + if(!traverse) + return NULL; + + for(DebuggerVariable * v = m_valueList.first(); v; v = m_valueList.next()) + { + DebuggerVariable * v2 = v->findItem(item, true); + if(v2) + return v2; + } + return NULL; +} + +void DebuggerVariable::copy( DebuggerVariable * v, bool copychildren ) +{ + m_name = v->name(); + m_size = (v->isScalar() || copychildren ? v->size() : m_valueList.count()); + m_value = v->value(); + m_type = v->type(); + m_isReference = v->isReference(); + + // We cant just assign m_valuelist to v->values(), it would make a shallow copy... +// + if(copychildren) + { + m_valueList.clear(); + for(DebuggerVariable * v2 = v->values().first(); v2; v2 = v->values().next()) + m_valueList.append(new DebuggerVariable(v2, true)); + } +} + +void DebuggerVariable::append( DebuggerVariable * v ) +{ + m_valueList.append(v); +} + diff --git a/quanta/components/debugger/debuggervariable.h b/quanta/components/debugger/debuggervariable.h new file mode 100644 index 00000000..3c83de4b --- /dev/null +++ b/quanta/components/debugger/debuggervariable.h @@ -0,0 +1,103 @@ +/*************************************************************************** + debuggervariable.h + ------------------------ + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef DEBUGGERVARIABLE_H +#define DEBUGGERVARIABLE_H + +#include +#include +#include + +namespace DebuggerVariableTypes +{ + + enum VarType { + Object, + Resource, + Reference, + Array, + String, + Integer, + Float, + Boolean, + Error, + Undefined + }; +} + +class DebuggerVariable; +typedef QPtrList ValueList_t; + +class DebuggerVariable +{ + public: + DebuggerVariable(); + DebuggerVariable(DebuggerVariable* var, bool copyitem = false); + DebuggerVariable(const QString& name); + DebuggerVariable(const QString& name, const QString& value, int type); + DebuggerVariable(const QString& name, const QString& value, int type, int size); + DebuggerVariable(const QString& name, const ValueList_t& values, int type); + virtual ~DebuggerVariable(); + + DebuggerVariable* findItem(QListViewItem *item, bool traverse = false); + + virtual void setName(const QString& name); + virtual QString name() const; + + virtual void setValue(const QString& value); + virtual QString value() const; + + virtual void setValues(const ValueList_t& valueList); + virtual ValueList_t values() const; + + virtual void setType(int type); + virtual int type() const; + virtual const QString typeName() const ; + virtual bool isScalar() const; + + virtual void setSize(long size); + virtual long size() const; + virtual QString sizeName() const; + + virtual void setReference(bool ref); + virtual bool isReference() const; + + virtual void touch() { m_touched = true;}; + virtual bool touched() const { return m_touched;}; + + virtual void setItem(KListViewItem* item) { m_item = item;}; + virtual KListViewItem* item() const{ return m_item;}; + + virtual void copy(DebuggerVariable* v, bool copychldren = true); + virtual void append(DebuggerVariable* v); + virtual void deleteChild(DebuggerVariable *child); + + + private: + ValueList_t m_valueList; + + QString m_name; + QString m_value; + bool m_isReference; + long m_size; + int m_type; + long m_touched; + + KListViewItem* m_item; +}; +#endif diff --git a/quanta/components/debugger/debuggervariablesets.ui b/quanta/components/debugger/debuggervariablesets.ui new file mode 100644 index 00000000..70440ff4 --- /dev/null +++ b/quanta/components/debugger/debuggervariablesets.ui @@ -0,0 +1,185 @@ + +DebuggerVariableSetS + + + DebuggerVariableSetS + + + + 0 + 0 + 414 + 129 + + + + Set Value of Variable + + + true + + + + unnamed + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + + + + true + + + true + + + + + buttonCancel + + + &Cancel + + + + + + true + + + + + + + lineVariable + + + + + + + + lblVariable + + + + 5 + 5 + 0 + 0 + + + + Variable: + + + + + lblValue + + + + 5 + 5 + 0 + 0 + + + + New value: + + + AlignTop + + + + + spacer8 + + + Vertical + + + Expanding + + + + 30 + 20 + + + + + + lineValue + + + + 7 + 7 + 0 + 0 + + + + + + + + buttonOk + clicked() + DebuggerVariableSetS + accept() + + + buttonCancel + clicked() + DebuggerVariableSetS + reject() + + + + lineVariable + lineValue + buttonOk + buttonCancel + + + diff --git a/quanta/components/debugger/gubed/Makefile.am b/quanta/components/debugger/gubed/Makefile.am new file mode 100644 index 00000000..755a7409 --- /dev/null +++ b/quanta/components/debugger/gubed/Makefile.am @@ -0,0 +1,18 @@ +METASOURCES = AUTO + +kde_module_LTLIBRARIES = quantadebuggergubed.la + +quantadebuggergubed_la_SOURCES = gubedsettingss.ui quantadebuggergubed.cpp gubedsettings.cpp +quantadebuggergubed_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) +quantadebuggergubed_la_LIBADD = ../interfaces/libdebuggerinterface.la $(LIB_KPARTS) +kde_services_DATA = quantadebuggergubed.desktop + +INCLUDES = -I$(top_srcdir)/quanta/components/debugger \ + -I$(top_srcdir)/quanta/components/debugger/interfaces \ + -I$(top_srcdir)/quanta/components/debugger/gubed \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/quanta/utility \ + $(all_includes) + + +noinst_HEADERS = gubedsettings.h diff --git a/quanta/components/debugger/gubed/gubedsettings.cpp b/quanta/components/debugger/gubed/gubedsettings.cpp new file mode 100644 index 00000000..f728d884 --- /dev/null +++ b/quanta/components/debugger/gubed/gubedsettings.cpp @@ -0,0 +1,41 @@ +/*************************************************************************** + gubedsettings.cpp + ------------------- + begin : 2004-04-05 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include "qlineedit.h" +#include "gubedsettings.h" +#include + +GubedSettings::GubedSettings(const QString &protocolversion) + : GubedSettingsS(0, "GubedSettings", false, 0) +{ + textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); +} + +GubedSettings::~GubedSettings() +{ +} + +void GubedSettings::slotUseProxyToggle( bool useproxy) +{ + lineServerHost->setEnabled(useproxy); + lineServerPort->setEnabled(useproxy); + lineServerListenPort->setEnabled(!useproxy); +} + + +#include "gubedsettings.moc" + diff --git a/quanta/components/debugger/gubed/gubedsettings.h b/quanta/components/debugger/gubed/gubedsettings.h new file mode 100644 index 00000000..dc070f32 --- /dev/null +++ b/quanta/components/debugger/gubed/gubedsettings.h @@ -0,0 +1,36 @@ +/*************************************************************************** + gubedsettings.h + ------------------- + begin : 2004-04-05 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef GUBEDSETTINGS_H +#define GUBEDSETTINGS_H + +#include "gubedsettingss.h" + +class GubedSettings : public GubedSettingsS +{ + Q_OBJECT + + public slots: + virtual void slotUseProxyToggle( bool useproxy); + + public: + GubedSettings(const QString &protocolversion); + ~GubedSettings(); + +}; + +#endif + diff --git a/quanta/components/debugger/gubed/gubedsettingss.ui b/quanta/components/debugger/gubed/gubedsettingss.ui new file mode 100644 index 00000000..12125c93 --- /dev/null +++ b/quanta/components/debugger/gubed/gubedsettingss.ui @@ -0,0 +1,762 @@ + +GubedSettingsS + + + GubedSettingsS + + + + 0 + 0 + 659 + 527 + + + + Gubed Settings + + + true + + + + unnamed + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + + + + true + + + true + + + + + buttonCancel + + + Ca&ncel + + + true + + + + + + + tabWidget2 + + + + 5 + 5 + 1 + 1 + + + + + tab + + + &General + + + + unnamed + + + + spacer4 + + + Vertical + + + Expanding + + + + 21 + 40 + + + + + + groupBox1 + + + Directory Mapping + + + + unnamed + + + + lblDebuggerServerBasedir + + + + 5 + 5 + 0 + 0 + + + + Server basedir: + + + + + lblDebuggerLocalBasedir + + + + 5 + 5 + 0 + 0 + + + + Local basedir: + + + + + lineServerBasedir + + + + + lineLocalBasedir + + + + + + + + + + groupBox2 + + + Connection Settings + + + + unnamed + + + + lineServerListenPort + + + + 5 + 0 + 0 + 0 + + + + + + lineServerPort + + + false + + + + 5 + 0 + 0 + 0 + + + + + + lineServerHost + + + false + + + + + checkUseProxy + + + + + + + + lblDebuggerUseProxe + + + + 5 + 5 + 0 + 0 + + + + Use proxy + + + + + lblDebuggerServerHost + + + + 5 + 5 + 0 + 0 + + + + Proxy host: + + + + + lblDebuggerServerPort + + + + 5 + 5 + 0 + 0 + + + + Proxy port: + + + + + lblDebuggerServerListenPort + + + + 5 + 5 + 0 + 0 + + + + Listen port: + + + + + + + groupBox3 + + + Mode + + + + unnamed + + + + lineStartSession + + + See "What's This?" for available variables + + + %afn - Filename of the current script +%afd - Absolute directory of the current script +%afp - Absolute path (directory + filename) of the current script + +%rfpd - Directory of the current script relative to project root +%rfpp - Path of the current script relative to project root + +%rfdd - Directory of the current script relative to document root +%rfdp - Path of the current script relative to document root + +%apd - Project root +%add - Document root of current script + + + + + optAddInclude + + + false + + + &Add include + + + + + optStartSession + + + Start session: + + + true + + + + + + + + + tab + + + Deb&ug Behavior + + + + unnamed + + + + groupBox4 + + + Error Handling + + + + unnamed + + + + checkBreakOnUserError + + + + 7 + 0 + 0 + 0 + + + + User errors + + + + + lblBreakOn + + + Break on: + + + AlignTop + + + + + checkBreakOnUserWarning + + + + 7 + 0 + 0 + 0 + + + + User warnings + + + + + checkBreakOnUserNotice + + + + 7 + 0 + 0 + 0 + + + + User notices + + + + + checkBreakOnNotice + + + + 7 + 0 + 0 + 0 + + + + Notices + + + + + checkBreakOnWarning + + + + 7 + 0 + 0 + 0 + + + + W&arnings + + + + + + + spacer4_3 + + + Vertical + + + Expanding + + + + 21 + 50 + + + + + + groupBox5 + + + Execution + + + + unnamed + + + + lblDelayFast + + + + 4 + 5 + 0 + 0 + + + + + 9 + + + + Fast + + + + + sliderDisplayDelay + + + + 0 + 27 + + + + 200 + + + Horizontal + + + Below + + + + + lblDelaySlow + + + + 4 + 5 + 0 + 0 + + + + + 9 + + + + Slow + + + AlignVCenter|AlignRight + + + + + + Pause + + + image0 + + + + + Trace + + + image1 + + + + + Run + + + image2 + + + + comboDefaultExecutionState + + + + + lblDefaultExecutionMode + + + Default mode: + + + AlignVCenter + + + + + lblDisplayDelay + + + Run speed: + + + AlignVCenter + + + + + + + + + TabPage + + + A&bout + + + + unnamed + + + + textLabel1 + + + + 5 + 4 + 0 + 0 + + + + <h4>Gubed PHP Debugger Plugin for Quanta +</h4> + + + + + pixmapLabel1 + + + + 0 + 0 + 0 + 0 + + + + image3 + + + false + + + AlignCenter + + + + + textAbout + + + true + + + <html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:Bitstream Vera Sans"> +<p><span style="font-weight:600">About</span></p> +<p>Gubed is a PHP debugger available for free through GPL. This plugin integrates Gubed with Quanta. </p> +<p>In order to use this plugin for PHP debugging, you need to get the Quanta package from the Gubed project page, <a href="http://sourceforge.net/projects/gubed">http://sourceforge.net/projects/gubed</a>, at SourceForge </p> +<p>For more info about Gubed, please visit the Gubed website at <a href="http://gubed.sf.net">http://gubed.sf.net</a> </p> +<p><span style="font-weight:600">Technical Details</span></p> +<p>This version of the debugger supports the %PROTOCOLVERSION% version of the Gubed protocol. </p> +</body></html> + + + + + + + + + + 89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000027f49444154388d7d93df4b53611cc69ff73de7ccb375dcdad46d2e3269036d21c4420a0b898484e82a08a2a02238a41741dd77e14dff4074d521efbae8a61b2f6a892062604e53117165e28f864dd73adb999e3cdb79cfe9c25a9c4dfa5e3e3ccfe7fdfee02538a412830b226075c3b662804d006b9567a5d4b4d2a7d77a494d5002c81370c20075797dc7fd157804139f77445846a14898fe9a67ead38f4aff661d2031b81006a1e3a16053c7ddcb3e5c3cc5c1ebe1000046c5c6a7af3a86c776b1b2bef3c3cdb2373ebcb83a5e052406e725103a9388473a1e5d13d1e8e60f9b0c1566e1655245727a3b2f19cb5d13c3b7bfff71da43a16073c7bd4b024667b56aa0b7cb0b009858fca75deff1622367357d59d58764597e481203332238317be74ad8d7798ca2ffacbf6a4eceaa00e0d0dea554ac6feb50deaabbc15f635d3c806e9728f9fc6e865cc172b49c2b9875633c1bf34033fca00db6a495a33d3c805840a2c8692638426a00953a40a9dc0000a0820842f9180f80941987cd3c0717ef04bc598ac02354f0b80642c8c1f6096cca03d66a51b791ce37d7bd06007a45a80b7304d8370db82c3d4379564a31a350a404a0f45086a3dc0283c83358fbea5e80a5e7e8b4d2a713a60f53238b36afe630c75b54c45b5487d6eed3408d2c04333712e437b608009c93937e2634a5cec79ba3019febbf1dfc2c9631b594cb448cd19b216e2d55ddda0579245a165adf9f89f94e76b649203517b16d1be9cd5dccafa8997065f241982c4f2a8aa2395cbdf75fb5eac289218fe7c8adf6904b3ada7870b242c9c07ab6bc67e8ea48c89c7a1ee2d6161545d1809adf0800b22cbbbe99a7231a17ed21948f11d894587a26c0d273417e630b405e5194f25fff6f6493fb9b9d8e82910000000049454e44ae426082 + + + 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000c949444154388ded93db0d83300c45af5137ea06190226610a260943d8137426f707a33c0c49a4f6a7ea91f261149f5c2207f873409dfb74d43301c006e8d66856557701408cb1ea9d3c0933b71266ccf35cc95df1284484655932f9b09888ce05a0ba965bf12b045cddf995a824139becc99cd5656211c9928b48fd67a5d4634df631b38610e848af2202ab5df19d7ced9ff736c56c6b3a82aa7a5bf74aadd79acf65b5e13d9416da432a7e8c9e60f35b9c5a7d1b16b7e6d7f8c893f6e84a1c63c4beefdfcaf0ebbc010507b65c1e0ebcf80000000049454e44ae426082 + + + 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000ac49444154388ded94c10dc33008453f5637ea061ec24cd2293289976083ce440f6d2262b012da5b95277188133f7f4560e0e2039dfc4eb39e621f164097894455c30280debbdb539c0180881c25dcd15a73f2509c8588c0cc3b795a4c445b0170bf65e596158f821969f19af4e8b02bf1f7e2b3890bf09eb8f145660223b63eb6a267ad00e209b47d6cfb39143f824be42e825aab5b4f27b6f2993483db2c223a4aa3db6b0633ff14e80f79015c6574466adcb13f0000000049454e44ae426082 + + + 89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000779494441545885b5566b6c54c715fe66ee6beededd8df7858dedc5181b87c501b2b20954e0d44a698df3a022a8addaa424229512f58168d52a951a5a4ad2a2d21f55da8aa6ed8f0ab595528ad434a452aa483c6a6a648bc486605b1830c602d65e83d7f6ee7dedde7ba73f1c6ffc0253851ce9fc9973bef9be3973667408e71cf7c39e6f6808d7aa6af2c1254bb6088a12bb383939f4565fdfdb1d0303dd77c389f783bca2a222f06a4dcdcf1f59ba744b2c1cae56348dfa54d53c75e5ca04804f57c02bab567dfe8fcb96fdf4b1d2d2cf4014411c07c8e711571435ca5862313cfd24e46b2391ea164d3bb891b1f5300cc0b2a6dcb6e127040151acf9d404fc301edffc7a34fab746e061d53044aeeb80ae835b16609a7800404010d6eddfbf9fdc7701d5d5d5be0d94ee7b08781886011806609a806d03f93ce03850008464397ce8d0a192fb2ae05b3535f17d9ef7c61724e9739a61487c62023c9b856b1828982690cf83e7f3a08e8387a251616c6c6ccdddf6fbbf9b30e179df7854559f22ba0e18060cd745976de3a4aea32049485a163657566289e761453008d7756b00fce7130b7876dd3aadceb6bffa4224b2376c9ac4721c9cb52cfcc034718173b8d389a914b49e1ebc9048e0f1ba3a445475755d5d9ddcdfdf9fff44021ee47ccbd668f4fb61cf23b02c9c721cbc66db38b7c047a63b0edee8e9c1bbd7afc3f5bcd2542aa50158500099fe09abaaaa986d5981e19191d19909cf3535b1e58ef3d88e48e4cd959406dc4c061de9349ebe7c19939e772fda6f88a2f862a150f8d742c162139aba1e7864d5aaaf555454046626c481af3cb17cf9c195a150804812061c07bf4ca7e7913f110a61776525d6068310c9ac9717f03cafec4eea8a15282b2bf3fd7af7ee5f8418db98ba79f3a8373969fa3cefd1e668f4e912d7257c7c1c855c0e3b4f9dc2dbc3c370a7719284ef9497e3bb555520aa0a5bd3d036398903bdbd18989c0493e561c375bf39323efe8f8504147ba0a5a5c5ba363232fcd4934f3664cbcaeadd4cc6f3150a3e55d70972394092f07e368b77d3e92239003c575e8ee7e371109f0f600c4c55b1251c46653c8ecba689db9c6b6f767545ef5481e2151c3e7cd83bd5dddd233246c2e1b01a0b87359fdf4f88a200aa8aebae8b83bdbd30dda97e9708c1b6a54bf1e3356b100e8741fc7e104d03340dc4e7c3ea8a0a6c5bbb161b57aef42f2929a9bd938059afe06c5fdf602e9f475014c1651928140045015c171f6432e81afdb83fab0301bc944840f0f9004a0159062409600c843178b28cace741515512d4b4ea7b121089c52e5e1a1e2e34545549b06d10d705cfe701cef1a70f3f442a972be67e3b9944d38a150021532e4920b20c5d149d6bba7ee92f1d1dbffd7b4f4f7b694949f5f0f8f81717bd02003872e48895b5ac61c8f2d4891405600c19cfc3e9c1c1625e5855b17df56ac88140b1f444d3005545c7c848fb5bfdfd7bcecbf2efaf8d8e76e735ed9d1b636357366cd8a02c5a81fafa7a7eb9aded82ab2871c1e7030070d7c5b18b1791b5ac2900a5f87a4303969495019cc32c1470cb30703d93c1c9c1c1ecabc78fbf03a01e40a320083200ce394f7677776f6c6a6a3addd6d6e6de51c0d48a3868791e3445013c0fa6aee3fc8d1bc57089cf87c6152bc05515574647f1873367d03b328281b131a47339e6baee5e00f2477b172b5c28148c73e7cef50348dd5580e1ba972c4a2d8d31064a713b9d465fea634c65248235757538d8de8ed7df7b0fb7757d265cfac8e719e7bcd1b6ed658b0ac864b3a39e24198431c601e89e875b1313c5786928047f2884df9d3c3997fcae4608494992746beefa3c01bae35cd33d6f027e7f988822263c0f59db2ec663b118fcb118a8380b5a007013408a103200a0c039df0960fa4fe684902ec7716cccb1790389c3792697cf67c118c0180a82006fc6cf2733063918c48bdbb7a32410e000fa28a5bf92657917636c672814da2d08c23f679003c030a5b40780b6a880f6f6f68c6e59d789aa82f8fd100301104128c65d4a612b0ad624127fddd6dc5cd3d9d959efbaeecbb66d1f374df3523e9f0fb9aefbd2ccea504aff0c20c5390fcde59b7705dddddd7a369b4d83524092e00f87a130568ca7c7c7f1dfdede2bff3e73e66713845c5bbf7efdac81c0308c6739e71b672cdd1404e1382124cf39f7cfe503e77c96b7b6b60a070e1cf89e61189ee7797c6868886fddba9503e000b8200819bfa6eddeb46993388d696969115455ada794be06c09bce05c029a53f8946a31a632c298ae297e6f2cd13c039c78e1d3b969d3871e2835c2ee7e57239be67cf1e3e63538710d24b29dd4b297d4610846728a53f22849c063039939c1072d5eff72febeaea0263ac5610845d73b9161cc98e1e3d3ad4dadadadadcdcfce5cd9b377f361e8fe7013c0ee0010002e73cc139dfbf1076da08211db22cbf9ccd66870080523ace399f3fa22f5481696f6c6c9492c96469229188504a7f03c09879c23b392164485194e6dada5a797aaff2f27246297da5b3b3932c7a050b793c1ef70b82b08b10d20720b700b10ee012a5745f2010a89a8bb76d1bc160b0f2c2850bb3041447b27bb14422215fbd7ab5d1719c759cf346ce790c534f7994527a561084f3b158ecfd63c78e19c964f29ef6fc1f4f14b29abe15e4b80000000049454e44ae426082 + + + + + buttonOk + clicked() + GubedSettingsS + accept() + + + buttonCancel + clicked() + GubedSettingsS + reject() + + + checkUseProxy + toggled(bool) + GubedSettingsS + slotUseProxyToggle(bool) + + + + tabWidget2 + lineLocalBasedir + lineServerBasedir + checkUseProxy + lineServerHost + lineServerPort + lineServerListenPort + optStartSession + lineStartSession + optAddInclude + checkBreakOnNotice + checkBreakOnWarning + checkBreakOnUserNotice + checkBreakOnUserWarning + checkBreakOnUserError + comboDefaultExecutionState + sliderDisplayDelay + buttonOk + buttonCancel + + + slotUseProxyToggle( bool ) + + + + ktextbrowser.h + + diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.cpp b/quanta/components/debugger/gubed/quantadebuggergubed.cpp new file mode 100644 index 00000000..be703e73 --- /dev/null +++ b/quanta/components/debugger/gubed/quantadebuggergubed.cpp @@ -0,0 +1,1247 @@ +/*************************************************************************** + quantadebuggergubed.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "debuggerclient.h" +#include "quantadebuggergubed.h" +#include "debuggerinterface.h" +#include "debuggerbreakpoint.h" +#include "gubedsettings.h" +#include "debuggervariable.h" +#include "variableslistview.h" +#include "pathmapper.h" + +#include "debuggerui.h" + + +K_EXPORT_COMPONENT_FACTORY( quantadebuggergubed, + KGenericFactory("quantadebuggergubed")) + +const char QuantaDebuggerGubed::protocolversion[] = "0.0.12"; + +QuantaDebuggerGubed::QuantaDebuggerGubed (QObject *parent, const char* name, const QStringList&) + : DebuggerClient (parent, name) +{ + // Create a socket object and set up its signals + m_socket = NULL; + m_server = NULL; + m_errormask = 1794; + m_defaultExecutionState = Pause; + setExecutionState(m_defaultExecutionState); + + emit updateStatus(DebuggerUI::NoSession); + m_datalen = -1; +} + +QuantaDebuggerGubed::~QuantaDebuggerGubed () +{ + + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + + if(m_socket) + { + sendCommand("die", (char*)0L); + m_socket->flush(); + m_socket->close(); + delete m_socket; + m_socket = NULL; + } + if(m_server) + { + m_server->close(); + delete m_server; + m_server = NULL; + } + emit updateStatus(DebuggerUI::NoSession); +} + +// Try to make a connection to the gubed server +void QuantaDebuggerGubed::startSession() +{ + + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + + // Set default execution state + setExecutionState(m_defaultExecutionState); + + if(m_useproxy) + { + if(!m_socket) + { + m_socket = new KNetwork::KStreamSocket(m_serverHost, m_serverPort); + + connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); + connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + + m_socket->connect(); + debuggerInterface()->enableAction("debug_connect", true); + debuggerInterface()->enableAction("debug_disconnect", false); + debuggerInterface()->enableAction("debug_request", false); + kdDebug(24002) << k_funcinfo << ", proxy:" << m_serverHost << ", " << m_serverPort.toUInt() << endl; + + emit updateStatus(DebuggerUI::AwaitingConnection); + } + } + else + { + if(!m_server) + { + m_server = new KNetwork::KServerSocket(m_listenPort); + + m_server->setAddressReuseable(true); + connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + + if(m_server->listen()) + { + emit updateStatus(DebuggerUI::AwaitingConnection); + debuggerInterface()->enableAction("debug_connect", false); + debuggerInterface()->enableAction("debug_disconnect", true); + debuggerInterface()->enableAction("debug_request", true); + } + else + { + emit updateStatus(DebuggerUI::NoSession); + delete m_server; + m_server = NULL; + debuggerInterface()->enableAction("debug_connect", true); + debuggerInterface()->enableAction("debug_disconnect", false); + debuggerInterface()->enableAction("debug_request", false); + } + } + } + +} + + +void QuantaDebuggerGubed::endSession() +{ + + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + + // Close the socket + if(m_socket) + { + sendCommand("die", (char*)0L); + m_socket->flush(); + m_socket->close(); + + m_socket->deleteLater(); + m_socket = NULL; + } + + // Close the server + if(m_server) + { + m_server->close(); + delete m_server; + m_server = NULL; + } + + // Fake a connection closed signal + slotConnectionClosed(); + debuggerInterface()->enableAction("debug_request", false); + debuggerInterface()->enableAction("debug_run", false); + debuggerInterface()->enableAction("debug_leap", false); + debuggerInterface()->enableAction("debug_pause", false); + + emit updateStatus(DebuggerUI::NoSession); +} + +// Change executionstate of the script +void QuantaDebuggerGubed::setExecutionState(State newstate) +{ + if(newstate == Pause) + { + sendCommand("pause", (char*)0L); + sendCommand("sendactiveline", (char*)0L); + if(isActive()) + emit updateStatus(DebuggerUI::Paused); + } + else if(newstate == Run) + { + if(m_executionState == Pause) + sendCommand("next", (char*)0L); + + sendCommand("run", (char*)0L); + if(isActive()) + emit updateStatus(DebuggerUI::Running); + } + else if(newstate == Trace) + { + if(m_executionState == Pause) + sendCommand("next", (char*)0L); + + sendCommand("trace", (char*)0L); + if(isActive()) + emit updateStatus(DebuggerUI::Tracing); + } + + m_executionState = newstate; + + if(debuggerInterface()) { + debuggerInterface()->enableAction("debug_trace", m_executionState != Trace); + debuggerInterface()->enableAction("debug_run", m_executionState != Run); + debuggerInterface()->enableAction("debug_pause", m_executionState != Pause); + } + + kdDebug(24002) << k_funcinfo << ", " << m_executionState << endl; + +} + +// Return capabilities of gubed +const uint QuantaDebuggerGubed::supports(DebuggerClientCapabilities::Capabilities cap) +{ + switch(cap) + { + case DebuggerClientCapabilities::LineBreakpoints: + case DebuggerClientCapabilities::ConditionalBreakpoints: + case DebuggerClientCapabilities::StartSession: + case DebuggerClientCapabilities::EndSession: + case DebuggerClientCapabilities::Kill: + case DebuggerClientCapabilities::Pause: + case DebuggerClientCapabilities::Run: + case DebuggerClientCapabilities::Trace: + case DebuggerClientCapabilities::Skip: + case DebuggerClientCapabilities::StepOut: + case DebuggerClientCapabilities::StepInto: + case DebuggerClientCapabilities::StepOver: + case DebuggerClientCapabilities::Watches: + case DebuggerClientCapabilities::VariableSetValue: + return true; + + default: + return false; + } +} + +// Socket errors +void QuantaDebuggerGubed::slotError(int) +{ + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + if(m_socket) + { + if(m_socket->error() == KNetwork::KSocketBase::RemotelyDisconnected) + { + slotConnectionClosed(); + return; + } + + if(m_socket->error()) + { + kdDebug(24002) << k_funcinfo << ", " << m_socket->errorString() << endl; + debuggerInterface()->showStatus(m_socket->errorString(), false); + } + } + + if(m_server && m_server->error()) + { + kdDebug(24002) << k_funcinfo << ", " << m_server->errorString() << endl; + debuggerInterface()->showStatus(m_server->errorString(), false); + } + +} + +// slotReadyAccept +void QuantaDebuggerGubed::slotReadyAccept() +{ + + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + if(!m_socket) + { + + // Perhaps this shouldnt be disconnected - instead check if connections are available at disconnect? + disconnect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + + m_socket = (KNetwork::KStreamSocket *)m_server->accept(); // KSocketServer returns a KStreamSocket (!) + if(m_socket) + { + kdDebug(24002) << k_funcinfo << ", ready" << endl; + m_socket->enableRead(true); + + connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); + connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connected(); + + emit updateStatus(DebuggerUI::Connected); + } + else + { + kdDebug(24002) << k_funcinfo << ", " << m_server->errorString() << endl; + } + } + +} + +// Connection established +void QuantaDebuggerGubed::slotConnected(const KNetwork::KResolverEntry &) +{ + emit updateStatus(DebuggerUI::Connected); + connected(); +} + +void QuantaDebuggerGubed::connected() +{ + kdDebug(24002) << k_funcinfo << endl; + + sendCommand("wait", (char*)0L); + debuggerInterface()->enableAction("debug_connect", false); + debuggerInterface()->enableAction("debug_disconnect", true); + debuggerInterface()->enableAction("debug_request", false); + + m_active = true; +} + +// Connectio closed +void QuantaDebuggerGubed::slotConnectionClosed() +{ + kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; + + // Check if we have more data to read + slotReadyRead(); + kdDebug(24002) << k_funcinfo << "buffer: " << m_buffer << endl; + + if(m_socket) + { + m_socket->deleteLater(); + m_socket = NULL; + } + + if(m_server) + connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + + // Disable all session related actions and enable connection action + debuggerInterface()->enableAction("*", false); + debuggerInterface()->enableAction("debug_connect", m_useproxy == 1 || m_server == NULL); + debuggerInterface()->enableAction("debug_disconnect", m_useproxy == 0 && m_server != NULL); + setExecutionState(m_defaultExecutionState); + + debuggerInterface()->enableAction("debug_request", true); + debuggerInterface()->enableAction("debug_breakpoints_toggle", true); + debuggerInterface()->enableAction("debug_breakpoints_clear", true); + + debuggerInterface()->setActiveLine("", 0); + + emit updateStatus(DebuggerUI::AwaitingConnection); + m_active = false; +} + +// Data from socket +void QuantaDebuggerGubed::slotReadyRead() +{ + + // Data from gubed + while(m_socket && (m_socket->bytesAvailable() > 0 || m_buffer.length() >= (unsigned long)m_datalen)) + { + int bytes; + QString data; + + if(m_socket && m_socket->bytesAvailable() > 0) + { + // Read all available bytes from socket and append them to the buffer + bytes = m_socket->bytesAvailable(); + char* buffer = new char[bytes + 1]; + m_socket->readBlock(buffer, bytes); + buffer[bytes] = 0; + m_buffer += buffer; + delete[] buffer; + } + + while(1) + { + // If datalen == -1, we didnt read the command yet, otherwise were reading data. + if(m_datalen == -1) + { + bytes = m_buffer.find(";"); + if(bytes < 0) + break; + + data = m_buffer.left(bytes); + m_buffer.remove(0, bytes + 1); + bytes = data.find(":"); + m_command = data.left(bytes); + data.remove(0, bytes + 1); + m_datalen = data.toLong(); + } + if(m_datalen != -1 && (long)m_buffer.length() >= m_datalen) + { + data = m_buffer.left(m_datalen); + m_buffer.remove(0, m_datalen); + m_datalen = -1; + processCommand(data); + } + else + break; + } + } +} + +// Process a gubed command +void QuantaDebuggerGubed::processCommand(const QString& datas) +{ + kdDebug(24002) << k_funcinfo << ", " << m_command << " : " << datas.left(50) << endl; + StringMap args = parseArgs(datas); + + // See what command we got and act accordingly.. + if(m_command == "commandme") + { + //sendCommand("sendactiveline", (char*)0L); + debuggerInterface()->setActiveLine(mapServerPathToLocal(args["filename"]), args["line"].toLong()); + sendWatches(); + if(m_executionState == Trace) + sendCommand("wait", (char*)0L); + + if(m_executionState != Pause) + sendCommand("next", (char*)0L); + } + // Send run mode to script + else if(m_command == "getrunmode") + { + debuggingState(true); + sendCommand("setdisplaydelay", "newdelay", QString::number(m_displaydelay).ascii(), (char*)0L); + if(m_executionState == Pause) + sendCommand("pause", (char*)0L); + else if(m_executionState == Run) + sendCommand("run", (char*)0L); + else if(m_executionState == Trace) + sendCommand("trace", (char*)0L); + + sendCommand("seterrormask", "errormask", QString::number(m_errormask).ascii(), (char*)0L); + } + // Just some status info, display on status line + else if(m_command == "status") + { + long argcnt = args["args"].toLong(); + QString msg = i18n(args["message"]); // How will we get these messages throught to the translators? + for(int cnt = 1; cnt <= argcnt; cnt++) + msg.replace("%" + QString("%1").arg(cnt) + "%", args[QString("arg%1").arg(cnt)]); + + debuggerInterface()->showStatus(msg, false); + } + // New current line + else if(m_command == "setactiveline") + { + debuggerInterface()->setActiveLine(mapServerPathToLocal(args["filename"]), args["line"].toLong()); + } + // Script requests breakpointlist + else if(m_command == "sendbreakpoints") + { + sendBreakpoints(); + } + // Parsing failed + else if(m_command == "parsefailed") + { + debuggerInterface()->showStatus(i18n("Syntax or parse error in %1)").arg(args["filenme"]), true); + return; + } + // A debugging session is running + else if(m_command == "debuggingon") + { + debuggingState(true); + } + // No session is running + else if(m_command == "debuggingoff") + { + debuggingState(false); + } + // We stumbled upon an error + else if(m_command == "error") + { + // Put the line number first so double clicking will jump to the corrrect line + debuggerInterface()->showStatus(i18n("Error occurred: Line %1, Code %2 (%3) in %4").arg(args["line"]).arg(args["errnum"]).arg(args["errmsg"]).arg(args["filename"]), true); + + // Filter to get error code only and match it with out mask + long error = args["errnum"].toLong(); + if(m_errormask & error) + setExecutionState(Pause); + else if(m_executionState == Trace) + setExecutionState(Trace); + else if(m_executionState == Run) + setExecutionState(Run); + else + setExecutionState(Pause); + + emit updateStatus(DebuggerUI::HaltedOnError); + } + // We came across a hard coded breakpoint + else if(m_command == "forcebreak") + { + setExecutionState(Pause); + emit updateStatus(DebuggerUI::HaltedOnBreakpoint); + debuggerInterface()->showStatus(i18n("Breakpoint reached"), true); + } + // A conditional breakpoint was fulfilled + else if(m_command == "conditionalbreak") + { + setExecutionState(Pause); + emit updateStatus(DebuggerUI::HaltedOnBreakpoint); + debuggerInterface()->showStatus(i18n("Conditional breakpoint fulfilled"), true); + } + // There is a breakpoint set in this file/line + else if(m_command == "removebreakpoint") + { + debuggerInterface()->havenoBreakpoint(mapServerPathToLocal(args["filename"]), args["line"].toLong()); + } + // We're about to debug a file.. + else if(m_command == "initialize") + { + debuggerInterface()->showStatus(i18n("Established connection to %1").arg(args["filename"]), false); + sendCommand("sendprotocolversion", (char*)0L); + + debuggerInterface()->setActiveLine(mapServerPathToLocal(args["filename"]), 0); + sendCommand("havesource", (char*)0L); + debuggingState(true); + } + else if(m_command == "sendingwatches") + { + //debuggerInterface()->preWatchUpdate(); + } + // Show the contents of a watched variable + else if(m_command == "watch") + { + showWatch(args["variable"]); + } + // Show the contents of a variable + else if(m_command == "variable") + { + showWatch(args["variable"]); + } + // Show the contents of a variable + else if(m_command == "showcondition") + { + showCondition(args); + } + else if(m_command == "sentwatches") + { + //debuggerInterface()->postWatchUpdate(); + } + // Reached en of an include + else if(m_command == "end") + { + //debuggerInterface()->showStatus(i18n("At end of include %1").arg(data), true); + return; + } + // Check protocol version + else if(m_command == "protocolversion") + { + if(args["version"] != protocolversion) + { + debuggerInterface()->showStatus(i18n("The script being debugged does not communicate with the correct protocol version"), true); + sendCommand("die", (char*)0L); + } + return; + } + // Instructions we currently ignore + else if(m_command == "sourcesent" + || m_command == "addsourceline" + ) + {} + else + // Unimplemented command - log to debug output + kdDebug(24002) << "QuantaDebuggerGubed::slotReadyRead Unknown: " << m_command << ":" << datas << endl; +} + +// Turn on/off actions related to a debugging session +void QuantaDebuggerGubed::debuggingState(bool enable) +{ + debuggerInterface()->enableAction("debug_kill", enable); + debuggerInterface()->enableAction("debug_stepout", enable); + debuggerInterface()->enableAction("debug_stepinto", enable); + debuggerInterface()->enableAction("debug_stepover", enable); + debuggerInterface()->enableAction("debug_skip", enable); +} + +void QuantaDebuggerGubed::sendBreakpoints() +{ + debuggerInterface()->refreshBreakpoints(); +} +void QuantaDebuggerGubed::sendWatches() +{ + for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + sendCommand("getwatch", "variable", (*it).ascii(), (char*)0L); + sendCommand("sentwatches", "key", (char*)0L, (char*)0L); +} + +// Send a command to gubed +bool QuantaDebuggerGubed::sendCommand(const QString& command, StringMap args) +{ + + kdDebug(24002) << k_lineinfo << ", command " << command << " with data: " << phpSerialize(args) << endl; + if(!m_socket || m_socket->state() != KNetwork::KClientSocketBase::Connected) + return false; + + QString buffer = phpSerialize(args); + + buffer = QString(command + ":%1;" + buffer).arg(buffer.length()); + m_socket->writeBlock(buffer, buffer.length()); + return true; +} + +// Send a command to gubed +bool QuantaDebuggerGubed::sendCommand(const QString& command, char * firstarg, ...) +{ + StringMap ca; + char *next; + + va_list l_Arg; + va_start(l_Arg, firstarg); + + next = firstarg; + while(next) + { + ca[(QString)next] = (QString)va_arg(l_Arg, char*); +// kdDebug(24002) << k_lineinfo << " Added arg/valuepair " << next << ", " << ca[next].left(30) << endl; + next = va_arg(l_Arg, char*); + } + + va_end(l_Arg); + sendCommand(command, ca); + return true; +} + +// Return name of debugger +QString QuantaDebuggerGubed::getName() +{ + return "Gubed"; // no i18n on the name +} + +void QuantaDebuggerGubed::showWatch(const QString& data) +{ + debuggerInterface()->showVariable(parsePHPVariables(data)); +} + +// Send HTTP Request +void QuantaDebuggerGubed::request() +{ + QString request; + request = debuggerInterface()->activeFileParts(m_startsession); + + //if(request.startsWith(m_localBasedir, false)) + // request.remove(0, m_localBasedir.length()); + + //request = m_startsession + request; + kdDebug(24002) << k_funcinfo << ", request: " << request << endl; + debuggerInterface()->sendRequest(request); +} + + +// Run boy, run (and show whats happening) +void QuantaDebuggerGubed::trace() +{ + setExecutionState(Trace); +} + +// Go as fast as possible and dont update current line or watches +void QuantaDebuggerGubed::run() +{ + setExecutionState(Run); +} + +// Step into function +void QuantaDebuggerGubed::stepInto() +{ + setExecutionState(Pause); + sendCommand("next", (char*)0L); +} + +// Step over function +void QuantaDebuggerGubed::stepOver() +{ + setExecutionState(Pause); + sendCommand("stepover", (char*)0L); +} + +// Step out of function +void QuantaDebuggerGubed::stepOut() +{ + setExecutionState(Pause); + sendCommand("stepout", (char*)0L); +} + +// Skip next function +void QuantaDebuggerGubed::skip() +{ + sendCommand("skip", (char*)0L); +} + +// Kill the running script +void QuantaDebuggerGubed::kill() +{ + sendCommand("die", (char*)0L); +} + +// Pause execution +void QuantaDebuggerGubed::pause() +{ + setExecutionState(Pause); +} + + +// Add a breakpoint +void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) +{ + QString type; + if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) + type = "line"; + else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) + type = "true"; + else + type = "change"; + + sendCommand("breakpoint", + "type", type.ascii(), + "filename", mapLocalPathToServer(breakpoint->filePath()).ascii(), + "class", breakpoint->inClass().ascii(), + "function", breakpoint->inFunction().ascii(), + "expression", breakpoint->condition().ascii(), + "line", QString::number(breakpoint->line()).ascii(), + (char *)0L); +} + +// QString QuantaDebuggerGubed::bpToGubed(DebuggerBreakpoint* breakpoint) +// { +// return QString("^" + mapLocalPathToServer(breakpoint->filePath()) + +// "^" + breakpoint->inClass() + +// "^" + breakpoint->inFunction() + +// "^" + (breakpoint->type() == DebuggerBreakpoint::ConditionalTrue ? "true" : "change") + +// "^" + breakpoint->condition()); +// } + +// Clear a breakpoint +void QuantaDebuggerGubed::removeBreakpoint(DebuggerBreakpoint* breakpoint) +{ + QString type; + if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) + type = "line"; + else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) + type = "true"; + else + type = "change"; + + sendCommand("removebreakpoint", + "type", type.ascii(), + "filename", mapLocalPathToServer(breakpoint->filePath()).ascii(), + "class", breakpoint->inClass().ascii(), + "function", breakpoint->inFunction().ascii(), + "expression", breakpoint->condition().ascii(), + "line", QString::number(breakpoint->line()).ascii(), + (char*)0L); +} + +// A file was opened... +void QuantaDebuggerGubed::fileOpened(const QString&) +{ + sendCommand("reinitialize", (char*)0L); +} + +// Watch a variable +void QuantaDebuggerGubed::addWatch(const QString &variable) +{ + if(m_watchlist.find(variable) == m_watchlist.end()) + m_watchlist.append(variable); + sendCommand("getwatch", "variable", variable.ascii(), (char*)0L); +} +// Remove watch +void QuantaDebuggerGubed::removeWatch(DebuggerVariable *variable) +{ + if(m_watchlist.find(variable->name()) != m_watchlist.end()) + m_watchlist.remove(m_watchlist.find(variable->name())); + //sendCommand("unwatchvariable", var->name()); +} + +// Show conditional breakpoint state +void QuantaDebuggerGubed::showCondition(const StringMap &args) +{ + + DebuggerBreakpoint *bp = debuggerInterface()->newDebuggerBreakpoint(); + bp->setType(args["type"] == "true" ? DebuggerBreakpoint::ConditionalTrue : DebuggerBreakpoint::ConditionalChange); + bp->setCondition(args["expression"]); + bp->setFilePath(mapServerPathToLocal(args["filename"])); + bp->setClass(args["class"]); + bp->setFunction(args["function"]); + bp->setValue(args["value"]); + + bp->setState(DebuggerBreakpoint::Undefined); + + debuggerInterface()->showBreakpoint(*bp); +} + +// Read configuration +void QuantaDebuggerGubed::readConfig(QDomNode node) +{ + // Server + QDomNode valuenode = node.namedItem("serverhost"); + m_serverHost = valuenode.firstChild().nodeValue(); + if(m_serverHost.isEmpty()) + m_serverHost = "localhost"; + + valuenode = node.namedItem("serverport"); + m_serverPort = valuenode.firstChild().nodeValue(); + if(m_serverPort.isEmpty()) + m_serverPort = "8026"; + + valuenode = node.namedItem("localbasedir"); + m_localBasedir = valuenode.firstChild().nodeValue(); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setLocalBasedir(m_localBasedir); + + valuenode = node.namedItem("serverbasedir"); + m_serverBasedir = valuenode.firstChild().nodeValue(); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setServerBasedir(m_serverBasedir); + + valuenode = node.namedItem("listenport"); + m_listenPort = valuenode.firstChild().nodeValue(); + if(m_listenPort.isEmpty()) + m_listenPort = "8016"; + + valuenode = node.namedItem("startsession"); + m_startsession = valuenode.firstChild().nodeValue(); + if(m_startsession.isEmpty()) + m_startsession = "http://localhost/Gubed/StartSession.php?gbdScript=/%rfpp"; + + valuenode = node.namedItem("defaultexecutionstate"); + if(valuenode.firstChild().nodeValue().isEmpty()) + m_defaultExecutionState = Pause; + else + m_defaultExecutionState = (State)valuenode.firstChild().nodeValue().toUInt(); + + valuenode = node.namedItem("useproxy"); + m_useproxy = valuenode.firstChild().nodeValue() == "1"; + + valuenode = node.namedItem("displaydelay"); + m_displaydelay = valuenode.firstChild().nodeValue().toLong(); + + valuenode = node.namedItem("errormask"); + m_errormask = valuenode.firstChild().nodeValue().toLong(); + kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; +} + + +// Show configuration +void QuantaDebuggerGubed::showConfig(QDomNode node) +{ + GubedSettings set(protocolversion); + + readConfig(node); + + set.lineServerHost->setText(m_serverHost); + set.lineServerPort->setText(m_serverPort); + set.lineLocalBasedir->setText(m_localBasedir); + set.lineServerBasedir->setText(m_serverBasedir); + set.lineServerListenPort->setText(m_listenPort); + set.checkUseProxy->setChecked(m_useproxy); + set.sliderDisplayDelay->setValue(m_displaydelay); + set.lineStartSession->setText(m_startsession); + set.comboDefaultExecutionState->setCurrentItem((int)m_defaultExecutionState); + + set.checkBreakOnNotice->setChecked(QuantaDebuggerGubed::Notice & m_errormask); + set.checkBreakOnWarning->setChecked(QuantaDebuggerGubed::Warning & m_errormask); + set.checkBreakOnUserNotice->setChecked(QuantaDebuggerGubed::User_Notice & m_errormask); + set.checkBreakOnUserWarning->setChecked(QuantaDebuggerGubed::User_Warning & m_errormask); + set.checkBreakOnUserError->setChecked(QuantaDebuggerGubed::User_Error & m_errormask); + + if(set.exec() == QDialog::Accepted ) + { + QDomElement el; + + el = node.namedItem("serverhost").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("serverhost"); + node.appendChild( el ); + m_serverHost = set.lineServerHost->text(); + el.appendChild(node.ownerDocument().createTextNode(m_serverHost)); + + el = node.namedItem("serverport").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("serverport"); + node.appendChild( el ); + m_serverPort = set.lineServerPort->text(); + el.appendChild( node.ownerDocument().createTextNode(m_serverPort) ); + + el = node.namedItem("localbasedir").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("localbasedir"); + node.appendChild( el ); + m_localBasedir = set.lineLocalBasedir->text(); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setLocalBasedir(m_localBasedir); + el.appendChild( node.ownerDocument().createTextNode(m_localBasedir) ); + + el = node.namedItem("serverbasedir").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("serverbasedir"); + node.appendChild( el ); + m_serverBasedir = set.lineServerBasedir->text(); + if(debuggerInterface()) + debuggerInterface()->Mapper()->setServerBasedir(m_serverBasedir); + el.appendChild( node.ownerDocument().createTextNode(m_serverBasedir) ); + + el = node.namedItem("useproxy").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("useproxy"); + node.appendChild( el ); + m_useproxy = set.checkUseProxy->isChecked(); + el.appendChild( node.ownerDocument().createTextNode(m_useproxy ? "1" : "0") ); + + el = node.namedItem("listenport").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("listenport"); + node.appendChild( el ); + m_listenPort = set.lineServerListenPort->text(); + el.appendChild( node.ownerDocument().createTextNode(m_listenPort) ); + + el = node.namedItem("startsession").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("startsession"); + node.appendChild( el ); + m_startsession = set.lineStartSession->text(); + el.appendChild(node.ownerDocument().createTextNode(m_startsession)); + + el = node.namedItem("defaultexecutionstate").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("defaultexecutionstate"); + node.appendChild( el ); + m_defaultExecutionState = (State)set.comboDefaultExecutionState->currentItem(); + el.appendChild(node.ownerDocument().createTextNode(QString::number(m_defaultExecutionState))); + + + el = node.namedItem("displaydelay").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("displaydelay"); + node.appendChild( el ); + m_displaydelay = set.sliderDisplayDelay->value(); + el.appendChild( node.ownerDocument().createTextNode(QString::number(m_displaydelay))); + + el = node.namedItem("errormask").toElement(); + if (!el.isNull()) + el.parentNode().removeChild(el); + el = node.ownerDocument().createElement("errormask"); + node.appendChild( el ); + m_errormask = (set.checkBreakOnNotice->isChecked() ? QuantaDebuggerGubed::Notice : 0) + + (set.checkBreakOnWarning->isChecked() ? QuantaDebuggerGubed::Warning : 0) + + (set.checkBreakOnUserNotice->isChecked() ? QuantaDebuggerGubed::User_Notice : 0) + + (set.checkBreakOnUserWarning->isChecked() ? QuantaDebuggerGubed::User_Warning : 0) + + (set.checkBreakOnUserError->isChecked() ? QuantaDebuggerGubed::User_Error : 0); + kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; + el.appendChild( node.ownerDocument().createTextNode(QString::number(m_errormask))); + + } +} + +// Map a server filepath to a local one using project settings +QString QuantaDebuggerGubed::mapServerPathToLocal(const QString& serverpath) +{ + // Translate filename from server to local + return debuggerInterface()->Mapper()->mapServerPathToLocal(serverpath); +} + +// Map a local filepath to a server one using project settings +QString QuantaDebuggerGubed::mapLocalPathToServer(const QString& localpath) +{ + // Translate filename from local to server + return debuggerInterface()->Mapper()->mapLocalPathToServer(localpath); +} + +void QuantaDebuggerGubed::variableSetValue(const DebuggerVariable &variable) +{ + sendCommand("setvariable", + "variable", variable.name().ascii(), + "value", variable.value().ascii(), + (char*)0L); +} + +QString QuantaDebuggerGubed::phpSerialize(StringMap args) +{ + StringMap::Iterator it; + // a:2:{s:4:"name";s:7:"Jessica";s:3:"age";s:2:"26";s:4:"test";i:1;} + QString ret = QString("a:%1:{").arg(args.size()); + for( it = args.begin(); it != args.end(); ++it ) + { + bool isNumber; + + it.data().toInt(&isNumber); + if(isNumber && !it.data().isEmpty()) + ret += QString("s:%1:\"%2\";i:%3;") + .arg(it.key().length()) + .arg(it.key()) + .arg(it.data()); + else + ret += QString("s:%1:\"%2\";s:%3:\"%4\";") + .arg(it.key().length()) + .arg(it.key()) + .arg(it.data().length()) + .arg(it.data()); + + } + + ret += "}"; + return ret; +} + + +StringMap QuantaDebuggerGubed::parseArgs(const QString &args) +{ + StringMap ca; + long cnt, length; + + // a:2:{s:4:"name";s:7:"Jessica";s:3:"age";s:2:"26";s:4:"test";i:1;} + + // No args + if(args.isEmpty() || args == "a:0:{}") + return ca; + + // Make sure we have a good string + if(!args.startsWith("a:")) + { + kdDebug(24002) << k_funcinfo << "An error occurred in the communication link, data received was:" << args << endl; + return ca; + } + + cnt = args.mid(2, args.find("{") - 3).toLong(); + QString data = args.mid(args.find("{") + 1); + + QString tmp, func; + while(cnt > 0) + { + tmp = data.left(data.find("\"")); + length = tmp.mid(2, tmp.length() - 3).toLong(); + + func = data.mid(tmp.length() + 1, length); + data = data.mid( tmp.length() + length + 3); + + if(data.left(1) == "i") + { + // Integer data + tmp = data.mid(data.find(":") + 1); + tmp = tmp.left(tmp.find(";")); + ca[func] = tmp; + data = data.mid(tmp.length() + 3); +// kdDebug(24002) << k_funcinfo << "**i " << func << ": " << ca[func] << endl; + } + else + { + // String data + tmp = data.left(data.find("\"")); + length = tmp.mid(2, tmp.length() - 3).toLong(); + + ca[func] = data.mid(tmp.length() + 1, length); + data = data.mid( tmp.length() + length + 3); +// kdDebug(24002) << k_funcinfo << "**s " << func << ": " << ca[func] << endl; + } + + cnt--; + } + + return ca; +} + +DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(const QString &varstring) +{ + QString str = varstring; + DebuggerVariable* var = parsePHPVariables(str); + return var; +} + +DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) +{ + QString key, data; + QString tempstring; + int length; + DebuggerVariable* debuggervar = NULL; + + // get type of key + QString type = str.left(1); + str.remove(0, 2); + + // Strings + if(type == "s") + { + // Get length of key + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 1); + length = tempstring.toUInt(); + + key = str.left(length + 1); + key.remove(0, 1); // remove starting quote + str.remove(0, length + 3); + } + else if(type == "i") + { + key = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); + + } + + // Get type of data + type = str.left(1); + str.remove(0, 2); + + if(type == "i") + { + /* Example: + s:4:"$row";i:6; + */ + data = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); + debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Integer); + + } + else if(type == "b") + { + /* Example: + s:8:"$boolvar";b:1; + */ + data = str.left(str.find(';')); + data = (data == "0" ? i18n("False"): i18n("True")); + str.remove(0, str.find(';') + 1); + debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Boolean); + } + else if(type == "N") + { + /* Example: + s:6:"return";N; + */ + debuggervar = debuggerInterface()->newDebuggerVariable(key, i18n(""), DebuggerVariableTypes::Undefined); + } + else if(type == "s") + { + /* Example: + s:7:"$strvar";s:16:"This is a string"; + */ + + // Get length of string + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 1); + length = tempstring.toUInt(); + + data = str.left(length + 1); + data.remove(0, 1); // remove starting quote + str.remove(0, length + 3); + debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::String); + debuggervar->setSize(length); + } + else if(type == "a") + { + /* Example: + s:6:"$array";a:5:{s:11:"Ingredients";a:3:{i:0;s:8:"potatoes";i:1;s:4:"salt";i:2;s:6:"pepper";}s:6:"Guests";a:4:{i:0;s:5:"Fiona";i:1;s:4:"Tori";i:2;s:4:"Neil";i:3;s:4:"Nick";}s:4:"Dogs";a:4:{i:0;s:5:"Kitty";i:1;s:5:"Tessy";i:2;s:5:"Fanny";i:3;s:5:"Cosmo";}s:7:"Numbers";a:6:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:9;i:4;i:8;i:5;i:7;}s:6:"Letter";s:1:"L";} + */ + + // Get length of array + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 2); + length = tempstring.toUInt(); + + QPtrList vars ; + while(length > 0) + { + //kdDebug(24002) << "VariablesListView::parsePHPVariables: length " << length << ", \"" << str << "\"" << endl; + + length --; + DebuggerVariable* var = parsePHPVariables(str); + if(var) + vars.append(var); + + } + str.remove(0, 1); + debuggervar = debuggerInterface()->newDebuggerVariable(key, vars, DebuggerVariableTypes::Array); + } + else if(type == "O") + { + /* Example: + + */ + + // Get length of array + tempstring = str.left(str.find(':')); + str.remove(0, str.find(':') + 2); + tempstring = str.mid(str.find(':') + 1); + tempstring = tempstring.left(tempstring.find(':')); + length = tempstring.toUInt(); + + str.remove(0, str.find('{') + 1); + + QPtrList vars ; + while(length > 0) + { + //kdDebug(24002) << "VariablesListView::parsePHPVariables: length " << length << ", \"" << str << "\"" << endl; + + length --; + DebuggerVariable* var = parsePHPVariables(str); + if(var) + vars.append(var); + + } + str.remove(0, 1); + debuggervar = debuggerInterface()->newDebuggerVariable(key, vars, DebuggerVariableTypes::Object); + } + else if(type == "d") + { + /* Example: + s:9:"$floatvar";d:12.5600000000000004973799150320701301097869873046875;" + */ + data = str.left(str.find(';')); + str.remove(0, str.find(';') + 1); + debuggervar = debuggerInterface()->newDebuggerVariable(key, data, DebuggerVariableTypes::Float); + + } + else if(type == "-") + { + debuggervar = debuggerInterface()->newDebuggerVariable(key, i18n(""), DebuggerVariableTypes::Undefined); + } + else if(type == "!") + { + debuggervar = debuggerInterface()->newDebuggerVariable(key, i18n(""), DebuggerVariableTypes::Error); + } + else + { + kdDebug(24002) << "VariablesListView::parsePHPVariables: Unknown variable type " << type << ", " << str << endl; + debuggervar = debuggerInterface()->newDebuggerVariable(key, i18n(""), DebuggerVariableTypes::Error); + } + + return debuggervar; + +} + + +#include "quantadebuggergubed.moc" diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.desktop b/quanta/components/debugger/gubed/quantadebuggergubed.desktop new file mode 100644 index 00000000..d2020cb7 --- /dev/null +++ b/quanta/components/debugger/gubed/quantadebuggergubed.desktop @@ -0,0 +1,48 @@ +[Desktop Entry] +Type=Service +Name=Gubed +Name[ne]=गà¥à¤¯à¥à¤¬à¥à¤¡ +Name[ta]=கà¯à®ªà¯†à®Ÿà¯ +Comment=Quanta debugger plugin to interact with the Gubed PHP debugger, see http://gubed.sf.net +Comment[bg]=ПриÑтавка на Quanta за връзка Ñ Ð´ÐµÐ±ÑŠÐ³ÐµÑ€Ð° Gubed PHP, http://gubed.sf.net +Comment[ca]=Connector de depuració pel Quanta que interactua amb el depurador Gubed PHP, consulteu http://gubed.sf.net +Comment[cs]=Ladicí modul Quanty s Gubed PHP debuggerem, viz http://gubed.sf.net +Comment[da]=Quanta fejlretter-plugin til at virke sammen med Gubed PHP fejlretter, se http://gubed.sf.net +Comment[de]=Debug-Komponente von Quanta für die Unterstützung des Gubed PHP-Debuggers. Näheres siehe http://gubed.sf.net +Comment[el]=Αποσφαλματωτής Quanta σε συνεÏγασία με το αποσφαλματωτή Gubed PHP, δείτε http://gubed.sf.net +Comment[es]=Accesorio de depuración de Quanta, para interactuar con el depurador de PHP Gubed. Vea http://gubed.sf.net +Comment[et]=Quanta siluriplugin koostööks PHP siluriga Gubed (vaata http://gubed.sf.net) +Comment[eu]=Gubed PHP araztailearekin lan egiteko Quanta araztailearen plugina, ikusi http://gubed.sf.net +Comment[fa]=وصلۀ اشکال‌زدای Quanta برای تعامل با اشکال‌زدای Gubed PHPØŒ http://gubed.sf.net را ببینید +Comment[fi]=Gubed PHP debuggerin plugin Quantan debuggeriin (katso http://gubed.sf.net) +Comment[fr]=Module de débogage de Quanta pour interagir avec le débogueur PHP Gubed ; consulter http://gubed.sf.net. +Comment[gl]=Plugin de depuración de Quanta para interactuar co depurador de PHP Gubed, vexa tamén http://gubed.sf.net +Comment[hu]=Quanta-nyomkövetÅ‘ (bÅ‘vítÅ‘modulként) a Gubed PHP-nyomkövetÅ‘höz, lásd: http://gubed.sf.net +Comment[is]=Quanta aflúsunaríforrit til samskipta við Gubed PHP aflúsarann. Sjá http://gubed.sf.net +Comment[it]=Plugin debugger di Quanta per interagire con il debugger PHP Gubed, vedi http://gubed.sf.net +Comment[ja]=Gubed PHP デãƒãƒƒã‚¬ã¨å¯¾è©±ã™ã‚‹ Quanta デãƒãƒƒã‚¬ã€‚詳細㯠http://gubed.sf.net +Comment[ka]=Quanta-ს გáƒáƒœáƒ‘ზიკვის მáƒáƒ“ული Gubed PHP გáƒáƒœáƒ‘ზიკáƒáƒ•áƒ—áƒáƒœ დáƒáƒ¡áƒáƒ™áƒáƒ•áƒ¨áƒ˜áƒ áƒ”ბლáƒáƒ“, იხილეთ http://gubed.sf.net +Comment[lt]=Quanta derintuvÄ—s priedas skirtas dirbti su Gubed PHP derintuve, žr.http://gubed.sf.net +Comment[ms]=Plug masuk penyah-ralat Quanta untuk berinteraksi dengan penyah-ralat Gubed PHP, lihat http://gubed.sf.net +Comment[nds]=Fehlersöök-Moduul för Quanta för't Tosamenwarken mit den PHP-Fehlersöker "Gubed", kiek op http://gubed.sf.net +Comment[ne]=गà¥à¤¯à¥à¤¬à¥à¤¡ पीà¤à¤šà¤ªà¥€ तà¥à¤°à¥à¤Ÿà¤¿à¤®à¥‹à¤šà¤•à¤¸à¤à¤— अनà¥à¤¤à¤°à¥à¤•à¥à¤°à¤¿à¤¯à¤¾ गरà¥à¤¨à¤•à¤¾ लागि कà¥à¤µà¤¾à¤¨à¥à¤Ÿà¤¾ तà¥à¤°à¥à¤Ÿà¤¿à¤®à¥‹à¤šà¤• पà¥à¤²à¤—इन, http://gubed.sf.net हेरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ +Comment[nl]=Quanta debugger plugin om te communiceren met de Gubed PHP debugger, zie http://gubed.sf.net +Comment[pl]=Wtyczka debuggera Quanty współpracujÄ…ca z debuggerem PHP Gubed , patrz http://gubed.sf.net +Comment[pt]='Plugin' de Depuração do Quanta para interagir com o depurador de PHP Gubed, veja http://gubed.sf.net +Comment[pt_BR]=Plugin do debugger do Quanta para interagir com o debugger PHP Gubed, olhe http://gubed.sf.net +Comment[ru]=Модуль отладчика Quanta Ð´Ð»Ñ ÑвÑзи Ñ Gubed, отладчиком PHP, Ñм. http://gubed.sf.net +Comment[sk]=Quanta debuger modul pre interakciu s Gubed PHP debugerom, pozrihttp://gubed.sf.net +Comment[sl]=Vstavek razhroÅ¡Äevanja v Quanti, ki sodeluje z razhroÅ¡Äevalnikom Gubed PHP, glejte http://gubed.sf.net +Comment[sr]=ИÑправљачки прикључак Quanta-е за интеракцију Ñа иÑправљачем PHP-а Gubed, погледајте http://gubed.sf.net +Comment[sr@Latn]=IspravljaÄki prikljuÄak Quanta-e za interakciju sa ispravljaÄem PHP-a Gubed, pogledajte http://gubed.sf.net +Comment[sv]=Quanta-insticksprogram för felsökning som fungerar med PHP-felsökaren Gubed, se http://gubed.sf.net +Comment[ta]=கà¯à®µà®¾à®£à¯à®Ÿà®¾ வழà¯à®¨à¯€à®•à¯à®•à®¿ உளà¯à®³à¯€à®Ÿà¯ கà¯à®ªà¯†à®Ÿà¯PHP வழà¯à®¨à¯€à®•à¯à®•à®¿à®¯à¯‹à®Ÿà¯ தொடரà¯à®ªà¯à®•à¯ கொணà¯à®Ÿà®¿à®°à¯à®•à¯à®•à®¿à®±à®¤à¯, பாரà¯à®•à¯à®•à®µà¯à®®à¯ http://gubed.sf.net +Comment[tg]=Модули ғалатёби Quanta барои алоқаи аз Gubed, ғалатёби PHP, нишон кунед http://gubed.sf.net +Comment[tr]=Gubed PHP hata ayıklayıcısıyla iletiÅŸim kurmayı saÄŸlayan Quanta hata ayıklama eklentisi, http://gubed.sf.net adresini ziyaret edin +Comment[uk]=Втулок Ð·Ð½ÐµÐ²Ð°Ð´Ð¶ÐµÐ½Ð½Ñ Quanta Ð´Ð»Ñ Ð·Ð²'Ñзку зі зневаджувачем PHP -- Gubed, див. http://gubed.sf.net +Comment[zh_CN]=与 Gubed PHP 调试器交互 Quanta 调试器æ’ä»¶ï¼Œè§ http://gubed.sf.net +Comment[zh_HK]=Quanta å°æ–¼ Gubed PHP 除錯器的通訊外掛程å¼, è«‹åƒé–± http://gubed.sf.net +Comment[zh_TW]=Quanta å°æ–¼ Gubed PHP 除錯器的通訊外掛程å¼, è«‹åƒé–± http://gubed.sf.net +Icon=kdbg +ServiceTypes=Quanta/Debugger +X-KDE-Library=quantadebuggergubed diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.h b/quanta/components/debugger/gubed/quantadebuggergubed.h new file mode 100644 index 00000000..62acac0b --- /dev/null +++ b/quanta/components/debugger/gubed/quantadebuggergubed.h @@ -0,0 +1,153 @@ +/*************************************************************************** + phpdebuggubed.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef QUANTADEBUGGERGUBED_H +#define QUANTADEBUGGERGUBED_H + +#include +#include +#include +#include +#include + +#include "debuggerclient.h" + +typedef QValueList WatchList; +typedef QMap StringMap; + +class QuantaDebuggerGubed : public DebuggerClient +{ + Q_OBJECT + + public: + QuantaDebuggerGubed(QObject *parent, const char* name, const QStringList&); + ~QuantaDebuggerGubed(); + + // Execution states + enum State + { + Pause = 0, + Trace, + Run + }; + // Error codes + enum Errors + { + Warning = 2, + Notice = 8, + User_Error = 256, + User_Warning = 512, + User_Notice = 1024 + }; + + // Protocol version + static const char protocolversion[]; + + // Manager interaction + const uint supports(DebuggerClientCapabilities::Capabilities); + + // Execution control + void request(); + void trace(); + void run(); + void skip(); + void stepInto(); + void stepOver(); + void stepOut(); + void pause(); + void kill(); + void setExecutionState(State newstate); + + // Connection + void startSession(); + void endSession(); + + // Return name of debugger + QString getName(); + + // New file opened in quanta + void fileOpened(const QString& file); + + // Settings + void readConfig(QDomNode node); + void showConfig(QDomNode node); + + // Breakpoints + void addBreakpoint(DebuggerBreakpoint* breakpoint); + void removeBreakpoint(DebuggerBreakpoint* breakpoint); + void showCondition(const StringMap &args); + + // Variables + void addWatch(const QString &variable); + void removeWatch(DebuggerVariable *var); + void variableSetValue(const DebuggerVariable &variable); + + private: + KNetwork::KStreamSocket *m_socket; + KNetwork::KServerSocket *m_server; + QString m_command, m_buffer; + long m_datalen; + + QString m_serverBasedir; + QString m_localBasedir; + QString m_serverPort; + QString m_serverHost; + QString m_startsession; + QString m_listenPort; + bool m_useproxy; + State m_executionState, m_defaultExecutionState; + long m_errormask; + long m_displaydelay; + + WatchList m_watchlist; + +// bool sendCommand(const QString&, const QString&); + bool sendCommand(const QString& command, StringMap args); + bool sendCommand(const QString& command, char * firstarg, ...); + + void processCommand(const QString&); + void sendWatches(); + void sendBreakpoints(); + void debuggingState(bool enable); + void connected(); + + QString mapServerPathToLocal(const QString& serverpath); + QString mapLocalPathToServer(const QString& localpath); + QString bpToGubed(DebuggerBreakpoint* breakpoint); + + // Communication helpers + QString phpSerialize(StringMap args); + StringMap parseArgs(const QString &args); + + // Variables + DebuggerVariable* parsePHPVariables(const QString &varstring); + DebuggerVariable* parsePHPVariables(QString &str); + void showWatch(const QString& data); + + + public slots: + // Socket slots + void slotConnected(const KNetwork::KResolverEntry &); + void slotConnectionClosed(); + void slotError(int error); + void slotReadyRead(); + void slotReadyAccept(); + + signals: + void updateStatus(DebuggerUI::DebuggerStatus); +}; + +#endif diff --git a/quanta/components/debugger/interfaces/Makefile.am b/quanta/components/debugger/interfaces/Makefile.am new file mode 100644 index 00000000..dba1986b --- /dev/null +++ b/quanta/components/debugger/interfaces/Makefile.am @@ -0,0 +1,17 @@ + +METASOURCES = AUTO + +noinst_LTLIBRARIES = libdebuggerinterface.la +libdebuggerinterface_la_LDFLAGS = $(all_libraries) +libdebuggerinterface_la_SOURCES = debuggerinterface.cpp debuggerclient.cpp + + +# Definition of the service type +kde_servicetypes_DATA = quantadebugger.desktop + + +INCLUDES = -I$(top_srcdir)/quanta/components/debugger \ + -I$(top_srcdir)/quanta/components/debugger/interfaces \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/utility \ + $(all_includes) diff --git a/quanta/components/debugger/interfaces/debuggerclient.cpp b/quanta/components/debugger/interfaces/debuggerclient.cpp new file mode 100644 index 00000000..8c3196d9 --- /dev/null +++ b/quanta/components/debugger/interfaces/debuggerclient.cpp @@ -0,0 +1,160 @@ +/*************************************************************************** + debuggerclient.cpp + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + Based on work by Mathieu Kooiman + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "debuggerclient.h" +#include "debuggerinterface.h" +#include +#include +#include + + +// CTor +DebuggerClient::DebuggerClient(QObject *parent, const char* name) + : QObject(parent, name) +{ + m_active = false; +} + + +DebuggerInterface* DebuggerClient::debuggerInterface() +{ + return static_cast( parent()->child( 0, "DebuggerInterface" ) ); +} + +// Active state of session +bool DebuggerClient::isActive() +{ + return m_active; +} + +void DebuggerClient::unSupportedAction(const QString &action) +{ + KMessageBox::error(NULL, i18n("The current debugger, %1, does not support the \"%2\" instruction.").arg(this->getName()).arg(action), i18n("Unsupported Debugger Function")); + +} + +// Unimplemented defaults - Pause execution +void DebuggerClient::pause() +{ + unSupportedAction(i18n("Pause")); +} + +// Unimplemented defaults - Send Request +void DebuggerClient::request() +{ + unSupportedAction(i18n("Send HTTP Request")); +} + +// Unimplemented defaults - step over +void DebuggerClient::stepOver() +{ + unSupportedAction(i18n("Step Over")); + +} + +// Unimplemented defaults - step out +void DebuggerClient::stepOut() +{ + unSupportedAction(i18n("Step Out")); + +} + +// Unimplemented defaults - trace +void DebuggerClient::trace() +{ + unSupportedAction(i18n("Trace")); +} +// Unimplemented defaults - Run +void DebuggerClient::run() +{ + unSupportedAction(i18n("Run")); +} +// Unimplemented defaults - skip +void DebuggerClient::skip() +{ + unSupportedAction(i18n("Skip")); +} +// Unimplemented defaults - stepInto +void DebuggerClient::stepInto() +{ + unSupportedAction(i18n("Step Into")); +} +// Unimplemented defaults - kill +void DebuggerClient::kill() +{ + unSupportedAction(i18n("Kill")); + +} + +// Unimplemented defaults +void DebuggerClient::profilerOpen( ) +{ + unSupportedAction(i18n("Open Profiler Output")); +} + +// Unimplemented defaults +void DebuggerClient::fileOpened(const QString&) +{ + return; +} + +// Unimplemented defaults +void DebuggerClient::addBreakpoint(DebuggerBreakpoint*) +{ + unSupportedAction(i18n("Set Breakpoint")); + +} + +// Unimplemented defaults +void DebuggerClient::removeBreakpoint(DebuggerBreakpoint*) +{ + unSupportedAction(i18n("Remove Breakpoint")); +} + + +// Unimplemented defaults +void DebuggerClient::showConfig(QDomNode) +{ + KMessageBox::error(NULL, i18n("%1 does not have any specific settings.").arg(this->getName()), i18n("Settings")); +} + +// Unimplemented defaults +void DebuggerClient::readConfig(QDomNode) +{ + +} + +// Unimplemented defaults: add watch +void DebuggerClient::addWatch(const QString &) +{ + KMessageBox::error(NULL, i18n("%1 does not support watches.").arg(this->getName()), i18n("Unsupported Debugger Function")); +} + +// Unimplemented defaults: Remove watch +void DebuggerClient::removeWatch(DebuggerVariable *) +{ + // Giving an error seems pointless, since you shouldnt be able to add a watch in the first place... + KMessageBox::error(NULL, i18n("%1 does not support watches.").arg(this->getName()), i18n("Unsupported Debugger Function")); +} + +// Unimplemented defaults: set value of varialbe +void DebuggerClient::variableSetValue(const DebuggerVariable &) +{ + KMessageBox::error(NULL, i18n("%1 does not support setting the value of variables.").arg(this->getName()), i18n("Unsupported Debugger Function")); +} + +#include "debuggerclient.moc" diff --git a/quanta/components/debugger/interfaces/debuggerclient.h b/quanta/components/debugger/interfaces/debuggerclient.h new file mode 100644 index 00000000..d50526cc --- /dev/null +++ b/quanta/components/debugger/interfaces/debuggerclient.h @@ -0,0 +1,115 @@ +/*************************************************************************** + phpdebugsocket.h + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + Based on work by Mathieu Kooiman + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef _DEBUGGERCLIENT_H +#define _DEBUGGERCLIENT_H + +#include +#include +#include +#include + +#include "debuggerui.h" + +class DebuggerInterface; +class DebuggerBreakpoint; +class DebuggerVariable; + +namespace DebuggerClientCapabilities +{ + enum Capabilities + { + // Session related + StartSession = 1000, + EndSession, + + // Breakpoint related + LineBreakpoints = 2000, + ConditionalBreakpoints, + + // Variable related + Watches = 4000, + VariableSetValue, + + // Execution related + Run = 5000, + Trace, + Pause, + Kill, + StepInto, + StepOver, + StepOut, + Skip, + + // Profiler related + ProfilerOpen = 6000 + }; +} + +class DebuggerClient : public QObject +{ + Q_OBJECT + + private: + protected: + DebuggerClient(QObject *parent, const char* name); + + bool m_active; + + public: + virtual const uint supports(DebuggerClientCapabilities::Capabilities) = 0; + virtual void startSession() = 0; + virtual void endSession() = 0; + virtual QString getName() = 0; + + // Execution control + virtual void request(); + virtual void run(); + virtual void trace(); + virtual void skip(); + virtual void stepOver(); + virtual void stepInto(); + virtual void stepOut(); + virtual void kill(); + virtual void pause(); + + // Settings + virtual void readConfig(QDomNode node); + virtual void showConfig(QDomNode node); + + // Profiler + virtual void profilerOpen(); + + // Misc + virtual void fileOpened(const QString& file); + virtual void addBreakpoint(DebuggerBreakpoint* breakpoint); + virtual void removeBreakpoint(DebuggerBreakpoint* breakpoint); + virtual void addWatch(const QString &); + virtual void removeWatch(DebuggerVariable*); + virtual void variableSetValue(const DebuggerVariable &variable); + + void unSupportedAction(const QString &action); + + bool isActive(); + DebuggerInterface *debuggerInterface(); + + signals: + void updateStatus(DebuggerUI::DebuggerStatus); + +}; + +#endif diff --git a/quanta/components/debugger/interfaces/debuggerinterface.cpp b/quanta/components/debugger/interfaces/debuggerinterface.cpp new file mode 100644 index 00000000..5481180c --- /dev/null +++ b/quanta/components/debugger/interfaces/debuggerinterface.cpp @@ -0,0 +1,26 @@ +/*************************************************************************** + debuggerinterface.cpp + --------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "debuggerinterface.h" + +DebuggerInterface::DebuggerInterface (QObject *parent, const char* name) + : QObject(parent, name) +{ +} + + +#include "debuggerinterface.moc" diff --git a/quanta/components/debugger/interfaces/debuggerinterface.h b/quanta/components/debugger/interfaces/debuggerinterface.h new file mode 100644 index 00000000..8c527979 --- /dev/null +++ b/quanta/components/debugger/interfaces/debuggerinterface.h @@ -0,0 +1,80 @@ +/*************************************************************************** + debuggerinterface.h + ------------------- + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef DEBUGGERINTERFACE_H +#define DEBUGGERINTERFACE_H + +#include +#include +#include + +#include "debuggervariable.h" +#include "debuggerbreakpoint.h" +#include "backtracelistview.h" + +class PathMapper; + +class DebuggerInterface : public QObject +{ + Q_OBJECT + + private: + + + public: + DebuggerInterface(QObject *parent, const char* name); + + // Breakpoints + virtual void haveBreakpoint (const QString& file, int line) = 0; + virtual void havenoBreakpoint (const QString& file, int line) = 0; + + // Public help functions + virtual bool showStatus(const QString& message, bool log) = 0; + virtual bool setActiveLine (const QString& file, int line) = 0; + + virtual void enableAction(const QString& action, bool enable) = 0; + virtual void fileOpened(const QString& file) = 0; + virtual void sendRequest(const KURL &url) = 0; + virtual const QString activeFileParts(const QString & str) = 0; + + // Watch handling + //virtual void preWatchUpdate() = 0; + //virtual void postWatchUpdate() = 0; + + virtual DebuggerVariable* newDebuggerVariable(const QString& name, const QString& value, int type) = 0; + virtual DebuggerVariable* newDebuggerVariable(const QString& name, const ValueList_t& values, int type) = 0; + virtual void showVariable(DebuggerVariable*) = 0; + + // Backtrace + virtual void backtraceClear() = 0; + virtual void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func) = 0; + + + // Breakpoints + virtual void showBreakpoint(const DebuggerBreakpoint &bp) = 0; + virtual void refreshBreakpoints() = 0; + virtual DebuggerBreakpoint * newDebuggerBreakpoint() = 0; + virtual DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key) = 0; + virtual void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey) = 0; + + // Path mapping + virtual PathMapper* Mapper() = 0; +}; + +#endif + + diff --git a/quanta/components/debugger/interfaces/quantadebugger.desktop b/quanta/components/debugger/interfaces/quantadebugger.desktop new file mode 100644 index 00000000..56d05e04 --- /dev/null +++ b/quanta/components/debugger/interfaces/quantadebugger.desktop @@ -0,0 +1,45 @@ +[Desktop Entry] +Type=ServiceType +X-KDE-ServiceType=Quanta/Debugger +Comment=A Quanta Debugger plugin +Comment[bg]=ПриÑтавка на Quanta за дебъгване +Comment[br]=Ul lugent dizraener Quanta +Comment[ca]=Un connector de depuració pel Quanta +Comment[cs]=Ladicí modul Quanty +Comment[da]=Et Quanta fejlretter-plugin +Comment[de]=Eine Quanta Debugger-Komponente +Comment[el]=ΠÏόσθετο αποσφαλματωτή Quanta +Comment[es]=Un accesorio para un depurador de Quanta +Comment[et]=Quanta siluriplugin +Comment[eu]=Quanta araztailearen plugina +Comment[fa]=وصلۀ اشکال‌زدای Quanta +Comment[fi]=Quantan debuggerin plugin +Comment[fr]=Un module de débogage pour Quanta +Comment[ga]=Breiseán dífhabhtóra Quanta +Comment[gl]=Un plugin para o depurador de Quanta +Comment[hu]=Quanta nyomkövetÅ‘-modul +Comment[is]=Quanta aflúsunaríforrit +Comment[it]=Un plugin debugger di Quanta +Comment[ja]=Quanta デãƒãƒƒã‚¬ãƒ—ラグイン +Comment[ka]=Quanta-ს გáƒáƒœáƒ‘ზიკვის მáƒáƒ“ული +Comment[lt]=Quanta derintuvÄ—s priedas +Comment[ms]=Plug masuk penyah-ralat Quanta +Comment[nds]=En Fehlersöök-Komponent för Quanta +Comment[ne]=à¤à¤‰à¤Ÿà¤¾ कà¥à¤µà¤¾à¤¨à¥à¤Ÿà¤¾ तà¥à¤°à¥à¤Ÿà¤¿à¤®à¥‹à¤šà¤• पà¥à¤²à¤—इन +Comment[nl]=Een Quanta debugger-plugin +Comment[pl]=Wtyczka debuggera Quanty +Comment[pt]=Um 'plugin' de depuração para o Quanta +Comment[pt_BR]=Um plugin do Debugger do Quanta +Comment[ru]=Модуль отладки Quanta +Comment[sk]=Quanta debuger modul +Comment[sl]=Vstavek razhroÅ¡Äevanja v Quanti +Comment[sr]=ИÑправљачки прикључак Quanta-е +Comment[sr@Latn]=IspravljaÄki prikljuÄak Quanta-e +Comment[sv]=Ett Quanta-insticksprogram för felsökning +Comment[ta]=கà¯à®µà®¾à®£à¯à®Ÿà®¾ வழà¯à®¨à¯€à®•à¯à®•à®¿ சொரà¯à®•à¯ +Comment[tg]=Модули ғалатёби Quanta +Comment[tr]=Bir Quanta Hata Ayıklayıcı eklentisi +Comment[uk]=Втулок Ð·Ð½ÐµÐ²Ð°Ð´Ð¶ÐµÐ½Ð½Ñ Quanta +Comment[zh_CN]=Quanta 调试器æ’件 +Comment[zh_HK]=一個 Quanta é™¤éŒ¯å™¨çš„å¤–æŽ›ç¨‹å¼ +Comment[zh_TW]=一個 Quanta é™¤éŒ¯å™¨çš„å¤–æŽ›ç¨‹å¼ diff --git a/quanta/components/debugger/pathmapper.cpp b/quanta/components/debugger/pathmapper.cpp new file mode 100644 index 00000000..194355d7 --- /dev/null +++ b/quanta/components/debugger/pathmapper.cpp @@ -0,0 +1,228 @@ +/*************************************************************************** + pathmapper.h + ------------------------ + begin : 2004-10-10 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "pathmapper.h" +#include "pathmapperdialog.h" + +#include "quantacommon.h" +#include "project.h" + +#include +#include +#include +#include +#include + +PathMapper::PathMapper(QObject *parent, const char *name) + : QObject(parent, name) +{ + +} + +PathMapper::PathMapper() +{ + +} + +QString PathMapper::translate(const QString & path, const QString & from, const QString &to) +{ + QString translated = path; + + // Check if this dir is matched by the maps + if(path.startsWith(from, false)) + { + translated.remove(0, from.length()); + translated = to + translated; + } + + return translated; +} + +QString PathMapper::mapLocalPathToServer(const QString &localpath) +{ + if(localpath.isEmpty()) + return localpath; + + if(m_localBasedir == "/" && m_serverBasedir == "/") + return localpath; + + QString newpath = translate(localpath, m_localBasedir, m_serverBasedir); + + // If no translation occurred, check and see if some of the other translations does + if(newpath == localpath) + { + for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) + { + // If the entire filename matches, count it as a match even if there is no difference + if(m_locallist[cnt] == localpath) + return localpath; + + // If both are slashes, count it as a local project + if(m_locallist[cnt] == "/" && m_serverlist[cnt] == "/") + return localpath; + + // Check if it translates into something + newpath = translate(localpath, m_locallist[cnt], m_serverlist[cnt]); + if(newpath != localpath) + { + addHistory(localpath, newpath, true); + return newpath; + } + } + + // No translation found -> show dialog + PathMapperDialog pmdlg(localpath, PathMapperDialog::LocalToServer); + for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) + pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]); + + if(pmdlg.exec() == QDialog::Accepted ) + { + newpath = translate(localpath, pmdlg.localPath(), pmdlg.serverPath()); + addHistory(pmdlg.localPath(), pmdlg.serverPath(), newpath != localpath); + + return newpath; + } + return localpath; + } + return newpath; +} + +QString PathMapper::mapServerPathToLocal(const QString &serverpath) +{ + QString newpath; + if(serverpath.isEmpty()) + return serverpath; + + newpath = translate(serverpath, m_serverBasedir, m_localBasedir); + + // Check if this dir is matched by the basedirs + if(QExtFileInfo::exists(newpath, true, 0L)) + return newpath; + + // Check if any previous mappings fit... + for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) + { + newpath = translate(serverpath, m_serverlist[cnt], m_locallist[cnt]); + if(QExtFileInfo::exists(newpath, true, 0L)) + return newpath; + } + + // If the basedirs didnt match, check if the file exists, + // otherwise scan through the mapping history or show the + // mapping dialog + if(!QExtFileInfo::exists(serverpath, true, 0L)) + { + PathMapperDialog pmdlg(serverpath, PathMapperDialog::ServerToLocal); + for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) + pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]); + + if(pmdlg.exec() == QDialog::Accepted ) + { + addHistory(pmdlg.localPath(), pmdlg.serverPath(), true); + newpath = translate(serverpath, pmdlg.localPath(), pmdlg.serverPath()); + return newpath; + } + } + + return serverpath; +} + +void PathMapper::setLocalBasedir(const QString &localpath) +{ + m_localBasedir = localpath; +} +void PathMapper::setServerBasedir(const QString &serverpath) +{ + m_serverBasedir = serverpath; +} + +QDomNode PathMapper::pathMapperNode() +{ + QDomNode nodeThisDbg; + QDomDocument *dom = Project::ref()->sessionDom(); + QDomNode projectNode = dom->firstChild().firstChild(); + QDomNode nodeDbg = projectNode.namedItem("debuggers"); + if(nodeDbg.isNull()) + { + nodeDbg = dom->createElement("debuggers"); + projectNode.appendChild(nodeDbg); + } + + // Find the pathmapper section + nodeThisDbg = nodeDbg.namedItem("pathmapper"); + if(nodeThisDbg.isNull()) + { + nodeThisDbg = dom->createElement("pathmapper"); + nodeDbg.appendChild(nodeThisDbg); + } + + return nodeThisDbg; +} + +void PathMapper::addHistory(const QString &localpath, const QString &serverpath, bool saveinproject) +{ + bool exists = false; + for (unsigned int cnt = 0; cnt < m_serverlist.count() && !exists; cnt++ ) + if(m_serverlist[cnt] == serverpath && m_locallist[cnt] == localpath) + exists = true; + + if(!exists) + { + if(saveinproject) + { + QDomNode node = pathMapperNode(); + QDomNode newnode = Project::ref()->dom()->createElement("mapping"); + + QDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath"); + serverattr.setValue(serverpath); + QDomAttr localattr = Project::ref()->dom()->createAttribute("localpath"); + localattr.setValue(localpath); + + newnode.attributes().setNamedItem(serverattr); + newnode.attributes().setNamedItem(localattr); + + node = node.namedItem("mappings"); + node.insertAfter(newnode, node.lastChild()); + } + + m_serverlist.append(serverpath); + m_locallist.append(localpath); + } + +} + +void PathMapper::readConfig() +{ + QDomNode node = pathMapperNode(); + + // Server + QDomNode valuenode = node.namedItem("mappings"); + QDomNode child = valuenode.firstChild(); + QString serverpath, localpath; + while(!child.isNull()) + { + serverpath = child.attributes().namedItem("serverpath").nodeValue(); + localpath = child.attributes().namedItem("localpath").nodeValue(); + kdDebug(24002) << "PathMapper::readConfig " << serverpath << ", " << localpath << endl; + + m_serverlist.append(serverpath); + m_locallist.append(localpath); + child = child.nextSibling(); + } +} + +#include "pathmapper.moc" diff --git a/quanta/components/debugger/pathmapper.h b/quanta/components/debugger/pathmapper.h new file mode 100644 index 00000000..b93b48cb --- /dev/null +++ b/quanta/components/debugger/pathmapper.h @@ -0,0 +1,55 @@ +/*************************************************************************** + pathmapper.h + ------------------------ + begin : 2004-10-10 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef PATHMAPPER_H +#define PATHMAPPER_H + +#include +#include +#include + +class KURL; + +class PathMapper : public QObject +{ + Q_OBJECT + + public: + PathMapper(QObject *parent = 0, const char *name = 0); + PathMapper(); + virtual QString mapLocalPathToServer(const QString &localpath); + virtual QString mapServerPathToLocal(const QString &serverpath); + + virtual void setLocalBasedir(const QString &localpath); + virtual void setServerBasedir(const QString &serverpath); + + void readConfig(); + + private: + QDomNode pathMapperNode(); + QString translate(const QString & path, const QString & from, const QString &to); + void addHistory(const QString &localpath, const QString &serverpath, bool saveinproject); + + QString m_localBasedir; + QString m_serverBasedir; + + QStringList m_serverlist; + QStringList m_locallist; +}; + +#endif diff --git a/quanta/components/debugger/pathmapperdialog.cpp b/quanta/components/debugger/pathmapperdialog.cpp new file mode 100644 index 00000000..8cfb949e --- /dev/null +++ b/quanta/components/debugger/pathmapperdialog.cpp @@ -0,0 +1,102 @@ +/*************************************************************************** + pathmapperdialog.cpp + -------------------- + begin : 2005-01-08 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include "pathmapperdialog.h" +#include +#include +#include +#include +#include + +PathMapperDialog::PathMapperDialog(const QString& path, const PathMapperDialog::Direction direction) + : PathMapperDialogS(0, "PathMapperDialog", false, 0) +{ + m_direction = direction; + m_path = path; + linePath->setText(path); + + if(m_direction == LocalToServer) + ledTranslationExists->hide(); + + connect(listHistory, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); + connect(lineLocalPath, SIGNAL(textChanged(const QString&)), this, SLOT(slotPathsChanged())); + connect(lineServerPath, SIGNAL(textChanged(const QString&)), this, SLOT(slotPathsChanged())); +} + +PathMapperDialog::~PathMapperDialog() +{ +} + +void PathMapperDialog::addHistory(const QString &serverdir, const QString &localdir) +{ + new QListViewItem(listHistory, localdir, serverdir); +} + +void PathMapperDialog::slotSelectionChanged() +{ + lineLocalPath->setText(listHistory->currentItem()->text(0)); + lineServerPath->setText(listHistory->currentItem()->text(1)); +} + +void PathMapperDialog::slotPathsChanged() +{ + QString translated, from, to; + if(m_direction == ServerToLocal) + { + from = lineServerPath->text(); + to = lineLocalPath->text(); + } + else + { + to = lineServerPath->text(); + from = lineLocalPath->text(); + } + + translated = m_path; + + // Check if this dir is matched by the maps + if(m_path.startsWith(from, false)) + { + translated.remove(0, from.length()); + translated = to + translated; + } + + // Indicate wether local file exists + if(m_direction == ServerToLocal) + { + if(QExtFileInfo::exists(translated, true, this)) + ledTranslationExists->setColor(Qt::green); + else + ledTranslationExists->setColor(Qt::red); + ledTranslationExists->on(); + } + + lineTranslated->setText(translated); +} + +QString PathMapperDialog::serverPath() +{ + return lineServerPath->text(); +} + +QString PathMapperDialog::localPath() +{ + return lineLocalPath->text(); +} + +#include "pathmapperdialog.moc" + diff --git a/quanta/components/debugger/pathmapperdialog.h b/quanta/components/debugger/pathmapperdialog.h new file mode 100644 index 00000000..786de8ea --- /dev/null +++ b/quanta/components/debugger/pathmapperdialog.h @@ -0,0 +1,52 @@ +/*************************************************************************** + pathmapperdialog.h + ------------------ + begin : 2004-04-05 + copyright : (C) 2004 Linus McCabe + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PATHMAPPERDIALOG_H +#define PATHMAPPERDIALOG_H + +#include "pathmapperdialogs.h" + +class PathMapperDialog : public PathMapperDialogS +{ + Q_OBJECT + + public: + enum Direction + { + ServerToLocal = 0, + LocalToServer + }; + + PathMapperDialog(const QString& path, const PathMapperDialog::Direction direction); + ~PathMapperDialog(); + + void addHistory(const QString &serverdir, const QString &localdir); + + QString serverPath(); + QString localPath(); + + public slots: + void slotSelectionChanged(); + void slotPathsChanged(); + + private: + QString m_path; + Direction m_direction; + +}; + +#endif // PATHMAPPERDIALOG_H + diff --git a/quanta/components/debugger/pathmapperdialogs.ui b/quanta/components/debugger/pathmapperdialogs.ui new file mode 100644 index 00000000..fc7486d4 --- /dev/null +++ b/quanta/components/debugger/pathmapperdialogs.ui @@ -0,0 +1,345 @@ + +PathMapperDialogS + + + PathMapperDialogS + + + + 0 + 0 + 590 + 519 + + + + Directory Mapping + + + true + + + + unnamed + + + + groupBox6 + + + Directory Mapping + + + + unnamed + + + + lblDebuggerLocalBasedir + + + + 5 + 5 + 0 + 0 + + + + Local basedir: + + + + + lblDebuggerServerBasedir + + + + 5 + 5 + 0 + 0 + + + + Server basedir: + + + + + lineLocalPath + + + This is where the local part of path is specified. If a file is located on the computer running Quanta at "/home/user/htdocs/project/file.php" and that file is located on the server as "/var/www/project/file.php", local basedir should be "/home/user/htdocs/" and server basedir should be "/var/www/". +The quanta will know that files starting with "/home/user/project/" on the local computer, will start with "/var/www/" on the remote computer. + + + + + lineServerPath + + + This is where the server part of path is specified. If a file is located on the computer running Quanta at "/home/user/htdocs/project/file.php" and that file is located on the server as "/var/www/project/file.php", local basedir should be "/home/user/htdocs/" and server basedir should be "/var/www/". +The quanta will know that files starting with "/home/user/project/" on the local computer, will start with "/var/www/" on the remote computer. + + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + buttonOk + + + &OK + + + + + + true + + + true + + + + + buttonCancel + + + &Cancel + + + + + + true + + + + + + + groupBox7 + + + Previous Mappings + + + + unnamed + + + + + Local Directory + + + true + + + true + + + + + Server Directory + + + true + + + true + + + + listHistory + + + StyledPanel + + + Manual + + + true + + + AllColumns + + + This is a list of previously used mappings. Click on one to use it + + + + + + + groupBox8 + + + Sample + + + + unnamed + + + + lblTranslates + + + + 5 + 5 + 0 + 0 + + + + Translates to: + + + + + lblOriginal + + + + 5 + 5 + 0 + 0 + + + + Original path: + + + + + ledTranslationExists + + + + 22 + 22 + + + + + 22 + 22 + + + + On + + + Circular + + + Raised + + + Indicates whether the translated path exists on disk or not + + + This indicator tells you whether the translated path exists on local disk or not. + + + + + lineTranslated + + + false + + + + 0 + 0 + 0 + + + + This field shows what the "original path" above will look like after translation. + + + + + linePath + + + false + + + + 0 + 0 + 0 + + + + This field shows the path currently needing to be translated. + + + + + + + + + + + buttonOk + clicked() + PathMapperDialogS + accept() + + + buttonCancel + clicked() + PathMapperDialogS + reject() + + + + slotHistoryclicked() + + + + kled.h + + diff --git a/quanta/components/debugger/quantadebuggerinterface.cpp b/quanta/components/debugger/quantadebuggerinterface.cpp new file mode 100644 index 00000000..bd9ba2e1 --- /dev/null +++ b/quanta/components/debugger/quantadebuggerinterface.cpp @@ -0,0 +1,176 @@ +/*************************************************************************** + debugmanager.cpp + ------------------ + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include + +#include "debuggerinterface.h" +#include "quantadebuggerinterface.h" +#include "debuggermanager.h" +#include "debuggerui.h" +#include "pathmapper.h" +#include "project.h" +#include "viewmanager.h" +#include "document.h" + +class DebuggerBreakpoint; + +QuantaDebuggerInterface::QuantaDebuggerInterface (QObject *myparent, const char* name) + : DebuggerInterface(myparent, name) +{ + m_manager = static_cast(parent()); +} + +QuantaDebuggerInterface::~QuantaDebuggerInterface () +{} + +void QuantaDebuggerInterface::haveBreakpoint (const QString& file, int line) +{ + return m_manager->haveBreakpoint(file, line); +} + +void QuantaDebuggerInterface::havenoBreakpoint (const QString& file, int line) +{ + return m_manager->havenoBreakpoint(file, line); +} + +// Public help functions +bool QuantaDebuggerInterface::showStatus(const QString& message, bool log) +{ + return m_manager->showStatus(message, log); +} + +bool QuantaDebuggerInterface::setActiveLine(const QString& file, int line) +{ + return m_manager->setActiveLine(file, line); +} + +void QuantaDebuggerInterface::enableAction(const QString& action, bool enable) +{ + m_manager->enableAction(action, enable); +} + +void QuantaDebuggerInterface::fileOpened(const QString& file) +{ + m_manager->fileOpened(file); +} + +void QuantaDebuggerInterface::sendRequest(const KURL &url) +{ + m_manager->UI()->sendRequest(url); +} + +const QString QuantaDebuggerInterface::activeFileParts(const QString & str) +{ + QString newstr = str; + + // a/r = absolute/relative + // f/p/d = file/project/docroot + // n/d/p = name/dir/path + + // Filename, filedir and filepath + newstr.replace("%afn", ViewManager::ref()->activeDocument()->url().fileName()); + newstr.replace("%afd", ViewManager::ref()->activeDocument()->url().directory()); + newstr.replace("%afp", ViewManager::ref()->activeDocument()->url().path()); + + // filedir and filepath relative to project root + newstr.replace("%rfpp", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().path())); + newstr.replace("%rfpd", KURL::relativePath(Project::ref()->projectBaseURL().path(), ViewManager::ref()->activeDocument()->url().directory())); + + // filedir and filepath relative to document root + newstr.replace("%rfdp", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().path())); + newstr.replace("%rfdd", KURL::relativePath(Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory(), ViewManager::ref()->activeDocument()->url().directory())); + + newstr.replace("%apd", Project::ref()->projectBaseURL().path()); + newstr.replace("%add", Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()).directory()); + + kdDebug(24002) << k_funcinfo << ", BaseURL " << Project::ref()->projectBaseURL().path() << ", active doc : " << ViewManager::ref()->activeDocument()->url().path() << ", documentFolderForURL" << Project::ref()->documentFolderForURL(ViewManager::ref()->activeDocument()->url()) << ", newstr" << newstr << endl; + + return newstr; +} + +void QuantaDebuggerInterface::showVariable(DebuggerVariable* var) +{ + m_manager->UI()->addVariable(var); +} + +DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const QString& name, const QString& value, int type) +{ + return new DebuggerVariable(name, value, type); +} + +DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const QString& name, const ValueList_t& values, int type) +{ + return new DebuggerVariable(name, values, type); +} + +void QuantaDebuggerInterface::showBreakpoint(const DebuggerBreakpoint &bp) +{ + m_manager->UI()->showBreakpoint(bp); +} + +void QuantaDebuggerInterface::refreshBreakpoints() +{ + m_manager->refreshBreakpoints(); +} + +DebuggerBreakpoint *QuantaDebuggerInterface::newDebuggerBreakpoint() +{ + return new DebuggerBreakpoint(); +} + +DebuggerBreakpoint *QuantaDebuggerInterface::findDebuggerBreakpoint(const QString& key) +{ + return m_manager->findDebuggerBreakpoint(key); +} + +/* +void QuantaDebuggerInterface::preWatchUpdate() +{ + m_manager->UI()->preWatchUpdate(); +} + +void QuantaDebuggerInterface::postWatchUpdate() +{ + m_manager->UI()->postWatchUpdate(); +}*/ + +// Path mapping +PathMapper* QuantaDebuggerInterface::Mapper() +{ + return m_manager->Mapper(); +} + +void QuantaDebuggerInterface::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +{ + m_manager->updateBreakpointKey(bp, newkey); +} + +void QuantaDebuggerInterface::backtraceClear( ) +{ + m_manager->UI()->backtraceClear(); +} + +void QuantaDebuggerInterface::backtraceShow( long level, BacktraceType type, const QString & filename, long line, const QString & func ) +{ + m_manager->UI()->backtraceShow(level, type, filename, line, func); +} + +#include "quantadebuggerinterface.moc" diff --git a/quanta/components/debugger/quantadebuggerinterface.h b/quanta/components/debugger/quantadebuggerinterface.h new file mode 100644 index 00000000..44be8f4a --- /dev/null +++ b/quanta/components/debugger/quantadebuggerinterface.h @@ -0,0 +1,75 @@ +/*************************************************************************** + debugmanager.h + ------------------ + begin : 2004-03-12 + copyright : (C) 2004 Linus McCabe + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef MYDEBUGMANAGER_H +#define MYDEBUGMANAGER_H + +#include +#include +#include "debuggerinterface.h" +#include "debuggervariable.h" + +class DebuggerManager; + +class QuantaDebuggerInterface : public DebuggerInterface +{ + Q_OBJECT + + private: + DebuggerManager *m_manager; + + public: + QuantaDebuggerInterface(QObject *myparent, const char* name); + ~QuantaDebuggerInterface(); + + // Breakpoints + void haveBreakpoint (const QString& file, int line) ; + void havenoBreakpoint (const QString& file, int line) ; + void refreshBreakpoints(); + + // Public help functions + bool showStatus(const QString& message, bool log); + bool setActiveLine (const QString& file, int line) ; + + void enableAction(const QString& action, bool enable); + void fileOpened(const QString& file) ; + void sendRequest(const KURL &url); + virtual const QString activeFileParts(const QString & str); + + // Watches handling + //void preWatchUpdate(); + //void postWatchUpdate(); + DebuggerVariable* newDebuggerVariable(const QString& name, const QString& value, int type); + DebuggerVariable* newDebuggerVariable(const QString& name, const ValueList_t& values, int type); + void showVariable(DebuggerVariable*); + + // Breakpoints + void showBreakpoint(const DebuggerBreakpoint &bp); + DebuggerBreakpoint * newDebuggerBreakpoint(); + DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + + // Backtrace + void backtraceClear(); + void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func); + + // Path mapping + PathMapper* Mapper(); +}; + +#endif + diff --git a/quanta/components/debugger/variableslistview.cpp b/quanta/components/debugger/variableslistview.cpp new file mode 100644 index 00000000..c9d77de3 --- /dev/null +++ b/quanta/components/debugger/variableslistview.cpp @@ -0,0 +1,290 @@ +/*************************************************************************** + variableslistview.cpp + ----------------------- + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// KDE Includes +#include +#include +#include +#include +#include +#include + +// Quanta includes +#include "variableslistview.h" +#include "debuggervariable.h" +#include "resource.h" +#include "quanta.h" +#include "messageoutput.h" +#include "debuggerclient.h" +#include "debuggermanager.h" + +namespace VariablesListViewColumns +{ + // The enums must correspond to the order of the columns + // If you change here, change the column adding + enum Columns + { + Name = 0, + Status, + Value, + Type, + Size + + }; +} + +VariablesListView::VariablesListView(QWidget *parent, const char *name) + : KListView(parent, name) +{ + // If you change here, change the VariablesListViewColumns enums above + addColumn(i18n("Name")); + addColumn(QString::null); + addColumn(i18n("Value")); + addColumn(i18n("Type")); + addColumn(i18n("Size")); + setRootIsDecorated(true); + setSorting(-1); // No sorting + + m_variablePopup = new KPopupMenu(this); + m_variablePopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, SLOT(slotRemoveSelected()), 0, removeWatch); + + if(quantaApp->debugger()->client()->supports(DebuggerClientCapabilities::VariableSetValue)) + m_variablePopup->insertItem(SmallIcon("edit"), i18n("&Set Value"), this, SLOT(slotVariableSetValue()), 0, setValue); + + m_variablePopup->insertItem(SmallIcon("viewmag"), i18n("&Dump in Messages Log"), this, SLOT(slotVariableDump()), 0, dumpValue); + + m_variablePopup->insertItem(SmallIcon("editcopy"), i18n("&Copy to Clipboard"), this, SLOT(slotVariableCopyToClipboard()), 0, copyValue); + + connect(this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT(slotVariableContextMenu(KListView *, QListViewItem *, const QPoint &))); +} + + +VariablesListView::~VariablesListView() +{} + +DebuggerVariable* VariablesListView::selected(bool traverse) +{ + if(!selectedItem()) + return NULL; + + DebuggerVariable* v, *found; + for( v = m_variablesList.first(); v; v = m_variablesList.next()) + { + found = v->findItem(selectedItem(), traverse); + if(found) + return found; + } + + return NULL; +} + +void VariablesListView::slotRemoveSelected() +{ + DebuggerVariable* v = selected(); + + if(!v) + return; + + emit removeVariable(v); + m_variablesList.remove(v); + delete v; +} + +void VariablesListView::keyPressEvent(QKeyEvent *e) +{ + if(e->key() != Qt::Key_Delete) + { + e->ignore(); + return; + } + + DebuggerVariable* v = selected(); + + if(!v) + return; + + emit removeVariable(v); + m_variablesList.remove(v); + delete v; +} + +void VariablesListView::addVariable(DebuggerVariable* variable) +{ + if(!variable) + { + kdDebug(24002) << k_funcinfo << " Tried to show NULL variable!" << endl; + return; + } + + // Find the old variable in the tree if it is there + for(DebuggerVariable* v = m_variablesList.first(); v; v = m_variablesList.next()) + { + if(v->name() == variable->name()) + { + replaceVariable(v, variable); + return; + } + } + + // Insert the new variable + DebuggerVariable *newvar = new DebuggerVariable(variable); + m_variablesList.append(newvar); + + KListViewItem * item = new KListViewItem(this); + insertItem(item); + newvar->setItem(item); + replaceVariable(newvar, variable); +} + +void VariablesListView::clear() +{ + KListView::clear(); + m_variablesList.clear(); +} + +void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariable* newvar) +{ + KListViewItem * item; + + // Remove children that doesen't exist anymore + QPtrList oldlist = oldvar->values(); + for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev()) + { + bool found = false; + QPtrList newlist = newvar->values(); + for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev()) + { + if(newchild->name() == oldchild->name()) + { + found = true; + break; + } + } + if(!found) + oldvar->deleteChild(oldchild); + } + + // Update and add children + QPtrList newlist = newvar->values(); + for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev()) + { + bool found = false; + QPtrList oldlist = oldvar->values(); + for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev()) + { + if(newchild->name() == oldchild->name()) + { + found = true; + replaceVariable( oldchild, newchild); + break; + } + } + if(!found) + { + DebuggerVariable* child = new DebuggerVariable(); + item = new KListViewItem(oldvar->item()); + child->setItem(item); + replaceVariable( child, newchild); + oldvar->append(child); + } + } + + item = oldvar->item(); + + if(oldvar->value() != newvar->value()) + item->setPixmap(VariablesListViewColumns::Status, SmallIcon("ok")); + else + item->setPixmap(VariablesListViewColumns::Status, KPixmap()); + + oldvar->copy(newvar, false); + + item->setText(VariablesListViewColumns::Name, oldvar->name()); + item->setText(VariablesListViewColumns::Type, oldvar->typeName()); + item->setText(VariablesListViewColumns::Size, oldvar->sizeName()); + item->setText(VariablesListViewColumns::Value, (newvar->isScalar() ? oldvar->value() : QString())); + +} + +void VariablesListView::slotVariableContextMenu(KListView *, QListViewItem *, const QPoint& point) +{ + if(!selectedItem()) + return; + + m_variablePopup->setItemEnabled(removeWatch, selected()); + if(quantaApp->debugger()->client()->supports(DebuggerClientCapabilities::VariableSetValue)) + m_variablePopup->setItemEnabled(setValue, selected()); + + DebuggerVariable *v = selected(true); + m_variablePopup->setItemEnabled(dumpValue, v && v->isScalar()); + m_variablePopup->setItemEnabled(copyValue, v && v->isScalar()); + + m_variablePopup->popup(point); +} + +void VariablesListView::slotVariableSetValue() +{ + if(!selected()) + return; + + DebuggerVariable v(selected()); + + QString newvalue; + switch(v.type()) + { + case DebuggerVariableTypes::String: + newvalue = "\"" + v.value() + "\""; + break; + + case DebuggerVariableTypes::Float: + case DebuggerVariableTypes::Boolean: + case DebuggerVariableTypes::Integer: + //case DebuggerVariableTypes::Array: + newvalue = v.value(); + break; + + default: + newvalue = ""; + } + newvalue = KInputDialog::getMultiLineText(i18n("Set Variable"), i18n("New value:"), newvalue, 0, this); + if(newvalue.isNull()) + return; + + v.setValue(newvalue); + quantaApp->debugger()->client()->variableSetValue(v); + +} + +void VariablesListView::slotVariableDump( ) +{ + DebuggerVariable *v = selected(true); + if(!v) + return; + + quantaApp->messageOutput()->showMessage(i18n("Contents of variable %1:\n>>>\n").arg(v->name())); + quantaApp->messageOutput()->showMessage(v->value()); + quantaApp->messageOutput()->showMessage("<<<\n"); +} + +void VariablesListView::slotVariableCopyToClipboard( ) +{ + DebuggerVariable *v = selected(true); + if(!v) + return; + QApplication::clipboard()->setText(v->value()); +} + +#include "variableslistview.moc" diff --git a/quanta/components/debugger/variableslistview.h b/quanta/components/debugger/variableslistview.h new file mode 100644 index 00000000..41de5328 --- /dev/null +++ b/quanta/components/debugger/variableslistview.h @@ -0,0 +1,71 @@ +/*************************************************************************** + variablelistview.h + ------------------------ + begin : 2004-04-04 + copyright : (C) 2004 Thiago Silva + + ***************************************************************************/ + +/**************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef VARIABLESLISTVIEW_H +#define VARIABLESLISTVIEW_H + +#include +#include +#include + +class DebuggerVariable; + +class VariablesListView : public KListView +{ + Q_OBJECT + + enum menuitems + { + setValue = 1, + dumpValue, + copyValue, + removeWatch + }; + + public: + VariablesListView(QWidget *parent = 0, const char *name = 0); + ~VariablesListView(); + + void addVariable(DebuggerVariable* variable); + DebuggerVariable* selected(bool traverse = false); + + DebuggerVariable* first() { return m_variablesList.first(); } + DebuggerVariable* next() { return m_variablesList.next(); } + + void clear(); + + public slots: + void slotRemoveSelected(); + void slotVariableSetValue(); + void slotVariableDump(); + void slotVariableCopyToClipboard(); + void slotVariableContextMenu(KListView *list, QListViewItem * item, const QPoint& point); + + signals: + void valueChanged(DebuggerVariable*); + void removeVariable(DebuggerVariable*); + + private: + void keyPressEvent(QKeyEvent *e); + void replaceVariable(DebuggerVariable* oldvar, DebuggerVariable* newvar); + + QPtrList m_variablesList; + KPopupMenu *m_variablePopup; +}; + +#endif diff --git a/quanta/components/framewizard/Makefile.am b/quanta/components/framewizard/Makefile.am new file mode 100644 index 00000000..ad04c91f --- /dev/null +++ b/quanta/components/framewizard/Makefile.am @@ -0,0 +1,9 @@ +noinst_LTLIBRARIES = libframewizard.la +AM_CPPFLAGS = -I$(top_srcdir)/lib \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/quanta/utility \ + $(all_includes) + +libframewizard_la_SOURCES = fmfpeditors.ui fmrceditors.ui framewizards.ui fwglobal.cpp areaattributedb.cpp selectablearea.cpp treenode.cpp visualframeeditor.cpp fmfpeditor.cpp fmrceditor.cpp framewizard.cpp +METASOURCES = AUTO + diff --git a/quanta/components/framewizard/areaattributedb.cpp b/quanta/components/framewizard/areaattributedb.cpp new file mode 100644 index 00000000..96cc77c0 --- /dev/null +++ b/quanta/components/framewizard/areaattributedb.cpp @@ -0,0 +1,40 @@ +/*************************************************************************** + areaattributedb.cpp - description + ------------------- + begin : gio mar 20 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "areaattributedb.h" + +areaAttribute::areaAttribute(){ + resetAttributes(); +} + +void areaAttribute::resetAttributes(){ + m_attributeMap["name"] = ""; + m_attributeMap["longdesc"] = ""; + m_attributeMap["src"] = ""; + m_attributeMap["scrolling"] = "auto"; // default value + m_attributeMap["id"] = ""; + m_attributeMap["style"] = ""; + m_attributeMap["title"] = ""; + m_attributeMap["class"] = ""; + m_attributeMap["noresize"] = "noresize"; + m_attributeMap["frameborder"] = "1"; // default value + m_attributeMap["marginwidth"] = "10"; + m_attributeMap["marginheight"] = "10"; +} +#include "areaattributedb.moc" + + diff --git a/quanta/components/framewizard/areaattributedb.h b/quanta/components/framewizard/areaattributedb.h new file mode 100644 index 00000000..e13682b3 --- /dev/null +++ b/quanta/components/framewizard/areaattributedb.h @@ -0,0 +1,49 @@ +/*************************************************************************** + areaattributedb.h - description + ------------------- + begin : gio mar 20 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef AREAATTRIBUTEDB_H +#define AREAATTRIBUTEDB_H +#include +#include +#include +/**this is + *@author gulmini luciano + */ + +class areaAttribute : public QObject{ + Q_OBJECT + + private: + QRect m_geometry; + QMap m_attributeMap; //tag specific attributes + + public: + areaAttribute(); + ~areaAttribute(){}; + void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; } + void setAllAttributes(QMap map){ m_attributeMap = map; } + void resetAttributes(); + QRect geometry() const { return m_geometry; } + QString src() const{ return m_attributeMap["src"]; } + QString attributeValue(QString l) const { return attributeMap()[l];} + QMap attributeMap() const { return m_attributeMap; } + + public slots: + void setGeometry(QRect g) { m_geometry = g; } +}; + +#endif diff --git a/quanta/components/framewizard/fmfpeditor.cpp b/quanta/components/framewizard/fmfpeditor.cpp new file mode 100644 index 00000000..cc262453 --- /dev/null +++ b/quanta/components/framewizard/fmfpeditor.cpp @@ -0,0 +1,111 @@ +/*************************************************************************** + fmfpeditor.cpp - description + ------------------- + begin : mer giu 4 2003 + copyright : (C) 2003 by Gulmini Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "fmfpeditor.h" +#include +#include +#include +#include +#include +#include +#include +#include +//#include + +/*class PreviewWidget : public KPreviewWidgetBase { +};*/ + +fmFPeditor::fmFPeditor() : fmFPeditorS (){ + sbLeft->setWrapping(true); + sbTop->setWrapping(true); + + QString htmlFiles = i18n("*.html *.htm|HTML Files"); + QString phpFiles = i18n("*.php|PHP Files"); + QString xmlFiles = i18n("*.xml|XML Files"); + QString xhtmlFiles = i18n("*xhtml|XHTML Files"); + QString allFiles = i18n("*|All Files"); + + fc->setFilter(htmlFiles+"\n"+phpFiles+"\n"+xmlFiles+"\n"+xhtmlFiles+"\n"+allFiles); + +} +fmFPeditor::~fmFPeditor(){ +} + +QString fmFPeditor::noresizeValue() { + switch(bgNoresize->id(bgNoresize->selected())){ + case 0:return "";break; + default:return "noresize"; + } +} + +QString fmFPeditor::scrollingValue() { + switch(bgScrolling->id(bgScrolling->selected())){ + case 0:return "yes";break; + case 2:return "no";break; + default:return "auto"; + } +} + +QString fmFPeditor::frameborderValue() { + switch(bgBorder->id(bgBorder->selected())){ + case 1:return "0"; break; + default:return "1"; + } +} + +void fmFPeditor::setup(QMap m){ + leId->setText(m["id"]); + fc->setURL(m["src"]); + leClass->setText(m["class"]); + leLongdesc->setText(m["longdesc"]); + leTitle->setText(m["title"]); + leStyle->setText(m["style"]); + leName->setText(m["name"]); + + if(m["noresize"]!="noresize") bgNoresize->setButton(0); + else bgNoresize->setButton(1); + + if(m["scrolling"]=="yes") bgScrolling->setButton(0); + else + if(m["scrolling"]=="no") bgScrolling->setButton(2); + + if(m["frameborder"]=="0") bgBorder->setButton(1); + + sbLeft->setValue(m["marginwidth"].toInt()); + sbTop->setValue(m["marginheight"].toInt()); +} + +QMap fmFPeditor::attributeMap(){ + QMap map; + + map["name"] = leName->text(); + map["longdesc"] = leLongdesc->text(); + map["src"] = fc->url(); + map["scrolling"] = scrollingValue(); + map["id"] = leId->text(); + map["style"] = leStyle->text(); + map["title"] = leTitle->text(); + map["class"] = leClass->text(); + map["noresize"] = noresizeValue(); + map["frameborder"] = frameborderValue(); + map["marginwidth"] = QString::number( sbLeft->value(),10 ); + map["marginheight"] = QString::number( sbTop->value(),10 ); + + return map; +} + +#include "fmfpeditor.moc" diff --git a/quanta/components/framewizard/fmfpeditor.h b/quanta/components/framewizard/fmfpeditor.h new file mode 100644 index 00000000..c434b421 --- /dev/null +++ b/quanta/components/framewizard/fmfpeditor.h @@ -0,0 +1,42 @@ +/*************************************************************************** + fmfpeditor.h - description + ------------------- + begin : mer giu 4 2003 + copyright : (C) 2003 by Gulmini Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FMFPEDITOR_H +#define FMFPEDITOR_H + +#include + +/** + *@author Gulmini Luciano + */ + +class fmFPeditor : public fmFPeditorS { + Q_OBJECT + + public: + fmFPeditor(); + ~fmFPeditor(); + void setup(QMap); + QMap attributeMap(); + + private: + QString noresizeValue(); + QString scrollingValue(); + QString frameborderValue(); +}; + +#endif diff --git a/quanta/components/framewizard/fmfpeditors.ui b/quanta/components/framewizard/fmfpeditors.ui new file mode 100644 index 00000000..ef8990a9 --- /dev/null +++ b/quanta/components/framewizard/fmfpeditors.ui @@ -0,0 +1,541 @@ + +fmFPeditorS + + + fmFPeditorS + + + + 26 + 5 + 320 + 430 + + + + Frame Properties + + + + unnamed + + + + Layout8 + + + + unnamed + + + 0 + + + 6 + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 55 + 0 + + + + + + pbOk + + + &OK + + + + + pbCancel + + + &Cancel + + + + + + + tw + + + + tab + + + Common + + + + unnamed + + + + bgBorder + + + Border + + + + unnamed + + + 11 + + + 6 + + + + rbBorderYes + + + Yes + + + true + + + + + rbBorderNo + + + No + + + false + + + + + + + gbMargins + + + Margins + + + + unnamed + + + 11 + + + 6 + + + + Layout8 + + + + unnamed + + + 0 + + + 6 + + + + Layout4 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel2_3 + + + From left: + + + + + sbLeft + + + px + + + 10 + + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + TextLabel1_3 + + + From top: + + + + + sbTop + + + px + + + 10 + + + + + + + + + + + bgScrolling + + + Scrolling + + + + unnamed + + + 11 + + + 6 + + + + rbScrollingYes + + + Yes + + + + + rbScrollingAuto + + + Auto + + + true + + + + + rbScrollingNo + + + No + + + + + + + bgNoresize + + + Resize + + + false + + + + unnamed + + + 11 + + + 6 + + + + rbResizeYes + + + Yes + + + + + rbResizeNo + + + No + + + true + + + + + + + Layout10 + + + + unnamed + + + 0 + + + 6 + + + + Layout9 + + + + unnamed + + + 0 + + + 6 + + + + tlFrameSource + + + Frame source: + + + + + tlFrameName + + + Frame name: + + + + + + + Layout8 + + + + unnamed + + + 0 + + + 6 + + + + fc + + + + + leName + + + + + + + + + + + tab + + + Others + + + + unnamed + + + + Layout11 + + + + unnamed + + + 0 + + + 6 + + + + tlId + + + Id: + + + + + TextLabel2_2 + + + Class: + + + + + TextLabel3 + + + Style: + + + + + TextLabel4 + + + Title: + + + + + TextLabel6 + + + Long description: + + + + + + + Layout10 + + + + unnamed + + + 0 + + + 6 + + + + leId + + + + + leClass + + + + + leStyle + + + + + leTitle + + + + + leLongdesc + + + + + + + spacer2 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + + + + pbOk + clicked() + fmFPeditorS + accept() + + + pbCancel + clicked() + fmFPeditorS + reject() + + + + + diff --git a/quanta/components/framewizard/fmrceditor.cpp b/quanta/components/framewizard/fmrceditor.cpp new file mode 100644 index 00000000..270b3e8c --- /dev/null +++ b/quanta/components/framewizard/fmrceditor.cpp @@ -0,0 +1,34 @@ +/*************************************************************************** + fmrceditor.cpp - description + ------------------- + begin : mer giu 4 2003 + copyright : (C) 2003 by Gulmini Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "fmrceditor.h" +#include +#include + +fmRCeditor::fmRCeditor() : fmRCeditorS(){} + +fmRCeditor::~fmRCeditor(){} + +int fmRCeditor::spinBoxValue() const { + return sb->value(); +} + +void fmRCeditor::setLabelText(QString s){ + tl->setText(s); +} + +#include "fmrceditor.moc" diff --git a/quanta/components/framewizard/fmrceditor.h b/quanta/components/framewizard/fmrceditor.h new file mode 100644 index 00000000..55441e91 --- /dev/null +++ b/quanta/components/framewizard/fmrceditor.h @@ -0,0 +1,38 @@ +/*************************************************************************** + fmrceditor.h - description + ------------------- + begin : mer giu 4 2003 + copyright : (C) 2003 by Gulmini Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FMRCEDITOR_H +#define FMRCEDITOR_H + +#include + +/** + *@author Gulmini Luciano + */ + +class fmRCeditor : public fmRCeditorS { + Q_OBJECT + public: + fmRCeditor(); + ~fmRCeditor(); + public: + int spinBoxValue() const; + void setLabelText(QString); + +}; + +#endif diff --git a/quanta/components/framewizard/fmrceditors.ui b/quanta/components/framewizard/fmrceditors.ui new file mode 100644 index 00000000..25cd41bd --- /dev/null +++ b/quanta/components/framewizard/fmrceditors.ui @@ -0,0 +1,149 @@ + +fmRCeditorS + + + fmRCeditorS + + + + 0 + 0 + 300 + 150 + + + + + 5 + 5 + 0 + 0 + + + + + 300 + 150 + + + + + 300 + 150 + + + + Rows Columns Editor + + + + unnamed + + + 11 + + + 6 + + + + Layout11 + + + + unnamed + + + 0 + + + 6 + + + + tl + + + + + + + + sb + + + 0 + + + 2 + + + + + + + Layout3 + + + + unnamed + + + 0 + + + 6 + + + + Spacer8 + + + Horizontal + + + Expanding + + + + 31 + 0 + + + + + + pbOk + + + &OK + + + + + pbCancel + + + &Cancel + + + + + + + + + pbOk + clicked() + fmRCeditorS + accept() + + + pbCancel + clicked() + fmRCeditorS + reject() + + + + diff --git a/quanta/components/framewizard/framewizard.cpp b/quanta/components/framewizard/framewizard.cpp new file mode 100644 index 00000000..2f3903dd --- /dev/null +++ b/quanta/components/framewizard/framewizard.cpp @@ -0,0 +1,120 @@ +/*************************************************************************** + framewizard.cpp - description + ------------------- + begin : mer giu 4 14:14:07 CEST 2003 + copyright : (C) |YEAR| by Gu2003Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "framewizard.h" +#include "fmrceditor.h" +#include "fmfpeditor.h" +#include +//#include +#include +#include + +#include "fwglobal.h" + +static const QString info1=i18n("You must select an area."), + info2=i18n("Before editing a frame you must save the file."); + +FrameWizard::FrameWizard(QWidget *parent, const char *name) : FrameWizardS(parent, name), +m_hasSelected(false),m_saved(false) +{ + m_hasSelected = false; + m_currSA=vfe->internalTree()->root()->label(); + connect(this, SIGNAL(launchDraw()), this, SLOT(draw())); + connect(vfe, SIGNAL(areaSelected(const QString &)), this, SLOT(catchSelectedArea(const QString &))); + + connect(pbHorizontal, SIGNAL(clicked()), this, SLOT(split())); + connect(pbVertical, SIGNAL(clicked()), this, SLOT(split())); + connect(pbEditFrame, SIGNAL(clicked()), this, SLOT(showFrameEditorDlg())); + connect(pbReset, SIGNAL(clicked()), this, SLOT(reset())); + connect(pbDelete, SIGNAL(clicked()), this, SLOT(remove())); +} + +FrameWizard::~FrameWizard(){ +#define QT_CHECK_NULL +Q_CHECK_PTR( vfe ); +} + +void FrameWizard::catchSelectedArea(const QString &id ){ + m_currSA = id; //is the current SelectableArea selected + m_hasSelected = true;// a SelectableArea has been selected +} + +void FrameWizard::split(){ + if(m_hasSelected) { + int split = 0; + QString currNodeLabel = m_currSA; + QString senderName=sender()->name(); + if(senderName=="pbHorizontal"){ + split = showRCeditorDlg(i18n("Enter the desired number of rows:")); + if(split>=2) vfe->split(currNodeLabel,split,HORIZONTAL); + } + else + if(senderName=="pbVertical"){ + split = showRCeditorDlg(i18n("Enter the desired number of columns:")); + if(split>=2) vfe->split(currNodeLabel,split,VERTICAL); + } + emit launchDraw(); + } + else KMessageBox::information( this, info1, i18n("Warning") ); + m_hasSelected=false; +} + +void FrameWizard::draw(){ + vfe->draw(); +} + +int FrameWizard::showRCeditorDlg(const QString &s){ + int res = 0; + fmRCeditor *dlg = new fmRCeditor; + dlg->setLabelText(s); + if(dlg->exec()) res = dlg->spinBoxValue(); + delete dlg; + return res; +} + +void FrameWizard::showFrameEditorDlg(){ + if(m_saved){ + if(m_hasSelected) { + fmFPeditor *dlg = new fmFPeditor(); + dlg->setup(vfe->internalTree()->findAreaAttribute(m_currSA)->attributeMap()); + if(dlg->exec()) { + vfe->internalTree()->findAreaAttribute(m_currSA)->setAllAttributes(dlg->attributeMap()); + vfe->draw(); + } + delete dlg; + } + else KMessageBox::information( this, info1, i18n("Warning") ); + m_hasSelected=false; + } + else KMessageBox::information( this, info2, i18n("Warning") ); +} + +void FrameWizard::reset(){ + vfe->internalTree()->reset(); + draw(); +} + +void FrameWizard::remove(){ + if(m_hasSelected) { + vfe->removeNode(m_currSA); + draw(); + } + else KMessageBox::information( this, info1, i18n("Warning") ); + m_hasSelected=false; +} + +#include "framewizard.moc" diff --git a/quanta/components/framewizard/framewizard.h b/quanta/components/framewizard/framewizard.h new file mode 100644 index 00000000..22e93789 --- /dev/null +++ b/quanta/components/framewizard/framewizard.h @@ -0,0 +1,61 @@ +/*************************************************************************** + framewizard.h - description + ------------------- + begin : mer giu 4 14:14:07 CEST 2003 + copyright : (C) |YEAR| by Gu2003Luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FRAMEWIZARD_H +#define FRAMEWIZARD_H + +#include +#include "visualframeeditor.h" +class QStringList; + +/** FrameWizard is the base class of the project */ +class FrameWizard : public FrameWizardS +{ + Q_OBJECT + private: + bool m_hasSelected, + m_saved; // if saved = false the the file containing the frameset structure + // has been not saved and so you cannot edit the frame + // This is for me: se non si salva il file no si riesce a conoscere il + // percorso relativo dei file da mettere nell'attributo src + QString m_currSA; + + public: + FrameWizard( QWidget* parent=0, const char *name=0); + ~FrameWizard(); + + private slots: + void showFrameEditorDlg(); + void reset(); + void remove(); + void catchSelectedArea(const QString &id ); + void split(); + void draw(); + int showRCeditorDlg(const QString &s); + + public : + void loadExistingFramesetStructure(const QStringList &list){ vfe->loadExistingStructure(list);} + QString generateFramesetStructure(){ return vfe->framesetStructure(); } + void setSaved( bool b){ m_saved=b; } + void setMarkupLanguage(const QString& s){ vfe->setMarkupLanguage(s);} + + signals: + void launchDraw(); + +}; + +#endif diff --git a/quanta/components/framewizard/framewizards.ui b/quanta/components/framewizard/framewizards.ui new file mode 100644 index 00000000..a06d321b --- /dev/null +++ b/quanta/components/framewizard/framewizards.ui @@ -0,0 +1,369 @@ + +FrameWizardS + + + FrameWizardS + + + + 0 + 0 + 640 + 482 + + + + + 5 + 5 + 0 + 0 + + + + + 0 + 0 + + + + + 32767 + 32767 + + + + Frame Wizard + + + + unnamed + + + 11 + + + 6 + + + + Layout2 + + + + unnamed + + + 0 + + + 6 + + + + pbHelp + + + &Help + + + + + Spacer1 + + + Horizontal + + + Expanding + + + + 30 + 0 + + + + + + Layout1 + + + + unnamed + + + 0 + + + 6 + + + + pbOk + + + &OK + + + + + pbCancel + + + &Cancel + + + + + + + + + Layout11 + + + + unnamed + + + 0 + + + 6 + + + + Layout9 + + + + unnamed + + + 0 + + + 6 + + + + tl + + + + + Spacer6 + + + Vertical + + + Expanding + + + + 0 + 30 + + + + + + ButtonGroup4 + + + + 0 + 0 + 0 + 0 + + + + Splitting + + + + unnamed + + + 11 + + + 6 + + + + pbVertical + + + Vertical + + + + + pbHorizontal + + + Horizontal + + + + + + + Spacer9 + + + Vertical + + + Expanding + + + + 0 + 16 + + + + + + ButtonGroup5 + + + + 0 + 0 + 0 + 0 + + + + Editing + + + + unnamed + + + 11 + + + 6 + + + + pbEditFrame + + + Edit Frame + + + + + pbDelete + + + true + + + Delete + + + + + pbReset + + + true + + + Reset + + + + + + + Spacer5 + + + Vertical + + + Expanding + + + + 0 + 30 + + + + + + + + vfe + + + + 3 + 3 + 0 + 0 + + + + ClickFocus + + + + + + + + + VisualFrameEditor +
visualframeeditor.h
+ + -1 + -1 + + 0 + + 5 + 5 + 0 + 0 + + image0 +
+
+ + + 789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f + + + + + pbCancel + clicked() + FrameWizardS + close() + + + pbOk + clicked() + FrameWizardS + accept() + + + + + + visualframeeditor.h + +
diff --git a/quanta/components/framewizard/fwglobal.cpp b/quanta/components/framewizard/fwglobal.cpp new file mode 100644 index 00000000..f2f971da --- /dev/null +++ b/quanta/components/framewizard/fwglobal.cpp @@ -0,0 +1,22 @@ +/*************************************************************************** + fwglobal.cpp - description + ------------------- + begin : mar feb 17 2004 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "fwglobal.h" + +int proxInt(double d){ + if((d-int(d))>= 0.5 ) return int(d)+1; + return int(d); +} diff --git a/quanta/components/framewizard/fwglobal.h b/quanta/components/framewizard/fwglobal.h new file mode 100644 index 00000000..9377012c --- /dev/null +++ b/quanta/components/framewizard/fwglobal.h @@ -0,0 +1,24 @@ +/*************************************************************************** + fwglobal.h - description + ------------------- + begin : mar feb 17 2004 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#ifndef FWGLOBAL_H +#define FWGLOBAL_H + +enum SplitType{ HORIZONTAL,VERTICAL,NONE }; + +int proxInt(double d); + +#endif diff --git a/quanta/components/framewizard/selectablearea.cpp b/quanta/components/framewizard/selectablearea.cpp new file mode 100644 index 00000000..32ea234b --- /dev/null +++ b/quanta/components/framewizard/selectablearea.cpp @@ -0,0 +1,57 @@ +/*************************************************************************** + selectablearea.cpp - description + ------------------- + begin : mer mar 5 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "selectablearea.h" +#include +//#include +#include "fwglobal.h" + +SelectableArea::SelectableArea(QWidget *parent, const char *name ) : KHTMLPart(parent,name) { + view()->setFrameShape(QFrame::NoFrame); + view()->setMinimumSize(QSize(1,1)); + view()->installEventFilter(this); +} + +SelectableArea::~SelectableArea(){} + +bool SelectableArea::eventFilter(QObject *o, QEvent *event){ + switch ( event->type() ) { + case QEvent::FocusIn : { + view()->setFrameShape(QFrame::Box); + view()->setFrameShadow ( QFrame::Plain ); + view()->setLineWidth(2); + emit selected(m_idLabel); + return true; + }; + break; + case QEvent::FocusOut : { + view()->setFrameShape(QFrame::NoFrame); + return true; + } + break; + case QEvent::Resize : { + emit Resized( view()->geometry() ); + view()->hide(); + view()->show(); + return true; + } + break; + default: return KHTMLPart::eventFilter( o, event ); + } +} + +#include "selectablearea.moc" diff --git a/quanta/components/framewizard/selectablearea.h b/quanta/components/framewizard/selectablearea.h new file mode 100644 index 00000000..252ec6c9 --- /dev/null +++ b/quanta/components/framewizard/selectablearea.h @@ -0,0 +1,53 @@ +/*************************************************************************** + selectablearea.h - description + ------------------- + begin : mer mar 5 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef SELECTABLEAREA_H +#define SELECTABLEAREA_H + +//#include +#include +#include + +/**a QTextBrowser that can be selected + *@author gulmini luciano + */ + + +class SelectableArea : public KHTMLPart { + Q_OBJECT + + public : + SelectableArea(QWidget *parent=0, const char *name=0); + ~SelectableArea(); + QString idLabel() const { return m_idLabel; } + void setIdLabel(const QString &i) { m_idLabel = i; } + void setSource(const QString& s) { if(!s.isEmpty()) openURL( KURL(s) ); } + + protected : + virtual bool eventFilter(QObject*, QEvent*); + + private : + QString m_idLabel; + + signals : + void selected(const QString &); + void Resized(QRect); +}; + + + +#endif diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp new file mode 100644 index 00000000..fcb60231 --- /dev/null +++ b/quanta/components/framewizard/treenode.cpp @@ -0,0 +1,135 @@ +/*************************************************************************** + treenode.cpp - description + ------------------- + begin : lun mar 17 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "treenode.h" + +static const int SIZE = 101; + +treeNode::treeNode(const QString &l, const QString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){ + m_childrenList.setAutoDelete(true); + m_atts = new areaAttribute; +} + +treeNode::~treeNode(){ + delete m_atts; +} + +void treeNode::addChildNode(const QString &l) { + m_childrenList.append( new treeNode(l,m_label) ); +} + +void treeNode::removeChildNode(const QString &l,bool autoDelete) { + m_childrenList.setAutoDelete(autoDelete); + m_childrenList.remove(findChild(l)); +} + +treeNode* treeNode::findChild(const QString &l){ + QPtrListIterator it( m_childrenList ); + treeNode *node; + while ( (node = it.current()) != 0 ) { + ++it; + if(node->label() == l) return node; + } + return 0L; +} + +int tree::nodeId = 0; + +tree::tree(){ + m_root = new treeNode(QString::number(nodeId,10)); + m_nodeList.resize(SIZE); +} + +tree::~tree(){ + delete m_root; +} + +void tree::refreshGeometries(treeNode *n){ + int dim = -6;// so we won't add exceeding pixels + + if(n->hasChildren()){ + n->firstChild(); + while(n->currentChild()){ + refreshGeometries(n->currentChild()); + n->nextChild(); + } + + QPtrList list = n->childrenList(); + QPtrListIterator it( list ); + treeNode *node= it.current(); + QRect newGeometry = n->atts()->geometry(); + if(n->splitType()==VERTICAL){ + newGeometry.setHeight(node->atts()->geometry().height()); + while ( (node = it.current()) != 0 ) { + ++it; + dim += node->atts()->geometry().width(); + dim += 6; + } + newGeometry.setWidth(dim); + } + else + if(n->splitType()==HORIZONTAL){ + newGeometry.setWidth(node->atts()->geometry().width()); + while ( (node = it.current()) != 0 ) { + ++it; + dim += node->atts()->geometry().height(); + dim += 6; + } + newGeometry.setHeight(dim); + } + + n->atts()->setGeometry( newGeometry ); + } +} + +treeNode* tree::findNode(const QString &l){ + if(l==m_root->label()) return m_root; + return m_nodeList.find(l); +} + +QString tree::addChildNode(const QString &l){ + treeNode *node; + if( (node = findNode(l)) != 0) { + ++nodeId; + treeNode *newNode = new treeNode(QString::number(nodeId,10),node->label()); + newNode->atts()->setAttribute( "src",node->atts()->src() ); + node->addChildNode(newNode); + m_nodeList.insert(QString::number(nodeId,10),newNode); + } + return QString::number(nodeId,10); +} + +bool tree::insertChildNode(const QString &l){ + QString parent = findNode(l)->parentLabel(); + int pos=findNode( parent )->childPosition( findNode(l) ); + ++nodeId; + treeNode *newNode = new treeNode(QString::number(nodeId,10),parent); + newNode->atts()->setAttribute( "src",findNode(l)->atts()->src() ); + m_nodeList.insert(QString::number(nodeId,10),newNode); + return findNode( parent )->insertChild(pos,newNode); +} + +void tree::reset(){ + nodeId = 1; + m_root->removeChildren(); + m_root->atts()->resetAttributes(); + m_nodeList.clear(); +} + +void tree::removeChildNode(const QString &pl,const QString &l,bool autoDelete){ + findNode(pl)->removeChildNode(l,autoDelete); +} diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h new file mode 100644 index 00000000..c2d0f3d6 --- /dev/null +++ b/quanta/components/framewizard/treenode.h @@ -0,0 +1,87 @@ +/*************************************************************************** + treenode.h - description + ------------------- + begin : lun mar 17 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TREENODE_H +#define TREENODE_H + +#include +#include +#include + +#include "fwglobal.h" +#include "areaattributedb.h" + +/**a node in the tree + *@author gulmini luciano + */ +class treeNode { + private: + QString m_label, + m_parentLabel; + SplitType m_splitType; + QPtrList m_childrenList; + areaAttribute *m_atts; + + public: + treeNode(const QString &l=QString::null, const QString &pl=QString::null); + ~treeNode(); + void addChildNode(const QString &L); + void addChildNode(treeNode *n){ m_childrenList.append(n); } + void removeChildNode(const QString &l, bool autoDelete); + void setSplitType(SplitType s) { m_splitType = s; } + void setLabel(const QString &l) { m_label = l; } + void removeChildren() { m_childrenList.clear(); } + void setParentLabel(const QString &s){ m_parentLabel = s;} + int childPosition(treeNode* n){ return m_childrenList.find(n); } + bool insertChild(unsigned int pos, treeNode* n) { return m_childrenList.insert( pos, n); } + QString label() const { return m_label; } + QString parentLabel() const { return m_parentLabel; } + SplitType splitType() const { return m_splitType; } + QPtrList childrenList() { return m_childrenList; } + + treeNode* firstChild() { return m_childrenList.first(); } + treeNode* nextChild() { return m_childrenList.next(); } + treeNode* lastChild() { return m_childrenList.last(); } + treeNode* currentChild() { return m_childrenList.current(); } + treeNode* findChild(const QString &L); + + areaAttribute* atts() { return m_atts; } + + int countChildren() const { return m_childrenList.count(); } + bool hasChildren() const { return !m_childrenList.isEmpty(); } +}; + +class tree{ + private: + treeNode *m_root; + QDict m_nodeList; + static int nodeId; + + public: + tree(); + ~tree(); + treeNode* root() const { return m_root; } + QString addChildNode(const QString &l); + bool insertChildNode(const QString &L); + void removeChildNode(const QString &pl,const QString &l,bool autoDelete);//parent node,child node + treeNode* findNode(const QString &L); + areaAttribute* findAreaAttribute(const QString &l){ return findNode(l)->atts(); }; + void reset(); + void refreshGeometries(treeNode*); +}; + +#endif diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp new file mode 100644 index 00000000..3871ac61 --- /dev/null +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -0,0 +1,449 @@ +/*************************************************************************** + visualframeeditor.cpp - description + ------------------- + begin : mar mar 25 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "visualframeeditor.h" + +#include +#include +//#include + +#include "qextfileinfo.h" +#include "project.h" + +static int cancelledPixels(int n){ + return (n-1)*6; +} + +QMap > SIZES; +static int splitterIdNumber = 0; + + +VisualFrameEditor::VisualFrameEditor(QWidget * parent, const char * name) : QHBox(parent,name){ + m_internalTree = new tree; + m_internalTree->root()->atts()->setGeometry(QRect(0,0,510,422)); + m_firstInsertedSA = 0L; + m_markupLanguage = HTML; +} + +VisualFrameEditor::~VisualFrameEditor(){ + delete m_internalTree; + delete m_firstInsertedSA; +} + +void VisualFrameEditor::setGeometries(const QString &l){ + int cP = cancelledPixels(m_internalTree->findNode(l)->countChildren()); + QRect newGeometry(m_internalTree->findNode(l)->atts()->geometry()); + QPtrList list=m_internalTree->findNode(l)->childrenList(); + QPtrListIterator it( list ); + treeNode *node; + if(m_internalTree->findNode(l)->splitType() == VERTICAL){ + int dummyDimension=m_internalTree->findNode(l)->atts()->geometry().width()-cP; + while ( (node = it.current()) != 0 ) { + ++it; + newGeometry.setWidth( int(dummyDimension/m_internalTree->findNode(l)->countChildren()) ); + m_internalTree->findNode(node->label())->atts()->setGeometry(newGeometry); + } + } + else + if(m_internalTree->findNode(l)->splitType() == HORIZONTAL){ + int dummyDimension=m_internalTree->findNode(l)->atts()->geometry().height()-cP; + while ( (node = it.current()) != 0 ) { + ++it; + newGeometry.setHeight( int(dummyDimension/m_internalTree->findNode(l)->countChildren()) ); + m_internalTree->findNode(node->label())->atts()->setGeometry(newGeometry); + } + } +} + +void VisualFrameEditor::split(const QString &l, int n, SplitType type) { + if(l==m_internalTree->root()->label()){ + m_internalTree->root()->setSplitType(type); + for(int i = 1; i<=n; i++) m_internalTree->addChildNode(l); + setGeometries(l); + } + else { + QString parentLabel=m_internalTree->findNode(l)->parentLabel(); + SplitType parentSplit=m_internalTree->findNode(parentLabel)->splitType(); + if( parentSplit != type ) { + m_internalTree->findNode(l)->setSplitType(type); + for(int i = 1; i<=n; i++) m_internalTree->addChildNode(l); + setGeometries(l); + } + else { + for(int i = 1; i<=n; i++) m_internalTree->insertChildNode(l); + m_internalTree->findNode(parentLabel)->removeChildNode(l,true); + setGeometries(m_internalTree->findNode(parentLabel)->label()); + } + } +} + +void VisualFrameEditor::loadExistingStructure(const QStringList &list){ + if(!list.isEmpty()) { + m_existingStructure = list; + m_existingStructure.remove("");//closure tag not needed + buildInternalTree(m_internalTree->root()->label()); + } +} + +QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ + QStringList list=QStringList::split(",",s); + int leftPercentage = 100; + int leftPercentageDistributedAmongAsterisks=0; + int weightAsteriskCounter=0; + // This for is used to determine how much percentage must be assign to an asterisk + // example cols="40%,5*,*" + // then every asterisk must be assigned a percentage of 10% so the real percentage + // notation is cols="40%,50%,10%" + for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; + if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); + if((*it).contains("*")) { + int weight= (*it).section("*",0,0).toInt(); + if( weight==0 ) weight=1; + weightAsteriskCounter += weight; + } + } + + if(weightAsteriskCounter!=0) leftPercentageDistributedAmongAsterisks = proxInt(double(leftPercentage)/double(weightAsteriskCounter)); + // this for changes asterisk notation in percentage notation + // This part of the comment is for me: + // NB: I valori delle percentuali generati da if .. else possono non corrispondere + // a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione. + // In genere la differenza �dell' 1% + for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + if((*it).contains("*")){ + int weight= (*it).section("*",0,0).toInt(); + if(weight==0) weight=1; + int newPercentage = weight*leftPercentageDistributedAmongAsterisks; + (*it)=(QString::number(newPercentage,10)+"%"); + leftPercentage-=newPercentage; + } + } + return list; +} + +void VisualFrameEditor::buildInternalTree(const QString &parent){ + QString line = m_existingStructure.first(); + if(line.contains("findNode(parent)->atts()->geometry(); + QStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); + + int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1); + + QPtrList list=m_internalTree->findNode(parent)->childrenList(); + QPtrListIterator it( list ); + treeNode *node; + while ( (node = it.current()) != 0 ) { + ++it; + QRect newGeometry(dummy); + double newDimension; + if(percentages.first().contains("%")) + newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; + else newDimension=(double)percentages.first().toInt(); + newGeometry.setHeight( proxInt(newDimension) ); + node->atts()->setGeometry(newGeometry); + percentages.pop_front(); + } + } + else + if(line.contains("cols")) { + split(parent,(line.contains(",")+1),VERTICAL); + QRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); + pattern.search(line); + + QRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); + QStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); + + int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1); + + QPtrList list=m_internalTree->findNode(parent)->childrenList(); + QPtrListIterator it( list ); + treeNode *node; + while ( (node = it.current()) != 0 ) { + ++it; + QRect newGeometry(dummy); + double newDimension; + if(percentages.first().contains("%")) + newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; + else newDimension=(double)percentages.first().toInt(); + newGeometry.setWidth( proxInt(newDimension) ); + node->atts()->setGeometry(newGeometry); + percentages.pop_front(); + } + } + + m_existingStructure.pop_front(); + m_internalTree->findNode(parent)->firstChild(); + while(m_internalTree->findNode(parent)->currentChild()) { + buildInternalTree(m_internalTree->findNode(parent)->currentChild()->label()); + m_internalTree->findNode(parent)->nextChild(); + } + } + else { + QMap attributeMap; + if( line.contains( QRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; + else attributeMap["noresize"] = QString::null; + + QRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files + if(srcPattern.search(line) !=-1 ) { + KURL pathToConvert, basePath; + pathToConvert.setPath(srcPattern.cap(1)); + basePath.setPath( Project::ref()->projectBaseURL().path() ); + attributeMap["src"] = QExtFileInfo::toAbsolute( pathToConvert, basePath ).path(); + line.remove(srcPattern);//we don't need to operate on this anymore + } + + QRegExp pattern("\\s+(\\w+\\s*=\\s*\"[\\w\\s\\./_\\+\\d]*\")"); + + int pos = 0; + while ( pos >= 0 ) { + pos = pattern.search( line, pos ); + attributeMap[ pattern.cap(1).section( QRegExp("=\\s*\"") ,0,0) ] = pattern.cap(1).section(QRegExp("=\\s*\""),1,1).remove("\""); + if ( pos >= 0 ) pos += pattern.matchedLength(); + } + m_internalTree->findNode(parent)->atts()->setAllAttributes(attributeMap); + m_existingStructure.pop_front(); + } +} + +void VisualFrameEditor::paintEvent ( QPaintEvent * ){ + hide(); + delete m_firstInsertedSA; + m_firstInsertedSA = 0L; + + QObjectList* splitterList = queryList("QSplitter"); + for (uint i = 0; i < splitterList->count(); i++) { + QObject* o = splitterList->at(i); + removeChild(o); //this will delete all childr of "o" + } + + delete splitterList; + splitterIdNumber = 0; + drawGUI( m_internalTree->root(), this); + show(); +} + +void VisualFrameEditor::removeNode(const QString &l){ + if( l == m_internalTree->root()->label() ) m_internalTree->reset();//trying to remove root node is equivalent to reinitialize + else { + QString parentLabel=m_internalTree->findNode(l)->parentLabel(); + if(m_internalTree->findNode(parentLabel)->countChildren()>=3) + m_internalTree->removeChildNode(parentLabel,l,true); + else { + m_internalTree->removeChildNode(parentLabel,l,true); + if( !m_internalTree->findNode(parentLabel)->firstChild()->hasChildren() ){ //final nodes + QMap map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap(); + m_internalTree->findNode(parentLabel)->removeChildren(); + m_internalTree->findNode(parentLabel)->atts()->setAllAttributes( map ) ; + m_internalTree->findNode(parentLabel)->setSplitType(NONE); + } + else { + QPtrList list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList(); + if( parentLabel != m_internalTree->root()->label() ) { + QString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel(); + m_internalTree->removeChildNode( parentLabel,m_internalTree->findNode(parentLabel)->firstChild()->label(),false ); + m_internalTree->removeChildNode( grandParentLabel ,parentLabel, true ); + treeNode *node; + for ( node = list.first(); node; node = list.next() ) { + node->setParentLabel(grandParentLabel); + m_internalTree->findNode(grandParentLabel)->addChildNode(node); + } + } + else { + m_internalTree->findNode(parentLabel)->setSplitType( m_internalTree->findNode(parentLabel)->firstChild()->splitType() ); + m_internalTree->removeChildNode( parentLabel,m_internalTree->findNode(parentLabel)->firstChild()->label(),false ); + treeNode *node; + for ( node = list.first(); node; node = list.next() ) { + node->setParentLabel(parentLabel); + m_internalTree->findNode(parentLabel)->addChildNode(node); + } + } + } + } + } +} + +void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){ + if(n->hasChildren()) { + QString splitterName("splitter"+QString::number(++splitterIdNumber,10)); + QSplitter *splitter = new QSplitter(parent,splitterName); + if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] ); + switch( n->splitType() ){ + case VERTICAL : splitter->setOrientation(QSplitter::Horizontal);break; + case HORIZONTAL : splitter->setOrientation(QSplitter::Vertical);break; + default:break; + } + n->firstChild(); + while(n->currentChild()) { + drawGUI(n->currentChild(),splitter); + n->nextChild(); + } + } + else { + SelectableArea *sa=new SelectableArea(parent,n->label()); + if(parent->isA("QSplitter")) dynamic_cast(parent)->setResizeMode(sa->view(),QSplitter::KeepSize ); + else + if(!m_firstInsertedSA) m_firstInsertedSA = sa; + sa->view()->setGeometry(n->atts()->geometry()); + sa->setIdLabel( n->label() ); + sa->setSource( n->atts()->src() ); + connect(sa, SIGNAL(Resized(QRect)), m_internalTree->findNode(sa->idLabel())->atts(), SLOT(setGeometry(QRect))); + connect(sa, SIGNAL(selected(const QString &)),this, SIGNAL(areaSelected(const QString &))); + } +} + +QString VisualFrameEditor::createFrameTag(areaAttribute *a){ + QString Src(a->attributeValue("src")), + Longdesc(a->attributeValue("longdesc")), + Name(a->attributeValue("name")), + Scrolling(a->attributeValue("scrolling")), + Id(a->attributeValue("id")), + Style(a->attributeValue("style")), + Title(a->attributeValue("title")), + Class(a->attributeValue("class")), + Noresize(a->attributeValue("noresize")), + Frameborder(a->attributeValue("frameborder")), + Marginwidth(a->attributeValue("marginwidth")), + Marginheight(a->attributeValue("marginheight")); + + QString tagBegin="projectBaseURL().path() ); + KURL u; + u.setPath(Src); + tagMiddle+= (" src=\"" + QExtFileInfo::toRelative( u, base).path() + "\""); + } + + if( !Longdesc.isEmpty() ) + tagMiddle+= (" longdesc=\""+Longdesc+"\""); + //if( !Name.isEmpty() ) + tagMiddle+=(" name=\""+Name+"\""); + if( Scrolling!="auto" && !Scrolling.isEmpty() ) tagMiddle+=(" scrolling=\""+Scrolling+"\""); + if( !Id.isEmpty() ) tagMiddle+=(" id=\""+Id+"\""); + if( !Style.isEmpty() ) tagMiddle+=(" style=\""+Style+"\""); + if( !Title.isEmpty() ) tagMiddle+=(" title=\""+Title+"\""); + if( !Class.isEmpty() ) tagMiddle+=(" class=\""+Class+"\""); + if( Frameborder=="0" ) tagMiddle+=(" frameborder=\""+Frameborder+"\""); + if( Marginwidth!="0" && !Marginwidth.isEmpty() ) tagMiddle+=(" marginwidth=\""+Marginwidth+"\""); + if( Marginheight!="0" && !Marginheight.isEmpty()) tagMiddle+=(" marginheight=\""+Marginheight+"\""); + + switch(m_markupLanguage){ + case HTML: if( Noresize=="noresize" ) tagMiddle+=(" "+Noresize); + tagEnd=">\n";break; + case XHTML: if( Noresize=="noresize" ) tagMiddle+=(" noresize=\""+Noresize+"\""); + tagEnd="/>\n";break; + default:; + } + + return tagBegin+tagMiddle+tagEnd; +} + +QString VisualFrameEditor::RCvalue(treeNode *n) { + QString s; + QMap dimMap; + double percentage = 100.0; + int remainingPercentage=100; + int child_number = n->countChildren(); + int lostPixels = (6*(child_number-1)); // 6 pixels are lost every time a splitter is drawn + + switch( n->splitType() ) { + case VERTICAL: percentage/=n->atts()->geometry().width(); + for(int i=1;i<=child_number;++i) dimMap[i]=n->childrenList().at(i-1)->atts()->geometry().width(); + break; + case HORIZONTAL: percentage/=n->atts()->geometry().height(); + for(int i=1;i<=child_number;++i) dimMap[i]=n->childrenList().at(i-1)->atts()->geometry().height(); + break; + default:break; + } + + while( lostPixels > 0) { + for(int i=1;i<=child_number;++i){ + dimMap[i]+=1; + lostPixels--; + if(lostPixels == 0) break; + } + } + + for(int i=1;i<=child_number-1;++i) { + remainingPercentage-=proxInt(dimMap[i]*percentage); + s+=QString::number(proxInt(dimMap[i]*percentage),10); + s+="%,"; + } + + return s+=(QString::number(remainingPercentage,10)+"%"); +} + +static QStringList nonFormattedStructure; + +void VisualFrameEditor::createStructure(treeNode* n){ + if(n==m_internalTree->root() && !n->hasChildren()) return; + if(n->hasChildren()) { + switch( n->splitType() ){ + case VERTICAL: nonFormattedStructure.append("\n");break; + case HORIZONTAL: nonFormattedStructure.append("\n");break; + default:break; + } + n->firstChild(); + while(n->currentChild()){ + createStructure(n->currentChild()); + n->nextChild(); + } + nonFormattedStructure.append("\n"); + } + else nonFormattedStructure.append(createFrameTag(n->atts())); +} + +QString VisualFrameEditor::formatStructure(){ + QString s; + int tabNum = 0; + for ( QStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { + if((*it).contains("")) { + tabNum--; + s.truncate(s.length()-1); + } + s+=*it; + for(int i=1;i<=tabNum;i++) s+='\t'; + } + nonFormattedStructure.clear(); + return s; +} + +QString VisualFrameEditor::framesetStructure() { + m_internalTree->refreshGeometries(m_internalTree->root()); + createStructure(m_internalTree->root()); + return formatStructure(); +} + +void VisualFrameEditor::setMarkupLanguage(const QString& s){ + if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML; + else + if( s.contains("html",false)!=0 ) m_markupLanguage = HTML; +} + +#include "visualframeeditor.moc" diff --git a/quanta/components/framewizard/visualframeeditor.h b/quanta/components/framewizard/visualframeeditor.h new file mode 100644 index 00000000..4924f3cb --- /dev/null +++ b/quanta/components/framewizard/visualframeeditor.h @@ -0,0 +1,66 @@ +/*************************************************************************** + visualframeeditor.h - description + ------------------- + begin : mar mar 25 2003 + copyright : (C) 2003 by gulmini luciano + email : gulmini.luciano@student.unife.it + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef VISUALFRAMEEDITOR_H +#define VISUALFRAMEEDITOR_H + +#include "treenode.h" +#include "selectablearea.h" +#include + +/** + *@author gulmini luciano + */ + + +class VisualFrameEditor : public QHBox { + Q_OBJECT + private: + enum MarkupLanguage{XHTML,HTML}; + tree *m_internalTree; + SelectableArea* m_firstInsertedSA; + QStringList m_existingStructure; + MarkupLanguage m_markupLanguage; + + void buildInternalTree(const QString &parent); + void setGeometries(const QString &l); + void drawGUI(treeNode *n, QWidget* parent); + QStringList convertAsterisks(const QString &s, int d); + + QString createFrameTag(areaAttribute *a); + QString formatStructure(); + QString RCvalue(treeNode *n); + void createStructure(treeNode* n); + + public: + VisualFrameEditor( QWidget * parent = 0, const char * name = 0); + ~VisualFrameEditor(); + void draw() { repaint(); } + void loadExistingStructure(const QStringList &list); + QString framesetStructure(); + void removeNode(const QString &l); + void split(const QString &l, int n, SplitType type); + void setMarkupLanguage(const QString& s); + tree* internalTree() { return m_internalTree;} + + protected: + virtual void paintEvent ( QPaintEvent * ); + signals: + void areaSelected(const QString &); +}; + +#endif diff --git a/quanta/components/tableeditor/Makefile.am b/quanta/components/tableeditor/Makefile.am new file mode 100644 index 00000000..242fae89 --- /dev/null +++ b/quanta/components/tableeditor/Makefile.am @@ -0,0 +1,15 @@ +noinst_LTLIBRARIES = libtableeditor.la + +libtableeditor_la_SOURCES = tableeditors.ui tableeditor.cpp tableitem.cpp + +METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/dialogs/tagdialogs \ + -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/lib \ + -I$(top_srcdir)/quanta/components/tableeditor \ + $(KMDI_INCLUDES) $(all_includes) + +noinst_HEADERS = tableeditor.h tableitem.h diff --git a/quanta/components/tableeditor/tableeditor.cpp b/quanta/components/tableeditor/tableeditor.cpp new file mode 100644 index 00000000..970828a2 --- /dev/null +++ b/quanta/components/tableeditor/tableeditor.cpp @@ -0,0 +1,1298 @@ +/*************************************************************************** + tableeditor.cpp - table editor dialog + begin : Thu 15 Apr 2004 + copyright : (C) 2004 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + ***************************************************************************/ + +//kde includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//qt includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//own includes +#include "tagdialog.h" +#include "parser.h" +#include "node.h" +#include "tag.h" + +#include "quantacommon.h" +#include "tableitem.h" +#include "tableeditor.h" + +int newNum; + +TableEditor::TableEditor(QWidget* parent, const char* name) + : TableEditorS(parent, name) +{ + m_popup = new KPopupMenu(); + m_cellEditId = m_popup->insertItem(i18n("&Edit Cell Properties"), this ,SLOT(slotEditCell())); + m_rowEditId = m_popup->insertItem(i18n("Edit &Row Properties"), this ,SLOT(slotEditRow())); + // m_colEditId = m_popup->insertItem(i18n("Edit &Column Properties"), this ,SLOT(slotEditCol())); + m_mergeSeparatorId = m_popup->insertSeparator(); + m_mergeCellsId = m_popup->insertItem(i18n("Merge Cells"), this, SLOT(slotMergeCells())); + m_unmergeCellsId = m_popup->insertItem(i18n("Break Merging"), this, SLOT(slotUnmergeCells())); + + m_popup->insertSeparator(); + m_popup->insertItem(i18n("&Insert Row"), this, SLOT(slotInsertRow())); + m_popup->insertItem(i18n("Insert Co&lumn"), this, SLOT(slotInsertCol())); + m_popup->insertItem(i18n("Remove Row"), this, SLOT(slotRemoveRow())); + m_popup->insertItem(i18n("Remove Column"), this, SLOT(slotRemoveCol())); + m_popup->insertSeparator(); + m_popup->insertItem(i18n("Edit &Table Properties"), this, SLOT(slotEditTable())); + m_editChildId = m_popup->insertItem(i18n("Edit Child Table"), this, SLOT(slotEditChildTable())); + + buttonOk->setIconSet(SmallIconSet("button_ok")); + buttonCancel->setIconSet(SmallIconSet("button_cancel")); + buttonHelp->setIconSet(SmallIconSet("help")); + + m_row = m_col = -1; + m_tbody = 0L; + m_thead = 0L; + m_tfoot = 0L; + m_table = 0L; + m_dtd = 0L; + m_write = 0L; + m_tableDataTags = new QValueList >; + m_tableHeaderTags = new QValueList >; + m_tableFooterTags = new QValueList >; + m_tableTags = 0L; + m_tableDataRows = new QValueList; + m_tableHeaderRows = new QValueList; + m_tableFooterRows = new QValueList; + m_tableRows = 0L; + m_createNodes = true; + newNum += 7; + + connect(headerColSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int))); + connect(headerRowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int))); + connect(rowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int))); + connect(colSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int))); + connect(footerRowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int))); + connect(footerColSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int))); + connect(tableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)), + SLOT(slotContextMenuRequested(int,int,const QPoint&))); + connect(pushButton7, SIGNAL(clicked()), SLOT(slotEditTable())); + connect(pushButton7_2, SIGNAL(clicked()), SLOT(slotEditTableBody())); + connect(pushButton7_3, SIGNAL(clicked()), SLOT(slotEditTableHeader())); + connect(pushButton7_4, SIGNAL(clicked()), SLOT(slotEditTableFooter())); + connect(headerTableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)), + SLOT(slotContextMenuRequested(int,int,const QPoint&))); + connect(footerTableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)), + SLOT(slotContextMenuRequested(int,int,const QPoint&))); + connect(tabWidget, SIGNAL(currentChanged(QWidget*)), SLOT(slotTabChanged(QWidget*))); + connect(buttonHelp, SIGNAL(clicked()), SLOT(slotHelpInvoked())); + connect(tableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int))); + connect(headerTableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int))); + connect(footerTableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int))); +} + +TableEditor::~TableEditor() +{ + delete m_popup; + delete m_tbody; + delete m_thead; + delete m_tfoot; + delete m_table; + newNum -=5; + deleteMatrix(m_tableDataTags); + deleteMatrix(m_tableHeaderTags); + deleteMatrix(m_tableFooterTags); + deleteList(m_tableDataRows); + deleteList(m_tableHeaderRows); + deleteList(m_tableFooterRows); + kdDebug(24000) << "Undeleted new: " << newNum << endl; +} + +void TableEditor::slotContextMenuRequested( int row, int col, const QPoint & pos ) +{ + m_row = row; + m_col = col; + m_popup->setItemEnabled(m_cellEditId, (row >=0 && col >=0)); + m_popup->setItemEnabled(m_rowEditId, (row >=0)); + m_popup->setItemEnabled(m_colEditId, (col >=0)); + m_popup->setItemVisible(m_mergeSeparatorId, false); + m_popup->setItemVisible(m_mergeCellsId, false); + m_popup->setItemVisible(m_unmergeCellsId, false); + if (row >=0 && col >=0) { + TableNode tableNode = (*m_tableTags)[m_row][m_col]; + m_popup->setItemVisible(m_mergeSeparatorId, false); + m_popup->setItemVisible(m_mergeCellsId, false); + m_popup->setItemVisible(m_editChildId, false); + if (tableNode.merged) { + m_popup->setItemVisible(m_unmergeCellsId, true); + m_popup->setItemVisible(m_mergeSeparatorId, true); + } + QTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); + QRect rect(QPoint(selection.topRow(), selection.leftCol()) , + QPoint(selection.bottomRow(), selection.rightCol())); + if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.contains(m_row, m_col)) { + m_popup->setItemVisible(m_mergeCellsId, true); + m_popup->setItemVisible(m_mergeSeparatorId, true); + } + if (m_dataTable->item(m_row, m_col) && !m_dataTable->item(m_row, m_col)->pixmap().isNull()) { + m_popup->setItemVisible(m_editChildId, true); + } + } + m_popup->popup(pos); +} + + +void TableEditor::slotEditCell() +{ + Tag *tag = (*m_tableTags)[m_row][m_col].node->tag; + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd, "td"), tag, m_baseURL); + int many = 0; + if (dlg.exec()) { + for (int row = 0; row < m_dataTable->numRows(); row++) + for (int col = 0; col < m_dataTable->numCols(); col++) { + many++; + if (m_dataTable->isSelected(row, col)) { + (*m_tableTags)[row][col].node->tag->modifyAttributes(dlg.getAttributes()); + configureCell(row, col, (*m_tableTags)[row][col].node); + } + } + if (!many) { + (*m_tableTags)[m_row][m_col].node->tag->modifyAttributes(dlg.getAttributes()); + configureCell(m_row, m_col, (*m_tableTags)[m_row][m_col].node); + } + //TODO: add/remove columns/rows if the colspan/rowspan attribute is changed + } +} + +void TableEditor::slotEditCellText( int r, int ) +{ + m_dataTable->adjustRow(r); +} + + +void TableEditor::slotEditRow() +{ + Tag *tag = (*m_tableRows)[m_row].node->tag; + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd,"tr"), tag, m_baseURL); + if (dlg.exec()) { + tag->modifyAttributes(dlg.getAttributes()); + } +} + + +void TableEditor::slotEditCol() +{ + KMessageBox::information(this, i18n("Edit col: %1").arg(m_col + 1)); + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd,"col")); + dlg.exec(); +} + + +void TableEditor::slotEditTable() +{ + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd,"table"), m_table, m_baseURL); + if (dlg.exec()) { + m_table->modifyAttributes(dlg.getAttributes()); + } +} + + +void TableEditor::slotEditTableBody() +{ + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd,"tbody"), m_tbody, m_baseURL); + if (dlg.exec()) { + m_tbody->modifyAttributes(dlg.getAttributes()); + } +} + + +bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser *docParser ) +{ + const uint pInitialTableSize = 20; + + m_bLine = bLine; + m_bCol = bCol; + m_eLine = eLine; + m_eCol = eCol; + m_createNodes = false; //don't create the cell and row content when adding a new cell/row + Node *node = docParser->nodeAt(bLine, bCol + 1); + Node *lastNode = docParser->nodeAt(eLine, eCol); + if (node) + kdDebug(24000) << "node = " << node->tag->name << endl; + if (lastNode) + kdDebug(24000) << "lastnode = " << lastNode->tag->name << endl; + if (!node || !lastNode) + return false; + m_write = node->tag->write(); + m_dtd = node->tag->dtd(); + if ( !QuantaCommon::closesTag(node->tag, lastNode->tag) ) { + return false; + } + int nCol, nRow, maxCol; + nCol = nRow = maxCol = 0; + bool countRows = false; + bool missingBody = false; + m_rowSpin = 0L; + m_colSpin = 0L; + m_dataTable = 0L; + QValueList tableRowTags; + QValueVector< QValueVector > mergeMatrix; + mergeMatrix.resize(pInitialTableSize); + for (uint i = 0; i < pInitialTableSize; i++) + mergeMatrix[i].resize(pInitialTableSize); + TableNode tableNode; + Node *n = node; + while (n != lastNode->nextSibling()) + { + QString tagName = n->tag->name.lower(); + if (tagName == "table") + { + if (m_table && m_dataTable && nRow > 0 && nCol > 0) //nested table! + { + int line, col; + n->tag->beginPos(line, col); + NestedTable table; + table.row = nRow -1; + table.col = nCol - 1; + table.bLine = line; + table.bCol = col; + if (n->next && QuantaCommon::closesTag(n->tag, n->next->tag)) { + n->next->tag->endPos(table.eLine, table.eCol); + table.node = n; + table.nestedData = m_write->text(table.bLine, table.bCol, table.eLine, table.eCol); + m_nestedTables.append(table); + m_dataTable->item(nRow -1, nCol -1)->setPixmap(QIconSet(UserIcon("quick_table")).pixmap()); + m_dataTable->updateCell(nRow - 1, nCol - 1); + } + n = n->next; + } else + { + m_table = new Tag(*(n->tag)); + newNum++; + } + } + else if (tagName == "thead") + { + headerCheckBox->setChecked(true); + countRows = true; + m_rowSpin = headerRowSpinBox; + m_colSpin = headerColSpinBox; + m_dataTable= headerTableData; + m_tableTags = m_tableHeaderTags; + m_tableRows = m_tableHeaderRows; + if (m_thead) { //there was already a tag in the area + nRow = m_dataTable->numRows(); + } else { + m_thead = new Tag(*(n->tag)); + newNum++; + } + } + else if (tagName == "/thead") + { + headerRowSpinBox->setValue(nRow); + headerColSpinBox->setValue(maxCol); + countRows = false; + nCol = nRow = maxCol = 0; + m_rowSpin = 0L; + m_colSpin = 0L; + m_dataTable = 0L; + } + else if (tagName == "tfoot") + { + footerCheckBox->setChecked(true); + m_rowSpin = footerRowSpinBox; + m_colSpin = footerColSpinBox; + m_tableTags = m_tableFooterTags; + m_tableRows = m_tableFooterRows; + m_dataTable = footerTableData; + countRows = true; + if (m_tfoot) { //there was already a tag in the area + nRow = m_dataTable->numRows(); + } else { + m_tfoot = new Tag(*(n->tag)); + newNum++; + } + } + else if (tagName == "/tfoot") + { + footerRowSpinBox->setValue(nRow); + footerColSpinBox->setValue(maxCol); + countRows = false; + nCol = nRow = maxCol = 0; + m_rowSpin = 0L; + m_colSpin = 0L; + m_dataTable = 0L; + } + else if (tagName == "tbody") + { + m_rowSpin = rowSpinBox; + m_colSpin = colSpinBox; + m_tableTags = m_tableDataTags; + m_tableRows = m_tableDataRows; + m_dataTable = tableData; + countRows = true; + m_tbody = new Tag(*(n->tag)); + newNum++; + } + else if (tagName == "/tbody") + { + rowSpinBox->setValue(nRow); + colSpinBox->setValue(maxCol); + countRows = false; + nCol = nRow = maxCol = 0; + m_tableTags = 0L; + m_tableRows = 0L; + m_rowSpin = 0L; + m_colSpin = 0L; + m_dataTable = 0L; + } + else if (tagName == "tr") + { + if (!countRows) + { + missingBody = true; + m_rowSpin = rowSpinBox; + m_colSpin = colSpinBox; + m_tableTags = m_tableDataTags; + m_tableRows = m_tableDataRows; + m_dataTable = tableData; + countRows = true; + m_tbody = new Tag(); + newNum++; + m_tbody->parse("", m_write); + } + nRow++; + if ((uint)nRow >= mergeMatrix.size()) { // Check if there are enough rows in mergeMatriz + mergeMatrix.resize(2 * mergeMatrix.size()); + for (uint i = mergeMatrix.size() / 2; i < mergeMatrix.size(); i++) + mergeMatrix[i].resize(mergeMatrix[0].size()); + } + + m_rowSpin->setValue(nRow); + nCol = 0; + tableNode.node = new Node(0L); + tableNode.node->tag = new Tag(*(n->tag)); + newNum++; + tableNode.merged = false; + m_tableRows->append(tableNode); + } + else if (tagName == "/tr") + { + if (countRows) + { + maxCol = (nCol > maxCol) ? nCol : maxCol; + maxCol = (maxCol == 0) ? 1 : maxCol; + for (int col = nCol; col < maxCol; col++) + { + if (mergeMatrix[nRow - 1][col].node != 0L) { + if (m_colSpin->value() < col) + m_colSpin->setValue(col); + TableNode tableN = mergeMatrix[nRow - 1][col]; + Node *n = tableN.node; + setCellText(m_dataTable, nRow - 1, col, i18n("Merged with (%1, %2).").arg(tableN.mergedRow + 1).arg(tableN.mergedCol + 1)); + m_dataTable->item(nRow-1, col)->setEnabled(false); + tableNode.node = new Node(0L); + tableNode.node->tag = new Tag(*(n->tag)); + configureCell(nRow-1, col, tableNode.node); + newNum++; + tableNode.merged = true; + tableNode.mergedRow = tableN.mergedRow; + tableNode.mergedCol = tableN.mergedCol; + tableRowTags.append(tableNode); + if ((uint)nCol >= mergeMatrix[0].size()) // Check if there are enough cols + for (uint i=0; itag = new Tag(); + tableNode.node->tag->setDtd(m_dtd); + tableNode.node->tag->parse("", m_write); + tableNode.merged = false; + tableRowTags.append(tableNode); + } + } + if (!tableRowTags.isEmpty()) + m_tableTags->append(tableRowTags); + tableRowTags.clear(); + } + } + else if (tagName == "th" || tagName == "td") + { + if (countRows) + { + int col = nCol; + while (mergeMatrix[nRow - 1][col].node != 0L) { + if (m_colSpin->value() < col) + m_colSpin->setValue(col); + TableNode tableN = mergeMatrix[nRow - 1][col]; + Node *n = tableN.node; + setCellText(m_dataTable, nRow - 1, col, i18n("Merged with (%1, %2).").arg(tableN.mergedRow + 1).arg(tableN.mergedCol + 1)); + m_dataTable->item(nRow-1, col)->setEnabled(false); + tableNode.node = new Node(0L); + tableNode.node->tag = new Tag(*(n->tag)); + configureCell(nRow-1, col, tableNode.node); + newNum++; + tableNode.merged = true; + tableNode.mergedRow = tableN.mergedRow; + tableNode.mergedCol = tableN.mergedCol; + tableRowTags.append(tableNode); + col++; + nCol++; + if ((uint)nCol >= mergeMatrix[0].size()) // Check if there are enough cols + for (uint i = 0; i < mergeMatrix.size(); i++) + mergeMatrix[i].resize(2 * mergeMatrix[i].size()); + + } + nCol++; + if (m_rowSpin && m_colSpin && m_dataTable) + { + m_rowSpin->setValue(nRow); + if (m_colSpin->value() < nCol) + m_colSpin->setValue(nCol); + setCellText(m_dataTable, nRow - 1, nCol - 1, tagContent(n)); + tableNode.node = new Node(0L); + tableNode.node->tag = new Tag(*(n->tag)); + configureCell(nRow-1, col, tableNode.node); + newNum++; + tableNode.merged = false; + tableRowTags.append(tableNode); + } + QString colspanValue = n->tag->attributeValue("colspan", true); + int colValue = 1; + int lastCol = nCol; + if (!colspanValue.isEmpty()) + { + bool ok; + colValue = colspanValue.toInt(&ok, 10); + if (ok && colValue > 1) + { + nCol += (colValue - 1); + if (m_colSpin->value() < nCol) + m_colSpin->setValue(nCol); + for (int i = 0; i < colValue - 1; i++) + { + setCellText(m_dataTable, nRow - 1, lastCol + i, i18n("Merged with (%1, %2).").arg(nRow).arg(lastCol)); + m_dataTable->item(nRow-1, lastCol + i)->setEnabled(false); + tableNode.node = new Node(0L); + tableNode.node->tag = new Tag(*(n->tag)); + configureCell(nRow-1, col, tableNode.node); + newNum++; + tableNode.merged = true; + tableNode.mergedRow = nRow - 1; + tableNode.mergedCol = lastCol - 1; + tableRowTags.append(tableNode); + } + } else + colValue = 1; + } + QString rowspanValue = n->tag->attributeValue("rowspan", true); + if (!rowspanValue.isEmpty()) + { + bool ok; + int rowValue = rowspanValue.toInt(&ok, 10); + if (ok && rowValue > 1) + { + lastCol--; + // Check if there are enough columns in mergeMatriz + if ((uint)(lastCol + colValue) >= mergeMatrix[0].size()) + for (uint i = 0; i < mergeMatrix.size(); i++) + mergeMatrix[i].resize(2 * mergeMatrix[i].size()); + // Check if there are enough rows in mergeMatriz + if ((uint)(nRow + rowValue) >= mergeMatrix.size()) { + mergeMatrix.resize(2 * mergeMatrix.size()); + for (uint i = mergeMatrix.size() / 2; i < mergeMatrix.size(); i++) + mergeMatrix[i].resize(mergeMatrix[0].size()); + } + + for (int i = 0; i < rowValue - 1; i++) + for (int j = 0; j < colValue; j++) { + mergeMatrix[nRow + i][lastCol + j].mergedRow = nRow - 1; + mergeMatrix[nRow + i][lastCol + j].mergedCol = lastCol; + mergeMatrix[nRow + i][lastCol + j].node = n; + } + } + } + } + } + else if (tagName == "caption") + { + captionText->setText(tagContent(n)); + } else if (tagName == "col" || tagName == "colgroup") { + m_colTags.append(n->tag); + } + n = n->nextSibling(); + } +/* if (missingBody) { //Hm, why do we need it? I don't remember now. ;-) + rowSpinBox->setValue(nRow); + colSpinBox->setValue(maxCol); + } */ + //by default the current page is the data handling page + m_tableTags = m_tableDataTags; + m_tableRows = m_tableDataRows; + m_dataTable = tableData; + m_rowSpin = rowSpinBox; + m_colSpin = colSpinBox; + + //create the thead, tbody, tfoot tags if they were not present in the parsed area + if (!m_thead) { + m_thead = new Tag(); + newNum++; + m_thead->parse("", m_write); + } + if (!m_tfoot) { + m_tfoot = new Tag(); + newNum++; + m_tfoot->parse("", m_write); + } + m_createNodes = true; //enable cell/row creation + + configureTable(tableData); + configureTable(headerTableData); + configureTable(footerTableData); + return true; +} + + +void TableEditor::setBaseURL( const KURL & url ) +{ + m_baseURL = url; +} + + +void TableEditor::slotEditTableHeader() +{ + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd, "thead"), m_thead, m_baseURL); + if (dlg.exec()) { + m_thead->modifyAttributes(dlg.getAttributes()); + } +} + + +void TableEditor::slotEditTableFooter() +{ + TagDialog dlg(QuantaCommon::tagFromDTD(m_dtd,"tfoot"), m_tfoot, m_baseURL); + if (dlg.exec()) { + m_tfoot->modifyAttributes(dlg.getAttributes()); + } +} + + +void TableEditor::slotTabChanged( QWidget *w) +{ + int i = tabWidget->indexOf(w); + switch (i) + { + case 0: { + m_tableTags = m_tableDataTags; + m_tableRows = m_tableDataRows; + m_dataTable = tableData; + m_colSpin = colSpinBox; + m_rowSpin = rowSpinBox; + break; + } + case 1: { + m_tableTags = m_tableHeaderTags; + m_tableRows = m_tableHeaderRows; + m_dataTable = headerTableData; + m_colSpin = headerColSpinBox; + m_rowSpin = headerRowSpinBox; + break; + } + case 2: { + m_tableTags = m_tableFooterTags; + m_tableRows = m_tableFooterRows; + m_dataTable = footerTableData; + m_colSpin = footerColSpinBox; + m_rowSpin = footerRowSpinBox; + break; + } + } + configureTable(m_dataTable); +} + + +QString TableEditor::readModifiedTable() +{ + QString tableString; + tableString = m_table->toString(); + if (!captionText->text().isEmpty()) { + tableString += indent(2); + tableString += "<" + QuantaCommon::tagCase("caption") + ">"; + tableString += captionText->text(); + tableString += ""; + } + for (QValueList::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) { + tableString += indent(2); + tableString += (*it)->toString(); + } + if (headerCheckBox->isChecked() && headerTableData->numRows() > 0) { + //insert the tag + tableString += indent(2); + tableString += m_thead->toString(); + + kdDebug(24000) << "thead" << endl; + m_tableTags = m_tableHeaderTags; + m_tableRows = m_tableHeaderRows; + m_dataTable = headerTableData; + tableString += tableToString(); + tableString += indent(2); + tableString += "name) +">"; + } + if (footerCheckBox->isChecked() && footerTableData->numRows() > 0) { + //insert the tag + tableString += indent(2); + tableString += m_tfoot->toString(); + + kdDebug(24000) << "tfoot" << endl; + m_tableTags = m_tableFooterTags; + m_tableRows = m_tableFooterRows; + m_dataTable = footerTableData; + tableString += tableToString(); + tableString += indent(2); + tableString += "name) +">"; + } + //insert the tag + if (!m_tbody) + { + m_tbody = new Tag(); + newNum++; + m_tbody->parse("", m_write); + } + tableString += indent(2); + tableString += m_tbody->toString(); + kdDebug(24000) << "tbody" << endl; + m_tableTags = m_tableDataTags; + m_tableRows = m_tableDataRows; + m_dataTable = tableData; + tableString += tableToString(); + //close the and tags + tableString += indent(2); + tableString += "name) +">"; + tableString += "\n"; + tableString += "name) + ">"; + + //kdDebug(24000) << tableString << endl; + return tableString; +} + + +QString TableEditor::indent( int n ) +{ + QString str; + str.fill(' ', n); + str.prepend('\n'); + return str; +} + + +QString TableEditor::cellValue( int row, int col ) +{ + if (!m_dataTable) + return QString::null; + QString str; + Node *node = (*m_tableTags)[row][col].node; + if (!node) + return QString::null; + str = node->tag->toString(); + str += m_dataTable->text(row, col); + str += "tag->name) + ">"; + return str; +} + + +QString TableEditor::tableToString() +{ + QString tableStr; + for (int i = 0; i < m_dataTable->numRows(); i++) { + tableStr += indent(4); + Node *node = (*m_tableRows)[i].node; + Tag *tag = 0L; + if (node) + tag = node->tag; + if (tag) + tableStr += tag->toString(); + else + tableStr += QuantaCommon::tagCase(""); + for (int j = 0; j < m_dataTable->numCols(); j++) { + if ((*m_tableTags)[i][j].node && !(*m_tableTags)[i][j].merged) + { + tableStr += indent(6); + tableStr += cellValue(i, j); + } + } + tableStr += indent(4); + if (tag) + tableStr += "name) +">"; + else + tableStr += QuantaCommon::tagCase(""); + } + return tableStr; +} + + +QString TableEditor::tagContent(Node *node) +{ + if (!node) + return QString::null; + QString content; + int bl, bc, el, ec; + node->tag->endPos(bl, bc); + bc++; + if (node->next) + { + node->next->tag->beginPos(el, ec); + ec--; + } + else + { + Node *n = node->nextSibling(); + if (n) { + n->tag->beginPos(el, ec); + ec--; + } else { + return QString::null; + } + } + content = m_write->text(bl, bc, el, ec); + return content; +} + + +void TableEditor::slotInsertRow() +{ + int num = m_dataTable->numRows(); + if (m_row >= 0) + num = m_row; + m_dataTable->insertRows(num); + m_dataTable->setRowHeight(num, 50); + if (m_createNodes) { + TableNode tableNode; + tableNode.merged = false; + tableNode.node = new Node(0L); + newNum++; + tableNode.node->tag = new Tag(); + tableNode.node->tag->setDtd(m_dtd); + tableNode.node->tag->parse("", m_write); + QValueList::Iterator rowIt = m_tableRows->at(num); + if (rowIt != m_tableRows->end()) + m_tableRows->insert(rowIt, tableNode); + else + m_tableRows->append(tableNode); + QValueList tableRowTags; + for (int i = 0; i < m_dataTable->numCols(); i++) { + tableNode.merged = false; + tableNode.node = new Node(0L); + newNum++; + tableNode.node->tag = new Tag(); + tableNode.node->tag->setDtd(m_dtd); + if (m_tableTags == m_tableHeaderTags) { + tableNode.node->tag->parse(" + + + +
", m_write); + } else { + tableNode.node->tag->parse("", m_write); + } + tableRowTags.append(tableNode); + setCellText(m_dataTable, num, i, ""); + } + QValueList >::Iterator it = m_tableTags->at(num); + if (it != m_tableTags->end()) + m_tableTags->insert(it, tableRowTags); + else + m_tableTags->append(tableRowTags); + } + m_rowSpin->setValue(m_dataTable->numRows()); +} + + +void TableEditor::slotInsertCol() +{ + int num = m_dataTable->numCols(); + if (m_col >= 0) + num = m_col; + m_dataTable->insertColumns(num); + m_dataTable->setColumnWidth(num, 150); + if (m_createNodes) { + TableNode tableNode; + int i = 0; + for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + tableNode.merged = false; + tableNode.node = new Node(0L); + newNum++; + tableNode.node->tag = new Tag(); + tableNode.node->tag->setDtd(m_dtd); + if (m_tableTags == m_tableHeaderTags) { + tableNode.node->tag->parse("", m_write); + } else { + tableNode.node->tag->parse("", m_write); + } + (*it).append(tableNode); + setCellText(m_dataTable, i, num, ""); + i++; + } + } + m_colSpin->setValue(m_dataTable->numCols()); +} + + +void TableEditor::slotAddRemoveRow( int num ) +{ + m_row = -1; + int numRows = m_dataTable->numRows(); + if (num > numRows) { + for (int i = numRows; i < num; i++) { + slotInsertRow(); + } + } + else { + for (int i = num; i < numRows; i++) { + slotRemoveRow(); + } + } + //TODO: change the main tag's rowspan if necessary +} + + +void TableEditor::slotAddRemoveCol( int num ) +{ + m_col = -1; + int numCols = m_dataTable->numCols(); + if (num > numCols) { + for (int i = numCols; i < num; i++) { + slotInsertCol(); + } + } + else { + for (int i = num; i < numCols; i++) { + slotRemoveCol(); + } + } + //TODO: change the main tag's colspan if necessary} +} + +void TableEditor::slotRemoveRow() +{ + if (m_row == -1) + m_row = m_dataTable->numRows() - 1; + int i = 0; + int j = 0; + for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + j = 0; + for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + if ((*it2).merged && (*it2).mergedRow == m_row) { + (*it2).merged = false; + setCellText(m_dataTable, i, j, tagContent((*it2).node)); + m_dataTable->item(i, j)->setEnabled(true); + (*it2).node->tag->deleteAttribute("colspan"); + (*it2).node->tag->deleteAttribute("rowspan"); + } + j++; + } + i++; + } + QValueList updatedMainNodes; + QValueList >::Iterator it2 = m_tableTags->at(m_row); + for (QValueList::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) { + if ((*it3).merged) + { + TableNode *mainTableNode = &((*m_tableTags)[(*it3).mergedRow][(*it3).mergedCol]); + if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) + { + int rowspan = mainTableNode->node->tag->attributeValue("rowspan", true).toInt(); + rowspan--; + if (rowspan > 1) + mainTableNode->node->tag->editAttribute("rowspan", QString("%1").arg(rowspan)); + else + mainTableNode->node->tag->deleteAttribute("rowspan"); + updatedMainNodes.append(mainTableNode); + } + } + Node::deleteNode((*it3).node); + (*it3).node = 0L; + newNum--; + } + m_tableTags->erase(it2); + m_dataTable->removeRow(m_row); + QValueList::Iterator it = m_tableRows->at(m_row); + Node::deleteNode((*it).node); + newNum--; + m_tableRows->erase(it); + m_rowSpin->setValue(m_dataTable->numRows()); +} + + +void TableEditor::slotRemoveCol() +{ + int i = 0; + int j = 0; + for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + j = 0; + for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + if ((*it2).merged && (*it2).mergedCol == m_col) { + (*it2).merged = false; + setCellText(m_dataTable, i, j, tagContent((*it2).node)); + m_dataTable->item(i, j)->setEnabled(true); + (*it2).node->tag->deleteAttribute("colspan"); + (*it2).node->tag->deleteAttribute("rowspan"); + } + j++; + } + i++; + } + if (m_col == -1) + m_col = m_dataTable->numCols() - 1; + QValueList updatedMainNodes; + for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + QValueList::Iterator it2 = (*it).at(m_col); + if ((*it2).merged) + { + TableNode *mainTableNode = &((*m_tableTags)[(*it2).mergedRow][(*it2).mergedCol]); + if (mainTableNode->node && !updatedMainNodes.contains(mainTableNode)) + { + int colspan = mainTableNode->node->tag->attributeValue("colspan", true).toInt(); + colspan--; + if (colspan > 1) + mainTableNode->node->tag->editAttribute("colspan", QString("%1").arg(colspan)); + else + mainTableNode->node->tag->deleteAttribute("colspan"); + updatedMainNodes.append(mainTableNode); + } + } + Node::deleteNode((*it2).node); + newNum--; + (*it).erase(it2); + } + m_dataTable->removeColumn(m_col); + m_colSpin->setValue(m_dataTable->numCols()); +} + + +void TableEditor::createNewTable(Document *write, const DTDStruct *dtd) +{ + m_write = write; + m_dtd = dtd; + m_table = new Tag(); + m_table->setDtd(m_dtd); + newNum++; + m_table->parse("", m_write); + m_thead = new Tag(); + m_thead->setDtd(m_dtd); + newNum++; + m_thead->parse("", m_write); + m_tfoot = new Tag(); + m_tfoot->setDtd(m_dtd); + newNum++; + m_tfoot->parse("", m_write); + m_tbody = new Tag(); + m_tbody->setDtd(m_dtd); + newNum++; + m_tbody->parse("", m_write); + //by default the current page is the data handling page + m_tableTags = m_tableDataTags; + m_tableRows = m_tableDataRows; + m_dataTable = tableData; + m_bLine = m_bCol = m_eLine = m_eCol = 0; +} + + +void TableEditor::deleteList( QValueList *table ) +{ + for (QValueList::Iterator it = table->begin(); it != table->end(); ++it) { + Node::deleteNode((*it).node); + newNum--; + } + delete table; + newNum--; +} + + +void TableEditor::deleteMatrix( QValueList > *matrix ) +{ + for (QValueList >::Iterator it = matrix->begin(); it != matrix->end(); ++it) { + for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + Node::deleteNode((*it2).node); + newNum--; + } + } + delete matrix; + newNum--; +} + + +void TableEditor::slotMergeCells() +{ + slotUnmergeCells(); //first unmerge all cells from the selection + + QTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); + int tRow, bRow, lCol, rCol; + tRow = selection.topRow(); + bRow = selection.bottomRow(); + lCol = selection.leftCol(); + rCol = selection.rightCol(); + TableNode *mainTableNode = &((*m_tableTags)[tRow][lCol]); + if (rCol - lCol > 0) + mainTableNode->node->tag->editAttribute("colspan", QString("%1").arg(rCol - lCol + 1)); + if (bRow - tRow > 0) + mainTableNode->node->tag->editAttribute("rowspan", QString("%1").arg(bRow - tRow + 1)); + for (int i = 0; i < bRow - tRow + 1; i++) + for (int j = 0; j < rCol - lCol + 1; j++) { + if (i != 0 || j != 0) { + setCellText(m_dataTable, tRow + i, lCol + j, i18n("Merged with (%1, %2).").arg(tRow + 1).arg(lCol + 1)); + m_dataTable->item(tRow + i, lCol + j)->setEnabled(false); + TableNode *tableNode = &((*m_tableTags)[tRow + i][lCol + j]); + Node::deleteNode(tableNode->node); + tableNode->node = new Node(0L); + newNum++; + tableNode->node->tag = new Tag(*(mainTableNode->node->tag)); + tableNode->merged = true; + tableNode->mergedRow = tRow; + tableNode->mergedCol = lCol; + } + } +} + + +void TableEditor::slotUnmergeCells() +{ + int tRow, bRow, lCol, rCol; + int selectionNum = m_dataTable->currentSelection(); + if (selectionNum != -1) { + QTableSelection selection = m_dataTable->selection(selectionNum); + tRow = selection.topRow(); + bRow = selection.bottomRow(); + lCol = selection.leftCol(); + rCol = selection.rightCol(); + } else { + tRow = m_row; + bRow = m_row; + lCol = m_col; + rCol = m_col; + } + for (int row = tRow; row <= bRow; ++row) + for (int col = lCol; col <= rCol; ++col) { + TableNode tableNode = (*m_tableTags)[row][col]; + if (!tableNode.merged) + continue; + TableNode newTableNode; + int i = 0; + int j = 0; + for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + j = 0; + QValueList::Iterator it2 = (*it).begin(); + while (it2 != (*it).end()) { + if ((*it2).merged && + tableNode.mergedRow == (*it2).mergedRow && + tableNode.mergedCol == (*it2).mergedCol) { + + Node::deleteNode((*it2).node); + newNum--; + it2 = (*it).erase(it2); + newTableNode.merged = false; + newTableNode.node = new Node(0L); + newNum++; + newTableNode.node->tag = new Tag(); + newTableNode.node->tag->setDtd(m_dtd); + if (m_tableTags == m_tableHeaderTags) { + newTableNode.node->tag->parse(" + + + +
", m_write); + } else { + newTableNode.node->tag->parse("", m_write); + } + (*it).insert(it2, newTableNode); + setCellText(m_dataTable, i, j, tagContent(newTableNode.node)); + m_dataTable->item(i, j)->setEnabled(true); + } else { + ++it2; + } + j++; + } + i++; + } + newTableNode = (*m_tableTags)[tableNode.mergedRow][tableNode.mergedCol]; + newTableNode.node->tag->deleteAttribute("colspan"); + newTableNode.node->tag->deleteAttribute("rowspan"); + //change the main node + TableNode tmpNode = newTableNode; + newTableNode.node = new Node(0L); + newNum++; + newTableNode.node->tag = new Tag(*(tmpNode.node->tag)); + QValueList >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow); + QValueList::Iterator iter2 = (*iter1).at(tableNode.mergedCol); + iter2 = (*iter1).erase(iter2); + (*iter1).insert(iter2, newTableNode); + Node::deleteNode(tmpNode.node); + newNum--; + } +} + + + +void TableEditor::slotEditChildTable() +{ + bool tempDocCreated = false; + bool error = false; + QValueList::Iterator errorIt; + Parser *localParser = 0L; + Document *w = 0L; + Node *savedBaseNode = 0L; + NestedTable table; + + for (QValueList::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) { + table = *it; + if (table.row == m_row && table.col == m_col) { + QString cellData = m_dataTable->text(table.row, table.col); + int pos = cellData.find(table.nestedData); + if (pos == -1) { + KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); + error = true; + errorIt = it; + break; + } + //create a new editor object and save the current state of the table there + KTextEditor::Document *doc = + KTextEditor::createDocument ("libkatepart", 0L, "KTextEditor::Document"); + w = new Document(doc, 0L); + QString tableData = readModifiedTable(); + w->editIf->insertText(0, 0, tableData); + localParser = new Parser(); + savedBaseNode = baseNode; //we must save it as it's deleted in the localParser->parse(); + baseNode = 0L; + baseNode = localParser->parse(w); + tempDocCreated = true; + //try to find the child table position + int pos2 = tableData.find(cellData); + if (pos2 != -1) + pos2 = tableData.find(table.nestedData, pos2); + else { + KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); + error = true; + errorIt = it; + break; + } + tableData = tableData.left(pos2); + table.bLine = tableData.contains('\n'); + pos2 = tableData.findRev('\n'); + if (pos2 != -1) { + table.bCol = tableData.length() - pos2; + } else { + table.bCol = tableData.length(); + } + Node *childTableNode = localParser->nodeAt(table.bLine, table.bCol); + if (!childTableNode->next || !QuantaCommon::closesTag(childTableNode->tag, childTableNode->next->tag)) { + KMessageBox::error(this, i18n("Cannot find the closing tag of the child table; you have probably introduced unclosed tags in the table and have broken its consistency."), i18n("Cannot Read Table")); + error = true; + errorIt = it; + break; + } + childTableNode->next->tag->endPos(table.eLine, table.eCol); + TableEditor editor; + editor.setCaption("Child Table Editor"); + editor.setBaseURL(m_baseURL); + editor.setTableArea(table.bLine, table.bCol, table.eLine, table.eCol, localParser); + if (editor.exec()) { + int length = table.nestedData.length(); + (*it).nestedData = editor.readModifiedTable(); + cellData.replace(pos, length, (*it).nestedData); + setCellText(m_dataTable, table.row, table.col, cellData); + } + //cleanup on success + Node::deleteNode(baseNode); + baseNode = savedBaseNode; + delete localParser; + delete w; + return; + } + } + //cleanup on error + if (error) { + m_nestedTables.erase(errorIt); + m_dataTable->item(table.row, table.col)->setPixmap(QPixmap()); + m_dataTable->updateCell(table.row, table.col); + if (tempDocCreated) { + Node::deleteNode(baseNode); + baseNode = savedBaseNode; + delete localParser; + delete w; + } + } +} + + +void TableEditor::slotHelpInvoked() +{ + kapp->invokeHelp("table-editor","quanta"); +} + +void TableEditor::configureTable( QTable * table ) +{ + if (!table) + return; + for (int r=0; rnumRows(); r++) { + table->adjustRow(r); + for (int c=0; cnumCols(); c++) + if (table->item(r, c)) + table->item(r, c)->setWordWrap(true); + } + table->setColumnMovingEnabled(true); + table->setRowMovingEnabled(true); +} + +void TableEditor::setCellText( QTable * table, int row, int col, const QString & text ) +{ + table->setItem(row, col, new TableItem(table, QTableItem::OnTyping, text)); +} + +void TableEditor::configureCell(int row, int col, Node * node) +{ + TableItem* item = (TableItem*) m_dataTable->item(row, col); + if (!item) + return; + // Header (TH) or standard cell? + item->setHeader(node->tag->name.lower() == "th"); + // Horizontal alignment + Qt::AlignmentFlags flags; + QString align = node->tag->attributeValue("align", true); + if (align == "right") + flags = Qt::AlignRight; + else if (align == "center") + flags = Qt::AlignHCenter; + else if (align == "justify") + flags = Qt::AlignJustify; + else if (align.isEmpty() && item->header()) + flags = Qt::AlignHCenter; // TH is centered by default + else + flags = Qt::AlignLeft; + item->setAlignment(flags); + // Vertical alignment + QString valign = node->tag->attributeValue("valign", true); + if (valign == "top") + flags = Qt::AlignTop; + else if (valign == "bottom") + flags = Qt::AlignBottom; + else flags = Qt::AlignVCenter; + item->setVAlignment(flags); +} + +#include "tableeditor.moc" diff --git a/quanta/components/tableeditor/tableeditor.h b/quanta/components/tableeditor/tableeditor.h new file mode 100644 index 00000000..b1df7b48 --- /dev/null +++ b/quanta/components/tableeditor/tableeditor.h @@ -0,0 +1,132 @@ +/*************************************************************************** + tableeditor.h - table editor dialog + begin : Thu 15 Apr 2004 + copyright : (C) 2004 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + ***************************************************************************/ + +#ifndef TABLEEDITOR_H +#define TABLEEDITOR_H + +#include +#include + +#include "tableeditors.h" +#include "document.h" + +class QSpinBox; +class QTable; +class KPopupMenu; +class Tag; +struct DTDStruct; +class Node; + +class TableNode +{ +public: + Node *node; + bool merged; + int mergedRow; + int mergedCol; + TableNode() {node = 0;} +}; + + + +typedef struct NestedTable{ Node *node; int row; int col; int bLine; int bCol; int eLine; int eCol; QString nestedData;}; +class Parser; + + +class TableEditor : public TableEditorS +{ + Q_OBJECT + +public: + TableEditor( QWidget* parent = 0, const char* name = 0 ); + ~TableEditor(); + + virtual bool setTableArea( int bLine, int bCol, int eLine, int eCol, Parser * docParser ); + virtual void setBaseURL( const KURL & url ); + virtual QString readModifiedTable(); + virtual void createNewTable( Document * write, const DTDStruct * dtd ); + // Set defaults for table: enable word wrap, fit content, allow swapping col/rows with D&D + virtual void configureTable( QTable * table ); + virtual void setCellText( QTable * table, int row, int col, const QString & text ); + // Configure TableItem from tag attributes + virtual void configureCell( int row, int col, Node * node ); + +public slots: + virtual void slotContextMenuRequested( int row, int col, const QPoint & pos ); + virtual void slotEditCell(); + // Wrapper for setText to use TableItem instead of QTableItem + virtual void slotEditCellText( int r, int ); + virtual void slotEditRow(); + virtual void slotEditCol(); + virtual void slotEditTable(); + virtual void slotEditTableBody(); + virtual void slotEditTableHeader(); + virtual void slotEditTableFooter(); + virtual void slotTabChanged( QWidget * w ); + virtual void slotInsertRow(); + virtual void slotInsertCol(); + virtual void slotAddRemoveRow( int num ); + virtual void slotAddRemoveCol( int num ); + virtual void slotRemoveRow(); + virtual void slotRemoveCol(); + virtual void slotMergeCells(); + virtual void slotUnmergeCells(); + virtual void slotEditChildTable(); + virtual void slotHelpInvoked(); + +protected: + QValueList m_colTags; + int m_unmergeCellsId; + int m_mergeSeparatorId; + int m_mergeCellsId; + bool m_createNodes; + QValueList > *m_tableTags; + QValueList > *m_tableFooterTags; + QValueList > *m_tableHeaderTags; + QValueList *m_tableFooterRows; + QValueList *m_tableHeaderRows; + QValueList *m_tableRows; + Document* m_write; + Tag *m_table; + Tag *m_tfoot; + Tag *m_thead; + int newVariable; + Tag *m_tbody; + int m_colEditId; + int m_rowEditId; + int m_cellEditId; + int m_col; + int m_row; + KPopupMenu *m_popup; + KURL m_baseURL; + const DTDStruct *m_dtd; + QValueList > *m_tableDataTags; + QValueList *m_tableDataRows; + QTable *m_dataTable; + QSpinBox *m_rowSpin; + QSpinBox *m_colSpin; + int m_bLine, m_bCol, m_eLine, m_eCol; + QValueList m_nestedTables; + int m_editChildId; + + virtual QString indent( int n ); + virtual QString cellValue( int row, int col ); + virtual QString tableToString(); + virtual QString tagContent( Node * node ); + virtual void deleteList( QValueList * table ); + virtual void deleteMatrix( QValueList > * matrix ); + +}; + +#endif diff --git a/quanta/components/tableeditor/tableeditors.ui b/quanta/components/tableeditor/tableeditors.ui new file mode 100644 index 00000000..88def66d --- /dev/null +++ b/quanta/components/tableeditor/tableeditors.ui @@ -0,0 +1,642 @@ + +TableEditorS + + + TableEditorS + + + + 0 + 0 + 692 + 584 + + + + Table Editor + + + + unnamed + + + + buttonCancel + + + Ca&ncel + + + true + + + + + Horizontal Spacing2 + + + Horizontal + + + Expanding + + + + 16 + 20 + + + + + + buttonOk + + + &OK + + + + + + true + + + true + + + + + buttonHelp + + + &Help + + + F1 + + + true + + + + + tabWidget + + + + tab + + + &Main + + + + unnamed + + + + textLabel5 + + + Ta&ble data: + + + tableData + + + + + tableData + + + + 7 + 7 + 0 + 0 + + + + AlwaysOn + + + AlwaysOn + + + 0 + + + 0 + + + Single + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 276 + 20 + + + + + + spacer1_2_2 + + + Horizontal + + + Expanding + + + + 276 + 20 + + + + + + rowSpinBox + + + 999 + + + 0 + + + + + textLabel2 + + + Co&lumns: + + + colSpinBox + + + + + captionText + + + + + pushButton7_2 + + + Bod&y Properties + + + + + pushButton7 + + + &Table Properties + + + + + textLabel3 + + + + 5 + 1 + 0 + 0 + + + + C&aption: + + + captionText + + + + + textLabel1 + + + &Rows: + + + rowSpinBox + + + + + colSpinBox + + + 999 + + + 0 + + + + + + + tab + + + Header + + + + unnamed + + + + frame3 + + + false + + + StyledPanel + + + Raised + + + + unnamed + + + + headerTableData + + + AutoOneFit + + + AlwaysOn + + + AlwaysOn + + + 0 + + + 0 + + + Single + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 340 + 20 + + + + + + headerRowSpinBox + + + 0 + + + 0 + + + + + textLabel4_2 + + + Header &rows: + + + headerRowSpinBox + + + + + headerColSpinBox + + + 999 + + + + + textLabel4 + + + Header co&lumns: + + + headerColSpinBox + + + + + textLabel6 + + + Header &data: + + + headerTableData + + + + + + + headerCheckBox + + + Insert ta&ble header + + + + + spacer6 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + pushButton7_3 + + + false + + + &Header Properties + + + + + + + tab + + + Footer + + + + unnamed + + + + frame3_2 + + + false + + + StyledPanel + + + Raised + + + + unnamed + + + + footerTableData + + + AutoOneFit + + + AlwaysOn + + + AlwaysOn + + + 0 + + + 0 + + + Single + + + FollowStyle + + + + + footerRowSpinBox + + + 0 + + + 0 + + + + + textLabel4_2_2 + + + Footer &rows: + + + footerRowSpinBox + + + + + footerColSpinBox + + + 999 + + + + + textLabel4_3 + + + Footer co&lumns: + + + footerColSpinBox + + + + + textLabel6_2 + + + Footer &data: + + + footerTableData + + + + + spacer2_2 + + + Horizontal + + + Expanding + + + + 340 + 20 + + + + + + + + footerCheckBox + + + Insert ta&ble footer + + + + + spacer7 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + pushButton7_4 + + + false + + + &Footer Properties + + + + + + + + + + headerCheckBox + toggled(bool) + frame3 + setEnabled(bool) + + + footerCheckBox + toggled(bool) + frame3_2 + setEnabled(bool) + + + buttonOk + clicked() + TableEditorS + accept() + + + buttonCancel + clicked() + TableEditorS + reject() + + + headerCheckBox + toggled(bool) + pushButton7_3 + setEnabled(bool) + + + footerCheckBox + toggled(bool) + pushButton7_4 + setEnabled(bool) + + + + tabWidget + rowSpinBox + colSpinBox + pushButton7 + pushButton7_2 + captionText + tableData + buttonOk + buttonCancel + buttonHelp + headerCheckBox + pushButton7_3 + headerRowSpinBox + headerColSpinBox + headerTableData + footerCheckBox + pushButton7_4 + footerRowSpinBox + footerColSpinBox + footerTableData + + + diff --git a/quanta/components/tableeditor/tableitem.cpp b/quanta/components/tableeditor/tableitem.cpp new file mode 100644 index 00000000..96d7d37c --- /dev/null +++ b/quanta/components/tableeditor/tableitem.cpp @@ -0,0 +1,94 @@ +/*************************************************************************** + tableitem.cpp - description + ------------------- + begin : Mon 15 Mar 2004 + copyright : (C) 2004 by Michal Rudolf + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include "tableitem.h" + +TableItem::TableItem(QTable* table, EditType et) : QTableItem(table, et) +{ + setReplaceable(false); + m_halign = Qt::AlignLeft; + m_valign = Qt::AlignVCenter; +} + +TableItem::TableItem(QTable* table, EditType et, const QString& text) : QTableItem(table, et, text) +{ + setReplaceable(false); + m_halign = Qt::AlignLeft; + m_valign = Qt::AlignVCenter; +} + +TableItem::TableItem (QTable* table, EditType et, const QString& text, const QPixmap& p) : + QTableItem(table, et, text, p) +{ + setReplaceable(false); + m_halign = Qt::AlignLeft; + m_valign = Qt::AlignVCenter; +} + +QWidget* TableItem::createEditor() const +{ + QTextEdit* Editor = new QTextEdit(table()->viewport()); + Editor->setTextFormat(QTextEdit::PlainText); + Editor->setHScrollBarMode(QScrollView::AlwaysOff); + Editor->setVScrollBarMode(QScrollView::AlwaysOff); + Editor->setBold(m_header); + Editor->setText(text()); + QObject::connect(Editor, SIGNAL(textChanged()), table(), SLOT(doValueChanged())); + return Editor; +} + +void TableItem::setContentFromEditor(QWidget *w) +{ + if (w->inherits( "QTextEdit" )) + setText(((QTextEdit*)w)->text()); + else + QTableItem::setContentFromEditor(w); +} + +void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool selected) +{ + if (m_header) { + QFont editFont = p->font(); + editFont.setBold(true); + p->setFont(editFont); + } + QRect cr0(0, 0, cr.width(), cr.height()); + if (selected) { + p->fillRect(cr0, cg.brush(QColorGroup::Highlight)); + p->setPen(cg.highlightedText()); + } + else { + p->fillRect(cr0, cg.brush(QColorGroup::Base)); + p->setPen(cg.text()); + } + if (!pixmap().isNull()) { + p->drawPixmap(4, 4, pixmap()); + p->drawText(6 + pixmap().width(), 4, cr0.width()-8, cr0.height()-8, m_halign | m_valign | WordBreak, text()); + } + else + p->drawText(4, 4, cr0.width()-8, cr0.height()-8, m_halign | m_valign | WordBreak, text()); +} + +QSize TableItem::sizeHint() const +{ + QSize size = QTableItem::sizeHint(); + size.setWidth(size.width()+8); + size.setHeight(size.height()+8); + return size; +} + diff --git a/quanta/components/tableeditor/tableitem.h b/quanta/components/tableeditor/tableitem.h new file mode 100644 index 00000000..1eff7f59 --- /dev/null +++ b/quanta/components/tableeditor/tableitem.h @@ -0,0 +1,56 @@ +/*************************************************************************** + tableitem.h - description + ------------------- + begin : Mon 15 Mar 2004 + copyright : (C) 2004 by Michal Rudolf + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TABLEITEM_H +#define TABLEITEM_H + +#include +#include + +class TableItem : public QTableItem +{ +private: + Qt::AlignmentFlags m_halign; + Qt::AlignmentFlags m_valign; + bool m_header; +public: + // Standard constructors copied from QTableItem + TableItem(QTable* table, EditType et); + TableItem(QTable* table, EditType et, const QString& text); + TableItem (QTable* table, EditType et, const QString& text, const QPixmap& p); + // Use QTextEdit instead of standard QLineEdit + virtual QWidget* createEditor() const; + // Get text from QTextEdit + virtual void setContentFromEditor(QWidget *w); + // Paint cell - handle alignment (horizontal and vertical) and bold for header + virtual void paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool selected); + // Return A bit larger sizeHint because QTextEdit has some margin around + virtual QSize sizeHint() const; + // Get and set vertical aligment + Qt::AlignmentFlags vAlignment() {return m_valign;} + void setVAlignment(Qt::AlignmentFlags flags) {m_valign = flags;} + // Get and set horizontal aligment + Qt::AlignmentFlags alignment() {return m_halign;} + void setAlignment(Qt::AlignmentFlags flags) {m_halign = flags;} + // Get and set header status (use true for TH, false for TD) + bool header() {return m_header;} + void setHeader(bool h) {m_header = h;} +}; + + + +#endif + diff --git a/quanta/data/Makefile.am b/quanta/data/Makefile.am new file mode 100644 index 00000000..33e044f3 --- /dev/null +++ b/quanta/data/Makefile.am @@ -0,0 +1,5 @@ +SUBDIRS = doc dtep icons pics templates toolbars config + +quantadir = ${quanta_datadir} + +quanta_DATA = chars tips diff --git a/quanta/data/chars b/quanta/data/chars new file mode 100644 index 00000000..e5d2a4f4 --- /dev/null +++ b/quanta/data/chars @@ -0,0 +1,170 @@ +! (!) Exclamation mark +" (") Quotation mark +# (#) Hash mark +$ ($) Dollar sign +% (%) Percent sign +& (&) Ampersand +' (') Apostrophe +( (() Left parenthesis +) ()) Right parenthesis +* (*) Asterisk ++ (+) Plus sign +, (,) Comma +- (-) Hyphen +. (.) Period +/ (/) Slash +: (:) Colon +; (;) Semicolon +< (<) Less than += (=) Equals sign +> (>) Greater than +? (?) Question mark +@ (@) Commercial at sign +[ ([) Left square bracket +\ (\) Backslash +] (]) Right square bracket +^ (^) Caret +_ (_) Underscore +` (`) Grave accent +{ ({) Left curly brace +| (|) Vertical bar +} (}) Right curly brace +~ (~) Tilde + ( ) Nonbreaking space +¡ (¡) Inverted exclamation mark +¢ (¢) Cent sign +£ (£) Pound sign +¤ (¤) Currency sign +Â¥ (¥) Yen sign +¦ (¦) Broken vertical bar +§ (§) Section sign +¨ (¨) Diaeresis +© (©) Copyright +ª (ª) Feminine ordinal +« («) Left Pointing Guillemet +¬ (¬) Not sign + (­) Soft hyphen +® (®) Registered trademark +¯ (¯) Macron +° (°) Degree sign +± (±) Plus-minus sign +² (²) Superscript 2 +³ (³) Superscript 3 +´ (´) Acute accent +µ (µ) Micro sign +¶ (¶) Paragraph sign +· (·) Middle dot +¸ (¸) Cedilla +¹ (¹) Superscript 1 +º (º) Masculine ordinal +» (») Right Pointing Guillemet +¼ (¼) Fraction one-fourth +½ (½) Fraction one-half +¾ (¾) Fraction three-fourths +¿ (¿) Inverted question mark +À (À) Capital A, grave accent +à (Á) Capital A, acute accent + (Â) Capital A, circumflex accent +à (Ã) Capital A, tilde +Ä (Ä) Capital A, diaeresis +Ã… (Å) Capital A, ring +Æ (Æ) Capital AE ligature +Ç (Ç) Capital C, cedilla +È (È) Capital E, grave accent +É (É) Capital E, acute accent +Ê (Ê) Capital E, circumflex accent +Ë (Ë) Capital E, diaeresis +ÃŒ (Ì) Capital I, grave accent +à (Í) Capital I, acute accent +ÃŽ (Î) Capital I, circumflex accent +à (Ï) Capital I, diaeresis +à (Ð) Capital eth +Ñ (Ñ) Capital N, tilde +Ã’ (Ò) Capital O, grave accent +Ó (Ó) Capital O, acute accent +Ô (Ô) Capital O, circumflex accent +Õ (Õ) Capital O, tilde +Ö (Ö) Capital O, diaeresis +× (×) Multiplication +Ø (Ø) Capital O, slash +Ù (Ù) Capital U, grave accent +Ú (Ú) Capital U, acute accent +Û (Û) Capital U, circumflex accent +Ãœ (Ü) Capital U, diaeresis +à (Ý) Capital Y, acute accent +Þ (Þ) Capital thorn +ß (ß) Small Sharp s +à (à) Small a, grave accent +á (á) Small a, acute accent +â (â) Small a, circumflex accent +ã (ã) Small a, tilde +ä (ä) Small a, diaeresis +Ã¥ (å) Small a, ring +æ (æ) Small ae ligature +ç (ç) Small c, cedilla +è (è) Small e, grave accent +é (é) Small e, acute accent +ê (ˆ) Small e, circumflex accent +ë (ë) Small e, diaeresis +ì (ì) Small i, grave accent +í (í) Small i, acute accent +î (î) Small i, circumflex accent +ï (ï) Small i, diaeresis +ð (ð) Small eth +ñ (ñ) Small n, tilde +ò (ò) Small o, grave accent +ó (ó) Small o, acute accent +ô (ô) Small o, circumflex accent +õ (õ) Small o, tilde +ö (ö) Small o, diaeresis +÷ (÷) Division +ø (ø) Small o, slash +ù (ù) Small u, grave accent +ú (ú) Small u, acute accent +û (û) Small u, circumflex accent +ü (ü) Small u, diaeresis +ý (ý) Small y, acute accent +þ (þ) Small thorn +ÿ (ÿ) Small y, diaeresis +Ä‚ (Ă) Capital A, romanian accent +ă (ă) Small a, romanian accent +Ä (č) Small c, caron +Ä (ď) Small d, caron +Ä› (ě) Small e, caron +ň (ň) Small n, caron +Å™ (ř) Small r, caron +Åž (Ş) Capital S, cedilla accent +ÅŸ (ş) Small s, cedilla accent +Å¡ (š) Small s, caron +Å¢ (Ţ) Capital T, cedilla accent +Å£ (ţ) Small t, cedilla accent +Å¥ (ť) Small t, caron +ů (ů) Small u, ring above +ž (ž) Small z, caron +Åž (Ș) Capital S, comma accent below +ÅŸ (ș) Small s, comma accent below +Å¢ (Ț) Capital T, comma accent below +Å£ (ț) Small t, comma accent below +†(‐) Hyphen +– (–) En dash +— (—) Em dash +‘ (‘) Left Single Quotation mark +’ (’) Right Single Quotation mark +‚ (‚) Single Low-9 Quotation mark +“ (“) Left Double Quotation mark +†(”) Right Double Quotation mark +„ („) Double Low-9 Quotation mark +† (†) Dagger +‡ (‡) Double Dagger +• (•) Bullet +… (…) Horizontal Ellipsis +‰ (‰) Per Mille sign +‹ (‹) Single Left-Pointing Angle Quotation mark +› (›) Single Right-Pointing Angle Quotation mark +â„ (⁄) Fraction slash +â‚£ (₣) French Franc sign +₧ (₧) Peseta sign +₪ (₪) New Sheqel sign +â‚« (₫) Dong sign +€ (€) Euro currency sign +â„¢ (™) Trade Mark sign diff --git a/quanta/data/config/Makefile.am b/quanta/data/config/Makefile.am new file mode 100644 index 00000000..c33e098f --- /dev/null +++ b/quanta/data/config/Makefile.am @@ -0,0 +1,13 @@ +# this is where the XML-GUI resource file goes +rcdir = ${quanta_datadir} + +rc_DATA = plugins.rc actions.rc quantaui.rc + +if QUANTAUIRC_HOOK +install-data-hook: + mv $(DESTDIR)$(rcdir)/quantaui.rc $(DESTDIR)$(rcdir)/$(package)ui.rc || true +else +install-data-hook: +#no hook +endif +kde_services_DATA = quanta_preview_config.desktop diff --git a/quanta/data/config/actions.rc b/quanta/data/config/actions.rc new file mode 100644 index 00000000..5b56ca58 --- /dev/null +++ b/quanta/data/config/actions.rc @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/quanta/data/config/plugins.rc b/quanta/data/config/plugins.rc new file mode 100644 index 00000000..6572e4d5 --- /dev/null +++ b/quanta/data/config/plugins.rc @@ -0,0 +1,66 @@ +[General] +Plugins=KFileReplace, CVS Management (Cervisia),XSLT Debugger, KImageMapEditor, Link Checker, Konsole +SearchPaths= + +[CVS Management (Cervisia)] +Arguments= +FileName=kde3/libcervisiapart.la +Icon=cervisia +Location= +OutputWindow=Editor View +Standard=true +Standard Name=cervisia_kpart +Type=KPart +Input=3 + +[KFileReplace] +Arguments= +FileName=kde3/libkfilereplacepart.la +Icon=kfilereplace +Input=3 +Location= +OutputWindow=Editor Tab +ReadOnly=true +Standard=false +Type=KPart + +[XSLT Debugger] +Arguments= +FileName=kde3/libkxsldbgpart.la +Icon=xsltproc.png +Input=0 +Location= +OutputWindow=Editor Tab +ReadOnly=true +Standard=false +Type=KPart + +[KImageMapEditor] +FileName=kde3/libkimagemapeditor.la +Icon=kimagemapeditor +Input=1 +Location= +OutputWindow=Editor Tab +ReadOnly=true +Standard=false +Type=KPart + +[Link Checker] +FileName=kde3/libklinkstatuspart.la +Icon=klinkstatus +Input=1 +Location= +OutputWindow=Editor Tab +ReadOnly=true +Standard=false +Type=KPart + +[Konsole] +FileName=kde3/libkonsolepart.la +Icon=konsole +Input=1 +Location= +OutputWindow=Separate Toolview +ReadOnly=true +Standard=false +Type=KPart diff --git a/quanta/data/config/quanta_preview_config.desktop b/quanta/data/config/quanta_preview_config.desktop new file mode 100644 index 00000000..cc152532 --- /dev/null +++ b/quanta/data/config/quanta_preview_config.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Exec=kcmshell --caption %c %i khtml_behavior khtml_java_js khtml_fonts cookies cache proxy kcmcss crypto useragent khtml_plugins +Icon=konqueror +DocPath=konqueror/index.html +Name=Configure KHTML Browser Part +Name[ca]=Configura la part del fullejador KHTML +Name[cs]=Nastavení KHTML Part +Name[da]=Indstil KHTML browser-part +Name[de]=Einrichten der KHTML-Browserkomponente +Name[el]=ΡÏθμιση του KHTML πεÏιηγητή +Name[es]=Configurara la parte del navegador KHTML +Name[et]=KHTML brauseri komponendi seadistamine +Name[eu]=Konfiguratu KHTML arakatzailearen partea +Name[fa]=پیکربندی جزء مرورگر KHTML +Name[fi]=KHTML selaimen komponentti +Name[fr]=Configurer le composant de navigation KHTML +Name[gl]=Configurar a parte do navegador KHTML +Name[hu]=A KHTML böngészÅ‘objektum beállításai +Name[is]=Stilla KHTML vafrahluti +Name[it]=Parte browser configura KHTML +Name[ja]=KHTML ブラウザ部を設定 +Name[ka]=KHTML ბრáƒáƒ£áƒ–ერის ნáƒáƒ¬áƒ˜áƒšáƒ˜áƒ¡ კáƒáƒœáƒ¤áƒ˜áƒ’ურáƒáƒªáƒ˜áƒ +Name[lt]=KonfigÅ«ruoti KHTML narÅ¡yklÄ—s dalį +Name[ms]=Selaraskan Bahagian Pelayar KHTML +Name[nds]=KHTML-Browserkomponent inrichten +Name[ne]=केडीई à¤à¤šà¤Ÿà¥€à¤à¤®à¤à¤² बà¥à¤°à¤¾à¤‰à¤œà¤° भाग कनà¥à¤«à¤¿à¤—र गरà¥à¤¨à¥à¤¹à¥‹à¤¸à¥ +Name[nl]=KHTML Browser Part configuratie +Name[pl]=Konfiguracja osadzalnej części przeglÄ…darki KHTML +Name[pt]=Configurar a Parte de Navegação HTML +Name[pt_BR]=Configurar o Componente KHTML do Navegador +Name[ru]=ÐаÑтроить компонент проÑмтра KHTML +Name[sk]=NastaviÅ¥ KHTML prehliadaÄ Part +Name[sl]=Nastavite del brskalnika KHTML +Name[sr]=Део за подешавање KHTML прегледача +Name[sr@Latn]=Deo za podeÅ¡avanje KHTML pregledaÄa +Name[sv]=Anpassa delprogrammet för webbläsning KHTML +Name[ta]=KHTML உலாவி பகà¯à®¤à®¿ உளà¯à®³à®®à¯ˆ +Name[tg]=Танзими қиÑми браузери KHTML +Name[tr]=KHTML Tarayıcısı Parçasını Yapılandır +Name[uk]=Ðалаштувати компонент переглÑду KHTML +Name[zh_CN]=é…ç½® KHTML æµè§ˆå™¨éƒ¨ä»¶ +Name[zh_HK]=設定 KHTML ç€è¦½å™¨å…ƒä»¶ +Name[zh_TW]=設定 KHTML ç€è¦½å™¨ Part diff --git a/quanta/data/config/quantaui.rc b/quanta/data/config/quantaui.rc new file mode 100644 index 00000000..212f6f01 --- /dev/null +++ b/quanta/data/config/quantaui.rc @@ -0,0 +1,293 @@ + + + + + &File + + + + + + + + Save as Template + + + + + + + + + + + + + + + + &Edit + + + + + + + + + Paste Special + + + + + + + + + + + + + + &View + + + + + + + + E&xternal Preview + + + + + + + + + + + + + + + &Project + + + + + + + + + + + + + + + + + + + Too&lbars + + &Load Toolbars + + + + + + &Save Toolbars + + + + + + + + + + + + + + &DTD + + + + + + + + + + + + &Tags + + + + + + + Plu&gins + + + + T&ools + + + + + + + + + + + &Settings + + + + + + + + + + + + + + + + &Help + + + + + + + + + + + + + + + + + Main Toolbar + + + + + + + + + Editor Toolbar + + + + + + + + Plugins Toolbar + + + + + + + Navigation Toolbar + + + + + + + + + + + + + + + + + + + + + + + &Debug + + Session + + + + + &Execution + + + + + + + + + + + + + + + &Breakpoints + + + + + + &Variables + + + + + &Profiler + + + + + Debugger Toolbar + + + + + + + + + + + + + + + + + + + Project Toolbar + + + + + + diff --git a/quanta/data/doc/Makefile.am b/quanta/data/doc/Makefile.am new file mode 100644 index 00000000..65c41189 --- /dev/null +++ b/quanta/data/doc/Makefile.am @@ -0,0 +1,3 @@ +quantadir = ${quanta_datadir}/doc + +quanta_DATA = documentation.html head_bg.gif minilogo.jpg quanta.docrc aniquanta.gif background.png bgtable.png developer.html focus.html intro.html kdelogo2.png konq.css lines.png lines2.png minilogo.png more.png quanta.css quantahdr.png shadow1.png tips.html webdev.png maindoc.html template.html qcenter2.png faq.html diff --git a/quanta/data/doc/README.FIRST b/quanta/data/doc/README.FIRST new file mode 100644 index 00000000..6330e732 --- /dev/null +++ b/quanta/data/doc/README.FIRST @@ -0,0 +1,9 @@ +THIS DOCUMENTATION IS OUTDATED + +Please use the one in quanta/doc/quanta. It is DocBook +format but can easily be converted to other formats like +HTML. + +The contents of this directory will be deleted after a while. + + Eric Bischoff diff --git a/quanta/data/doc/aniquanta.gif b/quanta/data/doc/aniquanta.gif new file mode 100644 index 00000000..783ab254 Binary files /dev/null and b/quanta/data/doc/aniquanta.gif differ diff --git a/quanta/data/doc/background.png b/quanta/data/doc/background.png new file mode 100644 index 00000000..20ad83bc Binary files /dev/null and b/quanta/data/doc/background.png differ diff --git a/quanta/data/doc/bgtable.png b/quanta/data/doc/bgtable.png new file mode 100644 index 00000000..97ac7d1f Binary files /dev/null and b/quanta/data/doc/bgtable.png differ diff --git a/quanta/data/doc/developer.html b/quanta/data/doc/developer.html new file mode 100644 index 00000000..dcf79ac4 --- /dev/null +++ b/quanta/data/doc/developer.html @@ -0,0 +1,102 @@ + + + + + Konquer the Web with Quanta Plus! + + + + + + + diff --git a/quanta/data/doc/documentation.html b/quanta/data/doc/documentation.html new file mode 100644 index 00000000..adcee4d9 --- /dev/null +++ b/quanta/data/doc/documentation.html @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ Quanta Documentation Page +
+
+ + +
+ + Documentation + +

+ Quanta Plus + is an HTML editor for the K Desktop Environment.
+ This program is designed for quick web development! + Quanta is rapidly becoming a mature editor with a number of great features. + Our objective is to produce a complete web development environment! +

+ +

+ +
+
+ + +
+ Avaible packages + +

+ + + + + +
+ html.tar.bz2 + + HTML 4.0 reference + +
+ css.tar.bz2 + + Cascading Style Sheets + +
+ php.tar.bz2 + + PHP documentation + +
+ js.tar.bz2 + + Java Script documentation + +
+

+ +
+
+ + + +
+ + Contacting us + +

+ Please use the KDE Bugzilla + site for bug reports, wishes. For further information and other discussions about Quanta Plus + subscribe to our user mailing list. + +

+ +

+ You can help us with coding, adding new documentation, + working on our homepage and in many other ways. + If you want to help please use our developer list to contact us.  +

+

+ +
   + + + + + + + +
+   Designed with   + +
+ + + +
+ + +
+
+ http://kdewebdev.org + +
+
+ + + + + +
+ Quanta Documentation Page +
+
+ + + diff --git a/quanta/data/doc/faq.html b/quanta/data/doc/faq.html new file mode 100644 index 00000000..e48a438d --- /dev/null +++ b/quanta/data/doc/faq.html @@ -0,0 +1,239 @@ + + + + + Konquer the Web with Quanta Plus! + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Quanta PlusKonquer the Web with Quanta Plus!
 Quanta PlusWeb Develop Environment
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + +
  
  + +

Quanta Plus FAQ

+ +
+ + +

1. What is Quanta Plus?

+
+

From http://quanta.sourceforge.net/:
+ Quanta Plus is a web development tool for the K Desktop Environment (KDE). Quanta Plus is designed for rapid web development and is quickly becoming a mature editor with a number of great features.

+

Our objective remains to create the very best web development tool anywhere. We realize that we will need many more people active to accomplish this so we are in the process of developing enhancements geared toward making it easy for web developers to customize, extend and enhance Quanta Plus. Then we will be asking you, the web developers, to contribute your feature enhancements. We will organize these so that Quanta Plus web developers can find just the resources, extensions and custom plug-ins they need to be the most kick butt developers ever!

+
+ + +

2. How do I install Quanta Plus?

+
+ +
2.1 Quanta Plus binary packages?
+
+ + +
2.2 Quanta Plus source code
+
+

There are two versions of the Quanta Plus source code:

+
    +
  1. The 3.x formal releases are available from http://sourceforge.net/projects/quanta/ and
  2. +
  3. The CVS tree, which is available from anoncvs.kde.org.
  4. +
+

For formal releases, it is just a download, et cetera. For CVS tree:

+
    +
  • cvs -d:pserver:anonymous@anoncvs.kde.org:/home/kde login
  • +
  • cvs -d:pserver:anonymous@anoncvs.kde.org:/home/kde co quanta
  • +
+

When prompted for a password, just press Enter. This will create a directory called "quanta" as a subdirectory of the directory you ran the above commands in.

+
+ + +
2.3 Compiling Quanta Plus
+
+

An assumption is made that you have the knowledge and ability to find and install any missing libraries that you may encounter. Basically, you need the headers from KDE, Qt, and GCC. If you don't know what was just said, then try the steps below and, if it doesn't work for you, then find yourself a Linux geek that can help.

+

Type the following in a shell and see what you get:

+
    +
  • test `echo $KDEDIR` && echo "yes" || echo "noKDE"
  • +
  • test `echo $QTDIR` && echo "yes" || echo "noQT"
  • +
+

If you don't get two yes answers, then you need to find the location of the one that failed and export it to your current shell environment.

+

Then it is as simple as:

+
+              make -f Makefile.cvs  (Only necessary if you're doing from CVS, but it is a good idea to do so anyway.)
+              ./configure
+              make
+              make install (Run this command as root.)
+             
+
+ + +
2.4 I get error X when running ./configure
+
+

Please read 2.3 carefully again and make certain that you have exported the $KDEDIR and $QTDIR environment variables. This is the most likely cause. Aside from that, if you are missing something very important, then configure will tell you what it needs.

+
+ + +
2.5 I get error X when compiling
+
+

Please read 2.3 and make certain that whatever libraries make is looking for are installed on your machine. How and where to get these libraries is beyond the scope of this FAQ.

+
+
+ + +

3. How do I do X? Can Quanta Plus do X?

+ +
3.1. How can I open/edit a file on a remote server?
+
+

Quanta Plus uses KIO for its file operations. To whit, an e-mail from our benefactor:

+

Try this. Open the file open dialog... you can do this in the file name, but it's even cooler if you use the directory drop-down up top on the dialog. Enter this: ftp://user@mydomain.com and hit enter. It will prompt you for a password after which it will fill the file dialog with the available files and folders on the site location. You and now navigate your site like you were looking at your local directory, open and save files on line.

+

Two additional facts here. First if you are using projects you can set your project preview option to directly preview from the site and then see PHP files with data live as they would behave on site. Second, this is made possible by KDE's KIO slaves. So any functional KIO slave you have installed brings this same functionality. Try kio_fish for secure file access as well as other slaves for Samba, scp and other protocols.

+

--
Eric Laffoon

+

That should about cover it.

+
+
+ +
3.2. Can I run program X from Quanta Plus?
+
+

Yes! Quanta Plus will run almost anything you want as an action. More from our benefactor:

+

Does Quanta Plus Shell? Hey, we're open source! Quanta Plus has shelled since around version 1.0.1. You can run virtually any program you can run from the command line with Quanta Plus with a wide variety of options.

+

To run HTMLtidy do the following:

+
    +
  1. On the menu go to Settings>Configure Actions.
  2. +
  3. In the dialog click New button and give it a name and icon
  4. +
  5. Select the script tab and put tidy -i in the script line
  6. +
  7. Select either selected text or current document for input
  8. +
  9. Select your output such as "Replace current document"
  10. +
  11. On the error tab select "Message window"
  12. +
  13. Close the dialog and select Settings>Configure Toolbars
  14. +
  15. Place the new action on the toolbar of your choice
  16. +
+

Now you can run tidy and if there are errors and you have the message window open it will give you errors. If you have kaptain installed (http://kaptain.sourceforge.net) you can even set parameters for each run.

+

Enjoy!
--
Eric Laffoon

+
+ + +

4. Is there any documentation for Quanta Plus?

+
+

Yes, however most are slightly outdated. They are being worked on currently. Would you like to help?

+
+ + +

5. How can I help Quanta Plus development?

+
+

I thought you'd never ask! ;-)

+

From Eric:

+

We would be remiss not to point out that Quanta Plus is being built with volunteer effort. Many people feel they cannot contribute to the open source cause for one reason or another. Probably the greatest being a feeling they do not have the skills. This documentation is writing in HTML... so if you can do that you can help. What is the open source cause? It is giving back to the community to grow something bigger than we could on our own, but it is also a shining hope for those people around the world where getting software for free is not an option, it is the option.

+

We believe in the cause!

+

If you would like to help out contact Eric Laffoon (sequitur@kde.org).

+
+ + +

6. Where is Quanta Plus going from here?

+
+

We have released Quanta Plus 3.1.3 and are now in preparation for 3.2. Our objective remains to create the very best web development tool anywhere. We realize that we will need many more people actively developing Quanta Plus to accomplish this, so we are in the process of developing enhancements geared toward making it easy for web developers to customize, extend, and enhance Quanta Plus. Then we will be asking you, the web developers, to contribute your feature enhancements. We will organize these so that Quanta Plus web developers can find just the resources, extensions, and custom plug-ins they need to be the most kick butt developers ever!

+
+ > Continue + +
 
  
+
 
 
+ + + + + + + + +
 KDE
 
+
+ + diff --git a/quanta/data/doc/focus.html b/quanta/data/doc/focus.html new file mode 100644 index 00000000..f8476dcf --- /dev/null +++ b/quanta/data/doc/focus.html @@ -0,0 +1,100 @@ + + + + + Konquer the Web with Quanta Plus! + + + + + + + diff --git a/quanta/data/doc/head_bg.gif b/quanta/data/doc/head_bg.gif new file mode 100644 index 00000000..201d5850 Binary files /dev/null and b/quanta/data/doc/head_bg.gif differ diff --git a/quanta/data/doc/intro.html b/quanta/data/doc/intro.html new file mode 100644 index 00000000..4987c19a --- /dev/null +++ b/quanta/data/doc/intro.html @@ -0,0 +1,142 @@ + + + + + Konquer the Web with Quanta Plus! + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Quanta PlusKonquer the Web with Quanta Plus!
 Quanta PlusWeb Develop Environment
+ + + + + + + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + +
  
  + +

Welcome to Quanta Plus

+

Quanta Plus is a web development tool for the K Desktop Environment (KDE). Quanta Plus is focused on productivity and power and is build for and by professional web developers. While maintaining this focus, Quanta Plus is also what our friends and families use to do their first home pages too. The main goal of Quanta Plus is to empower people at every skill level to build pages better and faster than with less focused tools.

+

Why work from a text based editor? Because static (dead) web pages are quickly fading into obscurity. In their place are PHP, Zope, ASP, HTML::Mason and other forms of dynamic pages. Our personal focus is PHP, but Quanta Plus can be extended for any development language. PHP can be as simple as a few tags in your (X)HTML, full of tags, using templates, classes, and cached pages... all hooked to databases and becoming chameleon like in selectable styles. Like we say: Static (X)HTML is going the way of the dinosaur and we are working to build the tool to make you more productive than you ever could be drawing pictures.

+

Available documentation packages for Quanta Plus:

+
+
Documentation
+
List of all documentation
+
html.tar.bz2
+
HTML 4.01 reference
+
css.tar.bz2
+
Cascading Style Sheets
+
php.tar.bz2
+
PHP documentation
+
javascript.tar.bz2
+
JavaScript documentation
+
+ + + + + + +
+

Contacting us

+

Please use our bug reporting site for bugs, wishes and the project home page for support, further information, and other useful features.

+ + + + + +
Eric Laffoon   Andras Mantia   
+
   + + + + + + + + + + +
  Designed with  
+ + + + + + +
Quanta Plus
+
http://kdewebdev.org
+
+ +
 
  
+
 
 
+ + + + + + + + +
 KDE
 
+
+ + diff --git a/quanta/data/doc/kdelogo2.png b/quanta/data/doc/kdelogo2.png new file mode 100644 index 00000000..ee3041b7 Binary files /dev/null and b/quanta/data/doc/kdelogo2.png differ diff --git a/quanta/data/doc/konq.css b/quanta/data/doc/konq.css new file mode 100644 index 00000000..a182f7c0 --- /dev/null +++ b/quanta/data/doc/konq.css @@ -0,0 +1,61 @@ +body {background-color: #3679AD; + color: #000000; + margin-left: 0; + margin-right: 0; + margin-top: 5; + padding: 0; + background-image: url(background.png); + background-repeat: no-repeat; + background-position: top-center;} + +td.trans {background-image: url(bgtable.png); + background-color:white; + background-repeat: no-repeat; + } +td.end {background-image: url(lines2.png); + background-repeat: x-repeat;} +td.shadow1 {background-image: url(shadow1.png); + background-repeat: x-repeat;} + +table.vnice { font-family: sans-serif; + font-size: x-small;} + +a:link {background-color: transparent; + color: #191970; + text-decoration:none;} +a:visited {background-color: transparent; + color: #551a8a; + text-decoration:none;} +a:active {background-color: transparent; + color: #fe0000; + text-decoration:none;} +a:hover {background-color: transparent; + color: #1919aa; + text-decoration:underline;} + +tr.menurow {background-color: #505050; + color: #000000; + vertical-align: middle;} + +td.deco {color: #ffffff; + background-color: #505050; + font-family: sans-serif; + font-size: small;} + +td.menuactive {color: #ffcc00; + background-color: #777777; + font-family: sans-serif; + font-size: small;} + +td.menu {color: #ffffff; + background-color: #505050; + font-family: sans-serif; + font-size: small;} + +a.menu {color: #eeeeee; + font-family: sans-serif; + font-size: small;} + +a.menu:hover {color: #ffffff; + text-decoration:none;} + diff --git a/quanta/data/doc/lines.png b/quanta/data/doc/lines.png new file mode 100644 index 00000000..498330c3 Binary files /dev/null and b/quanta/data/doc/lines.png differ diff --git a/quanta/data/doc/lines2.png b/quanta/data/doc/lines2.png new file mode 100644 index 00000000..02a8c05b Binary files /dev/null and b/quanta/data/doc/lines2.png differ diff --git a/quanta/data/doc/maindoc.html b/quanta/data/doc/maindoc.html new file mode 100644 index 00000000..44e3dae4 --- /dev/null +++ b/quanta/data/doc/maindoc.html @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ Quanta Documentation +
+
+ + + + +
+ +

Quanta Documentation

+ +

+ Quanta Plus is an ambitious open souce project. + Early on some of our very first developers did not even think it would need a + help section as it was so intuitive... While I appreciate the optimisim (and + our code slinging hero may be the exception) we wish to attempt to provide a + substantial resource here. Documentation is often the last thing to be done in + open source projects. We would like to step up the level here. +

+ +

This documentation is being developed on an + ongoing basis to handle several areas. +

+
    +
  • Areas of Quanta's interface that may be more confusing like the project section.
  • +
  • Assistance in understanding some of the more potentially difficult areas + like interface customization, scripting and running a PHP debugger.
  • +
  • Pointing out the less obvious things like the ability to open projects + remotely through kio.
  • +
  • Giving instruction on how you can customize Quanta (without writing a line + of C++ and in many cases not even recompiling) with custom tags and documentation.
  • +
  • Introductory instruction on how to be much more productive with Quanta.
  • +
  • Reference information on our design objectives and progress.
  • +
  • Developer information for those who might wish to join us.
  • +
+
+

Getting Involved! +

+

We would be remiss not to point out that Quanta + is being built with volunteer effort. Many people feel they cannot contribute to + the open source cause for one reason or another. Probably the greatest being a + feeling they do not have the skills. This documentation is writing in HTML... + so if you can do that you can help. What is the open source cause? It is + giving back to the community to grow something bigger than we could on our own, + but it is also a shining hope for those people around the world where getting + software for free is not an option, it is the option. We believe in the + cause! +

+

If you would like to help out contact + Eric Laffoon. +

+ +

+
+
+ + + + +
+ +

Thank you for using Quanta

+ +

This page and all Quanta docs are currently + under heavy construction. +

+ +

+
   + + +
+
+ + + + + +
+ Quanta Documentation +
+
+ + + diff --git a/quanta/data/doc/minilogo.jpg b/quanta/data/doc/minilogo.jpg new file mode 100644 index 00000000..a457c690 Binary files /dev/null and b/quanta/data/doc/minilogo.jpg differ diff --git a/quanta/data/doc/minilogo.png b/quanta/data/doc/minilogo.png new file mode 100644 index 00000000..981284c2 Binary files /dev/null and b/quanta/data/doc/minilogo.png differ diff --git a/quanta/data/doc/more.png b/quanta/data/doc/more.png new file mode 100644 index 00000000..f50ca50e Binary files /dev/null and b/quanta/data/doc/more.png differ diff --git a/quanta/data/doc/qcenter2.png b/quanta/data/doc/qcenter2.png new file mode 100644 index 00000000..cea35877 Binary files /dev/null and b/quanta/data/doc/qcenter2.png differ diff --git a/quanta/data/doc/quanta.css b/quanta/data/doc/quanta.css new file mode 100644 index 00000000..3dc4a64d --- /dev/null +++ b/quanta/data/doc/quanta.css @@ -0,0 +1,9 @@ +a:link { text-decoration: none; color: blue; } +a:visited { text-decoration: none; color: blue; } +a:active { text-decoration: none; color: blue; } +a:hover { text-decoration: underline; color: blue; } +..firstchar {color: #805417; font-weight: bold; font-size: larger} +..minihdr {color: #008080; font-weight: bold; font-size: larger} +td.blah { background-image:url(lines.png);} +td.bla { background-color: #505050; } + diff --git a/quanta/data/doc/quanta.docrc b/quanta/data/doc/quanta.docrc new file mode 100644 index 00000000..3aef01af --- /dev/null +++ b/quanta/data/doc/quanta.docrc @@ -0,0 +1,10 @@ +# KDE Config File +[Tree] + +Doc dir=../doc + +#top level elements +Top Element=Quanta Plus + +Quanta Plus=Welcome +Welcome=intro.html diff --git a/quanta/data/doc/quantahdr.png b/quanta/data/doc/quantahdr.png new file mode 100644 index 00000000..f747c16a Binary files /dev/null and b/quanta/data/doc/quantahdr.png differ diff --git a/quanta/data/doc/shadow1.png b/quanta/data/doc/shadow1.png new file mode 100644 index 00000000..1118daca Binary files /dev/null and b/quanta/data/doc/shadow1.png differ diff --git a/quanta/data/doc/template.html b/quanta/data/doc/template.html new file mode 100644 index 00000000..07a20c76 --- /dev/null +++ b/quanta/data/doc/template.html @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ Quanta Documentation +
+
+ + + + +
+ +

Documentation

+ +

+ Quanta Plus +

+ +

+
+
+ + + + +
+ +

Close Page

+ +

Quanta Plus +

+ +

+
   + + +
+
+ + + + + +
+ Quanta Documentation +
+
+ + + diff --git a/quanta/data/doc/templates.html b/quanta/data/doc/templates.html new file mode 100644 index 00000000..3043187e --- /dev/null +++ b/quanta/data/doc/templates.html @@ -0,0 +1,189 @@ + + + Konquer the Web with Quanta! + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Konquer the Web with Quanta!
 
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + +
  
  + + + +

Quanta Plus Templates

+

Template description +

+

Templates are basically skeleton documents, code snippets and files to link to. Quanta +uses templates fundementally as a standard file system with enhanced organization and interfacing. +You can copy, move or link any repository currently on your system into the templates tree. +Think of Quanta templates as having roughly the limitations to your imagination that your file system +has. +

+

Templates exist in nested directories. There is no limit to how deep you can nest them however +within any given directory Quanta expects a consistent action for the base template type described +below. Additionally templates allow for pre and post text to be concatonated to +non document type templates. This facilitates tag creation. The next update after the introduction +is scheduled to add the ability to pass variables to the text such as image size information to +assist in tag creation. +

+

Template types +

+

Currently templates are limited to being one of the following types of objects: +

    +
  • Document
  • +
  • Text to insert in a document
  • +
  • A file to link to from a document
  • +
+Documents can be any type of document. Generally you would want to nest more specific or diverse +documents in subdirectories. Here you can make a basic framework for what you do and deliver it +to your work in an organized fashion and realize much better effiency. Text insertion could be +anything from a snippet of code to a script or whatever you might wish to use. Note also this overlaps +the ability to insert text blocks as an action which can be triggered from the toolbar. Linked files +can be binary, PHP class libraries or whatever. +

+

Template scope +

+

Templates are scoped into three general categories: Global, Local and Project. +

    +
  • Global - Available to all folks all the time.
  • +
  • Local - Available to a specific user (maybe others if they can see it where it + exists in the file system).
  • +
  • Project - Available to the associated project only.
  • +
+

+

Creating templates +

+

Create a document structure that you love (XML, HTML, DocBook, etc.) and + click on File->Save as Template->Save as Local/Project Template. +

+

Once this is done, you'll notice that (even if it's saved as a Project template) + the template does NOT show in the project tab view. Look into the templates view + to find your template under the Project templates tab. +

+

Additinoally if you look at your options with the Right Mouse Button (RMB) you +will see complete file management tools for creatind directories or copying and pasting +templates from one location to another. +

+

Using templates with Projects +

+

Project templates allow you to be more tightly focused. You can create headers, footers +or go dynamic with PHP include files and link them. Additionally there are some very +cool things we took into consideration when using templates in projects. +

    +
  • When creating a project you can opt to copy over all global and user templates.
  • +
  • Legacy project get default templating abilities so nothing is lost
  • +
  • You can choose where to locate your template files so they can be in your server root + and easy to upload or you can make them secure to link to below server root which is a + very cool trick
  • +
  • When linking to a file not in the project templates you will be prompted to copy + the file to the project templates prior to linking. This will prevent broken links on upload.
  • +
  • You always have control where you place your templates so you can choose to move them. + However Quanta does not track this so you will need to change links. This is a good + task for kfilereplace which we are setting up to plug in as a kpart.
  • +
+

+

Templates conclusion +

+

Our goal with templates is to extend them to include multi file "concept" templates useful +for things like placing an order or creating an about section, Ideally this will be a tool for +making your work more productive and dynamic. An eventual goal is to have a structural template +design mode to deal with site layout and structure which you could use to design and interactively +update your sites. If you would like to be involved contact us. +

+
 Continue + + + + +

 
  
+ +
 
 
+ + + + + + + + + +
 
 
+
+ + + diff --git a/quanta/data/doc/tips.html b/quanta/data/doc/tips.html new file mode 100644 index 00000000..9efe6822 --- /dev/null +++ b/quanta/data/doc/tips.html @@ -0,0 +1,151 @@ + + + + + Konquer the Web with Quanta Plus! + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Quanta PlusKonquer the Web with Quanta Plus!
 Quanta PlusWeb Develop Environment
+ + + + + + + + + + + + + +
+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + +
  
  + +

Quanta Plus Tips

+ + + +
Quanta Plus Templates
Quanta Plus Toolbars
+ +

Quanta Plus Templates

+

Template description

+

Templates are basically skeleton documents, code snippets, and files to link to. Quanta Plus uses templates fundamentally as a standard file system with enhanced organization and interfacing. You can copy, move, or link any repository currently on your system into the templates tree. Think of Quanta Plus templates as having roughly the limitations to your file system has.

+

Templates exist in nested directories. There is no limit to how deep you can nest them, however, within any given directory, Quanta Plus expects a consistent action for the base template type described below. Additionally, templates allow for pre and post text to be concatenated to non document type templates. This facilitates tag creation. The next update after the introduction is scheduled to add the ability to pass variables to the text such as image size information to assist in tag creation.

+

Template types

+

Currently templates are limited to being one of the following types of objects:

+
    +
  • Document
  • +
  • Text to insert in a document
  • +
  • A file to link to from a document
  • +
+

Documents can be any type of document. Generally you would want to nest more specific or diverse documents in subdirectories. Here you can make a basic framework for what you do and deliver it to your work in an organized fashion and realize much better efficiency. Text insertion could be anything from a snippet of code to a script or whatever you might wish to use. Note that this also overlaps the ability to insert text blocks as an action which can be triggered from the toolbar. Linked files can be binary, PHP class libraries or whatever.

+

Template scope

+

Templates are scoped into three general categories: Global, Local and Project.

+
    +
  • Global - Available to all folks all the time.
  • +
  • Local - Available to a specific user (maybe others if they can see it where it exists in the file system).
  • +
  • Project - Available to the associated project only.
  • +
+

Creating templates

+

Create a document structure that you love (XML, (X)HTML, DocBook, etc.) and click on File->Save as Template->Save as Local/Project Template.

+

Once this is done, you'll notice that (even if it's saved as a Project template) the template does NOT show in the project tab view. Look into the templates view to find your template under the Project templates tab.

+

Additionally, if you look at your options with the Right Mouse Button (RMB) you will see complete file management tools for creating directories or copying and pasting templates from one location to another.

+

Using templates with Projects

+

Project templates allow you to be more tightly focused. You can create headers, footers or go dynamic with PHP include files and link them. Also, there are some very cool things we took into consideration when using templates in projects.

+
    +
  • When creating a project you can opt to copy over all global and user templates.
  • +
  • Legacy projects get default templating abilities, so nothing is lost.
  • +
  • You can choose where to locate your template files, so they can be in your server root and easy to upload or you can make them secure to link to below server root which is a very cool trick.
  • +
  • When linking to a file not in the project templates, you will be prompted to copy the file to the project templates prior to linking. This will prevent broken links on upload.
  • +
  • You always have control where you place your templates so you can choose to move them. However, Quanta Plus does not track this, so you will need to change links. This is a good task for KFileReplace, which is now a plug-in as a KPart!
  • +
+

Templates conclusion

+

Our goal with templates is to extend them to include multi-file "concept" templates, useful for certain things, like placing an order or creating an about section. Ideally this will be a tool for making your work more productive and dynamic. An eventual goal is to have a structural template design mode to deal with site layout and structure which you could use to design and interactively update your sites. If you would like to be involved, then contact us.

+
+

Quanta Plus Toolbars

+

Toolbar Description

+

Probably the most exciting feature of Quanta Plus is the ability to build and trade custom toolbars for the program.

+

Although this may seem somewhat trivial, toolbars are going to be quite critical to the quality of your experience with Quanta Plus.

+

Toolbars essentially give you the chance to organize any set of tags, commands, or utility functions you can make as a Quanta Plus action into a quick tabbed toolbar at the top of the code view. Currently, you must load and unload these as you see fit, but there is desire to make the toolbars change as the DTD/Schema changes. This will allow you to extend toolbars for a given type of document, say XML or DocBook, to include all of the tags for that markup, but not have to also get the (X)HTML toolbars, unless you wanted them.

+

Toolbar Creation

+

To put an action on a toolbar, select Toolbars->Add User Toolbar. Give it a nice descriptive name and then click Ok.

+

You should have it on the top with all the others now.

+

To add actions to this toolbar, go to Settings->Configure Toolbar or, if you're going to create more actions at this point, you can add the actions directly to the toolbar at action creation time with the "Place this action onto:" check box and selecting the toolbar to attach it to.

+

Toolbar Sharing

+

If you have a great toolbar and a set of actions, you can share it with the community or your buddies.

+

Just click on Toolbars->Send toolbar in email, follow the prompts and mail it to your buddies or someone on the Development team.

+

If this doesn't work for you, then you can just mail the <toolbar-name>.toolbar.gz file it can be opened via Toolbars->Load Toolbars menu tree.

+ >Continue + +
 
  
+
 
 
+ + + + + + + + +
 KDE
 
+
+ + diff --git a/quanta/data/doc/webdev.png b/quanta/data/doc/webdev.png new file mode 100644 index 00000000..0b4b0ab4 Binary files /dev/null and b/quanta/data/doc/webdev.png differ diff --git a/quanta/data/dtep/Makefile.am b/quanta/data/dtep/Makefile.am new file mode 100644 index 00000000..8adf55fa --- /dev/null +++ b/quanta/data/dtep/Makefile.am @@ -0,0 +1,4 @@ +SUBDIRS = html html-frameset html-strict tagxml php xhtml xhtml-basic xhtml-frameset xhtml-strict xhtml11 xslt wml-1-2 css docbook-4.2 schema cfml cffunct kde-docbook-4.1.2 kde-docbook-4.2 relaxng empty dtd +install-data-local: +# rm -f `find ${quanta_datadir}/tags -type f -name "*"` +# rmdir `find ${quanta_datadir}/tags -type d -name "*"` diff --git a/quanta/data/dtep/cffunct/Makefile.am b/quanta/data/dtep/cffunct/Makefile.am new file mode 100644 index 00000000..d85a5fc4 --- /dev/null +++ b/quanta/data/dtep/cffunct/Makefile.am @@ -0,0 +1,3 @@ +kdevelopdir = ${quanta_datadir}/dtep/cffunct + +kdevelop_DATA = abs.tag acos.tag acs.tag array.tag asin.tag atn.tag authenticatedcontext.tag authenticateduser.tag bitand.tag bitmaskclear.tag bitmaskread.tag bitmaskset.tag bitnot.tag bitor.tag bitshln.tag bitshrn.tag bitxor.tag ceiling.tag chr.tag cjustify.tag compare.tag comparenocase.tag cos.tag createobject.tag createuuid.tag datetime.tag de.tag decimalformat.tag decrementvalue.tag decrypt.tag deleteclientvariable.tag description.rc directoryexists.tag dollarformat.tag duplicate.tag encrypt.tag evaluate.tag exp.tag expandpath.tag fileexists.tag find.tag fix.tag formatbasen.tag getbasetagdata.tag getbasetaglist.tag getbasetemplatepath.tag getclientvariableslist.tag getcurrenttemplatepath.tag getdirectoryfrompath.tag getexception.tag getfilefrompath.tag getfunctionlist.tag gethttprequestdata.tag gethttptimestring.tag getlocale.tag getmetricdata.tag getprofilestring.tag gettempdirectory.tag gettempfile.tag gettemplatepath.tag gettickcount.tag gettoken.tag hash.tag htmlcodeformat.tag htmleditformat.tag iif.tag incrementvalue.tag inputbasen.tag insert.tag int.tag isarray.tag isauthenticated.tag diff --git a/quanta/data/dtep/cffunct/abs.tag b/quanta/data/dtep/cffunct/abs.tag new file mode 100644 index 00000000..8d39d9d8 --- /dev/null +++ b/quanta/data/dtep/cffunct/abs.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/acos.tag b/quanta/data/dtep/cffunct/acos.tag new file mode 100644 index 00000000..43a6cef4 --- /dev/null +++ b/quanta/data/dtep/cffunct/acos.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/acs.tag b/quanta/data/dtep/cffunct/acs.tag new file mode 100644 index 00000000..92080970 --- /dev/null +++ b/quanta/data/dtep/cffunct/acs.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/array.tag b/quanta/data/dtep/cffunct/array.tag new file mode 100644 index 00000000..d6be4bca --- /dev/null +++ b/quanta/data/dtep/cffunct/array.tag @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/asin.tag b/quanta/data/dtep/cffunct/asin.tag new file mode 100644 index 00000000..cc876e15 --- /dev/null +++ b/quanta/data/dtep/cffunct/asin.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/atn.tag b/quanta/data/dtep/cffunct/atn.tag new file mode 100644 index 00000000..712359d4 --- /dev/null +++ b/quanta/data/dtep/cffunct/atn.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/authenticatedcontext.tag b/quanta/data/dtep/cffunct/authenticatedcontext.tag new file mode 100644 index 00000000..d4767392 --- /dev/null +++ b/quanta/data/dtep/cffunct/authenticatedcontext.tag @@ -0,0 +1,5 @@ + + + + + diff --git a/quanta/data/dtep/cffunct/authenticateduser.tag b/quanta/data/dtep/cffunct/authenticateduser.tag new file mode 100644 index 00000000..cc7fa71a --- /dev/null +++ b/quanta/data/dtep/cffunct/authenticateduser.tag @@ -0,0 +1,5 @@ + + + + + diff --git a/quanta/data/dtep/cffunct/bitand.tag b/quanta/data/dtep/cffunct/bitand.tag new file mode 100644 index 00000000..371900e2 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitand.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitmaskclear.tag b/quanta/data/dtep/cffunct/bitmaskclear.tag new file mode 100644 index 00000000..d97d6a61 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitmaskclear.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitmaskread.tag b/quanta/data/dtep/cffunct/bitmaskread.tag new file mode 100644 index 00000000..ce2ebd08 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitmaskread.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitmaskset.tag b/quanta/data/dtep/cffunct/bitmaskset.tag new file mode 100644 index 00000000..42289ce6 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitmaskset.tag @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitnot.tag b/quanta/data/dtep/cffunct/bitnot.tag new file mode 100644 index 00000000..71ac3b49 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitnot.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/bitor.tag b/quanta/data/dtep/cffunct/bitor.tag new file mode 100644 index 00000000..9c0462c3 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitor.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitshln.tag b/quanta/data/dtep/cffunct/bitshln.tag new file mode 100644 index 00000000..50e60343 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitshln.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitshrn.tag b/quanta/data/dtep/cffunct/bitshrn.tag new file mode 100644 index 00000000..b388e1f2 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitshrn.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/bitxor.tag b/quanta/data/dtep/cffunct/bitxor.tag new file mode 100644 index 00000000..056a97a8 --- /dev/null +++ b/quanta/data/dtep/cffunct/bitxor.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/ceiling.tag b/quanta/data/dtep/cffunct/ceiling.tag new file mode 100644 index 00000000..cf01370b --- /dev/null +++ b/quanta/data/dtep/cffunct/ceiling.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/chr.tag b/quanta/data/dtep/cffunct/chr.tag new file mode 100644 index 00000000..c3ee1463 --- /dev/null +++ b/quanta/data/dtep/cffunct/chr.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/cjustify.tag b/quanta/data/dtep/cffunct/cjustify.tag new file mode 100644 index 00000000..45ba50ee --- /dev/null +++ b/quanta/data/dtep/cffunct/cjustify.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/compare.tag b/quanta/data/dtep/cffunct/compare.tag new file mode 100644 index 00000000..637fb43c --- /dev/null +++ b/quanta/data/dtep/cffunct/compare.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/comparenocase.tag b/quanta/data/dtep/cffunct/comparenocase.tag new file mode 100644 index 00000000..caa2fdab --- /dev/null +++ b/quanta/data/dtep/cffunct/comparenocase.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/cos.tag b/quanta/data/dtep/cffunct/cos.tag new file mode 100644 index 00000000..f6163502 --- /dev/null +++ b/quanta/data/dtep/cffunct/cos.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/createobject.tag b/quanta/data/dtep/cffunct/createobject.tag new file mode 100644 index 00000000..9fe96212 --- /dev/null +++ b/quanta/data/dtep/cffunct/createobject.tag @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/createuuid.tag b/quanta/data/dtep/cffunct/createuuid.tag new file mode 100644 index 00000000..cbbbe6a2 --- /dev/null +++ b/quanta/data/dtep/cffunct/createuuid.tag @@ -0,0 +1,5 @@ + + + + + diff --git a/quanta/data/dtep/cffunct/datetime.tag b/quanta/data/dtep/cffunct/datetime.tag new file mode 100644 index 00000000..a2f29126 --- /dev/null +++ b/quanta/data/dtep/cffunct/datetime.tag @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/de.tag b/quanta/data/dtep/cffunct/de.tag new file mode 100644 index 00000000..92646b8a --- /dev/null +++ b/quanta/data/dtep/cffunct/de.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/decimalformat.tag b/quanta/data/dtep/cffunct/decimalformat.tag new file mode 100644 index 00000000..5bbbf061 --- /dev/null +++ b/quanta/data/dtep/cffunct/decimalformat.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/decrementvalue.tag b/quanta/data/dtep/cffunct/decrementvalue.tag new file mode 100644 index 00000000..099f2329 --- /dev/null +++ b/quanta/data/dtep/cffunct/decrementvalue.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/decrypt.tag b/quanta/data/dtep/cffunct/decrypt.tag new file mode 100644 index 00000000..08bac464 --- /dev/null +++ b/quanta/data/dtep/cffunct/decrypt.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/deleteclientvariable.tag b/quanta/data/dtep/cffunct/deleteclientvariable.tag new file mode 100644 index 00000000..bd2aa34a --- /dev/null +++ b/quanta/data/dtep/cffunct/deleteclientvariable.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/description.rc b/quanta/data/dtep/cffunct/description.rc new file mode 100644 index 00000000..c1b1f7ff --- /dev/null +++ b/quanta/data/dtep/cffunct/description.rc @@ -0,0 +1,15 @@ +[General] +Name = CFFUNCT +DefaultExtension = cfm +NumOfPages = 0 +CaseSensitive = true +Family = 2 + +[Extra rules] +TagAutoCompleteAfter = none + +[Parsing rules] +AreaBorders = +Tags = script(language) +Comments = // EOL +maycontain = cffunct diff --git a/quanta/data/dtep/cffunct/directoryexists.tag b/quanta/data/dtep/cffunct/directoryexists.tag new file mode 100644 index 00000000..005d76cc --- /dev/null +++ b/quanta/data/dtep/cffunct/directoryexists.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/dollarformat.tag b/quanta/data/dtep/cffunct/dollarformat.tag new file mode 100644 index 00000000..2cb4aa09 --- /dev/null +++ b/quanta/data/dtep/cffunct/dollarformat.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/duplicate.tag b/quanta/data/dtep/cffunct/duplicate.tag new file mode 100644 index 00000000..59f2d0a8 --- /dev/null +++ b/quanta/data/dtep/cffunct/duplicate.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/encrypt.tag b/quanta/data/dtep/cffunct/encrypt.tag new file mode 100644 index 00000000..480d8f50 --- /dev/null +++ b/quanta/data/dtep/cffunct/encrypt.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/evaluate.tag b/quanta/data/dtep/cffunct/evaluate.tag new file mode 100644 index 00000000..e18e732a --- /dev/null +++ b/quanta/data/dtep/cffunct/evaluate.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/exp.tag b/quanta/data/dtep/cffunct/exp.tag new file mode 100644 index 00000000..9f2967d2 --- /dev/null +++ b/quanta/data/dtep/cffunct/exp.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/expandpath.tag b/quanta/data/dtep/cffunct/expandpath.tag new file mode 100644 index 00000000..18fbc316 --- /dev/null +++ b/quanta/data/dtep/cffunct/expandpath.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/fileexists.tag b/quanta/data/dtep/cffunct/fileexists.tag new file mode 100644 index 00000000..d347d23c --- /dev/null +++ b/quanta/data/dtep/cffunct/fileexists.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/find.tag b/quanta/data/dtep/cffunct/find.tag new file mode 100644 index 00000000..127e6fe9 --- /dev/null +++ b/quanta/data/dtep/cffunct/find.tag @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/fix.tag b/quanta/data/dtep/cffunct/fix.tag new file mode 100644 index 00000000..bda9d086 --- /dev/null +++ b/quanta/data/dtep/cffunct/fix.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/formatbasen.tag b/quanta/data/dtep/cffunct/formatbasen.tag new file mode 100644 index 00000000..13ae72c5 --- /dev/null +++ b/quanta/data/dtep/cffunct/formatbasen.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/getbasetagdata.tag b/quanta/data/dtep/cffunct/getbasetagdata.tag new file mode 100644 index 00000000..31e5eb7e --- /dev/null +++ b/quanta/data/dtep/cffunct/getbasetagdata.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/getbasetaglist.tag b/quanta/data/dtep/cffunct/getbasetaglist.tag new file mode 100644 index 00000000..c2113176 --- /dev/null +++ b/quanta/data/dtep/cffunct/getbasetaglist.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/getbasetemplatepath.tag b/quanta/data/dtep/cffunct/getbasetemplatepath.tag new file mode 100644 index 00000000..24b8f42a --- /dev/null +++ b/quanta/data/dtep/cffunct/getbasetemplatepath.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/getclientvariableslist.tag b/quanta/data/dtep/cffunct/getclientvariableslist.tag new file mode 100644 index 00000000..aa955783 --- /dev/null +++ b/quanta/data/dtep/cffunct/getclientvariableslist.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/getcurrenttemplatepath.tag b/quanta/data/dtep/cffunct/getcurrenttemplatepath.tag new file mode 100644 index 00000000..e43b0e85 --- /dev/null +++ b/quanta/data/dtep/cffunct/getcurrenttemplatepath.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/getdirectoryfrompath.tag b/quanta/data/dtep/cffunct/getdirectoryfrompath.tag new file mode 100644 index 00000000..95343c79 --- /dev/null +++ b/quanta/data/dtep/cffunct/getdirectoryfrompath.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/getexception.tag b/quanta/data/dtep/cffunct/getexception.tag new file mode 100644 index 00000000..04dda95e --- /dev/null +++ b/quanta/data/dtep/cffunct/getexception.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/getfilefrompath.tag b/quanta/data/dtep/cffunct/getfilefrompath.tag new file mode 100644 index 00000000..0ca6b63e --- /dev/null +++ b/quanta/data/dtep/cffunct/getfilefrompath.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/getfunctionlist.tag b/quanta/data/dtep/cffunct/getfunctionlist.tag new file mode 100644 index 00000000..8f5a518e --- /dev/null +++ b/quanta/data/dtep/cffunct/getfunctionlist.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/gethttprequestdata.tag b/quanta/data/dtep/cffunct/gethttprequestdata.tag new file mode 100644 index 00000000..17d77fe8 --- /dev/null +++ b/quanta/data/dtep/cffunct/gethttprequestdata.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/gethttptimestring.tag b/quanta/data/dtep/cffunct/gethttptimestring.tag new file mode 100644 index 00000000..7b66bb21 --- /dev/null +++ b/quanta/data/dtep/cffunct/gethttptimestring.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/getlocale.tag b/quanta/data/dtep/cffunct/getlocale.tag new file mode 100644 index 00000000..86f50a12 --- /dev/null +++ b/quanta/data/dtep/cffunct/getlocale.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/getmetricdata.tag b/quanta/data/dtep/cffunct/getmetricdata.tag new file mode 100644 index 00000000..11295864 --- /dev/null +++ b/quanta/data/dtep/cffunct/getmetricdata.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/getprofilestring.tag b/quanta/data/dtep/cffunct/getprofilestring.tag new file mode 100644 index 00000000..5e4d55ea --- /dev/null +++ b/quanta/data/dtep/cffunct/getprofilestring.tag @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/gettempdirectory.tag b/quanta/data/dtep/cffunct/gettempdirectory.tag new file mode 100644 index 00000000..971badbc --- /dev/null +++ b/quanta/data/dtep/cffunct/gettempdirectory.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/gettempfile.tag b/quanta/data/dtep/cffunct/gettempfile.tag new file mode 100644 index 00000000..4ab8317e --- /dev/null +++ b/quanta/data/dtep/cffunct/gettempfile.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/gettemplatepath.tag b/quanta/data/dtep/cffunct/gettemplatepath.tag new file mode 100644 index 00000000..553803c1 --- /dev/null +++ b/quanta/data/dtep/cffunct/gettemplatepath.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/gettickcount.tag b/quanta/data/dtep/cffunct/gettickcount.tag new file mode 100644 index 00000000..c03037a8 --- /dev/null +++ b/quanta/data/dtep/cffunct/gettickcount.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cffunct/gettoken.tag b/quanta/data/dtep/cffunct/gettoken.tag new file mode 100644 index 00000000..762b8a12 --- /dev/null +++ b/quanta/data/dtep/cffunct/gettoken.tag @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/hash.tag b/quanta/data/dtep/cffunct/hash.tag new file mode 100644 index 00000000..e8e52ffb --- /dev/null +++ b/quanta/data/dtep/cffunct/hash.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/htmlcodeformat.tag b/quanta/data/dtep/cffunct/htmlcodeformat.tag new file mode 100644 index 00000000..edcd27df --- /dev/null +++ b/quanta/data/dtep/cffunct/htmlcodeformat.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/htmleditformat.tag b/quanta/data/dtep/cffunct/htmleditformat.tag new file mode 100644 index 00000000..5cd35724 --- /dev/null +++ b/quanta/data/dtep/cffunct/htmleditformat.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/iif.tag b/quanta/data/dtep/cffunct/iif.tag new file mode 100644 index 00000000..5ef4b8b1 --- /dev/null +++ b/quanta/data/dtep/cffunct/iif.tag @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/incrementvalue.tag b/quanta/data/dtep/cffunct/incrementvalue.tag new file mode 100644 index 00000000..1f23b171 --- /dev/null +++ b/quanta/data/dtep/cffunct/incrementvalue.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/inputbasen.tag b/quanta/data/dtep/cffunct/inputbasen.tag new file mode 100644 index 00000000..222bd0ad --- /dev/null +++ b/quanta/data/dtep/cffunct/inputbasen.tag @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/quanta/data/dtep/cffunct/insert.tag b/quanta/data/dtep/cffunct/insert.tag new file mode 100644 index 00000000..7a6a538f --- /dev/null +++ b/quanta/data/dtep/cffunct/insert.tag @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/quanta/data/dtep/cffunct/int.tag b/quanta/data/dtep/cffunct/int.tag new file mode 100644 index 00000000..fcd0f4a2 --- /dev/null +++ b/quanta/data/dtep/cffunct/int.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/isarray.tag b/quanta/data/dtep/cffunct/isarray.tag new file mode 100644 index 00000000..37a1b2cc --- /dev/null +++ b/quanta/data/dtep/cffunct/isarray.tag @@ -0,0 +1,7 @@ + + + + + + + diff --git a/quanta/data/dtep/cffunct/isauthenticated.tag b/quanta/data/dtep/cffunct/isauthenticated.tag new file mode 100644 index 00000000..ea387672 --- /dev/null +++ b/quanta/data/dtep/cffunct/isauthenticated.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/cfml/Makefile.am b/quanta/data/dtep/cfml/Makefile.am new file mode 100644 index 00000000..c714f718 --- /dev/null +++ b/quanta/data/dtep/cfml/Makefile.am @@ -0,0 +1,3 @@ +kdevelopdir = ${quanta_datadir}/dtep/cfml + +kdevelop_DATA = cfabort.tag cfapplet.tag cfapplication.tag cfargument.tag cfassociate.tag cfauthenticate.tag cfbreak.tag cfcache.tag cfcase.tag cfcatch.tag cfchart.tag cfchartdata.tag cfchartseries.tag cfcol.tag cfcollection.tag cfcomponent.tag cfcontent.tag cfcookie.tag cfdirectory.tag cfdump.tag cferror.tag cfexecute.tag cfexit.tag cffile.tag cfflush.tag cfform.tag cfftp.tag cffunction.tag cfgrid.tag cfgridcolumn.tag cfgridrow.tag cfgridupdate.tag cfheader.tag cfhtmlhead.tag cfhttp.tag cfhttpparam.tag cfimport.tag cfinclude.tag cfindex.tag cfinput.tag cfinsert.tag cfinvoke.tag cfinvokeargument.tag cfldap.tag cflocation.tag cflock.tag cflog.tag cflogin.tag cfloginuser.tag cfloop.tag cfmail.tag cfmailparam.tag cfmodule.tag cfobject.tag cfobjectcache.tag cfoutput.tag cfparam.tag cfpop.tag cfprocessingdirective.tag cfprocparam.tag cfprocresult.tag cfproperty.tag cfquery.tag cfqueryparam.tag cfregistry.tag cfreport.tag cfsavecontent.tag cfschedule.tag cfsearch.tag cfselect.tag cfsetting.tag cfslider.tag cfstoredproc.tag cfswitch.tag cftable.tag cftextinput.tag cfthrow.tag cftrace.tag cftransaction.tag cftree.tag cftreeitem.tag cfupdate.tag cfusion.tag cfwddx.tag cfxml.tag description.rc ftp.tag test.cfm diff --git a/quanta/data/dtep/cfml/cfabort.tag b/quanta/data/dtep/cfml/cfabort.tag new file mode 100644 index 00000000..2ee28179 --- /dev/null +++ b/quanta/data/dtep/cfml/cfabort.tag @@ -0,0 +1,14 @@ + + + + + Show Error: + + + Error message to display, rather than just ending execution + + + + + + diff --git a/quanta/data/dtep/cfml/cfapplet.tag b/quanta/data/dtep/cfml/cfapplet.tag new file mode 100644 index 00000000..9741735d --- /dev/null +++ b/quanta/data/dtep/cfml/cfapplet.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfapplication.tag b/quanta/data/dtep/cfml/cfapplication.tag new file mode 100644 index 00000000..19a83ace --- /dev/null +++ b/quanta/data/dtep/cfml/cfapplication.tag @@ -0,0 +1,69 @@ + + + + + Name: + + + + + Client Management + + + + Yes + No + + + + Session Management + + + + Yes + No + + + + Set Client Cookies + + + + Yes + No + + + + Set Domain Cookies + + + + Yes + No + + + + Client Storage + + + + Registry + Cookie + "datasource_name" + + + + Application Timeout + + + + + Session Timeout + + + + + + + + diff --git a/quanta/data/dtep/cfml/cfargument.tag b/quanta/data/dtep/cfml/cfargument.tag new file mode 100644 index 00000000..3d1d2d9d --- /dev/null +++ b/quanta/data/dtep/cfml/cfargument.tag @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfassociate.tag b/quanta/data/dtep/cfml/cfassociate.tag new file mode 100644 index 00000000..dad2b9c9 --- /dev/null +++ b/quanta/data/dtep/cfml/cfassociate.tag @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfauthenticate.tag b/quanta/data/dtep/cfml/cfauthenticate.tag new file mode 100644 index 00000000..80eaedce --- /dev/null +++ b/quanta/data/dtep/cfml/cfauthenticate.tag @@ -0,0 +1,32 @@ + + + + + + + + + + + Yes + No + + + + + + Yes + No + + + + + + Basic + X509 + + + + + + diff --git a/quanta/data/dtep/cfml/cfbreak.tag b/quanta/data/dtep/cfml/cfbreak.tag new file mode 100644 index 00000000..5af7b0e8 --- /dev/null +++ b/quanta/data/dtep/cfml/cfbreak.tag @@ -0,0 +1,4 @@ + + + + diff --git a/quanta/data/dtep/cfml/cfcache.tag b/quanta/data/dtep/cfml/cfcache.tag new file mode 100644 index 00000000..a4939953 --- /dev/null +++ b/quanta/data/dtep/cfml/cfcache.tag @@ -0,0 +1,21 @@ + + + + + + cache + flush + clientcache + servercache + optimal + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfcase.tag b/quanta/data/dtep/cfml/cfcase.tag new file mode 100644 index 00000000..929d7eec --- /dev/null +++ b/quanta/data/dtep/cfml/cfcase.tag @@ -0,0 +1,19 @@ + + + + + Value(s) + + + + + Delimiters + + + Delimiters for the values, if more than one. + + + + + + diff --git a/quanta/data/dtep/cfml/cfcatch.tag b/quanta/data/dtep/cfml/cfcatch.tag new file mode 100644 index 00000000..75da8b41 --- /dev/null +++ b/quanta/data/dtep/cfml/cfcatch.tag @@ -0,0 +1,26 @@ + + + + + Exception Type: + + + + application + database + template + security + object + missinginclude + expression + lock + searchengine + any + "custom_type" + + + + + + + diff --git a/quanta/data/dtep/cfml/cfchart.tag b/quanta/data/dtep/cfml/cfchart.tag new file mode 100644 index 00000000..e8d1805e --- /dev/null +++ b/quanta/data/dtep/cfml/cfchart.tag @@ -0,0 +1,120 @@ + + + + + + flash + jpg + png + + + + + + + + + Yes + No + + + + + Yes + No + + + + + + default + cluster + stacked + percent + + + + + + + + Yes + No + + + + + + + Yes + No + + + + + Yes + No + + + + + number + currency + percent + date + + + + + + + Yes + No + + + + + Yes + No + + + + + + + Yes + No + + + + + Yes + No + + + + + moustdown + mouseover + off + + + + + + + Yes + No + + + + + + solid + sliced + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfchartdata.tag b/quanta/data/dtep/cfml/cfchartdata.tag new file mode 100644 index 00000000..35f96df5 --- /dev/null +++ b/quanta/data/dtep/cfml/cfchartdata.tag @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfchartseries.tag b/quanta/data/dtep/cfml/cfchartseries.tag new file mode 100644 index 00000000..b248dd50 --- /dev/null +++ b/quanta/data/dtep/cfml/cfchartseries.tag @@ -0,0 +1,45 @@ + + + + + + bar + line + pyramid + area + cone + curve + cylinder + step + scatter + pie + + + + + + + + + + plain + raise + shade + light + + + + + rectangle + triangle + diamond + circle + letter + mcross + snow + rcross + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfcol.tag b/quanta/data/dtep/cfml/cfcol.tag new file mode 100644 index 00000000..1129c9f0 --- /dev/null +++ b/quanta/data/dtep/cfml/cfcol.tag @@ -0,0 +1,15 @@ + + + + + + + + left + right + center + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfcollection.tag b/quanta/data/dtep/cfml/cfcollection.tag new file mode 100644 index 00000000..21f02f39 --- /dev/null +++ b/quanta/data/dtep/cfml/cfcollection.tag @@ -0,0 +1,19 @@ + + + + + + create + repair + delete + map + optimize + list + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfcomponent.tag b/quanta/data/dtep/cfml/cfcomponent.tag new file mode 100644 index 00000000..faa61c62 --- /dev/null +++ b/quanta/data/dtep/cfml/cfcomponent.tag @@ -0,0 +1,16 @@ + + + + + Extends: + + + + + + Yes + No + + + + diff --git a/quanta/data/dtep/cfml/cfcontent.tag b/quanta/data/dtep/cfml/cfcontent.tag new file mode 100644 index 00000000..a6eeaad1 --- /dev/null +++ b/quanta/data/dtep/cfml/cfcontent.tag @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfcookie.tag b/quanta/data/dtep/cfml/cfcookie.tag new file mode 100644 index 00000000..d1a0556e --- /dev/null +++ b/quanta/data/dtep/cfml/cfcookie.tag @@ -0,0 +1,16 @@ + + + + + + + + + Yes + No + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfdirectory.tag b/quanta/data/dtep/cfml/cfdirectory.tag new file mode 100644 index 00000000..24d6cd12 --- /dev/null +++ b/quanta/data/dtep/cfml/cfdirectory.tag @@ -0,0 +1,19 @@ + + + + + + list + create + delete + rename + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfdump.tag b/quanta/data/dtep/cfml/cfdump.tag new file mode 100644 index 00000000..feec0008 --- /dev/null +++ b/quanta/data/dtep/cfml/cfdump.tag @@ -0,0 +1,13 @@ + + + + + + + Yes + No + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cferror.tag b/quanta/data/dtep/cfml/cferror.tag new file mode 100644 index 00000000..a4cb031d --- /dev/null +++ b/quanta/data/dtep/cfml/cferror.tag @@ -0,0 +1,22 @@ + + + + + + application + database + template + security + object + missinginclude + expression + lock + any + "custom_type" + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfexecute.tag b/quanta/data/dtep/cfml/cfexecute.tag new file mode 100644 index 00000000..1c4c608a --- /dev/null +++ b/quanta/data/dtep/cfml/cfexecute.tag @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfexit.tag b/quanta/data/dtep/cfml/cfexit.tag new file mode 100644 index 00000000..1b3b6446 --- /dev/null +++ b/quanta/data/dtep/cfml/cfexit.tag @@ -0,0 +1,12 @@ + + + + + + exittag + exittemplate + loop + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cffile.tag b/quanta/data/dtep/cfml/cffile.tag new file mode 100644 index 00000000..2d5122f2 --- /dev/null +++ b/quanta/data/dtep/cfml/cffile.tag @@ -0,0 +1,37 @@ + + + + + + upload + move + rename + copy + delete + read + readbinary + write + append + + + + + + + + + error + skip + overwrite + makeunique + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfflush.tag b/quanta/data/dtep/cfml/cfflush.tag new file mode 100644 index 00000000..d8b2e6fe --- /dev/null +++ b/quanta/data/dtep/cfml/cfflush.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfform.tag b/quanta/data/dtep/cfml/cfform.tag new file mode 100644 index 00000000..5bb0d053 --- /dev/null +++ b/quanta/data/dtep/cfml/cfform.tag @@ -0,0 +1,24 @@ + + + + + + + /cfide/scripts/cfform.js + + + + false + true + + + + + + /cfide/classes/cf-j2re-win.cab + + + /cfide/classes/CFJava2.jar + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfftp.tag b/quanta/data/dtep/cfml/cfftp.tag new file mode 100644 index 00000000..ed2b7690 --- /dev/null +++ b/quanta/data/dtep/cfml/cfftp.tag @@ -0,0 +1,64 @@ + + + + + + open + close + changedir + createdir + listdir + removedir + getfile + putfile + rename + remove + getcurrentdir + getcurrentURL + existsdir + existsfile + exists + + + + + + + + + auto + ASCII + binary + + + + + Yes + No + + + + + + + + + + + + + + + + Yes + No + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cffunction.tag b/quanta/data/dtep/cfml/cffunction.tag new file mode 100644 index 00000000..b721dfa9 --- /dev/null +++ b/quanta/data/dtep/cfml/cffunction.tag @@ -0,0 +1,38 @@ + + + + + + + any + array + binary + boolean + date + guid + numeric + query + string + struct + uuid + void + "a return type" + + + + + + private + package + public + remote + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfgrid.tag b/quanta/data/dtep/cfml/cfgrid.tag new file mode 100644 index 00000000..b7245c8d --- /dev/null +++ b/quanta/data/dtep/cfml/cfgrid.tag @@ -0,0 +1,173 @@ + + + + + + + + + Yes + No + + + + + + + top + left + bottom + baseline + texttop + absbottom + middle + absmiddle + right + + + + + + Yes + No + + + + + Yes + No + + + + + Yes + No + + + + + + + Yes + No + + + + + Yes + No + + + + + + + + + Yes + No + + + + + Yes + No + + + + + + + left + right + center + + + + + Yes + No + + + + + + Yes + No + + + + + left + right + center + + + + + + + Yes + No + + + + + Yes + No + + + + + + Yes + No + + + + + left + right + center + + + + + + + Yes + No + + + + + Yes + No + + + + + + + + edit + single + row + column + browse + + + + + + + Yes + No + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfgridcolumn.tag b/quanta/data/dtep/cfml/cfgridcolumn.tag new file mode 100644 index 00000000..4edfc232 --- /dev/null +++ b/quanta/data/dtep/cfml/cfgridcolumn.tag @@ -0,0 +1,86 @@ + + + + + + + Yes + No + + + + + + + + Yes + No + + + + + Yes + No + + + + + + + + + + Yes + No + + + + + Yes + No + + + + + image + numeric + boolean + string_nocase + + + + + + + + Yes + No + + + + + Yes + No + + + + + + left + right + center + + + + + left + right + center + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfgridrow.tag b/quanta/data/dtep/cfml/cfgridrow.tag new file mode 100644 index 00000000..8a183e04 --- /dev/null +++ b/quanta/data/dtep/cfml/cfgridrow.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfgridupdate.tag b/quanta/data/dtep/cfml/cfgridupdate.tag new file mode 100644 index 00000000..b6ede664 --- /dev/null +++ b/quanta/data/dtep/cfml/cfgridupdate.tag @@ -0,0 +1,18 @@ + + + + + + + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfheader.tag b/quanta/data/dtep/cfml/cfheader.tag new file mode 100644 index 00000000..80fb218c --- /dev/null +++ b/quanta/data/dtep/cfml/cfheader.tag @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfhtmlhead.tag b/quanta/data/dtep/cfml/cfhtmlhead.tag new file mode 100644 index 00000000..cbe953b5 --- /dev/null +++ b/quanta/data/dtep/cfml/cfhtmlhead.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfhttp.tag b/quanta/data/dtep/cfml/cfhttp.tag new file mode 100644 index 00000000..4054ebd7 --- /dev/null +++ b/quanta/data/dtep/cfml/cfhttp.tag @@ -0,0 +1,50 @@ + + + + + + + + GET + POST + + + + + + + + + Yes + No + + + + + + + + + Yes + No + + + + + + + + Yes + No + + + + + Yes + No + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfhttpparam.tag b/quanta/data/dtep/cfml/cfhttpparam.tag new file mode 100644 index 00000000..756600f1 --- /dev/null +++ b/quanta/data/dtep/cfml/cfhttpparam.tag @@ -0,0 +1,17 @@ + + + + + + + URL + formfield + cookie + cgi + file + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfimport.tag b/quanta/data/dtep/cfml/cfimport.tag new file mode 100644 index 00000000..15c79de4 --- /dev/null +++ b/quanta/data/dtep/cfml/cfimport.tag @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfinclude.tag b/quanta/data/dtep/cfml/cfinclude.tag new file mode 100644 index 00000000..3bc486e8 --- /dev/null +++ b/quanta/data/dtep/cfml/cfinclude.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfindex.tag b/quanta/data/dtep/cfml/cfindex.tag new file mode 100644 index 00000000..52e1fabe --- /dev/null +++ b/quanta/data/dtep/cfml/cfindex.tag @@ -0,0 +1,36 @@ + + + + + + + update + delete + purge + refresh + + + + + file + path + custom + + + + + + + + + + + + + Yes + No + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfinput.tag b/quanta/data/dtep/cfml/cfinput.tag new file mode 100644 index 00000000..0ad1c657 --- /dev/null +++ b/quanta/data/dtep/cfml/cfinput.tag @@ -0,0 +1,42 @@ + + + + + + Yes + No + + + + + + + Yes + No + + + + + + date + eurodate + time + float + integer + telephone + zipcode + creditcard + social_security_number + regular_expression + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfinsert.tag b/quanta/data/dtep/cfml/cfinsert.tag new file mode 100644 index 00000000..818d5f3a --- /dev/null +++ b/quanta/data/dtep/cfml/cfinsert.tag @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfinvoke.tag b/quanta/data/dtep/cfml/cfinvoke.tag new file mode 100644 index 00000000..e222c665 --- /dev/null +++ b/quanta/data/dtep/cfml/cfinvoke.tag @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfinvokeargument.tag b/quanta/data/dtep/cfml/cfinvokeargument.tag new file mode 100644 index 00000000..562409bb --- /dev/null +++ b/quanta/data/dtep/cfml/cfinvokeargument.tag @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfldap.tag b/quanta/data/dtep/cfml/cfldap.tag new file mode 100644 index 00000000..9d77cd77 --- /dev/null +++ b/quanta/data/dtep/cfml/cfldap.tag @@ -0,0 +1,60 @@ + + + + + + + + + + query + add + modify + modifyDN + delete + + + + + + + + + onelevel + base + subtree + + + + + + + + nocase + asc + desc + nocase, asc + nocase, desc + + + + + + + add + delete + replace + + + + + Yes + No + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cflocation.tag b/quanta/data/dtep/cfml/cflocation.tag new file mode 100644 index 00000000..61823950 --- /dev/null +++ b/quanta/data/dtep/cfml/cflocation.tag @@ -0,0 +1,12 @@ + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cflock.tag b/quanta/data/dtep/cfml/cflock.tag new file mode 100644 index 00000000..6c3bfb67 --- /dev/null +++ b/quanta/data/dtep/cfml/cflock.tag @@ -0,0 +1,26 @@ + + + + + + + Application + Server + Session + + + + + + Yes + No + + + + + read-only + exclusive + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cflog.tag b/quanta/data/dtep/cfml/cflog.tag new file mode 100644 index 00000000..df018930 --- /dev/null +++ b/quanta/data/dtep/cfml/cflog.tag @@ -0,0 +1,27 @@ + + + + + + + Application + Scheduler + + + + + + information + warning + error + fatal information + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cflogin.tag b/quanta/data/dtep/cfml/cflogin.tag new file mode 100644 index 00000000..faaa5e2c --- /dev/null +++ b/quanta/data/dtep/cfml/cflogin.tag @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfloginuser.tag b/quanta/data/dtep/cfml/cfloginuser.tag new file mode 100644 index 00000000..6377fcfb --- /dev/null +++ b/quanta/data/dtep/cfml/cfloginuser.tag @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfloop.tag b/quanta/data/dtep/cfml/cfloop.tag new file mode 100644 index 00000000..a227333b --- /dev/null +++ b/quanta/data/dtep/cfml/cfloop.tag @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfmail.tag b/quanta/data/dtep/cfml/cfmail.tag new file mode 100644 index 00000000..a7d592ef --- /dev/null +++ b/quanta/data/dtep/cfml/cfmail.tag @@ -0,0 +1,34 @@ + + + + + + + + + + HTML + + + + + + + + Yes + No + + + + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfmailparam.tag b/quanta/data/dtep/cfml/cfmailparam.tag new file mode 100644 index 00000000..4c4a7654 --- /dev/null +++ b/quanta/data/dtep/cfml/cfmailparam.tag @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfmodule.tag b/quanta/data/dtep/cfml/cfmodule.tag new file mode 100644 index 00000000..3b1a23e3 --- /dev/null +++ b/quanta/data/dtep/cfml/cfmodule.tag @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfobject.tag b/quanta/data/dtep/cfml/cfobject.tag new file mode 100644 index 00000000..119068a7 --- /dev/null +++ b/quanta/data/dtep/cfml/cfobject.tag @@ -0,0 +1,37 @@ + + + + + + com + corba + java + + + + + create + connect + + + + + + + inproc + local + remote + + + + + + + ior + nameservice + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfobjectcache.tag b/quanta/data/dtep/cfml/cfobjectcache.tag new file mode 100644 index 00000000..46663bfb --- /dev/null +++ b/quanta/data/dtep/cfml/cfobjectcache.tag @@ -0,0 +1,8 @@ + + + + + clear + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfoutput.tag b/quanta/data/dtep/cfml/cfoutput.tag new file mode 100644 index 00000000..0a853c37 --- /dev/null +++ b/quanta/data/dtep/cfml/cfoutput.tag @@ -0,0 +1,15 @@ + + + + + + + + Yes + No + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfparam.tag b/quanta/data/dtep/cfml/cfparam.tag new file mode 100644 index 00000000..e1230cca --- /dev/null +++ b/quanta/data/dtep/cfml/cfparam.tag @@ -0,0 +1,21 @@ + + + + + + + array + binary + boolean + date + numeric + queyr + string + struct + uuid + any + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfpop.tag b/quanta/data/dtep/cfml/cfpop.tag new file mode 100644 index 00000000..57a1d4f3 --- /dev/null +++ b/quanta/data/dtep/cfml/cfpop.tag @@ -0,0 +1,28 @@ + + + + + + + + + + getheaderonly + getall + delete + + + + + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfprocessingdirective.tag b/quanta/data/dtep/cfml/cfprocessingdirective.tag new file mode 100644 index 00000000..0fc58685 --- /dev/null +++ b/quanta/data/dtep/cfml/cfprocessingdirective.tag @@ -0,0 +1,13 @@ + + + + + + in + out + inout + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfprocparam.tag b/quanta/data/dtep/cfml/cfprocparam.tag new file mode 100644 index 00000000..e0e95852 --- /dev/null +++ b/quanta/data/dtep/cfml/cfprocparam.tag @@ -0,0 +1,49 @@ + + + + + + in + out + inout + + + + + + + + CF_SQL_BIGINT + CF_SQL_BIT + CF_SQL_BLOB + CF_SQL_CHAR + CF_SQL_CLOB + CF_SQL_DATE + CF_SQL_DECIMAL + CF_SQL_DOUBLE + CF_SQL_FLOAT + CF_SQL_IDSTAMP + CF_SQL_INTEGER + CF_SQL_LONGVARCHAR + CF_SQL_MONEY + CF_SQL_MONEY4 + CF_SQL_NUMERIC + CF_SQL_REAL + CF_SQL_REFCURSOR + CF_SQL_SMALLINT + CF_SQL_TIME + CF_SQL_TIMESTAMP + CF_SQL_TINYINT + CF_SQL_VARCHAR + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfprocresult.tag b/quanta/data/dtep/cfml/cfprocresult.tag new file mode 100644 index 00000000..691f85c6 --- /dev/null +++ b/quanta/data/dtep/cfml/cfprocresult.tag @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfproperty.tag b/quanta/data/dtep/cfml/cfproperty.tag new file mode 100644 index 00000000..36f41be8 --- /dev/null +++ b/quanta/data/dtep/cfml/cfproperty.tag @@ -0,0 +1,20 @@ + + + + + + + array + binary + boolean + date + numeric + queyr + string + struct + uuid + any + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfquery.tag b/quanta/data/dtep/cfml/cfquery.tag new file mode 100644 index 00000000..86536fb9 --- /dev/null +++ b/quanta/data/dtep/cfml/cfquery.tag @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfqueryparam.tag b/quanta/data/dtep/cfml/cfqueryparam.tag new file mode 100644 index 00000000..47c14979 --- /dev/null +++ b/quanta/data/dtep/cfml/cfqueryparam.tag @@ -0,0 +1,47 @@ + + + + + + + CF_SQL_BIGINT + CF_SQL_BIT + CF_SQL_BLOB + CF_SQL_CHAR + CF_SQL_CLOB + CF_SQL_DATE + CF_SQL_DECIMAL + CF_SQL_DOUBLE + CF_SQL_FLOAT + CF_SQL_IDSTAMP + CF_SQL_INTEGER + CF_SQL_LONGVARCHAR + CF_SQL_MONEY + CF_SQL_MONEY4 + CF_SQL_NUMERIC + CF_SQL_REAL + CF_SQL_REFCURSOR + CF_SQL_SMALLINT + CF_SQL_TIME + CF_SQL_TIMESTAMP + CF_SQL_TINYINT + CF_SQL_VARCHAR + + + + + + + Yes + No + + + + + Yes + No + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfregistry.tag b/quanta/data/dtep/cfml/cfregistry.tag new file mode 100644 index 00000000..7a885419 --- /dev/null +++ b/quanta/data/dtep/cfml/cfregistry.tag @@ -0,0 +1,32 @@ + + + + + + getall + get + set + delete + + + + + + + + string + dword + key + any + + + + + + asc + desc + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfreport.tag b/quanta/data/dtep/cfml/cfreport.tag new file mode 100644 index 00000000..36a6621f --- /dev/null +++ b/quanta/data/dtep/cfml/cfreport.tag @@ -0,0 +1,19 @@ + + + + + + + + standard + netscape + microsoft + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfsavecontent.tag b/quanta/data/dtep/cfml/cfsavecontent.tag new file mode 100644 index 00000000..da0cf0b7 --- /dev/null +++ b/quanta/data/dtep/cfml/cfsavecontent.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfschedule.tag b/quanta/data/dtep/cfml/cfschedule.tag new file mode 100644 index 00000000..432e4305 --- /dev/null +++ b/quanta/data/dtep/cfml/cfschedule.tag @@ -0,0 +1,40 @@ + + + + + + delete + update + run + + + + + + + + + + + + Yes + No + + + + + + + + + + + + Yes + No + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfsearch.tag b/quanta/data/dtep/cfml/cfsearch.tag new file mode 100644 index 00000000..e7eb9325 --- /dev/null +++ b/quanta/data/dtep/cfml/cfsearch.tag @@ -0,0 +1,17 @@ + + + + + + + + simple + explicit + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfselect.tag b/quanta/data/dtep/cfml/cfselect.tag new file mode 100644 index 00000000..1bfcd367 --- /dev/null +++ b/quanta/data/dtep/cfml/cfselect.tag @@ -0,0 +1,26 @@ + + + + + + + + Yes + No + + + + + + + Yes + No + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfsetting.tag b/quanta/data/dtep/cfml/cfsetting.tag new file mode 100644 index 00000000..789197f5 --- /dev/null +++ b/quanta/data/dtep/cfml/cfsetting.tag @@ -0,0 +1,18 @@ + + + + + + Yes + No + + + + + Yes + No + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfslider.tag b/quanta/data/dtep/cfml/cfslider.tag new file mode 100644 index 00000000..b599d7e6 --- /dev/null +++ b/quanta/data/dtep/cfml/cfslider.tag @@ -0,0 +1,85 @@ + + + + + + + + Yes + No + + + + + + + + + + + + + + top + left + bottom + baseline + texttop + absbottom + middle + absmiddle + right + + + + + Yes + No + + + + + Yes + No + + + + + + Yes + No + "custom,label,list" + + + + + motif + windows + metal + + + + + Yes + No + + + + + + + + + Yes + No + + + + + Yes + No + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfstoredproc.tag b/quanta/data/dtep/cfml/cfstoredproc.tag new file mode 100644 index 00000000..42928240 --- /dev/null +++ b/quanta/data/dtep/cfml/cfstoredproc.tag @@ -0,0 +1,22 @@ + + + + + + + + + + + Yes + No + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfswitch.tag b/quanta/data/dtep/cfml/cfswitch.tag new file mode 100644 index 00000000..b316033a --- /dev/null +++ b/quanta/data/dtep/cfml/cfswitch.tag @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cftable.tag b/quanta/data/dtep/cfml/cftable.tag new file mode 100644 index 00000000..6cb40182 --- /dev/null +++ b/quanta/data/dtep/cfml/cftable.tag @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cftextinput.tag b/quanta/data/dtep/cfml/cftextinput.tag new file mode 100644 index 00000000..f762f734 --- /dev/null +++ b/quanta/data/dtep/cfml/cftextinput.tag @@ -0,0 +1,68 @@ + + + + + + + + Yes + No + + + + + + date + eurodate + time + float + integer + telephone + zipcode + creditcard + social_security_number + regular_expression + + + + + + + + + + + + Yes + No + + + + + Yes + No + + + + + + + + + top + left + bottom + baseline + texttop + absbottom + middle + absmiddle + right + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfthrow.tag b/quanta/data/dtep/cfml/cfthrow.tag new file mode 100644 index 00000000..8d72ae51 --- /dev/null +++ b/quanta/data/dtep/cfml/cfthrow.tag @@ -0,0 +1,16 @@ + + + + + + application + "custom_type" + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cftrace.tag b/quanta/data/dtep/cfml/cftrace.tag new file mode 100644 index 00000000..5a00cf1a --- /dev/null +++ b/quanta/data/dtep/cfml/cftrace.tag @@ -0,0 +1,23 @@ + + + + + + Yes + No + + + + + + + + information + warning + error + fatal information + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cftransaction.tag b/quanta/data/dtep/cfml/cftransaction.tag new file mode 100644 index 00000000..e5454cb1 --- /dev/null +++ b/quanta/data/dtep/cfml/cftransaction.tag @@ -0,0 +1,20 @@ + + + + + + begin + commit + rollback + + + + + read_uncommitted + read_committed + repeatable_read + serializable + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cftree.tag b/quanta/data/dtep/cfml/cftree.tag new file mode 100644 index 00000000..f2601061 --- /dev/null +++ b/quanta/data/dtep/cfml/cftree.tag @@ -0,0 +1,91 @@ + + + + + + + Yes + No + + + + + + Yes + No + + + + + Yes + No + + + + + Yes + No + + + + + + + + motif + windows + metal + + + + + + + Yes + No + + + + + Yes + No + + + + + + + + + top + left + bottom + baseline + texttop + absbottom + middle + absmiddle + right + + + + + Yes + No + + + + + Yes + No + + + + + Yes + No + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cftreeitem.tag b/quanta/data/dtep/cfml/cftreeitem.tag new file mode 100644 index 00000000..2e54a59a --- /dev/null +++ b/quanta/data/dtep/cfml/cftreeitem.tag @@ -0,0 +1,37 @@ + + + + + + + + + cd + computer + document + element + folder + floppy + fixed + remote + + + + + + + + + Yes + No + "string_for_name" + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfupdate.tag b/quanta/data/dtep/cfml/cfupdate.tag new file mode 100644 index 00000000..277ff051 --- /dev/null +++ b/quanta/data/dtep/cfml/cfupdate.tag @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfusion.tag b/quanta/data/dtep/cfml/cfusion.tag new file mode 100644 index 00000000..07d1e464 --- /dev/null +++ b/quanta/data/dtep/cfml/cfusion.tag @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/quanta/data/dtep/cfml/cfwddx.tag b/quanta/data/dtep/cfml/cfwddx.tag new file mode 100644 index 00000000..97989536 --- /dev/null +++ b/quanta/data/dtep/cfml/cfwddx.tag @@ -0,0 +1,28 @@ + + + + + + cfml2wddx + wddx2cfml + cfml2js + wddx2js + + + + + + + + Yes + No + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/cfxml.tag b/quanta/data/dtep/cfml/cfxml.tag new file mode 100644 index 00000000..26bda494 --- /dev/null +++ b/quanta/data/dtep/cfml/cfxml.tag @@ -0,0 +1,12 @@ + + + + + + + Yes + No + + + + \ No newline at end of file diff --git a/quanta/data/dtep/cfml/description.rc b/quanta/data/dtep/cfml/description.rc new file mode 100644 index 00000000..166f7d99 --- /dev/null +++ b/quanta/data/dtep/cfml/description.rc @@ -0,0 +1,20 @@ +[General] +Name = CFML +Inherits = -//W3C//DTD XHTML 1.0 Strict//EN +DefaultExtension = cfm +NumOfPages = 0 +CaseSensitive = false +Family = 1 + +[Toolbars] +Location = cfml +Names = standard, fonts, tables, lists, forms, cfml + +[Extra rules] +BooleanAttributes = simple +Single Tag Style = html + +[Parsing rules] +AppendCommonRules = false +Comments = +MayContain = css, cffunct diff --git a/quanta/data/dtep/cfml/ftp.tag b/quanta/data/dtep/cfml/ftp.tag new file mode 100644 index 00000000..d6992804 --- /dev/null +++ b/quanta/data/dtep/cfml/ftp.tag @@ -0,0 +1,64 @@ + + + + + + open + close + changedir + createdir + listdir + removedir + getfile + putfile + rename + remove + getcurrentdir + getcurrentURL + existsdir + existsfile + exists + + + + + + + + + auto + ASCII + binary + + + + + Yes + No + + + + + + + + + + + + + + + + Yes + No + + + + + Yes + No + + + + diff --git a/quanta/data/dtep/cfml/test.cfm b/quanta/data/dtep/cfml/test.cfm new file mode 100644 index 00000000..139597f9 --- /dev/null +++ b/quanta/data/dtep/cfml/test.cfm @@ -0,0 +1,2 @@ + + diff --git a/quanta/data/dtep/css/Makefile.am b/quanta/data/dtep/css/Makefile.am new file mode 100644 index 00000000..043494b0 --- /dev/null +++ b/quanta/data/dtep/css/Makefile.am @@ -0,0 +1,18 @@ +quantadir = ${quanta_datadir}/dtep/css + +quanta_DATA = description.rc background.tag border-bottom-color.tag border-bottom-style.tag \ +border-bottom-width.tag border-bottom.tag border-collapse.tag border-color.tag \ +border-left-color.tag border-left-style.tag border-left-width.tag border-left.tag \ +border-right-color.tag border-right-style.tag border-right-width.tag border-right.tag \ +border-spacing.tag border-top-color.tag border-top-style.tag border-top-width.tag \ +border-top.tag border.tag bottom.tag caption-side.tag clear.tag clip.tag color.tag \ +content.tag counter-increment.tag counter-reset.tag cursor.tag direction.tag display.tag \ +empty-cells.tag float.tag font-size-adjust.tag font-stretch.tag font.tag height.tag \ +left.tag letter-spacing.tag line-height.tag list-style.tag margin-bottom.tag margin-left.tag \ +margin-right.tag margin-top.tag margin.tag marker-offset.tag max-height.tag max-width.tag \ +min-height.tag min-width.tag outline.tag overflow.tag padding-bottom.tag padding-left.tag \ +padding-right.tag padding-top.tag padding.tag position.tag quotes.tag right.tag table-layout.tag \ +text-align.tag text-decoration.tag text-indent.tag text-shadow.tag text-transform.tag \ +top.tag unicode-bidi.tag vertical-align.tag visibility.tag white-space.tag width.tag \ +word-spacing.tag z-index.tag + diff --git a/quanta/data/dtep/css/background.tag b/quanta/data/dtep/css/background.tag new file mode 100644 index 00000000..00716338 --- /dev/null +++ b/quanta/data/dtep/css/background.tag @@ -0,0 +1,67 @@ + + + + + + scroll + fixed + inherit + + + + + + + + white + transparent + inherit + + + + + + + + url() + none + inherit + + + + + + + + 0% + 10px + top + center + bottom + left + right + inherit + + + + + + + + repeat + repeat-x + repeat-y + no-repeat + inherit + + + + + + + + inherit + + + + diff --git a/quanta/data/dtep/css/border-bottom-color.tag b/quanta/data/dtep/css/border-bottom-color.tag new file mode 100644 index 00000000..515ef923 --- /dev/null +++ b/quanta/data/dtep/css/border-bottom-color.tag @@ -0,0 +1,11 @@ + + + + + + gray + inherit + + + + diff --git a/quanta/data/dtep/css/border-bottom-style.tag b/quanta/data/dtep/css/border-bottom-style.tag new file mode 100644 index 00000000..31183fb5 --- /dev/null +++ b/quanta/data/dtep/css/border-bottom-style.tag @@ -0,0 +1,20 @@ + + + + + + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + inherit + + + + diff --git a/quanta/data/dtep/css/border-bottom-width.tag b/quanta/data/dtep/css/border-bottom-width.tag new file mode 100644 index 00000000..11c3f803 --- /dev/null +++ b/quanta/data/dtep/css/border-bottom-width.tag @@ -0,0 +1,14 @@ + + + + + + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border-bottom.tag b/quanta/data/dtep/css/border-bottom.tag new file mode 100644 index 00000000..8d849d22 --- /dev/null +++ b/quanta/data/dtep/css/border-bottom.tag @@ -0,0 +1,23 @@ + + + + + + 1px + thin + medium + thick + inherit + + + + + + + + gray + inherit + + + + diff --git a/quanta/data/dtep/css/border-collapse.tag b/quanta/data/dtep/css/border-collapse.tag new file mode 100644 index 00000000..03613a5c --- /dev/null +++ b/quanta/data/dtep/css/border-collapse.tag @@ -0,0 +1,12 @@ + + + + + + collapse + separate + inherit + + + + diff --git a/quanta/data/dtep/css/border-color.tag b/quanta/data/dtep/css/border-color.tag new file mode 100644 index 00000000..a486c23f --- /dev/null +++ b/quanta/data/dtep/css/border-color.tag @@ -0,0 +1,12 @@ + + + + + + grey + transparent + inherit + + + + diff --git a/quanta/data/dtep/css/border-left-color.tag b/quanta/data/dtep/css/border-left-color.tag new file mode 100644 index 00000000..c50afd49 --- /dev/null +++ b/quanta/data/dtep/css/border-left-color.tag @@ -0,0 +1,12 @@ + + + + + + grey + transparent + inherit + + + + diff --git a/quanta/data/dtep/css/border-left-style.tag b/quanta/data/dtep/css/border-left-style.tag new file mode 100644 index 00000000..afcba8e3 --- /dev/null +++ b/quanta/data/dtep/css/border-left-style.tag @@ -0,0 +1,20 @@ + + + + + + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + inherit + + + + diff --git a/quanta/data/dtep/css/border-left-width.tag b/quanta/data/dtep/css/border-left-width.tag new file mode 100644 index 00000000..540affe1 --- /dev/null +++ b/quanta/data/dtep/css/border-left-width.tag @@ -0,0 +1,14 @@ + + + + + + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border-left.tag b/quanta/data/dtep/css/border-left.tag new file mode 100644 index 00000000..e5ff6cc6 --- /dev/null +++ b/quanta/data/dtep/css/border-left.tag @@ -0,0 +1,25 @@ + + + + + + grey + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border-right-color.tag b/quanta/data/dtep/css/border-right-color.tag new file mode 100644 index 00000000..b17ba826 --- /dev/null +++ b/quanta/data/dtep/css/border-right-color.tag @@ -0,0 +1,12 @@ + + + + + + grey + transparent + inherit + + + + diff --git a/quanta/data/dtep/css/border-right-style.tag b/quanta/data/dtep/css/border-right-style.tag new file mode 100644 index 00000000..bafce197 --- /dev/null +++ b/quanta/data/dtep/css/border-right-style.tag @@ -0,0 +1,20 @@ + + + + + + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + inherit + + + + diff --git a/quanta/data/dtep/css/border-right-width.tag b/quanta/data/dtep/css/border-right-width.tag new file mode 100644 index 00000000..9a6959fb --- /dev/null +++ b/quanta/data/dtep/css/border-right-width.tag @@ -0,0 +1,14 @@ + + + + + + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border-right.tag b/quanta/data/dtep/css/border-right.tag new file mode 100644 index 00000000..99278af3 --- /dev/null +++ b/quanta/data/dtep/css/border-right.tag @@ -0,0 +1,25 @@ + + + + + + grey + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border-spacing.tag b/quanta/data/dtep/css/border-spacing.tag new file mode 100644 index 00000000..31fecc8b --- /dev/null +++ b/quanta/data/dtep/css/border-spacing.tag @@ -0,0 +1,11 @@ + + + + + + 1px + inherit + + + + diff --git a/quanta/data/dtep/css/border-top-color.tag b/quanta/data/dtep/css/border-top-color.tag new file mode 100644 index 00000000..877afb2d --- /dev/null +++ b/quanta/data/dtep/css/border-top-color.tag @@ -0,0 +1,12 @@ + + + + + + grey + transparent + inherit + + + + diff --git a/quanta/data/dtep/css/border-top-style.tag b/quanta/data/dtep/css/border-top-style.tag new file mode 100644 index 00000000..9e6a2cf0 --- /dev/null +++ b/quanta/data/dtep/css/border-top-style.tag @@ -0,0 +1,20 @@ + + + + + + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + inherit + + + + diff --git a/quanta/data/dtep/css/border-top-width.tag b/quanta/data/dtep/css/border-top-width.tag new file mode 100644 index 00000000..c987bb22 --- /dev/null +++ b/quanta/data/dtep/css/border-top-width.tag @@ -0,0 +1,14 @@ + + + + + + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border-top.tag b/quanta/data/dtep/css/border-top.tag new file mode 100644 index 00000000..79800559 --- /dev/null +++ b/quanta/data/dtep/css/border-top.tag @@ -0,0 +1,25 @@ + + + + + + grey + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + 1px + thin + medium + thick + inherit + + + + diff --git a/quanta/data/dtep/css/border.tag b/quanta/data/dtep/css/border.tag new file mode 100644 index 00000000..3ea24d30 --- /dev/null +++ b/quanta/data/dtep/css/border.tag @@ -0,0 +1,41 @@ + + + + + + 1px + thin + medium + thick + inherit + + + + + + + + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + inherit + + + + + + + + gray + inherit + + + + diff --git a/quanta/data/dtep/css/bottom.tag b/quanta/data/dtep/css/bottom.tag new file mode 100644 index 00000000..34fb93a5 --- /dev/null +++ b/quanta/data/dtep/css/bottom.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/caption-side.tag b/quanta/data/dtep/css/caption-side.tag new file mode 100644 index 00000000..7c70a3d4 --- /dev/null +++ b/quanta/data/dtep/css/caption-side.tag @@ -0,0 +1,14 @@ + + + + + + top + bottom + left + right + inherit + + + + diff --git a/quanta/data/dtep/css/clear.tag b/quanta/data/dtep/css/clear.tag new file mode 100644 index 00000000..1ad3d0a1 --- /dev/null +++ b/quanta/data/dtep/css/clear.tag @@ -0,0 +1,14 @@ + + + + + + none + left + right + both + inherit + + + + diff --git a/quanta/data/dtep/css/clip.tag b/quanta/data/dtep/css/clip.tag new file mode 100644 index 00000000..5cc838a4 --- /dev/null +++ b/quanta/data/dtep/css/clip.tag @@ -0,0 +1,12 @@ + + + + + + rect + auto + inherit + + + + diff --git a/quanta/data/dtep/css/color.tag b/quanta/data/dtep/css/color.tag new file mode 100644 index 00000000..ec23d733 --- /dev/null +++ b/quanta/data/dtep/css/color.tag @@ -0,0 +1,12 @@ + + + + + + grey + yellow + inherit + + + + diff --git a/quanta/data/dtep/css/content.tag b/quanta/data/dtep/css/content.tag new file mode 100644 index 00000000..f038cd7d --- /dev/null +++ b/quanta/data/dtep/css/content.tag @@ -0,0 +1,18 @@ + + + + + + url() + string"" + counter + attr(x) + open-quote + close-quote + no-open-quote + no-close-quote + inherit + + + + diff --git a/quanta/data/dtep/css/counter-increment.tag b/quanta/data/dtep/css/counter-increment.tag new file mode 100644 index 00000000..41b23259 --- /dev/null +++ b/quanta/data/dtep/css/counter-increment.tag @@ -0,0 +1,13 @@ + + + + + + name + triples + none + inherit + + + + diff --git a/quanta/data/dtep/css/counter-reset.tag b/quanta/data/dtep/css/counter-reset.tag new file mode 100644 index 00000000..21628f84 --- /dev/null +++ b/quanta/data/dtep/css/counter-reset.tag @@ -0,0 +1,13 @@ + + + + + + name + triples + none + inherit + + + + diff --git a/quanta/data/dtep/css/cursor.tag b/quanta/data/dtep/css/cursor.tag new file mode 100644 index 00000000..cd549339 --- /dev/null +++ b/quanta/data/dtep/css/cursor.tag @@ -0,0 +1,28 @@ + + + + + + url() + auto + crosshair + default + pointer + double + move + e-resize + ne-resize + nw-resize + n-resize + se-resize + sw-resize + s-resize + w-resize + text + wait + help + inherit + + + + diff --git a/quanta/data/dtep/css/description.rc b/quanta/data/dtep/css/description.rc new file mode 100644 index 00000000..1d6a80c6 --- /dev/null +++ b/quanta/data/dtep/css/description.rc @@ -0,0 +1,37 @@ +[General] +Name = text/css +NickName = CSS +DefaultExtension = css +MimeTypes = text/css +NumOfPages = 0 +CaseSensitive = true +Family = 2 +TopLevel = true + +[Toolbars] +Location = css +Names = css + +[Extra rules] +StructGroupsCount = 1 +MinusAllowedInWord = true +TagAutoCompleteAfter = { +RequestSpaceBeforeTagAutoCompletion = true +AttributeAutoCompleteAfter = : +AttributeSeparator = , +TagSeparator = ; + +[Parsing rules] +Tags = style(type[text/css]) +Comments = /* */ +StructKeywords = +StructBeginStr = { +StructEndStr = } +StructRx = \\{|\\} + + +[StructGroup_1] +Name = Selectors +No_Name = No Selectors Found +DefinitionRx = \s([\d\S\w]+)\b +TagType = ScriptStructureBegin diff --git a/quanta/data/dtep/css/direction.tag b/quanta/data/dtep/css/direction.tag new file mode 100644 index 00000000..1df43e74 --- /dev/null +++ b/quanta/data/dtep/css/direction.tag @@ -0,0 +1,12 @@ + + + + + + rtl + ltr + inherit + + + + diff --git a/quanta/data/dtep/css/display.tag b/quanta/data/dtep/css/display.tag new file mode 100644 index 00000000..d62b5018 --- /dev/null +++ b/quanta/data/dtep/css/display.tag @@ -0,0 +1,27 @@ + + + + + + inline + block + list-item + run-in + compact + marker + table + inline-table + table-row-group + table-header-group + table-footer-group + table-row + table-column-group + table-column + table-cell + table-caption + none + inherit + + + + diff --git a/quanta/data/dtep/css/empty-cells.tag b/quanta/data/dtep/css/empty-cells.tag new file mode 100644 index 00000000..f07b227a --- /dev/null +++ b/quanta/data/dtep/css/empty-cells.tag @@ -0,0 +1,12 @@ + + + + + + show + hide + inherit + + + + diff --git a/quanta/data/dtep/css/float.tag b/quanta/data/dtep/css/float.tag new file mode 100644 index 00000000..013d6f45 --- /dev/null +++ b/quanta/data/dtep/css/float.tag @@ -0,0 +1,13 @@ + + + + + + left + right + none + inherit + + + + diff --git a/quanta/data/dtep/css/font-size-adjust.tag b/quanta/data/dtep/css/font-size-adjust.tag new file mode 100644 index 00000000..ca899f66 --- /dev/null +++ b/quanta/data/dtep/css/font-size-adjust.tag @@ -0,0 +1,12 @@ + + + + + + .5 + none + inherit + + + + diff --git a/quanta/data/dtep/css/font-stretch.tag b/quanta/data/dtep/css/font-stretch.tag new file mode 100644 index 00000000..291d5b8d --- /dev/null +++ b/quanta/data/dtep/css/font-stretch.tag @@ -0,0 +1,21 @@ + + + + + + normal + wider + narrower + ultra-condensed + extra-condensed + condensed + semi-condensed + semi-expanded + expanded + extra-expanded + ultra-expanded + inherit + + + + diff --git a/quanta/data/dtep/css/font.tag b/quanta/data/dtep/css/font.tag new file mode 100644 index 00000000..e38106b0 --- /dev/null +++ b/quanta/data/dtep/css/font.tag @@ -0,0 +1,75 @@ + + + + + + serif + sans-serif + cursive + fantasy + monospace + + + + + + + + normal + italic + oblique + + + + + + + + normal + small-caps + + + + + + + + normal + bold + bolder + lighter + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + + + + + + + + xx-small + x-small + small + medium + large + x-large + xx-large + larger + smaller + 12py + 70% + + + + + + + + diff --git a/quanta/data/dtep/css/height.tag b/quanta/data/dtep/css/height.tag new file mode 100644 index 00000000..99dc3983 --- /dev/null +++ b/quanta/data/dtep/css/height.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/left.tag b/quanta/data/dtep/css/left.tag new file mode 100644 index 00000000..e27a051b --- /dev/null +++ b/quanta/data/dtep/css/left.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/letter-spacing.tag b/quanta/data/dtep/css/letter-spacing.tag new file mode 100644 index 00000000..7f091780 --- /dev/null +++ b/quanta/data/dtep/css/letter-spacing.tag @@ -0,0 +1,12 @@ + + + + + + 1em + normal + inherit + + + + diff --git a/quanta/data/dtep/css/line-height.tag b/quanta/data/dtep/css/line-height.tag new file mode 100644 index 00000000..f199f55f --- /dev/null +++ b/quanta/data/dtep/css/line-height.tag @@ -0,0 +1,14 @@ + + + + + + 1.1 + 1px + 0% + normal + inherit + + + + diff --git a/quanta/data/dtep/css/list-style.tag b/quanta/data/dtep/css/list-style.tag new file mode 100644 index 00000000..958f2a68 --- /dev/null +++ b/quanta/data/dtep/css/list-style.tag @@ -0,0 +1,60 @@ + + + + + + url() + none + inherit + + + + + + + + inside + outside + inherit + + + + + + + + disc + circle + square + decimal + decimal-leading-zero + lower-roman + upper-roman + lower-greek + lower-alpha + lower-latin + upper-alpha + upper-latin + hebrew + hebrew + armenian + georgian + cjk-ideographic + hiragana + katakana + hiragana-iroha + katakana-iroha + none + inherit + + + + + + + + inherit + + + + diff --git a/quanta/data/dtep/css/margin-bottom.tag b/quanta/data/dtep/css/margin-bottom.tag new file mode 100644 index 00000000..b0918d9d --- /dev/null +++ b/quanta/data/dtep/css/margin-bottom.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/margin-left.tag b/quanta/data/dtep/css/margin-left.tag new file mode 100644 index 00000000..f1a4688f --- /dev/null +++ b/quanta/data/dtep/css/margin-left.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/margin-right.tag b/quanta/data/dtep/css/margin-right.tag new file mode 100644 index 00000000..e76ae0ff --- /dev/null +++ b/quanta/data/dtep/css/margin-right.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/margin-top.tag b/quanta/data/dtep/css/margin-top.tag new file mode 100644 index 00000000..16c06373 --- /dev/null +++ b/quanta/data/dtep/css/margin-top.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/margin.tag b/quanta/data/dtep/css/margin.tag new file mode 100644 index 00000000..924ab03a --- /dev/null +++ b/quanta/data/dtep/css/margin.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/marker-offset.tag b/quanta/data/dtep/css/marker-offset.tag new file mode 100644 index 00000000..058b495e --- /dev/null +++ b/quanta/data/dtep/css/marker-offset.tag @@ -0,0 +1,12 @@ + + + + + + 1em + auto + inherit + + + + diff --git a/quanta/data/dtep/css/max-height.tag b/quanta/data/dtep/css/max-height.tag new file mode 100644 index 00000000..ce3a71ed --- /dev/null +++ b/quanta/data/dtep/css/max-height.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/max-width.tag b/quanta/data/dtep/css/max-width.tag new file mode 100644 index 00000000..4a3a9315 --- /dev/null +++ b/quanta/data/dtep/css/max-width.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/min-height.tag b/quanta/data/dtep/css/min-height.tag new file mode 100644 index 00000000..3d3e8416 --- /dev/null +++ b/quanta/data/dtep/css/min-height.tag @@ -0,0 +1,12 @@ + + + + + + 1px + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/min-width.tag b/quanta/data/dtep/css/min-width.tag new file mode 100644 index 00000000..0c194901 --- /dev/null +++ b/quanta/data/dtep/css/min-width.tag @@ -0,0 +1,12 @@ + + + + + + 1px + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/outline.tag b/quanta/data/dtep/css/outline.tag new file mode 100644 index 00000000..aac4fbcc --- /dev/null +++ b/quanta/data/dtep/css/outline.tag @@ -0,0 +1,49 @@ + + + + + + grey + invert + inherit + + + + + + + + none + dotted + dashed + solid + double + groove + ridge + inset + outset + inherit + + + + + + + + 1px + thin + medium + thick + inherit + + + + + + + + inherit + + + + diff --git a/quanta/data/dtep/css/overflow.tag b/quanta/data/dtep/css/overflow.tag new file mode 100644 index 00000000..7f9321d3 --- /dev/null +++ b/quanta/data/dtep/css/overflow.tag @@ -0,0 +1,14 @@ + + + + + + visible + hidden + scroll + auto + inherit + + + + diff --git a/quanta/data/dtep/css/padding-bottom.tag b/quanta/data/dtep/css/padding-bottom.tag new file mode 100644 index 00000000..f2f61720 --- /dev/null +++ b/quanta/data/dtep/css/padding-bottom.tag @@ -0,0 +1,12 @@ + + + + + + 1em + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/padding-left.tag b/quanta/data/dtep/css/padding-left.tag new file mode 100644 index 00000000..5867ec1e --- /dev/null +++ b/quanta/data/dtep/css/padding-left.tag @@ -0,0 +1,12 @@ + + + + + + 1em + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/padding-right.tag b/quanta/data/dtep/css/padding-right.tag new file mode 100644 index 00000000..ea4639e8 --- /dev/null +++ b/quanta/data/dtep/css/padding-right.tag @@ -0,0 +1,12 @@ + + + + + + 1em + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/padding-top.tag b/quanta/data/dtep/css/padding-top.tag new file mode 100644 index 00000000..428c49b6 --- /dev/null +++ b/quanta/data/dtep/css/padding-top.tag @@ -0,0 +1,12 @@ + + + + + + 1em + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/padding.tag b/quanta/data/dtep/css/padding.tag new file mode 100644 index 00000000..ee3ce878 --- /dev/null +++ b/quanta/data/dtep/css/padding.tag @@ -0,0 +1,12 @@ + + + + + + 1em + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/position.tag b/quanta/data/dtep/css/position.tag new file mode 100644 index 00000000..d7f95cdb --- /dev/null +++ b/quanta/data/dtep/css/position.tag @@ -0,0 +1,14 @@ + + + + + + static + relative + absolute + fixed + inherit + + + + diff --git a/quanta/data/dtep/css/quotes.tag b/quanta/data/dtep/css/quotes.tag new file mode 100644 index 00000000..4685c8ee --- /dev/null +++ b/quanta/data/dtep/css/quotes.tag @@ -0,0 +1,12 @@ + + + + + + " ' " + none + inherit + + + + diff --git a/quanta/data/dtep/css/right.tag b/quanta/data/dtep/css/right.tag new file mode 100644 index 00000000..5ee99359 --- /dev/null +++ b/quanta/data/dtep/css/right.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/table-layout.tag b/quanta/data/dtep/css/table-layout.tag new file mode 100644 index 00000000..36306882 --- /dev/null +++ b/quanta/data/dtep/css/table-layout.tag @@ -0,0 +1,12 @@ + + + + + + auto + fixed + inherit + + + + diff --git a/quanta/data/dtep/css/text-align.tag b/quanta/data/dtep/css/text-align.tag new file mode 100644 index 00000000..ed181d7c --- /dev/null +++ b/quanta/data/dtep/css/text-align.tag @@ -0,0 +1,15 @@ + + + + + + left + right + center + justify + " . " + inherit + + + + diff --git a/quanta/data/dtep/css/text-decoration.tag b/quanta/data/dtep/css/text-decoration.tag new file mode 100644 index 00000000..2f5e78af --- /dev/null +++ b/quanta/data/dtep/css/text-decoration.tag @@ -0,0 +1,15 @@ + + + + + + none + underline + overline + line-through + blink + inherit + + + + diff --git a/quanta/data/dtep/css/text-indent.tag b/quanta/data/dtep/css/text-indent.tag new file mode 100644 index 00000000..4d1e55ec --- /dev/null +++ b/quanta/data/dtep/css/text-indent.tag @@ -0,0 +1,12 @@ + + + + + + 1em + 0% + inherit + + + + diff --git a/quanta/data/dtep/css/text-shadow.tag b/quanta/data/dtep/css/text-shadow.tag new file mode 100644 index 00000000..173cd1d8 --- /dev/null +++ b/quanta/data/dtep/css/text-shadow.tag @@ -0,0 +1,13 @@ + + + + + + none + grey + 1em + inherit + + + + diff --git a/quanta/data/dtep/css/text-transform.tag b/quanta/data/dtep/css/text-transform.tag new file mode 100644 index 00000000..e7a05c2f --- /dev/null +++ b/quanta/data/dtep/css/text-transform.tag @@ -0,0 +1,14 @@ + + + + + + capitalize + uppercase + lowercase + none + inherit + + + + diff --git a/quanta/data/dtep/css/top.tag b/quanta/data/dtep/css/top.tag new file mode 100644 index 00000000..85ab1b9f --- /dev/null +++ b/quanta/data/dtep/css/top.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/unicode-bidi.tag b/quanta/data/dtep/css/unicode-bidi.tag new file mode 100644 index 00000000..cb3b4cf8 --- /dev/null +++ b/quanta/data/dtep/css/unicode-bidi.tag @@ -0,0 +1,13 @@ + + + + + + normal + embed + bidi-override + inherit + + + + diff --git a/quanta/data/dtep/css/vertical-align.tag b/quanta/data/dtep/css/vertical-align.tag new file mode 100644 index 00000000..7194de80 --- /dev/null +++ b/quanta/data/dtep/css/vertical-align.tag @@ -0,0 +1,20 @@ + + + + + + baseline + sub + super + top + text-top + middle + bottom + text-bottom + 0% + 1px + inherit + + + + diff --git a/quanta/data/dtep/css/visibility.tag b/quanta/data/dtep/css/visibility.tag new file mode 100644 index 00000000..cb445cf8 --- /dev/null +++ b/quanta/data/dtep/css/visibility.tag @@ -0,0 +1,13 @@ + + + + + + visible + hidden + collapse + inherit + + + + diff --git a/quanta/data/dtep/css/white-space.tag b/quanta/data/dtep/css/white-space.tag new file mode 100644 index 00000000..b0bfa169 --- /dev/null +++ b/quanta/data/dtep/css/white-space.tag @@ -0,0 +1,13 @@ + + + + + + normal + pre + nowrap + inherit + + + + diff --git a/quanta/data/dtep/css/width.tag b/quanta/data/dtep/css/width.tag new file mode 100644 index 00000000..37e80c3e --- /dev/null +++ b/quanta/data/dtep/css/width.tag @@ -0,0 +1,13 @@ + + + + + + 1em + 0% + auto + inherit + + + + diff --git a/quanta/data/dtep/css/word-spacing.tag b/quanta/data/dtep/css/word-spacing.tag new file mode 100644 index 00000000..488c8c82 --- /dev/null +++ b/quanta/data/dtep/css/word-spacing.tag @@ -0,0 +1,12 @@ + + + + + + 1em + normal + inherit + + + + diff --git a/quanta/data/dtep/css/z-index.tag b/quanta/data/dtep/css/z-index.tag new file mode 100644 index 00000000..1fdebcc8 --- /dev/null +++ b/quanta/data/dtep/css/z-index.tag @@ -0,0 +1,12 @@ + + + + + + auto + 1 + inherit + + + + diff --git a/quanta/data/dtep/docbook-4.2/Makefile.am b/quanta/data/dtep/docbook-4.2/Makefile.am new file mode 100644 index 00000000..b6288e76 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/Makefile.am @@ -0,0 +1,6 @@ +quanta_DATA = a.tag b.tag c.tag d.tag e.tag f.tag g.tag h.tag i.tag j.tag \ +k.tag l.tag m.tag n.tag o.tag p.tag q.tag r.tag s.tag t.tag u.tag v.tag \ +w.tag x.tag y.tag common.tag description.rc + +quantadir = ${quanta_datadir}/dtep/docbook-4.2 + diff --git a/quanta/data/dtep/docbook-4.2/a.tag b/quanta/data/dtep/docbook-4.2/a.tag new file mode 100644 index 00000000..2e5e1355 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/a.tag @@ -0,0 +1,339 @@ + + + + + + + + + + + moreinfo + + + none + refentry + + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + + + + + revisionflag + + + added + changed + deleted + off + + + + + revision + + + + + arch + + + + + vendor + + + + + security + + + + + pagemnu + + + + + remap + + + + + xreflabel + + + + + conformance + + + + + os + + + + + userlevel + + + + + id + + + + + role + + + + + condition + + + + + + + + status + + + + + label + + + + + + + + moreinfo + + + none + refentry + + + + + class + + + hardware + software + + + + + + + units + + + calspair + linecolumn + linecolumnpair + linerange + other + + + + + label + + + + + otherunits + + + + + linkends + + + + + coords + + + + + + + units + + + + calspair + linecolumn + linecolumnpair + linerange + other + + + + label + + + + + otherunits + + + + + coords + + + + + + + units + + + + calspair + linecolumn + linecolumnpair + linerange + other + + + + otherunits + + + + + + + rep + + + norepeat + repeat + + + + + choice + + + opt + plain + req + + + + + + + parentbook + + + + + status + + + + + class + + + faq + journalarticle + productsheet + specification + techreport + whitepaper + + + + + + + + + + srccredit + + + + + format + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + + entityref + + + + + fileref + + + + + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/b.tag b/quanta/data/dtep/docbook-4.2/b.tag new file mode 100644 index 00000000..22f73979 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/b.tag @@ -0,0 +1,206 @@ + + + + + + pagenum + + + + + + + otherspatial + + + + + spatial + + + dcmibox + dcmipoint + iso3166 + otherspatial + tgn + + + + + temporal + + + dcmiperiod + othertemporal + w3c-dtf + + + + + othertemporal + + + + + + + bibliodiv + + + + + + + + bibliography + + + + + + + + otherclass + + + + + class + + + doi + isbn + issn + libraryofcongress + other + pubnumber + uri + + + + + + + + + bibliomset + + + + + + + class + + + doi + isbn + issn + libraryofcongress + other + pubnumber + uri + + + + + type + + + hasformat + haspart + hasversion + isformatof + ispartof + isreferencedby + isreplacedby + isrequiredby + isversionof + othertype + references + replaces + requires + + + + + otherclass + + + + + othertype + + + + + + + relation + + + + + + + otherclass + + + + + class + + + doi + isbn + issn + libraryofcongress + other + pubnumber + uri + + + + + + + + + fpi + + + + + status + + + + + label + + + + + + + bookinfo + + + + + + + renderas + + + other + sect1 + sect2 + sect3 + sect4 + sect5 + + + + + diff --git a/quanta/data/dtep/docbook-4.2/c.tag b/quanta/data/dtep/docbook-4.2/c.tag new file mode 100644 index 00000000..810e8763 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/c.tag @@ -0,0 +1,264 @@ + + + + + + arearefs + + + + + + + + + + status + + + + + label + + + + + + + + + otherclass + + + + + class + + + + doi + isbn + issn + libraryofcongress + other + pubnumber + uri + + + + + + + pubwork + + + + article + book + chapter + journal + manuscript + part + refentry + section + series + set + + + + + + + + language + + + + + class + + + + class + interface + + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + + + sepchar + + + + + cmdlength + + + + + label + + + + + + + label + + + + + linkends + + + + + + + + + status + + + + + + + colnum + + + + + char + + + + + colsep + + + + + colwidth + + + + + charoff + + + + + colname + + + + + rowsep + + + + + align + + + + center + char + justify + left + right + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + + + + + + + + class + + + + limit + + + + + + linkend + + + + + + + + language + + + + + + + + + + + linkend + + + + + label + + + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/common.tag b/quanta/data/dtep/docbook-4.2/common.tag new file mode 100644 index 00000000..f99e27b4 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/common.tag @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/d.tag b/quanta/data/dtep/docbook-4.2/d.tag new file mode 100644 index 00000000..2c051059 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/d.tag @@ -0,0 +1,43 @@ + + + + + + moreinfo + + + + none + refentry + + + + class + + + + field + key1 + key2 + name + record + table + + + + + + + status + + + + + + + language + + + + + diff --git a/quanta/data/dtep/docbook-4.2/description.rc b/quanta/data/dtep/docbook-4.2/description.rc new file mode 100644 index 00000000..5e41935d --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/description.rc @@ -0,0 +1,23 @@ +[General] +Name = -//OASIS//DTD DocBook XML V4.2//EN +NickName = Docbook XML 4.2 +URL = http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd +DoctypeString = book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" +MimeTypes = text/docbook +DefaultExtension = docbook +Groups = Core +NumOfPages = 1 +CaseSensitive = true + +[Toolbars] +Location = docbook +Names = docbook_code, docbook_table, docbook_ui, docbook_xml, xmltools + +[Page1] +Title = Core +Groups = Core + +[Extra rules] +Single Tag Style = XML + +[Parsing rules] diff --git a/quanta/data/dtep/docbook-4.2/e.tag b/quanta/data/dtep/docbook-4.2/e.tag new file mode 100644 index 00000000..eee84d03 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/e.tag @@ -0,0 +1,172 @@ + + + + + + + + + + entry + + + + + char + + + + + colsep + + + + + charoff + + + + + morerows + + + + + spanname + + + + + namest + + + + + colname + + + + + rowsep + + + + + rotate + + + + + align + + + + center + char + justify + left + right + + + + + + entry + + + + + char + + + + + charoff + + + + + spanname + + + + + namest + + + + + tgroupstyle + + + + + cols + + + + + colsep + + + + + rowsep + + + + + colname + + + + + align + + + + center + char + justify + left + right + + + + + + + + label + + + + + + + moreinfo + + + + none + refentry + + + + + + + + + width + + + + + label + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/f.tag b/quanta/data/dtep/docbook-4.2/f.tag new file mode 100644 index 00000000..b92fc0ce --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/f.tag @@ -0,0 +1,128 @@ + + + + + + + language + + + + + + + float + + + + + pgwide + + + + + label + + + + + + + path + + + + + moreinfo + + + + none + refentry + + + + class + + + + devicefile + directory + extension + headerfile + libraryfile + partition + symlink + + + + + + + linkend + + + + + + + label + + + + + + + linkend + + + + + label + + + + + + + + + + + + label + + + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + + + moreinfo + + + + none + refentry + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/g.tag b/quanta/data/dtep/docbook-4.2/g.tag new file mode 100644 index 00000000..3a35bebc --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/g.tag @@ -0,0 +1,249 @@ + + + + + + status + + + + + + + + subject + + + + + + + status + + + + + + + sortas + + + + + + + + otherterm + + + + + + + otherterm + + + + + + + baseform + + + + + linkend + + + + + + + srccredit + + + + + valign + + + + bottom + middle + top + + + + width + + + + + contentwidth + + + + + format + + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + entityref + + + + + fileref + + + + + scalefit + + + + + depth + + + + + scale + + + + + contentdepth + + + + + align + + + + center + left + right + + + + + + + + + + + norepeat + repeat + + + + + + + + opt + plain + req + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/h.tag b/quanta/data/dtep/docbook-4.2/h.tag new file mode 100644 index 00000000..f55e2525 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/h.tag @@ -0,0 +1,19 @@ + + + + + + moreinfo + + + + none + refentry + + + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/i.tag b/quanta/data/dtep/docbook-4.2/i.tag new file mode 100644 index 00000000..05f05009 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/i.tag @@ -0,0 +1,379 @@ + + + + + + srccredit + + + + + valign + + + + bottom + middle + top + + + + width + + + + + contentwidth + + + + + format + + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + entityref + + + + + fileref + + + + + scalefit + + + + + depth + + + + + scale + + + + + contentdepth + + + + + align + + + + center + left + right + + + + + + + + + + + + + significance + + + + normal + preferred + + + + zone + + + + + pagenum + + + + + class + + + + endofrange + singular + startofrange + + + + scope + + + + all + global + local + + + + startref + + + + + + + + width + + + + + + + float + + + + + pgwide + + + + + label + + + + + + + tocentry + + + + + shortentry + + + + + tabstyle + + + + rowsep + orient + + + + land + port + + + + label + + + + + colsep + + + + + frame + + + + all + bottom + none + sides + top + topbot + + + + pgwide + + + + + rowsep + + + + + + + + + srccredit + + + + + valign + + + + bottom + middle + top + + + + width + + + + + contentwidth + + + + + format + + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + entityref + + + + + fileref + + + + + scalefit + + + + + depth + + + + + scale + + + + + contentdepth + + + + + align + + + + center + left + right + + + + + + + moreinfo + + + + none + refentry + + + + + + + + + + + mark + + + + + spacing + + + + compact + normal + + + + + diff --git a/quanta/data/dtep/docbook-4.2/j.tag b/quanta/data/dtep/docbook-4.2/j.tag new file mode 100644 index 00000000..d3e01b37 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/j.tag @@ -0,0 +1,5 @@ + + + + + diff --git a/quanta/data/dtep/docbook-4.2/k.tag b/quanta/data/dtep/docbook-4.2/k.tag new file mode 100644 index 00000000..809ee951 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/k.tag @@ -0,0 +1,48 @@ + + + + + + moreinfo + + + + none + refentry + + + + + + + moreinfo + + + + none + refentry + + + + otheraction + + + + + action + + + + click + double-click + other + press + seq + simul + + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/l.tag b/quanta/data/dtep/docbook-4.2/l.tag new file mode 100644 index 00000000..08737456 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/l.tag @@ -0,0 +1,101 @@ + + + + + + + + + + + linkend + + + + + endterm + + + + + type + + + + + + + override + + + + + + + moreinfo + + + + none + refentry + + + + + + width + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + class + + + + monospaced + normal + + + + + + label + + + + + + + srccredit + + + + + linkend + + + + + pagenum + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/m.tag b/quanta/data/dtep/docbook-4.2/m.tag new file mode 100644 index 00000000..13032732 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/m.tag @@ -0,0 +1,123 @@ + + + + + + + + class + + + + cartridge + cdrom + disk + tape + + + + + + + + + moreinfo + + + + none + refentry + + + + + + + rep + + + + norepeat + repeat + + + + choice + + + + opt + plain + req + + + + + + language + + + + + + + modespec + + + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + + + mousebutton + + + + + none + refentry + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/n.tag b/quanta/data/dtep/docbook-4.2/n.tag new file mode 100644 index 00000000..aed5b719 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/n.tag @@ -0,0 +1,12 @@ + + + + + + def + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/o.tag b/quanta/data/dtep/docbook-4.2/o.tag new file mode 100644 index 00000000..b4f3445a --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/o.tag @@ -0,0 +1,106 @@ + + + + + + + localinfo + + + + + type + + + + + linkmode + + + + + targetptr + + + + + targe + + + + + targetdocent + + + + + + + + + + + + inheritnum + + + + ignore + inherit + + + + spacing + + + + compact + normal + + + + continuation + + + + continues + restarts + + + + numeration + + + + arabic + loweralpha + lowerroman + upperalpha + upperroman + + + + + + + otherclass + + + + + class + + + + consortium + corporation + informal + nonprofit + other + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/p.tag b/quanta/data/dtep/docbook-4.2/p.tag new file mode 100644 index 00000000..a450837c --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/p.tag @@ -0,0 +1,152 @@ + + + + + + + + + moreinfo + + + + none + refentry + + + + class + + + + command + function + option + + + + + + status + + + + + label + + + + + + + + label + + + + + + + + + + + + + status + + + + + + + + sortas + + + + + + + linkend + + + + + + + + + + linkend + + + + + + + + class + + + + copyright + registered + service + trade + + + + + + + width + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + + + + moreinfo + + + + none + refentry + + + + + + moreinfo + + + + none + refentry + + + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/q.tag b/quanta/data/dtep/docbook-4.2/q.tag new file mode 100644 index 00000000..a5c5d2c3 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/q.tag @@ -0,0 +1,20 @@ + + + + + + + + defaultlabel + + + + none + number + qanda + + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/r.tag b/quanta/data/dtep/docbook-4.2/r.tag new file mode 100644 index 00000000..2068b297 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/r.tag @@ -0,0 +1,112 @@ + + + + + + + + status + + + + + + + + + status + + + + + label + + + + + + + + + class + + + + + + + + + + status + + + + + + + + status + + + + + + + + status + + + + + + + + status + + + + + + + + + + + + class + + + + command + function + option + parameter + + + + + + + + + + + + + valign + + + + bottom + middle + top + + + + rowsep + + + + + diff --git a/quanta/data/dtep/docbook-4.2/s.tag b/quanta/data/dtep/docbook-4.2/s.tag new file mode 100644 index 00000000..1a616cc1 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/s.tag @@ -0,0 +1,482 @@ + + + + + + + width + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + + + + + + sortas + + + + + + + linkends + + + + + + + renderas + + + + sect2 + sect3 + sect4 + sect5 + + + + status + + + + + label + + + + + + + + renderas + + + + sect1 + sect3 + sect4 + sect5 + + + + status + + + + + label + + + + + + + + renderas + + + + sect1 + sect2 + sect4 + sect5 + + + + status + + + + + label + + + + + + + + renderas + + + + sect1 + sect2 + sect3 + sect5 + + + + status + + + + + label + + + + + + + + renderas + + + + sect1 + sect2 + sect3 + sect4 + + + + status + + + + + label + + + + + + + + status + + + + + label + + + + + + + + + + linkends + + + + + + + linkends + + + + + + + + + + + + fpi + + + + + status + + + + + + + + + contents + + + + + + + class + + + + attribute + attvalue + element + emptytag + endtag + genentity + numcharref + paramentity + pi + sgmlcomment + starttag + xmlpi + + + + + + + moreinfo + + + + none + refentry + + + + otheraction + + + + + action + + + + click + double-click + other + press + seq + simul + + + + + + + + + columns + + + + + type + + + + horiz + inline + vert + + + + + + origin + + + + + audience + + + + + level + + + + + + + + nameend + + + + + char + + + + + colsep + + + + + charoff + + + + + spanname + + + + + namest + + + + + rowsep + + + + + align + + + + center + char + justify + left + right + + + + + + + performance + + + + optional + required + + + + + + + + + weight + + + + + + + scheme + + + + + + + + + performance + + + + optional + required + + + + + + + + + symbol + + + + + limit + + + + + + + linkend + + + + + + + format + + + + linespecific + + + + linenumbering + + + + numbered + unnumbered + + + + label + + + + + + + moreinfo + + + + none + refentry + + + + class + + + + constant + domainname + etheraddress + event + eventhandler + filesystem + fqdomainname + groupname + ipaddress + library + macro + netmask + newsgroup + osname + resource + systemname + username + + + + diff --git a/quanta/data/dtep/docbook-4.2/t.tag b/quanta/data/dtep/docbook-4.2/t.tag new file mode 100644 index 00000000..17101804 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/t.tag @@ -0,0 +1,305 @@ + + + + + + tocentry + + + + + shortentry + + + + + tabstyle + + + + + orient + + + + land + port + + + + label + + + + + colsep + + + + + frame + + + + all + bottom + none + sides + top + topbot + + + + pgwide + + + + + rowsep + + + + + + + valign + + + + bottom + middle + top + + + + + + + sortas + + + + + + + linkends + + + + + + + srccredit + + + + + format + + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + entityref + + + + + fileref + + + + + encoding + + + + + + + + valign + + + + bottom + middle + top + + + + + + char + + + + + charoff + + + + + tgroupstyle + + + + + cols + + + + + colsep + + + + + rowsep + + + + + align + + + + center + char + justify + left + right + + + + + + valign + + + + bottom + middle + top + + + + + + + pagenum + + + + + + + + pagenum + + + + + + + linkend + + + + + label + + + + + pagenum + + + + + + + label + + + + + + + linkend + + + + + pagenum + + + + + + + linkend + + + + + label + + + + + pagenum + + + + + + + + + + + + + + trademark + + + + copyright + registered + service + trade + + + + + diff --git a/quanta/data/dtep/docbook-4.2/u.tag b/quanta/data/dtep/docbook-4.2/u.tag new file mode 100644 index 00000000..e377b58a --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/u.tag @@ -0,0 +1,27 @@ + + + + + + url + + + + + type + + + + + + + moreinfo + + + + none + refentry + + + + diff --git a/quanta/data/dtep/docbook-4.2/v.tag b/quanta/data/dtep/docbook-4.2/v.tag new file mode 100644 index 00000000..45dd6a22 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/v.tag @@ -0,0 +1,113 @@ + + + + + + + termlength + + + + + + + + + srccredit + + + + + valign + + + + bottom + middle + top + + + + width + + + + + contentwidth + + + + + format + + + + BMP + CGM-BINARY + CGM-CHAR + CGM-CLEAR + DITROFF + DVI + EPS + EQN + FAX + GIF + GIF87a + GIF89a + IGES + JPEG + JPG + linespecific + PCX + PIC + PNG + PS + SGML + SVG + TBL + TEX + TIFF + WMF + WPG + + + + entityref + + + + + fileref + + + + + scalefit + + + + + depth + + + + + scale + + + + + contentdepth + + + + + align + + + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/w.tag b/quanta/data/dtep/docbook-4.2/w.tag new file mode 100644 index 00000000..f46d2140 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/w.tag @@ -0,0 +1,6 @@ + + + + + + diff --git a/quanta/data/dtep/docbook-4.2/x.tag b/quanta/data/dtep/docbook-4.2/x.tag new file mode 100644 index 00000000..3f351e2c --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/x.tag @@ -0,0 +1,16 @@ + + + + + + linkend + + + + + endterm + + + + + \ No newline at end of file diff --git a/quanta/data/dtep/docbook-4.2/y.tag b/quanta/data/dtep/docbook-4.2/y.tag new file mode 100644 index 00000000..cf5c47b8 --- /dev/null +++ b/quanta/data/dtep/docbook-4.2/y.tag @@ -0,0 +1,5 @@ + + + + + diff --git a/quanta/data/dtep/dtd-description.txt b/quanta/data/dtep/dtd-description.txt new file mode 100644 index 00000000..3c55890d --- /dev/null +++ b/quanta/data/dtep/dtd-description.txt @@ -0,0 +1,207 @@ +DTD definitions for Quanta+ are made up from two parts: +a) the description.rc +b) the tag files + +The content of them depends also on the type of the DTD (real or pseudo +DTD). + +A. The description.rc +--------------------- +Contains some information and rules about the DTD itself. + +A1. description.rc for real DTDs +-------------------------------- + +[General] - generic information +Name = DTD definition string (like -//W3C//DTD HTML 4.01 Transitional//EN) +NickName = the beautified name of the DTD (like HTML 4.01 Transitional). If not + defined, the Name is used as NickName. +URL = url pointing to the DTD definition (http://www.w3.org/TR/html4/loose.dtd) +DoctypeString = the string that should appear in the !DOCTYPE tag + (HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd") +Inherits = the name of the DTD from where this DTD inherits the tags (-//W3C//DTD HTML 4.01//EN) +DefaultExtension = new files are created with this extension (html) +Groups = the list of common attribute groups, which may be present in more than + one tag (Core, I18n, Script). See below (Group1, Group2...) + OBSOLETE, don't use. Groups are read from common.tag. +NumOfPages = how many pages does a tag dialog have (aside of the page containing + the attributes defined in the tag file). See below (Page1,...) +CaseSensitive = case-sensitiveness of the DTD +QuotedAttributes = OBSOLETE, not used +Family = 1 (it's a real DTD) + + +[Toolbars] - information about DTD toolbars +Location = the directory inside the $KDEDIR($KDEHOME)/share/apps/quanta/toolbars + where the toolbars for this DTD are +Names = the list of toolbar file names (without the .toolbar.tgz extension) that + are loaded for this DTD from the above directory + + +[Group1] - replace with one of the Groups listed below +Attributes = the list of attributes for this group. Currently all of the listed + attributes are treated as strings. +Example: +[Core] +Attributes = id, class, style, title + + +[Page1] - description of a tag editor page +Title = the title of this page in the tag editing dialog +Groups = list of groups appearing on this page (like Core, I18n) + + +[Extra tags] - OBSOLETE! Please define the tags in external files! +List = list of tags not defined in external tag files. +tag_name = attribute1, attribute2 - attribute names of tag called tag_name +tag_name_options = options of tag called tag_name + + +[Extra rules] - some rules not fitted in other places +BooleanAttributes = simple or complex. + Example for simple: . + Example for complex: or +Single Tag Style = html or XML. + Example for html: + Example for XML: +StructGroupsCount = the number of structure groups. See below. +MinusAllowedInWords = if true "this-is-a-word" is treated like a word. Otherwise + it's treated like 4 words. +TagAutoCompleteAfter = CHAR. The autocompletion box is brought up automatically + once this CHAR is entered or SPACE is pressed after this CHAR. For real + DTDs it's usually "<", but for CSS pseudo DTD it's "{". The text "none" + instead of a CHAR specifies that the tag completion box should not be brought + up automatically, only if the user requests it. +AttributeSeparator = CHAR. This CHAR means that the attribute name has ended. + It's " for XML DTDs and , for pseudo DTDs. +TagSeparator = CHAR. Similar to the above. + + +[StructGroup_1] - definition of structure group 1 +Name = the text that appears if there are tags matching this group settings + (like Links) +No_Name = the text that appears if there are NO tags matching this group settings + (like No Links) +Icon = the name of the icon appearing before the above texts (like www) +Tag = tagname(attribute1, attribute2, ...). Tags with name tagname will appear + under this group. The item text will be "attribute1_value | attribute2_value | ..." + Currently only one tag may be listed here. +HasFileName = true if the item text (one of the above attribute values) contains a file name +FileNameRx = regular expression used to remove the unnecessary chars from the item + text. + + +[Parsing rules] - rules used when parsing the document +SpecialAreas = the beginning and ending string of special areas, separatted by a comma. + Special areas are not parsed according to this DTD's rules, but as their own rules. + A special area can be a pseudo DTD,a comment or something like that. Eg. +SpecialAreaNames = comma separated list of the above special area names. Eg. comment +Comments = comma separated list of area borders for comments. EOL means end-of-line. + Eg: // EOL, /* */ +AppendCommonRules = true or false. If true, the following rules are automatically appended: + SpecialAreas = , , + SpecialAreaNames = XML PI, comment, DTD + Comments = + Default is "true", so append the rules. +SpecialTags = tagname(attributename) - specifies a tag which defines the start of + a special area +MayContain = comma separated list of pseudo-DTDs that can be present in the document. + E.g. php, css + + +A2. description.rc for pseudo DTDs +---------------------------------- + +Only the differences, special notices are listed here. +[General] +Groups = (There are no common groups) +NumOfPages = 0 . There is no tag editing dialog for pseudo DTDs. +Family = 2 (it's a pseudo DTD) + + +[Extra rules] +ScriptName = OBSOLETE, don't use. +ScriptTagBorders = OBSOLETE, don't use. +ScriptRegExp = OBSOLETE, don't use. +AttributeAutoCompletionAfter = CHAR. Similar to the TagAutoCompletionAfter, but + for tag attributes. It's "(" by default and ":" for CSS. Not used for real + DTDs. +RequestSpaceBeforeTagAutoCompletion = boolean. If "true", the list of tags + does not appear if the user types the TagAutoCompletionAfter char, only + if it is followed by at least one space. The default is "false". +VariableGroupIndex = the index value of the group that defines variables. + -1 if there is no such group, otherwise the group must exists. +FunctionGroupIndex = the index value of the group that defines functions. + -1 if there is no such group, otherwise the group must exists. +ClassGroupIndex = the index value of the group that defines classes. + -1 if there is no such group, otherwise the group must exists. +ObjectGroupIndex = the index value of the group that defines objects. + ClassGroupIndex must be defined, otherwise this doesn't make sense. + -1 if there is no such group, otherwise the group must exists. +MemberAutoCompleteAfter = a regular expression which defines when may a member + variable/method appear after a class' usage. Example: + - we have a class called "foo" with some member variables + - the object of type "foo" is used in the document as $objFoo + - the members can appear as $objFoo->member or $objFoo.member + - in the above case this entry shoul look like (?:->|\.)$ (autocomplete + if the object is followed by -> or .) + The regular expression must be terminated with "$" (match end of line). + + +[StructGroup_1] +DefinitionRx = regular expression used to find text areas in the pseudo DTD, which + will belong to this group. The first captured area should be the actual name + of the group entry. + Example: + \bclass[\\s]+([0-9a-zA-Z_\x7f-\xff]*)[\\s]* + The first captured area (between "(" and ")") holds the class name. +UsageRx = to find an usage of an element of the group. + Example: + - classes are defined as "class foo {...}" + - classes are used as $objFoo + Example 2: + - variables are defined as "int i" + - variables are used as @i + Example 3: + - variables are defined as $i + - variables are used as $i. In this case UsageRx is the same as + DefinitionRx +TypeRx = regular expression to find the type of the element. The pattern is + searched on the result of DefinitionRx match and the first captured areas + will hold the element type. Example (simplified): + DefinitionRx =\$+([a-zA-Z]+)=new\\s[a-zA-Z]+; + TypeRx = new\\s([a-zA-Z]+); + This will match strings like "$fooObj=new foo;". Now this string is + searched and it will find "new foo;", where "foo" is the first + captured text (the regular expression matching foo is between brackets). + So the type of "$fooObj" is "foo". + + +SearchRx = OBSOLETED by DefinitionRx. Don't use it. +ClearRx = OBSOLETED by DefinitionRx. Don't use it. + + + +[Parsing rules] +AreaBorders = comma separated list of the area borders encapsulating this pseudo + DTD. In case of PHP it is: , <* *>, <% %> +Tags = tagname(attribute[defaultvalue]). If the parent(real) DTD has a tag with tagname and + the attribute value of this tag is equal with the DTD name, the tag area + is parsed according to the rules of this DTD. If [defaultvalue] is present, it means that if the attribute + is not present in the tag it's taken as present with value = defaultvalue. Example: + Tags = style(type[text/css]) means that both + + + + + + \ No newline at end of file diff --git a/quanta/data/templates/pages/html/special/Makefile.am b/quanta/data/templates/pages/html/special/Makefile.am new file mode 100644 index 00000000..e86133b9 --- /dev/null +++ b/quanta/data/templates/pages/html/special/Makefile.am @@ -0,0 +1,2 @@ +templatespagesspecialdir = ${quanta_datadir}/templates/pages/special +templatespagesspecial_DATA = drag_n_drop_men.html diff --git a/quanta/data/templates/pages/html/special/drag_n_drop_men.html b/quanta/data/templates/pages/html/special/drag_n_drop_men.html new file mode 100644 index 00000000..8710921e --- /dev/null +++ b/quanta/data/templates/pages/html/special/drag_n_drop_men.html @@ -0,0 +1,156 @@ + + + + + + d and d men + + + + + + + +
+ +
+ + \ No newline at end of file diff --git a/quanta/data/templates/pages/html/xhtml/Makefile.am b/quanta/data/templates/pages/html/xhtml/Makefile.am new file mode 100644 index 00000000..acdd8102 --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/Makefile.am @@ -0,0 +1,2 @@ +templatespagesxhtmldir = ${quanta_datadir}/templates/pages/xhtml +templatespagesxhtml_DATA = Quanta_Times.html leftMen_BB.html rightMen_BB.html twoSideMen_BB.html leftMen_Quanta.html rightMen_Quanta.html twoSideMen_Quanta.html diff --git a/quanta/data/templates/pages/html/xhtml/Quanta_Times.html b/quanta/data/templates/pages/html/xhtml/Quanta_Times.html new file mode 100644 index 00000000..381252da --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/Quanta_Times.html @@ -0,0 +1,103 @@ + + + + + + NewsPaper + + + + + + +
Quanta Times.
+ +

News!

The Quanta editor continues to improve and expand! Both in terms of usability and of functionality.

+This fab all purpose script and markup editor contius to make strides in every direction. Prompting the question from FOSS observers "Just how many legs does Quanta have anyway?"

+ +

Developers

Undisclosed honours are said to be on the way for the chief Quanta developers.It is rumoured that Eric Laffoon has been awarded an extra Cat, and that Andras Mantia may be the lucky recipient of a day without patch requests!More news on this development will be printed when it comes to light.

+Just how many will be honoured and in what way is yet to be announced. Early speculation however suggests that some may recieve personaly typed emails possibly containing the word “Thanks” at some point in the text.

+ +

Killer App!

With great new features like VPL and it's excelent xml configurable CSS tool, Quanta the DTD agnostic markup and scripting editor could well be the killer app that moves more and more people certainly more and more web profesionals to open source solutions.

+Quanta's usability, productivity enhanced enviroment and it's easy production of DTD compliant markup is producing an application streets ahead of it's commercial competitors.

+ +

Comment!

In a world without walls and fences who needs windows and gates?

+ + + + diff --git a/quanta/data/templates/pages/html/xhtml/leftMen_BB.html b/quanta/data/templates/pages/html/xhtml/leftMen_BB.html new file mode 100644 index 00000000..9b403d4d --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/leftMen_BB.html @@ -0,0 +1,75 @@ + + + + + + rightMen-Float.html + + + + + + +
+
Quanta web I.D.E.
+
+ + + +
+ +

Welcome to Quanta

+

+Quanta Plus is a web development tool for +the K Desktop Environment. Quanta is designed for quick web development +and is a mature yet continuously developing editor with a number of great features.

+

Community

+

Quanta has had a great deal of success and +acclaim. When you load it up and begin making pages, putting a Quanta logo on them +and interacting to help us make Quanta better you are a part of that community. +We welcome you.

+ +
+ + + + diff --git a/quanta/data/templates/pages/html/xhtml/leftMen_Quanta.html b/quanta/data/templates/pages/html/xhtml/leftMen_Quanta.html new file mode 100644 index 00000000..9a370621 --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/leftMen_Quanta.html @@ -0,0 +1,86 @@ + + + + + + rightMen-Float.html + + + + + + + + + +
+ +

Welcome to Quanta

+

+Quanta Plus is a web development tool for +the K Desktop Environment. Quanta is designed for quick web development +and is a mature yet continuously developing editor with a number of great features.

+

Community

+

Quanta has had a great deal of success and +acclaim. When you load it up and begin making pages, putting a Quanta logo on them +and interacting to help us make Quanta better you are a part of that community. +We welcome you.

+ +
+ + + + diff --git a/quanta/data/templates/pages/html/xhtml/rightMen_BB.html b/quanta/data/templates/pages/html/xhtml/rightMen_BB.html new file mode 100644 index 00000000..4f32cf59 --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/rightMen_BB.html @@ -0,0 +1,74 @@ + + + + + + rightMen-Float.html + + + + + + + +
Quanta web I.D.E.
+
+ + + +
+ +

Welcome to Quanta

+

+Quanta Plus is a web development tool for +the K Desktop Environment. Quanta is designed for quick web development +and is a mature yet continuously developing editor with a number of great features.

+

Community

+

Quanta has had a great deal of success and +acclaim. When you load it up and begin making pages, putting a Quanta logo on them +and interacting to help us make Quanta better you are a part of that community. +We welcome you.

+ +
+ + + + diff --git a/quanta/data/templates/pages/html/xhtml/rightMen_Quanta.html b/quanta/data/templates/pages/html/xhtml/rightMen_Quanta.html new file mode 100644 index 00000000..e4b6dfbf --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/rightMen_Quanta.html @@ -0,0 +1,86 @@ + + + + + + rightMen-Float.html + + + + + + + + + +
+ +

Welcome to Quanta

+

+Quanta Plus is a web development tool for +the K Desktop Environment. Quanta is designed for quick web development +and is a mature yet continuously developing editor with a number of great features.

+

Community

+

Quanta has had a great deal of success and +acclaim. When you load it up and begin making pages, putting a Quanta logo on them +and interacting to help us make Quanta better you are a part of that community. +We welcome you.

+ +
+ + + + diff --git a/quanta/data/templates/pages/html/xhtml/twoSideMen_BB.html b/quanta/data/templates/pages/html/xhtml/twoSideMen_BB.html new file mode 100644 index 00000000..5342591d --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/twoSideMen_BB.html @@ -0,0 +1,94 @@ + + + + + + rightMen-Float.html + + + + + + + +
Quanta web I.D.E.
+
+ + + + + +
+ +

Welcome to Quanta

+

+Quanta Plus is a web development tool for +the K Desktop Environment. Quanta is designed for quick web development +and is a mature yet continuously developing editor with a number of great features.

+

Community

+

Quanta has had a great deal of success and +acclaim. When you load it up and begin making pages, putting a Quanta logo on them +and interacting to help us make Quanta better you are a part of that community. +We welcome you.

+ +
+ + + + diff --git a/quanta/data/templates/pages/html/xhtml/twoSideMen_Quanta.html b/quanta/data/templates/pages/html/xhtml/twoSideMen_Quanta.html new file mode 100644 index 00000000..dda87f28 --- /dev/null +++ b/quanta/data/templates/pages/html/xhtml/twoSideMen_Quanta.html @@ -0,0 +1,108 @@ + + + + + + rightMen-Float.html + + + + + + + + + + + +
+ +

Welcome to Quanta

+

+Quanta Plus is a web development tool for +the K Desktop Environment. Quanta is designed for quick web development +and is a mature yet continuously developing editor with a number of great features.

+

Community

+

Quanta has had a great deal of success and +acclaim. When you load it up and begin making pages, putting a Quanta logo on them +and interacting to help us make Quanta better you are a part of that community. +We welcome you.

+ +
+ + + + diff --git a/quanta/data/templates/pages/php/Makefile.am b/quanta/data/templates/pages/php/Makefile.am new file mode 100644 index 00000000..9def08e3 --- /dev/null +++ b/quanta/data/templates/pages/php/Makefile.am @@ -0,0 +1,2 @@ +templatespagesphpdir = ${quanta_datadir}/templates/pages/php +templatespagesphp_DATA = demo.php diff --git a/quanta/data/templates/pages/php/demo.php b/quanta/data/templates/pages/php/demo.php new file mode 100644 index 00000000..573cfc1c --- /dev/null +++ b/quanta/data/templates/pages/php/demo.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/quanta/data/templates/scripts/Makefile.am b/quanta/data/templates/scripts/Makefile.am new file mode 100644 index 00000000..a6e11e12 --- /dev/null +++ b/quanta/data/templates/scripts/Makefile.am @@ -0,0 +1,7 @@ +SUBDIRS = php perl javascript + +templatesscriptsdir = ${quanta_datadir}/templates/scripts +templatesscripts_DATA = dirinfo + +install-data-hook: + @mv $(DESTDIR)$(templatesscriptsdir)/dirinfo $(DESTDIR)$(templatesscriptsdir)/.dirinfo diff --git a/quanta/data/templates/scripts/dirinfo b/quanta/data/templates/scripts/dirinfo new file mode 100644 index 00000000..5cc185ca --- /dev/null +++ b/quanta/data/templates/scripts/dirinfo @@ -0,0 +1,6 @@ +PostText= +PreText= +Type=text/all +UsePrePostText=false + + diff --git a/quanta/data/templates/scripts/javascript/Makefile.am b/quanta/data/templates/scripts/javascript/Makefile.am new file mode 100644 index 00000000..05b96d9f --- /dev/null +++ b/quanta/data/templates/scripts/javascript/Makefile.am @@ -0,0 +1,2 @@ +templatesscriptsjavascriptdir = ${quanta_datadir}/templates/scripts/javascript +templatesscriptsjavascript_DATA = overlib.js email_validate.js preload.js diff --git a/quanta/data/templates/scripts/javascript/email_validate.js b/quanta/data/templates/scripts/javascript/email_validate.js new file mode 100644 index 00000000..3b9bdf75 --- /dev/null +++ b/quanta/data/templates/scripts/javascript/email_validate.js @@ -0,0 +1,63 @@ +/* To include this script into an xhtml page without copying and pasting it in +add the following tags into your xhtml page. Please note that these comments are +only valid within .js (JavaScript files), +do not include them if you wish to use this script within an xhtml document. + + + +or copy and paste the script into your document head enclosed in + tags + +add the following in place of your usual tag + + + +variable names variable descrition + +yourname first name input +yoursurname second name input +addy email address + +*/ + + + +function validate(){ + if (document.form1.yourname.value.length<3){ + alert("Please enter your full Forname"); + document.form1.yourname.focus(); + return false; + } + if (document.form1.yoursirname.value.length<3){ + alert("Please enter your full Sirname."); + document.form1.yoursirname.focus(); + return false; + } + if (document.form1.addy.value.length < 5){ + alert("Please enter a complete email address in the form: yourname@yourdomain.com") + document.form1.addy.focus(); + return false; + } +var addystring = document.form1.addy.value; + var ampIndex = addystring.indexOf("@"); + var afterAmp = addystring.substring((ampIndex + 1), addystring.length); + var dotIndex = afterAmp.indexOf("."); + dotIndex = dotIndex + ampIndex + 1; + afterAmp = addystring.substring((ampIndex + 1), dotIndex); + var afterDot = addystring.substring((dotIndex + 1), addystring.length); + var beforeAmp = addystring.substring(0,(ampIndex)); + var addy_regex ="^[a-zA-Z0-9_\-\.]+@[a-zA-Z0-9_\-]+\.[a-zA-Z0-9_\-\.]+$"; + if ((addystring.indexOf("@") != "-1") && + (addystring.length > 5) && + (afterAmp.length > 0) && + (beforeAmp.length > 1) && + (afterDot.length > 1) && + (addy_regex.test(addystring)) ) { + return true; + } + else{ + alert("Invalid! Please enter a complete email address in the form: yourname@yourdomain.com") + document.form1.addy.focus(); + return false; + } +} diff --git a/quanta/data/templates/scripts/javascript/overlib.js b/quanta/data/templates/scripts/javascript/overlib.js new file mode 100644 index 00000000..4ec178bd --- /dev/null +++ b/quanta/data/templates/scripts/javascript/overlib.js @@ -0,0 +1,1222 @@ +//\////////////////////////////////////////////////////////////////////////////////// +//\ overLIB 3.50 -- This notice must remain untouched at all times. +//\ Copyright Erik Bosrup 1998-2001. All rights reserved. +//\ +//\ By Erik Bosrup (erik@bosrup.com). Last modified 2001-08-28. +//\ Portions by Dan Steinman (dansteinman.com). Additions by other people are +//\ listed on the overLIB homepage. +//\ +//\ Get the latest version at http://www.bosrup.com/web/overlib/ +//\ +//\ This script is published under an open source license. Please read the license +//\ agreement online at: http://www.bosrup.com/web/overlib/license.html +//\ If you have questions regarding the license please contact erik@bosrup.com. +//\ +//\ This script library was originally created for personal use. By request it has +//\ later been made public. This is free software. Do not sell this as your own +//\ work, or remove this copyright notice. For full details on copying or changing +//\ this script please read the license agreement at the link above. +//\ +//\ Please give credit on sites that use overLIB and submit changes of the script +//\ so other people can use them as well. This script is free to use, don't abuse. +//\////////////////////////////////////////////////////////////////////////////////// +//\mini + + +//////////////////////////////////////////////////////////////////////////////////// +// CONSTANTS +// Don't touch these. :) +//////////////////////////////////////////////////////////////////////////////////// +var INARRAY = 1; +var CAPARRAY = 2; +var STICKY = 3; +var BACKGROUND = 4; +var NOCLOSE = 5; +var CAPTION = 6; +var LEFT = 7; +var RIGHT = 8; +var CENTER = 9; +var OFFSETX = 10; +var OFFSETY = 11; +var FGCOLOR = 12; +var BGCOLOR = 13; +var TEXTCOLOR = 14; +var CAPCOLOR = 15; +var CLOSECOLOR = 16; +var WIDTH = 17; +var BORDER = 18; +var STATUS = 19; +var AUTOSTATUS = 20; +var AUTOSTATUSCAP = 21; +var HEIGHT = 22; +var CLOSETEXT = 23; +var SNAPX = 24; +var SNAPY = 25; +var FIXX = 26; +var FIXY = 27; +var FGBACKGROUND = 28; +var BGBACKGROUND = 29; +var PADX = 30; // PADX2 out +var PADY = 31; // PADY2 out +var FULLHTML = 34; +var ABOVE = 35; +var BELOW = 36; +var CAPICON = 37; +var TEXTFONT = 38; +var CAPTIONFONT = 39; +var CLOSEFONT = 40; +var TEXTSIZE = 41; +var CAPTIONSIZE = 42; +var CLOSESIZE = 43; +var FRAME = 44; +var TIMEOUT = 45; +var FUNCTION = 46; +var DELAY = 47; +var HAUTO = 48; +var VAUTO = 49; +var CLOSECLICK = 50; +var CSSOFF = 51; +var CSSSTYLE = 52; +var CSSCLASS = 53; +var FGCLASS = 54; +var BGCLASS = 55; +var TEXTFONTCLASS = 56; +var CAPTIONFONTCLASS = 57; +var CLOSEFONTCLASS = 58; +var PADUNIT = 59; +var HEIGHTUNIT = 60; +var WIDTHUNIT = 61; +var TEXTSIZEUNIT = 62; +var TEXTDECORATION = 63; +var TEXTSTYLE = 64; +var TEXTWEIGHT = 65; +var CAPTIONSIZEUNIT = 66; +var CAPTIONDECORATION = 67; +var CAPTIONSTYLE = 68; +var CAPTIONWEIGHT = 69; +var CLOSESIZEUNIT = 70; +var CLOSEDECORATION = 71; +var CLOSESTYLE = 72; +var CLOSEWEIGHT = 73; + + +//////////////////////////////////////////////////////////////////////////////////// +// DEFAULT CONFIGURATION +// You don't have to change anything here if you don't want to. All of this can be +// changed on your html page or through an overLIB call. +//////////////////////////////////////////////////////////////////////////////////// + +// Main background color (the large area) +// Usually a bright color (white, yellow etc) +if (typeof ol_fgcolor == 'undefined') { var ol_fgcolor = "#CCCCFF";} + +// Border color and color of caption +// Usually a dark color (black, brown etc) +if (typeof ol_bgcolor == 'undefined') { var ol_bgcolor = "#333399";} + +// Text color +// Usually a dark color +if (typeof ol_textcolor == 'undefined') { var ol_textcolor = "#000000";} + +// Color of the caption text +// Usually a bright color +if (typeof ol_capcolor == 'undefined') { var ol_capcolor = "#FFFFFF";} + +// Color of "Close" when using Sticky +// Usually a semi-bright color +if (typeof ol_closecolor == 'undefined') { var ol_closecolor = "#9999FF";} + +// Font face for the main text +if (typeof ol_textfont == 'undefined') { var ol_textfont = "sans-serif";} + +// Font face for the caption +if (typeof ol_captionfont == 'undefined') { var ol_captionfont = "sans-serif";} + +// Font face for the close text +if (typeof ol_closefont == 'undefined') { var ol_closefont = "sans-serif";} + +// Font size for the main text +// When using CSS this will be very small. +if (typeof ol_textsize == 'undefined') { var ol_textsize = "1";} + +// Font size for the caption +// When using CSS this will be very small. +if (typeof ol_captionsize == 'undefined') { var ol_captionsize = "1";} + +// Font size for the close text +// When using CSS this will be very small. +if (typeof ol_closesize == 'undefined') { var ol_closesize = "1";} + +// Width of the popups in pixels +// 100-300 pixels is typical +if (typeof ol_width == 'undefined') { var ol_width = "200";} + +// How thick the ol_border should be in pixels +// 1-3 pixels is typical +if (typeof ol_border == 'undefined') { var ol_border = "1";} + +// How many pixels to the right/left of the cursor to show the popup +// Values between 3 and 12 are best +if (typeof ol_offsetx == 'undefined') { var ol_offsetx = 10;} + +// How many pixels to the below the cursor to show the popup +// Values between 3 and 12 are best +if (typeof ol_offsety == 'undefined') { var ol_offsety = 10;} + +// Default text for popups +// Should you forget to pass something to overLIB this will be displayed. +if (typeof ol_text == 'undefined') { var ol_text = "Default Text"; } + +// Default caption +// You should leave this blank or you will have problems making non caps popups. +if (typeof ol_cap == 'undefined') { var ol_cap = ""; } + +// Decides if sticky popups are default. +// 0 for non, 1 for stickies. +if (typeof ol_sticky == 'undefined') { var ol_sticky = 0; } + +// Default background image. Better left empty unless you always want one. +if (typeof ol_background == 'undefined') { var ol_background = ""; } + +// Text for the closing sticky popups. +// Normal is "Close". +if (typeof ol_close == 'undefined') { var ol_close = "Close"; } + +// Default vertical alignment for popups. +// It's best to leave RIGHT here. Other options are LEFT and CENTER. +if (typeof ol_hpos == 'undefined') { var ol_hpos = RIGHT; } + +// Default status bar text when a popup is invoked. +if (typeof ol_status == 'undefined') { var ol_status = ""; } + +// If the status bar automatically should load either text or caption. +// 0=nothing, 1=text, 2=caption +if (typeof ol_autostatus == 'undefined') { var ol_autostatus = 0; } + +// Default height for popup. Often best left alone. +if (typeof ol_height == 'undefined') { var ol_height = -1; } + +// Horizontal grid spacing that popups will snap to. +// 0 makes no grid, anything else will cause a snap to that grid spacing. +if (typeof ol_snapx == 'undefined') { var ol_snapx = 0; } + +// Vertical grid spacing that popups will snap to. +// 0 makes no grid, andthing else will cause a snap to that grid spacing. +if (typeof ol_snapy == 'undefined') { var ol_snapy = 0; } + +// Sets the popups horizontal position to a fixed column. +// Anything above -1 will cause fixed position. +if (typeof ol_fixx == 'undefined') { var ol_fixx = -1; } + +// Sets the popups vertical position to a fixed row. +// Anything above -1 will cause fixed position. +if (typeof ol_fixy == 'undefined') { var ol_fixy = -1; } + +// Background image for the popups inside. +if (typeof ol_fgbackground == 'undefined') { var ol_fgbackground = ""; } + +// Background image for the popups frame. +if (typeof ol_bgbackground == 'undefined') { var ol_bgbackground = ""; } + +// How much horizontal left padding text should get by default when BACKGROUND is used. +if (typeof ol_padxl == 'undefined') { var ol_padxl = 1; } + +// How much horizontal right padding text should get by default when BACKGROUND is used. +if (typeof ol_padxr == 'undefined') { var ol_padxr = 1; } + +// How much vertical top padding text should get by default when BACKGROUND is used. +if (typeof ol_padyt == 'undefined') { var ol_padyt = 1; } + +// How much vertical bottom padding text should get by default when BACKGROUND is used. +if (typeof ol_padyb == 'undefined') { var ol_padyb = 1; } + +// If the user by default must supply all html for complete popup control. +// Set to 1 to activate, 0 otherwise. +if (typeof ol_fullhtml == 'undefined') { var ol_fullhtml = 0; } + +// Default vertical position of the popup. Default should normally be BELOW. +// ABOVE only works when HEIGHT is defined. +if (typeof ol_vpos == 'undefined') { var ol_vpos = BELOW; } + +// Default height of popup to use when placing the popup above the cursor. +if (typeof ol_aboveheight == 'undefined') { var ol_aboveheight = 0; } + +// Default icon to place next to the popups caption. +if (typeof ol_caption == 'undefined') { var ol_capicon = ""; } + +// Default frame. We default to current frame if there is no frame defined. +if (typeof ol_frame == 'undefined') { var ol_frame = self; } + +// Default timeout. By default there is no timeout. +if (typeof ol_timeout == 'undefined') { var ol_timeout = 0; } + +// Default javascript funktion. By default there is none. +if (typeof ol_function == 'undefined') { var ol_function = Function(); } + +// Default timeout. By default there is no timeout. +if (typeof ol_delay == 'undefined') { var ol_delay = 0; } + +// If overLIB should decide the horizontal placement. +if (typeof ol_hauto == 'undefined') { var ol_hauto = 0; } + +// If overLIB should decide the vertical placement. +if (typeof ol_vauto == 'undefined') { var ol_vauto = 0; } + + + +// If the user has to click to close stickies. +if (typeof ol_closeclick == 'undefined') { var ol_closeclick = 0; } + +// This variable determines if you want to use CSS or inline definitions. +// CSSOFF=no CSS CSSSTYLE=use CSS inline styles CSSCLASS=use classes +if (typeof ol_css == 'undefined') { var ol_css = CSSOFF; } + +// Main background class (eqv of fgcolor) +// This is only used if CSS is set to use classes (ol_css = CSSCLASS) +if (typeof ol_fgclass == 'undefined') { var ol_fgclass = ""; } + +// Frame background class (eqv of bgcolor) +// This is only used if CSS is set to use classes (ol_css = CSSCLASS) +if (typeof ol_bgclass == 'undefined') { var ol_bgclass = ""; } + +// Main font class +// This is only used if CSS is set to use classes (ol_css = CSSCLASS) +if (typeof ol_textfontclass == 'undefined') { var ol_textfontclass = ""; } + +// Caption font class +// This is only used if CSS is set to use classes (ol_css = CSSCLASS) +if (typeof ol_captionfontclass == 'undefined') { var ol_captionfontclass = ""; } + +// Close font class +// This is only used if CSS is set to use classes (ol_css = CSSCLASS) +if (typeof ol_closefontclass == 'undefined') { var ol_closefontclass = ""; } + +// Unit to be used for the text padding above +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +// Options include "px", "%", "in", "cm" and more +if (typeof ol_padunit == 'undefined') { var ol_padunit = "px";} + +// Unit to be used for height of popup +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +// Options include "px", "%", "in", "cm" and more +if (typeof ol_heightunit == 'undefined') { var ol_heightunit = "px";} + +// Unit to be used for width of popup +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +// Options include "px", "%", "in", "cm" and more +if (typeof ol_widthunit == 'undefined') { var ol_widthunit = "px";} + +// Font size unit for the main text +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_textsizeunit == 'undefined') { var ol_textsizeunit = "px";} + +// Decoration of the main text ("none", "underline", "line-through" or "blink") +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_textdecoration == 'undefined') { var ol_textdecoration = "none";} + +// Font style of the main text ("normal" or "italic") +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_textstyle == 'undefined') { var ol_textstyle = "normal";} + +// Font weight of the main text ("normal", "bold", "bolder", "lighter", ect.) +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_textweight == 'undefined') { var ol_textweight = "normal";} + +// Font size unit for the caption +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_captionsizeunit == 'undefined') { var ol_captionsizeunit = "px";} + +// Decoration of the caption ("none", "underline", "line-through" or "blink") +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_captiondecoration == 'undefined') { var ol_captiondecoration = "none";} + +// Font style of the caption ("normal" or "italic") +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_captionstyle == 'undefined') { var ol_captionstyle = "normal";} + +// Font weight of the caption ("normal", "bold", "bolder", "lighter", ect.) +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_captionweight == 'undefined') { var ol_captionweight = "bold";} + +// Font size unit for the close text +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_closesizeunit == 'undefined') { var ol_closesizeunit = "px";} + +// Decoration of the close text ("none", "underline", "line-through" or "blink") +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_closedecoration == 'undefined') { var ol_closedecoration = "none";} + +// Font style of the close text ("normal" or "italic") +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_closestyle == 'undefined') { var ol_closestyle = "normal";} + +// Font weight of the close text ("normal", "bold", "bolder", "lighter", ect.) +// Only used if CSS inline styles are being used (ol_css = CSSSTYLE) +if (typeof ol_closeweight == 'undefined') { var ol_closeweight = "normal";} + + + +//////////////////////////////////////////////////////////////////////////////////// +// ARRAY CONFIGURATION +// You don't have to change anything here if you don't want to. The following +// arrays can be filled with text and html if you don't wish to pass it from +// your html page. +//////////////////////////////////////////////////////////////////////////////////// + +// Array with texts. +if (typeof ol_texts == 'undefined') { var ol_texts = new Array("Text 0", "Text 1"); } + +// Array with captions. +if (typeof ol_caps == 'undefined') { var ol_caps = new Array("Caption 0", "Caption 1"); } + + +//////////////////////////////////////////////////////////////////////////////////// +// END CONFIGURATION +// Don't change anything below this line, all configuration is above. +//////////////////////////////////////////////////////////////////////////////////// + + + + + + + +//////////////////////////////////////////////////////////////////////////////////// +// INIT +//////////////////////////////////////////////////////////////////////////////////// + +// Runtime variables init. Used for runtime only, don't change, not for config! +var o3_text = ""; +var o3_cap = ""; +var o3_sticky = 0; +var o3_background = ""; +var o3_close = "Close"; +var o3_hpos = RIGHT; +var o3_offsetx = 2; +var o3_offsety = 2; +var o3_fgcolor = ""; +var o3_bgcolor = ""; +var o3_textcolor = ""; +var o3_capcolor = ""; +var o3_closecolor = ""; +var o3_width = 100; +var o3_border = 1; +var o3_status = ""; +var o3_autostatus = 0; +var o3_height = -1; +var o3_snapx = 0; +var o3_snapy = 0; +var o3_fixx = -1; +var o3_fixy = -1; +var o3_fgbackground = ""; +var o3_bgbackground = ""; +var o3_padxl = 0; +var o3_padxr = 0; +var o3_padyt = 0; +var o3_padyb = 0; +var o3_fullhtml = 0; +var o3_vpos = BELOW; +var o3_aboveheight = 0; +var o3_capicon = ""; +var o3_textfont = "Verdana,Arial,Helvetica"; +var o3_captionfont = "Verdana,Arial,Helvetica"; +var o3_closefont = "Verdana,Arial,Helvetica"; +var o3_textsize = "1"; +var o3_captionsize = "1"; +var o3_closesize = "1"; +var o3_frame = self; +var o3_timeout = 0; +var o3_timerid = 0; +var o3_allowmove = 0; +var o3_function = Function(); +var o3_delay = 0; +var o3_delayid = 0; +var o3_hauto = 0; +var o3_vauto = 0; +var o3_closeclick = 0; + +var o3_css = CSSOFF; +var o3_fgclass = ""; +var o3_bgclass = ""; +var o3_textfontclass = ""; +var o3_captionfontclass = ""; +var o3_closefontclass = ""; +var o3_padunit = "px"; +var o3_heightunit = "px"; +var o3_widthunit = "px"; +var o3_textsizeunit = "px"; +var o3_textdecoration = ""; +var o3_textstyle = ""; +var o3_textweight = ""; +var o3_captionsizeunit = "px"; +var o3_captiondecoration = ""; +var o3_captionstyle = ""; +var o3_captionweight = ""; +var o3_closesizeunit = "px"; +var o3_closedecoration = ""; +var o3_closestyle = ""; +var o3_closeweight = ""; + + + +// Display state variables +var o3_x = 0; +var o3_y = 0; +var o3_allow = 0; +var o3_showingsticky = 0; +var o3_removecounter = 0; + +// Our layer +var over = null; + + +// Decide browser version +var ns4 = (document.layers)? true:false; +var ns6 = (document.getElementById)? true:false; +var ie4 = (document.all)? true:false; +var ie5 = false; + +// Microsoft Stupidity Check(tm). +if (ie4) { + if ((navigator.userAgent.indexOf('MSIE 5') > 0) || (navigator.userAgent.indexOf('MSIE 6') > 0)) { + ie5 = true; + } + if (ns6) { + ns6 = false; + } +} + + +// Capture events, alt. diffuses the overlib function. +if ( (ns4) || (ie4) || (ns6)) { + document.onmousemove = mouseMove + if (ns4) document.captureEvents(Event.MOUSEMOVE) +} else { + overlib = no_overlib; + nd = no_overlib; + ver3fix = true; +} + + +// Fake function for 3.0 users. +function no_overlib() { + return ver3fix; +} + + + +//////////////////////////////////////////////////////////////////////////////////// +// PUBLIC FUNCTIONS +//////////////////////////////////////////////////////////////////////////////////// + + +// overlib(arg0, ..., argN) +// Loads parameters into global runtime variables. +function overlib() { + + // Load defaults to runtime. + o3_text = ol_text; + o3_cap = ol_cap; + o3_sticky = ol_sticky; + o3_background = ol_background; + o3_close = ol_close; + o3_hpos = ol_hpos; + o3_offsetx = ol_offsetx; + o3_offsety = ol_offsety; + o3_fgcolor = ol_fgcolor; + o3_bgcolor = ol_bgcolor; + o3_textcolor = ol_textcolor; + o3_capcolor = ol_capcolor; + o3_closecolor = ol_closecolor; + o3_width = ol_width; + o3_border = ol_border; + o3_status = ol_status; + o3_autostatus = ol_autostatus; + o3_height = ol_height; + o3_snapx = ol_snapx; + o3_snapy = ol_snapy; + o3_fixx = ol_fixx; + o3_fixy = ol_fixy; + o3_fgbackground = ol_fgbackground; + o3_bgbackground = ol_bgbackground; + o3_padxl = ol_padxl; + o3_padxr = ol_padxr; + o3_padyt = ol_padyt; + o3_padyb = ol_padyb; + o3_fullhtml = ol_fullhtml; + o3_vpos = ol_vpos; + o3_aboveheight = ol_aboveheight; + o3_capicon = ol_capicon; + o3_textfont = ol_textfont; + o3_captionfont = ol_captionfont; + o3_closefont = ol_closefont; + o3_textsize = ol_textsize; + o3_captionsize = ol_captionsize; + o3_closesize = ol_closesize; + o3_timeout = ol_timeout; + o3_function = ol_function; + o3_delay = ol_delay; + o3_hauto = ol_hauto; + o3_vauto = ol_vauto; + o3_closeclick = ol_closeclick; + + o3_css = ol_css; + o3_fgclass = ol_fgclass; + o3_bgclass = ol_bgclass; + o3_textfontclass = ol_textfontclass; + o3_captionfontclass = ol_captionfontclass; + o3_closefontclass = ol_closefontclass; + o3_padunit = ol_padunit; + o3_heightunit = ol_heightunit; + o3_widthunit = ol_widthunit; + o3_textsizeunit = ol_textsizeunit; + o3_textdecoration = ol_textdecoration; + o3_textstyle = ol_textstyle; + o3_textweight = ol_textweight; + o3_captionsizeunit = ol_captionsizeunit; + o3_captiondecoration = ol_captiondecoration; + o3_captionstyle = ol_captionstyle; + o3_captionweight = ol_captionweight; + o3_closesizeunit = ol_closesizeunit; + o3_closedecoration = ol_closedecoration; + o3_closestyle = ol_closestyle; + o3_closeweight = ol_closeweight; + + + // Special for frame support, over must be reset... + if ( (ns4) || (ie4) || (ns6) ) { + o3_frame = ol_frame; + if (ns4) over = o3_frame.document.overDiv + if (ie4) over = o3_frame.overDiv.style + if (ns6) over = o3_frame.document.getElementById("overDiv"); + } + + + // What the next argument is expected to be. + var parsemode = -1; + + var ar = arguments; + + for (i = 0; i < ar.length; i++) { + + if (parsemode < 0) { + // Arg is maintext, unless INARRAY + if (ar[i] == INARRAY) { + o3_text = ol_texts[ar[++i]]; + } else { + o3_text = ar[i]; + } + + parsemode = 0; + } else { + // Note: NS4 doesn't like switch cases with vars. + if (ar[i] == INARRAY) { o3_text = ol_texts[ar[++i]]; continue; } + if (ar[i] == CAPARRAY) { o3_cap = ol_caps[ar[++i]]; continue; } + if (ar[i] == STICKY) { o3_sticky = 1; continue; } + if (ar[i] == BACKGROUND) { o3_background = ar[++i]; continue; } + if (ar[i] == NOCLOSE) { o3_close = ""; continue; } + if (ar[i] == CAPTION) { o3_cap = ar[++i]; continue; } + if (ar[i] == CENTER || ar[i] == LEFT || ar[i] == RIGHT) { o3_hpos = ar[i]; continue; } + if (ar[i] == OFFSETX) { o3_offsetx = ar[++i]; continue; } + if (ar[i] == OFFSETY) { o3_offsety = ar[++i]; continue; } + if (ar[i] == FGCOLOR) { o3_fgcolor = ar[++i]; continue; } + if (ar[i] == BGCOLOR) { o3_bgcolor = ar[++i]; continue; } + if (ar[i] == TEXTCOLOR) { o3_textcolor = ar[++i]; continue; } + if (ar[i] == CAPCOLOR) { o3_capcolor = ar[++i]; continue; } + if (ar[i] == CLOSECOLOR) { o3_closecolor = ar[++i]; continue; } + if (ar[i] == WIDTH) { o3_width = ar[++i]; continue; } + if (ar[i] == BORDER) { o3_border = ar[++i]; continue; } + if (ar[i] == STATUS) { o3_status = ar[++i]; continue; } + if (ar[i] == AUTOSTATUS) { o3_autostatus = 1; continue; } + if (ar[i] == AUTOSTATUSCAP) { o3_autostatus = 2; continue; } + if (ar[i] == HEIGHT) { o3_height = ar[++i]; o3_aboveheight = ar[i]; continue; } // Same param again. + if (ar[i] == CLOSETEXT) { o3_close = ar[++i]; continue; } + if (ar[i] == SNAPX) { o3_snapx = ar[++i]; continue; } + if (ar[i] == SNAPY) { o3_snapy = ar[++i]; continue; } + if (ar[i] == FIXX) { o3_fixx = ar[++i]; continue; } + if (ar[i] == FIXY) { o3_fixy = ar[++i]; continue; } + if (ar[i] == FGBACKGROUND) { o3_fgbackground = ar[++i]; continue; } + if (ar[i] == BGBACKGROUND) { o3_bgbackground = ar[++i]; continue; } + if (ar[i] == PADX) { o3_padxl = ar[++i]; o3_padxr = ar[++i]; continue; } + if (ar[i] == PADY) { o3_padyt = ar[++i]; o3_padyb = ar[++i]; continue; } + if (ar[i] == FULLHTML) { o3_fullhtml = 1; continue; } + if (ar[i] == BELOW || ar[i] == ABOVE) { o3_vpos = ar[i]; continue; } + if (ar[i] == CAPICON) { o3_capicon = ar[++i]; continue; } + if (ar[i] == TEXTFONT) { o3_textfont = ar[++i]; continue; } + if (ar[i] == CAPTIONFONT) { o3_captionfont = ar[++i]; continue; } + if (ar[i] == CLOSEFONT) { o3_closefont = ar[++i]; continue; } + if (ar[i] == TEXTSIZE) { o3_textsize = ar[++i]; continue; } + if (ar[i] == CAPTIONSIZE) { o3_captionsize = ar[++i]; continue; } + if (ar[i] == CLOSESIZE) { o3_closesize = ar[++i]; continue; } + if (ar[i] == FRAME) { opt_FRAME(ar[++i]); continue; } + if (ar[i] == TIMEOUT) { o3_timeout = ar[++i]; continue; } + if (ar[i] == FUNCTION) { opt_FUNCTION(ar[++i]); continue; } + if (ar[i] == DELAY) { o3_delay = ar[++i]; continue; } + if (ar[i] == HAUTO) { o3_hauto = (o3_hauto == 0) ? 1 : 0; continue; } + if (ar[i] == VAUTO) { o3_vauto = (o3_vauto == 0) ? 1 : 0; continue; } + if (ar[i] == CLOSECLICK) { o3_closeclick = (o3_closeclick == 0) ? 1 : 0; continue; } + if (ar[i] == CSSOFF) { o3_css = ar[i]; continue; } + if (ar[i] == CSSSTYLE) { o3_css = ar[i]; continue; } + if (ar[i] == CSSCLASS) { o3_css = ar[i]; continue; } + if (ar[i] == FGCLASS) { o3_fgclass = ar[++i]; continue; } + if (ar[i] == BGCLASS) { o3_bgclass = ar[++i]; continue; } + if (ar[i] == TEXTFONTCLASS) { o3_textfontclass = ar[++i]; continue; } + if (ar[i] == CAPTIONFONTCLASS) { o3_captionfontclass = ar[++i]; continue; } + if (ar[i] == CLOSEFONTCLASS) { o3_closefontclass = ar[++i]; continue; } + if (ar[i] == PADUNIT) { o3_padunit = ar[++i]; continue; } + if (ar[i] == HEIGHTUNIT) { o3_heightunit = ar[++i]; continue; } + if (ar[i] == WIDTHUNIT) { o3_widthunit = ar[++i]; continue; } + if (ar[i] == TEXTSIZEUNIT) { o3_textsizeunit = ar[++i]; continue; } + if (ar[i] == TEXTDECORATION) { o3_textdecoration = ar[++i]; continue; } + if (ar[i] == TEXTSTYLE) { o3_textstyle = ar[++i]; continue; } + if (ar[i] == TEXTWEIGHT) { o3_textweight = ar[++i]; continue; } + if (ar[i] == CAPTIONSIZEUNIT) { o3_captionsizeunit = ar[++i]; continue; } + if (ar[i] == CAPTIONDECORATION) { o3_captiondecoration = ar[++i]; continue; } + if (ar[i] == CAPTIONSTYLE) { o3_captionstyle = ar[++i]; continue; } + if (ar[i] == CAPTIONWEIGHT) { o3_captionweight = ar[++i]; continue; } + if (ar[i] == CLOSESIZEUNIT) { o3_closesizeunit = ar[++i]; continue; } + if (ar[i] == CLOSEDECORATION) { o3_closedecoration = ar[++i]; continue; } + if (ar[i] == CLOSESTYLE) { o3_closestyle = ar[++i]; continue; } + if (ar[i] == CLOSEWEIGHT) { o3_closeweight = ar[++i]; continue; } + } + } + + if (o3_delay == 0) { + return overlib350(); + } else { + o3_delayid = setTimeout("overlib350()", o3_delay); + + if (o3_sticky) { + return false; + } else { + return true; + } + } +} + + + +// Clears popups if appropriate +function nd() { + if ( o3_removecounter >= 1 ) { o3_showingsticky = 0 }; + if ( (ns4) || (ie4) || (ns6) ) { + if ( o3_showingsticky == 0 ) { + o3_allowmove = 0; + if (over != null) hideObject(over); + } else { + o3_removecounter++; + } + } + + return true; +} + + + + + + + +//////////////////////////////////////////////////////////////////////////////////// +// OVERLIB 3.50 FUNCTION +//////////////////////////////////////////////////////////////////////////////////// + + +// This function decides what it is we want to display and how we want it done. +function overlib350() { + + // Make layer content + var layerhtml; + + if (o3_background != "" || o3_fullhtml) { + // Use background instead of box. + layerhtml = ol_content_background(o3_text, o3_background, o3_fullhtml); + } else { + // They want a popup box. + + // Prepare popup background + if (o3_fgbackground != "" && o3_css == CSSOFF) { + o3_fgbackground = "BACKGROUND=\""+o3_fgbackground+"\""; + } + if (o3_bgbackground != "" && o3_css == CSSOFF) { + o3_bgbackground = "BACKGROUND=\""+o3_bgbackground+"\""; + } + + // Prepare popup colors + if (o3_fgcolor != "" && o3_css == CSSOFF) { + o3_fgcolor = "BGCOLOR=\""+o3_fgcolor+"\""; + } + if (o3_bgcolor != "" && o3_css == CSSOFF) { + o3_bgcolor = "BGCOLOR=\""+o3_bgcolor+"\""; + } + + // Prepare popup height + if (o3_height > 0 && o3_css == CSSOFF) { + o3_height = "HEIGHT=" + o3_height; + } else { + o3_height = ""; + } + + // Decide which kinda box. + if (o3_cap == "") { + // Plain + layerhtml = ol_content_simple(o3_text); + } else { + // With caption + if (o3_sticky) { + // Show close text + layerhtml = ol_content_caption(o3_text, o3_cap, o3_close); + } else { + // No close text + layerhtml = ol_content_caption(o3_text, o3_cap, ""); + } + } + } + + // We want it to stick! + if (o3_sticky) { + o3_showingsticky = 1; + o3_removecounter = 0; + } + + // Write layer + layerWrite(layerhtml); + + // Prepare status bar + if (o3_autostatus > 0) { + o3_status = o3_text; + if (o3_autostatus > 1) { + o3_status = o3_cap; + } + } + + // When placing the layer the first time, even stickies may be moved. + o3_allowmove = 0; + + // Initiate a timer for timeout + if (o3_timeout > 0) { + if (o3_timerid > 0) clearTimeout(o3_timerid); + o3_timerid = setTimeout("cClick()", o3_timeout); + } + + // Show layer + disp(o3_status); + + // Stickies should stay where they are. + if (o3_sticky) { + o3_allowmove = 0; + return false; + } else { + return true; + } +} + + + +//////////////////////////////////////////////////////////////////////////////////// +// LAYER GENERATION FUNCTIONS +//////////////////////////////////////////////////////////////////////////////////// + +// Makes simple table without caption +function ol_content_simple(text) { + if (o3_css == CSSCLASS) txt = "
"+text+"
"; + if (o3_css == CSSSTYLE) txt = "
"+text+"
"; + if (o3_css == CSSOFF) txt = "
"+text+"
"; + + set_background(""); + return txt; +} + + + + +// Makes table with caption and optional close link +function ol_content_caption(text, title, close) { + closing = ""; + closeevent = "onMouseOver"; + + if (o3_closeclick == 1) closeevent = "onClick"; + if (o3_capicon != "") o3_capicon = " "; + + if (close != "") { + if (o3_css == CSSCLASS) closing = ""+close+""; + if (o3_css == CSSSTYLE) closing = ""+close+""; + if (o3_css == CSSOFF) closing = ""+close+""; + } + + if (o3_css == CSSCLASS) txt = "
"+closing+"
"+o3_capicon+title+"
"+text+"
"; + if (o3_css == CSSSTYLE) txt = "
"+closing+"
"+o3_capicon+title+"
"+text+"
"; + if (o3_css == CSSOFF) txt = "
"+closing+"
"+o3_capicon+title+"
"+text+"
"; + + set_background(""); + return txt; +} + +// Sets the background picture, padding and lots more. :) +function ol_content_background(text, picture, hasfullhtml) { + if (hasfullhtml) { + txt = text; + } else { + if (o3_css == CSSCLASS) txt = "
"+text+"
"; + if (o3_css == CSSSTYLE) txt = "
"+text+"
"; + if (o3_css == CSSOFF) txt = "
"+text+"
"; + } + set_background(picture); + return txt; +} + +// Loads a picture into the div. +function set_background(pic) { + if (pic == "") { + if (ie4) over.backgroundImage = "none"; + if (ns6) over.style.backgroundImage = "none"; + } else { + if (ns4) { + over.background.src = pic; + } else if (ie4) { + over.backgroundImage = "url("+pic+")"; + } else if (ns6) { + over.style.backgroundImage = "url("+pic+")"; + } + } +} + + + +//////////////////////////////////////////////////////////////////////////////////// +// HANDLING FUNCTIONS +//////////////////////////////////////////////////////////////////////////////////// + + +// Displays the popup +function disp(statustext) { + if ( (ns4) || (ie4) || (ns6) ) { + if (o3_allowmove == 0) { + placeLayer(); + showObject(over); + o3_allowmove = 1; + } + } + + if (statustext != "") { + self.status = statustext; + } +} + +// Decides where we want the popup. +function placeLayer() { + var placeX, placeY; + + // HORIZONTAL PLACEMENT + if (o3_fixx > -1) { + // Fixed position + placeX = o3_fixx; + } else { + winoffset = (ie4) ? o3_frame.document.body.scrollLeft : o3_frame.pageXOffset; + if (ie4) iwidth = o3_frame.document.body.clientWidth; + if (ns4) iwidth = o3_frame.innerWidth; // was screwed in mozilla, fixed now? + if (ns6) iwidth = o3_frame.outerWidth; + + // If HAUTO, decide what to use. + if (o3_hauto == 1) { + if ( (o3_x - winoffset) > ((eval(iwidth)) / 2)) { + o3_hpos = LEFT; + } else { + o3_hpos = RIGHT; + } + } + + // From mouse + if (o3_hpos == CENTER) { // Center + placeX = o3_x+o3_offsetx-(o3_width/2); + } + if (o3_hpos == RIGHT) { // Right + placeX = o3_x+o3_offsetx; + if ( (eval(placeX) + eval(o3_width)) > (winoffset + iwidth) ) { + placeX = iwidth + winoffset - o3_width; + if (placeX < 0) placeX = 0; + } + } + if (o3_hpos == LEFT) { // Left + placeX = o3_x-o3_offsetx-o3_width; + if (placeX < winoffset) placeX = winoffset; + } + + // Snapping! + if (o3_snapx > 1) { + var snapping = placeX % o3_snapx; + if (o3_hpos == LEFT) { + placeX = placeX - (o3_snapx + snapping); + } else { + // CENTER and RIGHT + placeX = placeX + (o3_snapx - snapping); + } + if (placeX < winoffset) placeX = winoffset; + } + } + + + + // VERTICAL PLACEMENT + if (o3_fixy > -1) { + // Fixed position + placeY = o3_fixy; + } else { + scrolloffset = (ie4) ? o3_frame.document.body.scrollTop : o3_frame.pageYOffset; + + // If VAUTO, decide what to use. + if (o3_vauto == 1) { + if (ie4) iheight = o3_frame.document.body.clientHeight; + if (ns4) iheight = o3_frame.innerHeight; + if (ns6) iheight = o3_frame.outerHeight; + + iheight = (eval(iheight)) / 2; + if ( (o3_y - scrolloffset) > iheight) { + o3_vpos = ABOVE; + } else { + o3_vpos = BELOW; + } + } + + + // From mouse + if (o3_vpos == ABOVE) { + if (o3_aboveheight == 0) { + var divref = (ie4) ? o3_frame.document.all['overDiv'] : over; + o3_aboveheight = (ns4) ? divref.clip.height : divref.offsetHeight; + } + + placeY = o3_y - (o3_aboveheight + o3_offsety); + if (placeY < scrolloffset) placeY = scrolloffset; + } else { + // BELOW + placeY = o3_y + o3_offsety; + } + + // Snapping! + if (o3_snapy > 1) { + var snapping = placeY % o3_snapy; + + if (o3_aboveheight > 0 && o3_vpos == ABOVE) { + placeY = placeY - (o3_snapy + snapping); + } else { + placeY = placeY + (o3_snapy - snapping); + } + + if (placeY < scrolloffset) placeY = scrolloffset; + } + } + + + // Actually move the object. + repositionTo(over, placeX, placeY); +} + + +// Moves the layer +function mouseMove(e) { + if ( (ns4) || (ns6) ) {o3_x=e.pageX; o3_y=e.pageY;} + if (ie4) {o3_x=event.x; o3_y=event.y;} + if (ie5) {o3_x=event.x+o3_frame.document.body.scrollLeft; o3_y=event.y+o3_frame.document.body.scrollTop;} + + if (o3_allowmove == 1) { + placeLayer(); + } +} + +// The Close onMouseOver function for stickies +function cClick() { + hideObject(over); + o3_showingsticky = 0; + + return false; +} + + +// Makes sure target frame has overLIB +function compatibleframe(frameid) { + if (ns4) { + if (typeof frameid.document.overDiv =='undefined') return false; + } else if (ie4) { + if (typeof frameid.document.all["overDiv"] =='undefined') return false; + } else if (ns6) { + if (frameid.document.getElementById('overDiv') == null) return false; + } + + return true; +} + + + +//////////////////////////////////////////////////////////////////////////////////// +// LAYER FUNCTIONS +//////////////////////////////////////////////////////////////////////////////////// + + +// Writes to a layer +function layerWrite(txt) { + txt += "\n"; + + if (ns4) { + var lyr = o3_frame.document.overDiv.document + + lyr.write(txt) + lyr.close() + } else if (ie4) { + o3_frame.document.all["overDiv"].innerHTML = txt + } else if (ns6) { + range = o3_frame.document.createRange(); + range.setStartBefore(over); + domfrag = range.createContextualFragment(txt); + while (over.hasChildNodes()) { + over.removeChild(over.lastChild); + } + over.appendChild(domfrag); + } +} + +// Make an object visible +function showObject(obj) { + if (ns4) obj.visibility = "show"; + else if (ie4) obj.visibility = "visible"; + else if (ns6) obj.style.visibility = "visible"; +} + +// Hides an object +function hideObject(obj) { + if (ns4) obj.visibility = "hide"; + else if (ie4) obj.visibility = "hidden"; + else if (ns6) obj.style.visibility = "hidden"; + + if (o3_timerid > 0) clearTimeout(o3_timerid); + if (o3_delayid > 0) clearTimeout(o3_delayid); + o3_timerid = 0; + o3_delayid = 0; + self.status = ""; +} + +// Move a layer +function repositionTo(obj,xL,yL) { + if ( (ns4) || (ie4) ) { + obj.left = xL; + obj.top = yL; + } else if (ns6) { + obj.style.left = xL + "px"; + obj.style.top = yL+ "px"; + } +} + + + + + +//////////////////////////////////////////////////////////////////////////////////// +// PARSER FUNCTIONS +//////////////////////////////////////////////////////////////////////////////////// + + +// Defines which frame we should point to. +function opt_FRAME(frm) { + o3_frame = compatibleframe(frm) ? frm : ol_frame; + + if ( (ns4) || (ie4 || (ns6)) ) { + if (ns4) over = o3_frame.document.overDiv; + if (ie4) over = o3_frame.overDiv.style; + if (ns6) over = o3_frame.document.getElementById("overDiv"); + } + + return 0; +} + +// Calls an external function +function opt_FUNCTION(callme) { + o3_text = callme() + return 0; +} + + + + +//end (For internal purposes.) +//////////////////////////////////////////////////////////////////////////////////// +// OVERLIB 2 COMPATABILITY FUNCTIONS +// If you aren't upgrading you can remove the below section. +//////////////////////////////////////////////////////////////////////////////////// + +// Converts old 0=left, 1=right and 2=center into constants. +function vpos_convert(d) { + if (d == 0) { + d = LEFT; + } else { + if (d == 1) { + d = RIGHT; + } else { + d = CENTER; + } + } + + return d; +} + +// Simple popup +function dts(d,text) { + o3_hpos = vpos_convert(d); + overlib(text, o3_hpos, CAPTION, ""); +} + +// Caption popup +function dtc(d,text, title) { + o3_hpos = vpos_convert(d); + overlib(text, CAPTION, title, o3_hpos); +} + +// Sticky +function stc(d,text, title) { + o3_hpos = vpos_convert(d); + overlib(text, CAPTION, title, o3_hpos, STICKY); +} + +// Simple popup right +function drs(text) { + dts(1,text); +} + +// Caption popup right +function drc(text, title) { + dtc(1,text,title); +} + +// Sticky caption right +function src(text,title) { + stc(1,text,title); +} + +// Simple popup left +function dls(text) { + dts(0,text); +} + +// Caption popup left +function dlc(text, title) { + dtc(0,text,title); +} + +// Sticky caption left +function slc(text,title) { + stc(0,text,title); +} + +// Simple popup center +function dcs(text) { + dts(2,text); +} + +// Caption popup center +function dcc(text, title) { + dtc(2,text,title); +} + +// Sticky caption center +function scc(text,title) { + stc(2,text,title); +} diff --git a/quanta/data/templates/scripts/javascript/preload.js b/quanta/data/templates/scripts/javascript/preload.js new file mode 100644 index 00000000..5023bb37 --- /dev/null +++ b/quanta/data/templates/scripts/javascript/preload.js @@ -0,0 +1,24 @@ +/* To include this script into an xhtml page without copying and pasting it in +add the following tags into your xhtml page. Please note that these comments are +only valid within .js (JavaScript files), +do not include them if you wish to use this script within an xhtml document. + + + +or copy and paste the script into your document head enclosed in + tags */ + +var arImages=new Array(); +function Preload() { + var temp = Preload.arguments; + for(x=0; x < temp.length; x++) { + arImages[x]=new Image(); + arImages[x].src=Preload.arguments[x]; + } +} + + /*this replaces your normal 'body' tag + substitute your own image names*/ + /* + < body onload="Preload('thing.png','anotherthing.png','etc etc.png')" > + */ \ No newline at end of file diff --git a/quanta/data/templates/scripts/perl/Makefile.am b/quanta/data/templates/scripts/perl/Makefile.am new file mode 100644 index 00000000..ace29364 --- /dev/null +++ b/quanta/data/templates/scripts/perl/Makefile.am @@ -0,0 +1,2 @@ +templatesscriptsperldir = ${quanta_datadir}/templates/scripts/perl +templatesscriptsperl_DATA = demo.perl diff --git a/quanta/data/templates/scripts/perl/demo.perl b/quanta/data/templates/scripts/perl/demo.perl new file mode 100644 index 00000000..0757c3be --- /dev/null +++ b/quanta/data/templates/scripts/perl/demo.perl @@ -0,0 +1 @@ +#You can put script parts here and in the subdirs. diff --git a/quanta/data/templates/scripts/php/Makefile.am b/quanta/data/templates/scripts/php/Makefile.am new file mode 100644 index 00000000..8c457ec7 --- /dev/null +++ b/quanta/data/templates/scripts/php/Makefile.am @@ -0,0 +1,2 @@ +templatescriptsphpdir = ${quanta_datadir}/templates/scripts/php +templatescriptsphp_DATA = demo.php diff --git a/quanta/data/templates/scripts/php/demo.php b/quanta/data/templates/scripts/php/demo.php new file mode 100644 index 00000000..573cfc1c --- /dev/null +++ b/quanta/data/templates/scripts/php/demo.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/quanta/data/templates/text/Makefile.am b/quanta/data/templates/text/Makefile.am new file mode 100644 index 00000000..62450336 --- /dev/null +++ b/quanta/data/templates/text/Makefile.am @@ -0,0 +1,7 @@ +SUBDIRS = scripts others html + +templatestextdir = ${quanta_datadir}/templates/text +templatestext_DATA = dirinfo + +install-data-hook: + @mv $(DESTDIR)$(templatestextdir)/dirinfo $(DESTDIR)$(templatestextdir)/.dirinfo diff --git a/quanta/data/templates/text/dirinfo b/quanta/data/templates/text/dirinfo new file mode 100644 index 00000000..5cc185ca --- /dev/null +++ b/quanta/data/templates/text/dirinfo @@ -0,0 +1,6 @@ +PostText= +PreText= +Type=text/all +UsePrePostText=false + + diff --git a/quanta/data/templates/text/html/Makefile.am b/quanta/data/templates/text/html/Makefile.am new file mode 100644 index 00000000..c882d6c2 --- /dev/null +++ b/quanta/data/templates/text/html/Makefile.am @@ -0,0 +1,2 @@ +templatestexthtmldir = ${quanta_datadir}/templates/text/html +templatestexthtml_DATA = demo.html diff --git a/quanta/data/templates/text/html/demo.html b/quanta/data/templates/text/html/demo.html new file mode 100644 index 00000000..b395e172 --- /dev/null +++ b/quanta/data/templates/text/html/demo.html @@ -0,0 +1 @@ + diff --git a/quanta/data/templates/text/others/Makefile.am b/quanta/data/templates/text/others/Makefile.am new file mode 100644 index 00000000..7320b408 --- /dev/null +++ b/quanta/data/templates/text/others/Makefile.am @@ -0,0 +1,2 @@ +templatestextothersdir = ${quanta_datadir}/templates/text/others +templatestextothers_DATA = demo.txt diff --git a/quanta/data/templates/text/others/demo.txt b/quanta/data/templates/text/others/demo.txt new file mode 100644 index 00000000..88373d80 --- /dev/null +++ b/quanta/data/templates/text/others/demo.txt @@ -0,0 +1 @@ +You can put common texts in this dir. \ No newline at end of file diff --git a/quanta/data/templates/text/scripts/Makefile.am b/quanta/data/templates/text/scripts/Makefile.am new file mode 100644 index 00000000..0323c49b --- /dev/null +++ b/quanta/data/templates/text/scripts/Makefile.am @@ -0,0 +1,2 @@ +templatestextscriptsdir = ${quanta_datadir}/templates/text/scripts +templatestextscripts_DATA = demo.php diff --git a/quanta/data/templates/text/scripts/demo.php b/quanta/data/templates/text/scripts/demo.php new file mode 100644 index 00000000..573cfc1c --- /dev/null +++ b/quanta/data/templates/text/scripts/demo.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/quanta/data/tips b/quanta/data/tips new file mode 100644 index 00000000..609ed245 --- /dev/null +++ b/quanta/data/tips @@ -0,0 +1,369 @@ + + +

...that you can use ftp for file operations by using +ftp://user@domain/path in the file dialog? It will prompt you for your password. +

+ +
+ + + +

...that you can use SSH/SCP for file operations by using +fish://user@domain/path in the file dialog? It will prompt you for your password. +

+ +
+ + + +

...that you can view and manage the content of any +project upload profile in the in a tree in the right side dock? Dragging files from the upload profile to the project tree in the left dock will also prompt asking if you want to add them to the project if they are new. +

+ +
+ + + +

...that you can turn on line numbering and the icon border +by default from Settings > Configure Editor::Defaults? +

+ +
+ + + +

...that you can create actions that will run scripts from +Settings > Configure Actions and place them on the toolbar? You can even assign hot keys to them. +

+ +
+ + + +

...that you can create custom toolbars and even make them project +specific? You can customize any of Quanta's toolbars too. +

+ +
+ + + +

...that you can create remote projects and manage them with the +kio slave of your choice? Look in the project settings dialog. +

+ +
+ + + +

...that you can open and close groups of files in projects with +Project Views? You can even include project toolbars in the views. The new project toolbar makes it easy. +

+ +
+ + + +

...that you can have as many upload profiles as you want for a project? This means you can have a separate test server and production server and Quanta will keep track of what is uploaded where. +

+ +
+ + + +

...that you can view a summary of PHP classes, functions and variables +in the structure tree with RMB Show Groups For > PHP? +

+ +
+ + + +

...that you can use auto-complete with PHP's built in functions by using Ctrl+Space? +

+ +
+ + + +

...that you can turn on/off autoupdating of closing tags in +Settings > Configure Quanta::Tag Style? + + + + + +

...that you can cause Quanta to open files from Konqueror into the +currently open window by adding a --unique switch to your .desktop +file or menu entry? It would look like this: '[path/]quanta --unique'. +

+ +
+ + + +

...that you can add a keyboard shortcut for any action you define? +Just go to Settings > Configure Shortcuts. +

+ +
+ + + +

...that you can add new local and remote top level folders to the Files Tree? Use RMB New Top Folder... and select a local folder or enter the remote server name in form of ftp://user@server and select the remote folder. +

+ +
+ + + +

...that there is a README file with useful information? +

+ +
+ + + +

...that we have a mailing list for Quanta users at http://mail.kde.org/mailman/listinfo/quanta? This is a great place to go for help and information. Please join before posting, even if you read from a newsreader. You can set it not to send you mail and this is how we prevent spam. +

+ +
+ + + +

...that you can search the Quanta mailing list using Google? +

+ +
+ + + +

...that we have additional mailing lists to support our users? Lists include Kommander and web development help.Click here to see. +

+ +
+ + + +

...that you can help to financially support our program of sponsoring developers? Click here to help. +

+ +
+ + + +

...that you can set a project root below your document root and then upload database password files and libraries where they can only be accessed by your user account. +

+ +
+ + + +

...that you can use Quanta to enable new DTDs using our tagxml DTD? Quanta can even import a DTD for you. +

+ +
+ + + +

...that you can now edit and create Quanta Document Type Editing Packages from a dialog? Use DTD>Edit DTD settings to access this. +

+ +
+ + + +

...that you can use Kommander to create custom dialogs for Quanta? Open the editor with kmdr-editor or run a dialog with kmdr-executor mydialog.kmdr. +

+ +
+ + + +

...that bookmarks are now saved? +

+ +
+ + + +

...that Quanta has a visual problem reporter for your current DTD? Switch to the Structure Tree and make the problem description widget visible with View > Show Problem Reporter. +

+ +
+ + + +

...that you can save file descriptions that appear in the project tree? Right click on a project file, select Properties and go to the Quanta File Info tab. +

+ +
+ + + +

...that you can set the Upload Status of files and folders in the project tree? Right click on a project file or folder and select Upload Status and set the appropriate actions. This enables you to set a project root below the document root and prevent support files from uploading while requiring confirmation on sensitive data files. +

+ +
+ + + +

...that you can set the file tabs to one of three modes for close buttons? You can set them to never, always or delay/hover in Settings > Configure Quanta::User Interface. +

+ +
+ + + +

...that you can move the file tabs now? Hold the middle mouse button on a tab and drag it where you want it.. +

+ +
+ + + +

...that the file tabs now have popup menus? RMB on a file tab and you can even select which open file to view from a menu list. +

+ +
+ + + +

...that Quanta can convert tag and attribute case for you? It's on the Tools menu. +

+ +
+ + + +

...that Quanta comes with a number of applications that run a plug ins? Quanta can also load other programs if they are installed including HTML Tidy, Cervisia and Kompare. Make sure you have HTML Tidy and the kdesdk module installed to use them all. +

+ +
+ + + +

...that you can use Cervisia to manage CVS from inside Quanta? Click on the Cervisia icon and it will load up the current project directory (if it is CVS). If you have never used CVS before Cervisia has great help files and setting up a local repository is easy. +

+ +
+ + + +

...that common CVS commands are available in the project context menu inside Quanta? Open the project tree and right click on a file or folder. This functionality uses the DCOP services of Cervisia so you must have it installed. It will also support any versioning system supported by Cervisia. +

+ +
+ + + +

...that you can use KFileReplace to find and replace across your entire project? Click on the KFileReplace button and you can set extensive configurations, use multi line values and wild cards, and even go to the files found in Quanta. +

+ +
+ + + +

...that you can create image maps easily with Quanta? Select KImageMapEditor from the Plugins menu and you have estensive options at your fingertips. +

+ +
+ + + +

...that you can debug XSL from within Quanta? Click on the XSL icon for KXSL Dbg and Quanta will load an interactive XSL debugger. +

+ +
+ + + +

...that you can visually check the status of your links from within Quanta? Select KLinkStatus from the Plugins menu and Quanta will load a visual link checker. +

+ +
+ + + +

...that you can view the HTML source when using project preview with PHP (or other server side scripting) in Quanta? right click on a preview and select View Document Source and Quanta will load a tab with the rendered HTML. +

+ +
+ + + +

...that Quanta has XML tools for things like XSL Transforms? Select the scripts tree on the left and you will find several Kommander dialogs that use your installed libxml libraries. +

+ +
+ + + +

...that Quanta has a local script library for useful scripts? Select the scripts tree on the left and you will find scripts and Kommander dialogs for doc generation, Quick Start, XSL Transforms and more. +

+ +
+ + + +

...that you can create the XML files used to display information about scripts in the Script tree? Select the scripts tree on the left and you will find scriptinfo.kmdr. Right click and select Run Script and fill in the dialog. +

+ +
+ + + +

...that you can create text templates using Drag and Drop ? Have your template tree open, select some text, drag it to the tree and drop it on a folder. Quanta will prompt you for a file name. +

+ +
+ + + +

...that you can create filter actions for templates? Right click on a template in the tree and select properties, Quanta Templates and a filtering action, which is a script from the scripts tree. This can take the template and filter it. +

+ +
+ + + +

...that Quanta has four types of templates? There are document (page), text snippet, binary (linked files) and site (tgz files holding entire trees) templates. These all go in folders for each type. +

+ +
+ + + +

...that Quanta has a deeply integrated PHP debugger? you can enable it from your Project Settings. +

+ +
+ + + +

...that Quanta now has Team Project capabilities? You can share information about roles, subprojects and tasks. This integrates with Quanta's new Event Actions. See the Project Properties dialog. +

+ +
+ + + +

...that Quanta supports attaching scripts to events with Event Actions in your projects? You can share information about roles, subprojects and tasks. This integrates with Quanta's new Event Actions. See the Project Properties dialog. +

+ +
+ + + +

...that Quanta now has a public repository for all resources? Quanta uses KNewStuff to make templates, scripts, DTEPs, toolbars and more available for download. Need something? Check the download menu items. +

+ +
+ + + +

...that you can contribute to Quanta's public repository of resources? Just email it here. +

+ +
+ diff --git a/quanta/data/toolbars/Makefile.am b/quanta/data/toolbars/Makefile.am new file mode 100644 index 00000000..9aa73c87 --- /dev/null +++ b/quanta/data/toolbars/Makefile.am @@ -0,0 +1,4 @@ +SUBDIRS = html xml wml-1-2 tagxml schema cfml kde-docbook docbook css + +toolbarsdir = ${quanta_datadir}/toolbars +toolbars_DATA = debug.toolbar.tgz diff --git a/quanta/data/toolbars/cfml/Makefile.am b/quanta/data/toolbars/cfml/Makefile.am new file mode 100644 index 00000000..5f5c6f00 --- /dev/null +++ b/quanta/data/toolbars/cfml/Makefile.am @@ -0,0 +1,2 @@ +quanta_DATA = fonts.toolbar.tgz forms.toolbar.tgz lists.toolbar.tgz standard.toolbar.tgz tables.toolbar.tgz cfml.toolbar.tgz +quantadir = ${quanta_datadir}/toolbars/cfml diff --git a/quanta/data/toolbars/cfml/cfml.toolbar.tgz b/quanta/data/toolbars/cfml/cfml.toolbar.tgz new file mode 100644 index 00000000..d4ace7c2 Binary files /dev/null and b/quanta/data/toolbars/cfml/cfml.toolbar.tgz differ diff --git a/quanta/data/toolbars/cfml/fonts.toolbar.tgz b/quanta/data/toolbars/cfml/fonts.toolbar.tgz new file mode 100644 index 00000000..392af661 Binary files /dev/null and b/quanta/data/toolbars/cfml/fonts.toolbar.tgz differ diff --git a/quanta/data/toolbars/cfml/forms.toolbar.tgz b/quanta/data/toolbars/cfml/forms.toolbar.tgz new file mode 100644 index 00000000..7df6b7aa Binary files /dev/null and b/quanta/data/toolbars/cfml/forms.toolbar.tgz differ diff --git a/quanta/data/toolbars/cfml/lists.toolbar.tgz b/quanta/data/toolbars/cfml/lists.toolbar.tgz new file mode 100644 index 00000000..4505da3f Binary files /dev/null and b/quanta/data/toolbars/cfml/lists.toolbar.tgz differ diff --git a/quanta/data/toolbars/cfml/standard.toolbar.tgz b/quanta/data/toolbars/cfml/standard.toolbar.tgz new file mode 100644 index 00000000..46dfd340 Binary files /dev/null and b/quanta/data/toolbars/cfml/standard.toolbar.tgz differ diff --git a/quanta/data/toolbars/cfml/tables.toolbar.tgz b/quanta/data/toolbars/cfml/tables.toolbar.tgz new file mode 100644 index 00000000..8f31e707 Binary files /dev/null and b/quanta/data/toolbars/cfml/tables.toolbar.tgz differ diff --git a/quanta/data/toolbars/css/Makefile.am b/quanta/data/toolbars/css/Makefile.am new file mode 100644 index 00000000..808de3e2 --- /dev/null +++ b/quanta/data/toolbars/css/Makefile.am @@ -0,0 +1,2 @@ +quantadir = ${quanta_datadir}/toolbars/css +quanta_DATA = css.toolbar.tgz diff --git a/quanta/data/toolbars/css/css.toolbar.tgz b/quanta/data/toolbars/css/css.toolbar.tgz new file mode 100644 index 00000000..0d2b9b0d Binary files /dev/null and b/quanta/data/toolbars/css/css.toolbar.tgz differ diff --git a/quanta/data/toolbars/debug.toolbar.tgz b/quanta/data/toolbars/debug.toolbar.tgz new file mode 100644 index 00000000..ed854a93 Binary files /dev/null and b/quanta/data/toolbars/debug.toolbar.tgz differ diff --git a/quanta/data/toolbars/docbook/Makefile.am b/quanta/data/toolbars/docbook/Makefile.am new file mode 100644 index 00000000..4ab71fd2 --- /dev/null +++ b/quanta/data/toolbars/docbook/Makefile.am @@ -0,0 +1,5 @@ +quantadir = ${quanta_datadir}/toolbars/docbook +quanta_DATA = xmltools.toolbar.tgz \ +docbook_code.toolbar.tgz \ +docbook_ui.toolbar.tgz \ +docbook_xml.toolbar.tgz diff --git a/quanta/data/toolbars/docbook/docbook_code.toolbar.tgz b/quanta/data/toolbars/docbook/docbook_code.toolbar.tgz new file mode 100644 index 00000000..51555e4f Binary files /dev/null and b/quanta/data/toolbars/docbook/docbook_code.toolbar.tgz differ diff --git a/quanta/data/toolbars/docbook/docbook_ui.toolbar.tgz b/quanta/data/toolbars/docbook/docbook_ui.toolbar.tgz new file mode 100644 index 00000000..17a33fce Binary files /dev/null and b/quanta/data/toolbars/docbook/docbook_ui.toolbar.tgz differ diff --git a/quanta/data/toolbars/docbook/docbook_xml.toolbar.tgz b/quanta/data/toolbars/docbook/docbook_xml.toolbar.tgz new file mode 100644 index 00000000..6a332f62 Binary files /dev/null and b/quanta/data/toolbars/docbook/docbook_xml.toolbar.tgz differ diff --git a/quanta/data/toolbars/docbook/xmltools.toolbar.tgz b/quanta/data/toolbars/docbook/xmltools.toolbar.tgz new file mode 100644 index 00000000..9d029ece Binary files /dev/null and b/quanta/data/toolbars/docbook/xmltools.toolbar.tgz differ diff --git a/quanta/data/toolbars/html/Makefile.am b/quanta/data/toolbars/html/Makefile.am new file mode 100644 index 00000000..be14bd30 --- /dev/null +++ b/quanta/data/toolbars/html/Makefile.am @@ -0,0 +1,2 @@ +htmltemplatedir = ${quanta_datadir}/toolbars/html +htmltemplate_DATA = forms.toolbar.tgz lists.toolbar.tgz other.toolbar.tgz standard.toolbar.tgz tables.toolbar.tgz style.toolbar.tgz diff --git a/quanta/data/toolbars/html/forms.toolbar.tgz b/quanta/data/toolbars/html/forms.toolbar.tgz new file mode 100644 index 00000000..72b05874 Binary files /dev/null and b/quanta/data/toolbars/html/forms.toolbar.tgz differ diff --git a/quanta/data/toolbars/html/lists.toolbar.tgz b/quanta/data/toolbars/html/lists.toolbar.tgz new file mode 100644 index 00000000..4505da3f Binary files /dev/null and b/quanta/data/toolbars/html/lists.toolbar.tgz differ diff --git a/quanta/data/toolbars/html/other.toolbar.tgz b/quanta/data/toolbars/html/other.toolbar.tgz new file mode 100644 index 00000000..50d01e26 Binary files /dev/null and b/quanta/data/toolbars/html/other.toolbar.tgz differ diff --git a/quanta/data/toolbars/html/standard.toolbar.tgz b/quanta/data/toolbars/html/standard.toolbar.tgz new file mode 100644 index 00000000..646f9c49 Binary files /dev/null and b/quanta/data/toolbars/html/standard.toolbar.tgz differ diff --git a/quanta/data/toolbars/html/style.toolbar.tgz b/quanta/data/toolbars/html/style.toolbar.tgz new file mode 100644 index 00000000..a6696d92 Binary files /dev/null and b/quanta/data/toolbars/html/style.toolbar.tgz differ diff --git a/quanta/data/toolbars/html/tables.toolbar.tgz b/quanta/data/toolbars/html/tables.toolbar.tgz new file mode 100644 index 00000000..32ea1763 Binary files /dev/null and b/quanta/data/toolbars/html/tables.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/Makefile.am b/quanta/data/toolbars/kde-docbook/Makefile.am new file mode 100644 index 00000000..fc263072 --- /dev/null +++ b/quanta/data/toolbars/kde-docbook/Makefile.am @@ -0,0 +1,8 @@ +quantadir = ${quanta_datadir}/toolbars/kde-docbook +quanta_DATA = kde-docbook-admonitions.toolbar.tgz \ + kde-docbook-images.toolbar.tgz \ + kde-docbook-list.toolbar.tgz \ + kde-docbook-standard.toolbar.tgz \ + kde-docbook-tables.toolbar.tgz \ + kde-docbook-uielements.toolbar.tgz \ + kdexmltools.toolbar.tgz diff --git a/quanta/data/toolbars/kde-docbook/kde-docbook-admonitions.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kde-docbook-admonitions.toolbar.tgz new file mode 100644 index 00000000..eab93067 Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kde-docbook-admonitions.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/kde-docbook-images.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kde-docbook-images.toolbar.tgz new file mode 100644 index 00000000..cccd2614 Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kde-docbook-images.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/kde-docbook-list.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kde-docbook-list.toolbar.tgz new file mode 100644 index 00000000..55041f46 Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kde-docbook-list.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/kde-docbook-standard.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kde-docbook-standard.toolbar.tgz new file mode 100644 index 00000000..e280053a Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kde-docbook-standard.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/kde-docbook-tables.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kde-docbook-tables.toolbar.tgz new file mode 100644 index 00000000..5501091a Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kde-docbook-tables.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/kde-docbook-uielements.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kde-docbook-uielements.toolbar.tgz new file mode 100644 index 00000000..ec6c407c Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kde-docbook-uielements.toolbar.tgz differ diff --git a/quanta/data/toolbars/kde-docbook/kdexmltools.toolbar.tgz b/quanta/data/toolbars/kde-docbook/kdexmltools.toolbar.tgz new file mode 100644 index 00000000..319a7b3a Binary files /dev/null and b/quanta/data/toolbars/kde-docbook/kdexmltools.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/Makefile.am b/quanta/data/toolbars/schema/Makefile.am new file mode 100644 index 00000000..0a534bab --- /dev/null +++ b/quanta/data/toolbars/schema/Makefile.am @@ -0,0 +1,3 @@ +schemadir = ${quanta_datadir}/toolbars/schema +schema_DATA = attributes.toolbar.tgz complex.toolbar.tgz documentation.toolbar.tgz facets.toolbar.tgz \ + misc.toolbar.tgz simple.toolbar.tgz main.toolbar.tgz diff --git a/quanta/data/toolbars/schema/attributes.toolbar.tgz b/quanta/data/toolbars/schema/attributes.toolbar.tgz new file mode 100644 index 00000000..3bd6acb4 Binary files /dev/null and b/quanta/data/toolbars/schema/attributes.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/complex.toolbar.tgz b/quanta/data/toolbars/schema/complex.toolbar.tgz new file mode 100644 index 00000000..d9a51053 Binary files /dev/null and b/quanta/data/toolbars/schema/complex.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/documentation.toolbar.tgz b/quanta/data/toolbars/schema/documentation.toolbar.tgz new file mode 100644 index 00000000..205cd011 Binary files /dev/null and b/quanta/data/toolbars/schema/documentation.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/facets.toolbar.tgz b/quanta/data/toolbars/schema/facets.toolbar.tgz new file mode 100644 index 00000000..980388fb Binary files /dev/null and b/quanta/data/toolbars/schema/facets.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/main.toolbar.tgz b/quanta/data/toolbars/schema/main.toolbar.tgz new file mode 100644 index 00000000..804941c0 Binary files /dev/null and b/quanta/data/toolbars/schema/main.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/misc.toolbar.tgz b/quanta/data/toolbars/schema/misc.toolbar.tgz new file mode 100644 index 00000000..815f01c1 Binary files /dev/null and b/quanta/data/toolbars/schema/misc.toolbar.tgz differ diff --git a/quanta/data/toolbars/schema/simple.toolbar.tgz b/quanta/data/toolbars/schema/simple.toolbar.tgz new file mode 100644 index 00000000..3a1a3963 Binary files /dev/null and b/quanta/data/toolbars/schema/simple.toolbar.tgz differ diff --git a/quanta/data/toolbars/tagxml/Makefile.am b/quanta/data/toolbars/tagxml/Makefile.am new file mode 100644 index 00000000..b2baec1a --- /dev/null +++ b/quanta/data/toolbars/tagxml/Makefile.am @@ -0,0 +1,2 @@ +tagxmldir = ${quanta_datadir}/toolbars/tagxml +tagxml_DATA = tagxml.toolbar.tgz diff --git a/quanta/data/toolbars/tagxml/tagxml.toolbar.tgz b/quanta/data/toolbars/tagxml/tagxml.toolbar.tgz new file mode 100644 index 00000000..cc41f5ec Binary files /dev/null and b/quanta/data/toolbars/tagxml/tagxml.toolbar.tgz differ diff --git a/quanta/data/toolbars/wml-1-2/Makefile.am b/quanta/data/toolbars/wml-1-2/Makefile.am new file mode 100644 index 00000000..93708ec7 --- /dev/null +++ b/quanta/data/toolbars/wml-1-2/Makefile.am @@ -0,0 +1,2 @@ +wmldir = ${quanta_datadir}/toolbars/wml-1-2 +wml_DATA = deck.toolbar.tgz forms.toolbar.tgz misc.toolbar.tgz table.toolbar.tgz tasks.toolbar.tgz text.toolbar.tgz diff --git a/quanta/data/toolbars/wml-1-2/deck.toolbar.tgz b/quanta/data/toolbars/wml-1-2/deck.toolbar.tgz new file mode 100644 index 00000000..f8a7295b Binary files /dev/null and b/quanta/data/toolbars/wml-1-2/deck.toolbar.tgz differ diff --git a/quanta/data/toolbars/wml-1-2/forms.toolbar.tgz b/quanta/data/toolbars/wml-1-2/forms.toolbar.tgz new file mode 100644 index 00000000..8215aaf8 Binary files /dev/null and b/quanta/data/toolbars/wml-1-2/forms.toolbar.tgz differ diff --git a/quanta/data/toolbars/wml-1-2/misc.toolbar.tgz b/quanta/data/toolbars/wml-1-2/misc.toolbar.tgz new file mode 100644 index 00000000..7d3e918b Binary files /dev/null and b/quanta/data/toolbars/wml-1-2/misc.toolbar.tgz differ diff --git a/quanta/data/toolbars/wml-1-2/table.toolbar.tgz b/quanta/data/toolbars/wml-1-2/table.toolbar.tgz new file mode 100644 index 00000000..db602b3e Binary files /dev/null and b/quanta/data/toolbars/wml-1-2/table.toolbar.tgz differ diff --git a/quanta/data/toolbars/wml-1-2/tasks.toolbar.tgz b/quanta/data/toolbars/wml-1-2/tasks.toolbar.tgz new file mode 100644 index 00000000..3533b936 Binary files /dev/null and b/quanta/data/toolbars/wml-1-2/tasks.toolbar.tgz differ diff --git a/quanta/data/toolbars/wml-1-2/text.toolbar.tgz b/quanta/data/toolbars/wml-1-2/text.toolbar.tgz new file mode 100644 index 00000000..8319d038 Binary files /dev/null and b/quanta/data/toolbars/wml-1-2/text.toolbar.tgz differ diff --git a/quanta/data/toolbars/xml/Makefile.am b/quanta/data/toolbars/xml/Makefile.am new file mode 100644 index 00000000..7e12f324 --- /dev/null +++ b/quanta/data/toolbars/xml/Makefile.am @@ -0,0 +1,2 @@ +toolbarxmldir = ${quanta_datadir}/toolbars/xml +toolbarxml_DATA = fonts.toolbar.tgz diff --git a/quanta/data/toolbars/xml/fonts.toolbar.tgz b/quanta/data/toolbars/xml/fonts.toolbar.tgz new file mode 100644 index 00000000..392af661 Binary files /dev/null and b/quanta/data/toolbars/xml/fonts.toolbar.tgz differ diff --git a/quanta/dialogs/Makefile.am b/quanta/dialogs/Makefile.am new file mode 100644 index 00000000..9a63dd23 --- /dev/null +++ b/quanta/dialogs/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libdialogs.la + +libdialogs_la_SOURCES = copyto.cpp dirtydialog.ui dirtydlg.cpp \ + donationdialog.ui dtdselectdialog.ui fourbuttonmessagebox.ui casewidget.ui \ + actionconfigdialogs.ui actionconfigdialog.cpp filecombo.cpp specialchardialogs.ui \ + specialchardialog.cpp dtepeditdlgs.ui dtepstructureeditdlgs.ui dtepeditdlg.cpp \ + loadentitydlgs.ui + +METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/lib \ + -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/src \ + $(KMDI_INCLUDES) $(all_includes) + +SUBDIRS = settings tagdialogs + diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp new file mode 100644 index 00000000..9a4cfb3d --- /dev/null +++ b/quanta/dialogs/actionconfigdialog.cpp @@ -0,0 +1,933 @@ +/*************************************************************************** + actionconfigdialog.cpp + --------------------- + copyright : (C) 2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +//qt includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//kde includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//app includes +#include "resource.h" +#include "filecombo.h" + +#include "actionconfigdialog.h" +#include "tagaction.h" +#include "toolbartabwidget.h" + +ActionConfigDialog::ActionConfigDialog(const QDict &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const QString& defaultAction ) + :ActionConfigDialogS( parent, name, modal, fl ) +{ + m_mainWindow = parent; + m_toolbarList = toolbarList; + buttonOk->setIconSet(SmallIconSet("button_ok")); + buttonCancel->setIconSet(SmallIconSet("button_cancel")); + buttonApply->setIconSet(SmallIconSet("apply")); + //buttonHelp->setIconSet(SmallIconSet("help")); + + currentAction = 0L; + m_toolbarItem = 0L; + + connect(actionTreeView, SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint &)), + SLOT(slotContextMenu(KListView *,QListViewItem *,const QPoint &))); + connect(actionTreeView, SIGNAL(selectionChanged(QListViewItem *)), + SLOT(slotSelectionChanged(QListViewItem *))); + connect(shortcutKeyButton, SIGNAL(capturedShortcut(const KShortcut &)), + SLOT(slotShortcutCaptured(const KShortcut &))); + connect(scriptPath, SIGNAL(activated(const QString&)), + SLOT(slotTextChanged(const QString&))); + connect(this, SIGNAL(addToolbar()), m_mainWindow, SLOT(slotAddToolbar())); + connect(this, SIGNAL(removeToolbar(const QString&)), m_mainWindow, SLOT(slotRemoveToolbar(const QString&))); + connect(this, SIGNAL(deleteUserAction(KAction*)), m_mainWindow, SLOT(slotDeleteAction(KAction*))); + connect(this, SIGNAL(configureToolbars(const QString&)), m_mainWindow, SLOT(slotConfigureToolbars(const QString&))); +//fill up the tree view with the toolbars and actions + actionTreeView->setSorting(-1); + allActionsItem = new KListViewItem(actionTreeView, i18n("All")); + actionTreeView->insertItem(allActionsItem); + QListViewItem *item, *oldItem = allActionsItem; + KAction *action; + QString toolbarName; + QString toolbarId; + ToolbarTabWidget *tb = ToolbarTabWidget::ref(); + QRegExp r("\\&(?!\\&)"); + KActionCollection *ac = m_mainWindow->actionCollection(); + for (int i = 0; i < tb->count(); i++) + { + toolbarName = tb->label(i); + toolbarName.replace(r, ""); + item = new KListViewItem(actionTreeView, oldItem, i18n(toolbarName.utf8())); + actionTreeView->insertItem(item); + + toolbarId = tb->id(i); + QListViewItem *oldActionItem = 0L; + ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; + if (p_toolbar) + { + QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + while (!node.isNull()) + { + if (node.nodeName() == "Action") + { + action = ac->action(node.toElement().attribute("name")); + if (action) + { + oldActionItem = new KListViewItem(item, oldActionItem, action->text().replace(r,""), action->shortcut().toString(), action->name()); + oldActionItem->setPixmap(0, SmallIcon(action->icon()) ); + } + } + node = node.nextSibling(); + } + if (tb->label(tb->currentPageIndex()).replace(r, "") == toolbarName) + { + item->setOpen(true); + if (item->firstChild()) + { + if (defaultAction.isEmpty()) + { + actionTreeView->setCurrentItem(item->firstChild()); + } else + { + QListViewItem *actionItem = item->firstChild(); + while (actionItem && actionItem->depth() > 0) + { + if (actionItem->text(0) == defaultAction || actionItem->text(0) == defaultAction + "...") + { + actionTreeView->setCurrentItem(actionItem); + break; + } + actionItem = actionItem->nextSibling(); + } + } + } + } + } + oldItem = item; + } + uint acCount = ac->count(); + for (uint i = 0; i < acCount; i++) + { + action = ac->action(i); + item = new KListViewItem(allActionsItem, action->text().replace(r, ""), action->shortcut().toString(), action->name()); + item->setPixmap(0, SmallIcon(action->icon()) ); + } + allActionsItem->sortChildItems(0, true); + + treeMenu = new KPopupMenu(actionTreeView); + treeMenu->insertItem(i18n("&Add New Toolbar"), this, SLOT(slotAddToolbar())); + treeMenu->insertItem(i18n("&Remove Toolbar"), this, SLOT(slotRemoveToolbar())); + treeMenu->insertItem(i18n("&Edit Toolbar"), this, SLOT(slotEditToolbar())); + + globalShortcuts = KGlobal::config()->entryMap( "Global Shortcuts" ); +} + +ActionConfigDialog::~ActionConfigDialog() +{ +} + +void ActionConfigDialog::slotAddToolbar() +{ + emit addToolbar(); + QString toolbarName; + QListViewItem *item; + ToolbarTabWidget *tb = ToolbarTabWidget::ref(); + for (int i = 0; i < tb->count(); i++) + { + toolbarName = tb->label(i); + if (!actionTreeView->findItem(toolbarName, 0)) + { + item = actionTreeView->lastItem(); + if (item->parent()) + item = item->parent(); + new KListViewItem(actionTreeView, item, i18n(toolbarName.utf8())); + break; + } + } +} + +void ActionConfigDialog::slotRemoveToolbar() +{ + QListViewItem *item = actionTreeView->currentItem(); + QString s = item->text(0); + if (item->parent()) + { + item = item->parent(); + s = item->text(0); + } + if (s != i18n("All")) + { + if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),QString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + { + m_toolbarItem = item; + connect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), SLOT(slotToolbarRemoved(const QString&))); + emit removeToolbar(s.lower()); + } + } +} + +void ActionConfigDialog::slotToolbarRemoved(const QString &/*name*/) +{ + actionTreeView->setCurrentItem(allActionsItem); + delete m_toolbarItem; + m_toolbarItem = 0L; + disconnect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), this, SLOT(slotToolbarRemoved(const QString&))); +} + +void ActionConfigDialog::slotEditToolbar() +{ + QString toolbarName; + QString toolbarId; + QListViewItem *oldItem; + QListViewItem *item = actionTreeView->currentItem(); + if (item->parent()) + item = item->parent(); + toolbarName = item->text(0); + if ( toolbarName != i18n("All")) + { + emit configureToolbars(toolbarName +" "); + + //update the tree view + KAction *action; + KActionCollection *ac = m_mainWindow->actionCollection(); + ToolbarTabWidget *tb = ToolbarTabWidget::ref(); + for (int i = 0; i < tb->count(); i++) + { + toolbarName = tb->label(i); + toolbarId = tb->id(i); + ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; + if (p_toolbar) + { + oldItem = actionTreeView->findItem(toolbarName, 0); + item = new KListViewItem(actionTreeView, oldItem, toolbarName); + item->setOpen(oldItem->isOpen()); + delete oldItem; + QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + while (!node.isNull()) + { + if (node.nodeName() == "Action") + { + action = ac->action(node.toElement().attribute("name")); + if (action) + { + oldItem = new KListViewItem(item, oldItem, action->text().replace(QRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); + oldItem->setPixmap(0, SmallIcon(action->icon())); + } + } + node = node.nextSibling(); + } + } + } + actionTreeView->setCurrentItem(allActionsItem); + actionTreeView->setSelected(allActionsItem, true); + } +} + +void ActionConfigDialog::slotContextMenu(KListView *,QListViewItem *,const QPoint &point) +{ + treeMenu->popup(point); +} + +void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) +{ + if (currentAction && currentAction->inherits("TagAction")) + { + if ( buttonApply->isEnabled() && + KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) + { + saveCurrentAction(); + } + buttonApply->setEnabled(false); + currentAction = 0L; + } + if (item && item->depth() > 0) + { + TagAction *action = 0L; + KActionCollection *ac = m_mainWindow->actionCollection(); + uint acCount = ac->count(); +//find the corresponding action + for (uint i = 0; i < acCount; i++) + { + KAction *a = ac->action(i); + QString actionName = a->name(); + if (a && actionName == item->text(2) && a->inherits("TagAction")) + { + action = static_cast(a); + actionProperties->setEnabled(true); + deleteAction->setEnabled(true); + break; + } else + { + actionProperties->setEnabled(false); + deleteAction->setEnabled(false); + } + } + + //if we found the action, load the action details + if (action) + { + currentAction = action; + QDomElement el = action->data(); + if ( el.hasAttribute("icon") ) + { + QString s = el.attribute("icon"); + if (!QFileInfo(s).exists()) + s = QFileInfo(s).fileName(); + actionIcon->setIcon(s); + } + QString actionText = el.attribute("text"); + actionText.replace(QRegExp("\\&(?!\\&)"),""); + lineText->setText(actionText); + lineToolTip->setText( el.attribute("tooltip") ); + selectedShortcut = action->shortcut(); + QString shortcutText = action->shortcut().toString(); + if (shortcutText.isEmpty()) + { + noShortcut->setChecked(true); + shortcutKeyButton->setText(i18n("None")); + } else + { + customShortcut->setChecked(true); + shortcutKeyButton->setShortcut(action->shortcut(), false); + shortcutKeyButton->setText(shortcutText); + } + +//find the container toolbars of this action and add them to the container listbox + toolbarListBox->clear(); + int current = 0; + int count = 0; + ToolbarTabWidget *tb = ToolbarTabWidget::ref(); + for (int i = 0; i < tb->count(); i++) + { + QString toolbarName = tb->label(i); + QString toolbarId = tb->id(i); + ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; + if (p_toolbar) + { + QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + while (!node.isNull()) + { + if (node.nodeName() == "Action" && + node.toElement().attribute("name") == el.attribute("name")) + { + toolbarListBox->insertItem(toolbarName); + if (item->parent()->text(0) == toolbarName) + current = count; + count++; + } + node = node.nextSibling(); + } + } + } + toolbarListBox->setCurrentItem(current); + toolbarListBox->setSelected(current, true); + toolbarListBox->sort(); + +//set the detailed settings pages to their defaults + lineTag->clear(); + lineClosingTag->clear(); + useClosingTag->setChecked(false); + useActionDialog->setChecked(false); + scriptPath->setText(""); + inputBox->setCurrentItem(0); + outputBox->setCurrentItem(5); + errorBox->setCurrentItem(5); + textEdit->clear(); +//set the detailed settings according to the type of the action + QString type = el.attribute("type", "tag"); + if (type == "tag") + { + QDomElement eltag = el.namedItem("tag").toElement(); + lineTag->setText( eltag.text() ); + useActionDialog->setChecked(eltag.attribute("useDialog","false") == "true"); + eltag = el.namedItem("xtag").toElement(); + lineClosingTag->setText( eltag.text() ); + useClosingTag->setChecked( eltag.attribute("use","false") == "true" ); + typeCombo->setCurrentItem(0); + } + else if (type == "script") + { + QDomElement elScript = el.namedItem("script").toElement(); + scriptPath->setText( elScript.text() ); + + QString s; + s = elScript.attribute("input","none"); + if (s == "current") + { + inputBox->setCurrentItem(1); + } else + if (s == "selected") + { + inputBox->setCurrentItem(2); + } else + { + inputBox->setCurrentItem(0); + } + + s = elScript.attribute("output","none"); + if (s == "cursor") + { + outputBox->setCurrentItem(1); + } else + if (s == "selection") + { + outputBox->setCurrentItem(2); + } else + if (s == "replace") + { + outputBox->setCurrentItem(3); + } else + if (s == "new") + { + outputBox->setCurrentItem(4); + } else + if (s == "message") + { + outputBox->setCurrentItem(5); + } else + { + outputBox->setCurrentItem(0); + } + + s = elScript.attribute("error","none"); + if (s == "cursor") + { + errorBox->setCurrentItem(1); + } else + if (s == "selection") + { + errorBox->setCurrentItem(2); + } else + if (s == "replace") + { + errorBox->setCurrentItem(3); + } else + if (s == "new") + { + errorBox->setCurrentItem(4); + } else + if (s == "message") + { + errorBox->setCurrentItem(5); + } else + { + errorBox->setCurrentItem(0); + } + typeCombo->setCurrentItem(1); + } + else if (type == "text") + { + textEdit->setText( el.namedItem("text").toElement().text() ); + typeCombo->setCurrentItem(2); + } + buttonApply->setEnabled(false); + } + } else + { + actionProperties->setEnabled(false); + deleteAction->setEnabled(false); + } +} + +void ActionConfigDialog::saveCurrentAction() +{ + static_cast(currentAction)->setModified(true); + QString s; + QDomElement el = static_cast(currentAction)->data(); + s = actionIcon->icon(); + el.setAttribute("icon", s); + currentAction->setIcon(s); + QString oldText = el.attribute("text"); + s = lineText->text(); + s.replace('&', "&&"); + el.setAttribute("text", s); + currentAction->setText(s); + s = lineToolTip->text(); + el.setAttribute("tooltip", s); + currentAction->setToolTip(s); + s = ""; + if (customShortcut->isChecked()) + { + s = selectedShortcut.toString(); + currentAction->setShortcut(selectedShortcut); + } else + { + currentAction->setShortcut(KShortcut()); + } + el.setAttribute("shortcut", s); + + +//update the tree view + QListViewItem *listItem; + QListViewItemIterator it(actionTreeView); + while (it.current()) + { + listItem = it.current(); + if (listItem->depth() > 0 && listItem->text(2) == currentAction->name()) + { + listItem->setPixmap(0, SmallIcon(actionIcon->icon())); + listItem->setText(0, lineText->text()); + listItem->setText(1, currentAction->shortcut().toString()); + } + ++it; + } + +//remove all the detailed settings + QDomElement item = el.namedItem("tag").toElement(); + if ( !item.isNull() ) + el.removeChild(item); + item = el.namedItem("tag").toElement(); + if ( !item.isNull() ) + el.removeChild(item); + item = el.namedItem("xtag").toElement(); + if ( !item.isNull() ) + el.removeChild(item); + item = el.namedItem("script").toElement(); + if ( !item.isNull() ) + el.removeChild(item); + item = el.namedItem("text").toElement(); + if ( !item.isNull() ) + el.removeChild(item); +//add the new detailed settings + QDomDocument document = QDomDocument(); + int type = typeCombo->currentItem(); + switch (type) + { + case 1:{ + el.setAttribute("type","script"); + item = document.createElement("script"); + switch (inputBox->currentItem()) + { + case 1:{ item.setAttribute("input", "current"); + break; + } + case 2:{ item.setAttribute("input", "selected"); + break; + } + default:{ item.setAttribute("input", "none"); + break; + } + } + switch (outputBox->currentItem()) + { + case 1:{ item.setAttribute("output", "cursor"); + break; + } + case 2:{ item.setAttribute("output", "selection"); + break; + } + case 3:{ item.setAttribute("output", "replace"); + break; + } + case 4:{ item.setAttribute("output", "new"); + break; + } + case 5:{ item.setAttribute("output", "message"); + break; + } + default:{ item.setAttribute("output", "none"); + break; + } + } + switch (errorBox->currentItem()) + { + case 1:{ item.setAttribute("error", "cursor"); + break; + } + case 2:{ item.setAttribute("error", "selection"); + break; + } + case 3:{ item.setAttribute("error", "replace"); + break; + } + case 4:{ item.setAttribute("error", "new"); + break; + } + case 5:{ item.setAttribute("error", "message"); + break; + } + default:{ item.setAttribute("error", "none"); + break; + } + } + + el.appendChild(item); + item.appendChild(document.createTextNode(scriptPath->text())); + break; + } + case 2:{ + el.setAttribute("type","text"); + item = document.createElement("text"); + el.appendChild(item); + item.appendChild(document.createTextNode(textEdit->text())); + break; + } + default:{ + el.setAttribute("type","tag"); + item = document.createElement("tag"); + item.setAttribute("useDialog", useActionDialog->isChecked() ? "true" : "false"); + el.appendChild(item); + item.appendChild(document.createTextNode(lineTag->text())); + item = document.createElement("xtag"); + item.setAttribute("use", useClosingTag->isChecked() ? "true" : "false"); + el.appendChild(item); + item.appendChild(document.createTextNode(lineClosingTag->text())); + break; + } + } + ToolbarTabWidget *tb = ToolbarTabWidget::ref(); + for (int i = 0; i < tb->count(); i++) + { + QString toolbarName = tb->label(i); + QString toolbarId = tb->id(i); + ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; + bool isOnToolbar = false; + if (p_toolbar) + { + QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + bool placeOnToolbar = toolbarListBox->findItem(toolbarName, Qt::ExactMatch); + while (!node.isNull()) + { + if (node.nodeName() == "Action" && + node.toElement().attribute("name") == el.attribute("name")) + { + //if it's present in the toolbar, but not in the container list, + //remove it also from the toolbar + if (!placeOnToolbar) + { + currentAction->unplug(tb->page(i)); + currentAction->unplug(p_toolbar->menu); + node.parentNode().removeChild(node); + QListViewItemIterator iter(actionTreeView); + while (iter.current()) + { + listItem = iter.current(); + if (listItem->depth() > 0 && listItem->parent()->text(0) == toolbarName + && listItem->text(2) == el.attribute("name")) + { + delete listItem; + break; + } + ++iter; + } + } + isOnToolbar = true; + break; + } + node = node.nextSibling(); + } + //it's not on the toolbar, but it should be + if (!isOnToolbar && placeOnToolbar) + { + currentAction->plug(tb->page(i)); + currentAction->plug(p_toolbar->menu); + item = p_toolbar->guiClient->domDocument().createElement("Action"); + item.setAttribute("name",el.attribute("name")); + p_toolbar->guiClient->domDocument().firstChild().firstChild().appendChild(item); + //put it also in the treeview + listItem = actionTreeView->findItem(toolbarName, 0); + if (listItem) + { + QListViewItem *after = listItem->firstChild(); + while ( after && (!after->nextSibling() || (after->nextSibling() && after->nextSibling()->depth()!=0 ) )) + { + if (after->text(2) == currentAction->name()) + { + placeOnToolbar = false; + break; + } + after = after->nextSibling(); + } + if (placeOnToolbar) + { + listItem = new KListViewItem(listItem, after, lineText->text(), currentAction->shortcut().toString(), currentAction->name()); + listItem->setPixmap(0, SmallIcon(actionIcon->icon())); + } + } + } + KXMLGUIFactory::saveConfigFile(p_toolbar->guiClient->domDocument(), + p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance()); + } + QWidget *toolBar = tb->page(i); + if (toolBar->minimumSizeHint().height() > 20) + { + toolBar->adjustSize(); + toolBar->setGeometry(0,0, tb->width(), toolBar->height()); + } else + { + toolBar->setGeometry(0,0, tb->width(), tb->height() - tb->tabHeight()); + } + + } +} + +void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) +{ + QString shortcutText = shortcut.toString(); + QString shortcutText2; + int pos = shortcutText.find(';'); + if (pos != -1) + { + shortcutText2 = shortcutText.mid(pos + 1); + shortcutText = shortcutText.left(pos); + } + QString s = shortcutText; + s.replace('+', "\\+"); + QRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); + s = shortcutText2; + s.replace('+', "\\+"); + QRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); + QString global; +//check for conflicting global shortcuts + QMap::Iterator it; + for ( it = globalShortcuts.begin(); it != globalShortcuts.end(); ++it ) + { + if (it.data().contains(shortcutRx)) + { + global = it.key(); + break; + } + if (!shortcutText2.isEmpty() && it.data().contains(shortcutRx2)) + { + shortcutText = shortcutText2; + global = it.key(); + break; + } + } + + if (global.isEmpty()) + { + QPtrList clients = m_mainWindow->guiFactory()->clients(); + for( QPtrListIterator it( clients ); it.current(); ++it ) + { + KActionCollection *ac = (*it)->actionCollection(); + for (uint i = 0; i < ac->count(); i++) + { + KAction *action = ac->action(i); + if (action != currentAction && action->shortcut().toString().contains(shortcutRx)) + { + global = action->text(); + break; + } + if (!shortcutText2.isEmpty() && action != currentAction && action->shortcut().toString().contains(shortcutRx)) + { + shortcutText = shortcutText2; + global = action->text(); + break; + } + } + if (!global.isEmpty()) + break; + } + } + + if (global.isEmpty()) + { + shortcutKeyButton->setText(shortcutText); + buttonApply->setEnabled(true); + selectedShortcut = shortcut; + } else + { + global.replace('&',""); + QString s = i18n("The '%1' key combination has already been allocated " + "to the \"%2\" action.\n" + "Please choose a unique key combination."). + arg(shortcutText).arg(global); + KMessageBox::sorry( this, s, i18n("Conflicting Shortcuts")); + } +} + +void ActionConfigDialog::accept() +{ + if (buttonApply->isEnabled()) + saveCurrentAction(); + ActionConfigDialogS::accept(); +} + +void ActionConfigDialog::reject() +{ + if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) + saveCurrentAction(); + ActionConfigDialogS::reject(); +} + +void ActionConfigDialog::slotNewAction() +{ + QDomDocument doc; + QDomElement el = doc.createElement("action"); + el.setAttribute( "name", "user_"+KApplication::randomString(10) ); + el.setAttribute( "icon", "ball" ); + + currentAction = new TagAction(&el, m_mainWindow); + + //add the actions to every toolbar xmlguiclient + QDictIterator it(m_toolbarList); + while (it.current()) + { + it.current()->guiClient->actionCollection()->insert(currentAction); + ++it; + } + + selectedShortcut = KShortcut(); + static_cast(currentAction)->setModified(true); + QListViewItem *currentItem = actionTreeView->currentItem(); + QListViewItem *item = new KListViewItem(allActionsItem); + QString actionText = QString("Action_%1").arg(m_mainWindow->actionCollection()->count()); + currentAction->setText(actionText); + item->setText(2, currentAction->name()); + item->setText(0, actionText); + item->setPixmap(0, SmallIcon("ball")); + allActionsItem->sortChildItems(0, true); + if (currentItem->parent() && currentItem->parent() == allActionsItem) + { + actionTreeView->setCurrentItem(item); + } else + { + QListViewItem *parentItem = currentItem->parent(); + if (!parentItem) + parentItem = currentItem; + + item = new KListViewItem(parentItem, currentItem); + item->setText(0, actionText); + item->setText(2, currentAction->name()); + item->setPixmap(0, SmallIcon("ball")); + actionTreeView->setCurrentItem(item); + if (parentItem != allActionsItem) + { + toolbarListBox->insertItem(parentItem->text(0)); + toolbarListBox->setCurrentItem(0); + toolbarListBox->setSelected(0, true); + } + } + actionTreeView->ensureItemVisible(item); + buttonApply->setEnabled(true); +} + +void ActionConfigDialog::slotDeleteAction() +{ + if ( KMessageBox::warningContinueCancel(this, i18n("Removing the action removes all the references to it.\nAre you sure you want to remove the %1 action?").arg(currentAction->text()),QString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + { + QString actionName = currentAction->name(); + emit deleteUserAction(currentAction); + currentAction = 0L; + //update the tree view + QListViewItem *listItem; + QListViewItemIterator it(actionTreeView); + while (it.current()) + { + listItem = it.current(); + if (listItem->depth() > 0 && listItem->text(2) == actionName) + { + ++it; + delete listItem; + } else + { + ++it; + } + } + slotSelectionChanged(actionTreeView->currentItem()); + } +} + +void ActionConfigDialog::slotApply() +{ + saveCurrentAction(); + buttonApply->setEnabled(false); +} + +void ActionConfigDialog::slotAddContainerToolbar() +{ + ToolbarTabWidget *tb = ToolbarTabWidget::ref(); + int i; + + QStringList lst; + for (i = 0; i < tb->count(); i++) + { + if (!toolbarListBox->findItem(tb->label(i), Qt::ExactMatch)) + lst << tb->label(i); + } + + if (lst.count() > 0) + { + bool ok = false; + QString res = KInputDialog::getItem( + i18n( "Add Action to Toolbar" ), + i18n( "Please select a toolbar:" ), lst, 0, false, &ok, this ); + + if (ok) + { + toolbarListBox->insertItem(res); + toolbarListBox->sort(); + buttonApply->setEnabled(true); + } + } +} + +void ActionConfigDialog::slotRemoveContainerToolbar() +{ + int item = toolbarListBox->currentItem(); + toolbarListBox->removeItem(item); + item = (item > 0) ? item - 1 : 0; + toolbarListBox->setCurrentItem(item); + toolbarListBox->setSelected(item, true); + buttonApply->setEnabled(true); +} + +void ActionConfigDialog::slotToggled(bool) +{ + buttonApply->setEnabled(true); +} + +void ActionConfigDialog::slotTextChanged() +{ + buttonApply->setEnabled(true); +} + +void ActionConfigDialog::slotTextChanged(const QString&) +{ + buttonApply->setEnabled(true); +} + +void ActionConfigDialog::createScriptAction(const QString& a_name, const QString& a_script) +{ + actionTreeView->setCurrentItem(allActionsItem); + slotNewAction(); + typeCombo->setCurrentItem(1); + scriptPath->setText(a_script); + lineText->setText(a_name); +} + +#include "actionconfigdialog.moc" diff --git a/quanta/dialogs/actionconfigdialog.h b/quanta/dialogs/actionconfigdialog.h new file mode 100644 index 00000000..f94ba67e --- /dev/null +++ b/quanta/dialogs/actionconfigdialog.h @@ -0,0 +1,92 @@ +/*************************************************************************** + actionconfigdialog.cpp + --------------------- + copyright : (C) 2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef ACTIONCONFIGDIALOG_H +#define ACTIONCONFIGDIALOG_H + +#include +#include "actionconfigdialogs.h" + +class QDomDocument; +class QPopupMenu; + +class KAction; +class KMainWindow; +class KPopupMenu; +class KShortcut; +class KXMLGUIClient; + +typedef struct ToolbarEntry{ + KXMLGUIClient *guiClient; + QDomDocument *dom; + QPopupMenu *menu; + KURL url; + QString name; + QString id; + bool user; + bool visible; + bool nameModified; ///< True if the name of the toolbar was modified by Quanta on loading:" (n)" was added +}; + +class ActionConfigDialog: public ActionConfigDialogS +{ + Q_OBJECT + +public: + + ActionConfigDialog(const QDict &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const QString& defaultAction = QString::null); + ~ActionConfigDialog(); + void createScriptAction(const QString& a_name, const QString& a_script); + +public slots: + virtual void accept(); + virtual void reject(); + void slotToggled(bool); + void slotTextChanged(); + void slotTextChanged(const QString&); + void slotNewAction(); + +private slots: + void slotAddToolbar(); + void slotRemoveToolbar(); + void slotEditToolbar(); + void slotContextMenu(KListView *,QListViewItem *,const QPoint &); + void slotSelectionChanged(QListViewItem *); + void slotShortcutCaptured(const KShortcut&); + void slotDeleteAction(); + void slotApply(); + void slotAddContainerToolbar(); + void slotRemoveContainerToolbar(); + void slotToolbarRemoved(const QString& toolbarName); + +signals: + void addToolbar(); + void removeToolbar(const QString&); + void deleteUserAction(KAction *); + void configureToolbars(const QString&); + +private: + void saveCurrentAction(); + + KPopupMenu *treeMenu; + KAction *currentAction; + QListViewItem *allActionsItem; + QMap globalShortcuts; + KShortcut selectedShortcut; + KMainWindow *m_mainWindow; + QDict m_toolbarList; + QListViewItem *m_toolbarItem; +}; + +#endif diff --git a/quanta/dialogs/actionconfigdialogs.ui b/quanta/dialogs/actionconfigdialogs.ui new file mode 100644 index 00000000..baeb41bd --- /dev/null +++ b/quanta/dialogs/actionconfigdialogs.ui @@ -0,0 +1,1001 @@ + +ActionConfigDialogS +A dialog box where you can configure the actions and the toolbars holding the actions. + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +Andras Mantia <amantia@kde.org> + + + ActionConfigDialogS + + + + 0 + 0 + 751 + 628 + + + + Configure Actions + + + + unnamed + + + + splitter2 + + + Horizontal + + + + layout17 + + + + unnamed + + + + deleteAction + + + false + + + &Delete Action + + + + + addAction + + + &New Action + + + true + + + + + spacer14 + + + Horizontal + + + Expanding + + + + 16 + 20 + + + + + + spacer17 + + + Horizontal + + + Fixed + + + + 16 + 20 + + + + + + textLabel1 + + + + 5 + 0 + 0 + 0 + + + + Toolbar & Action Tree + + + + + + Name + + + false + + + true + + + + + Shortcut + + + false + + + true + + + + actionTreeView + + + Auto + + + true + + + AllColumns + + + 2 + + + + + + + layout9 + + + + unnamed + + + + buttonApply + + + false + + + &Apply + + + + + buttonCancel + + + &Cancel + + + true + + + + + spacer16 + + + Horizontal + + + Fixed + + + + 16 + 20 + + + + + + buttonOk + + + + 90 + 0 + + + + &OK + + + true + + + true + + + + + actionProperties + + + false + + + Action Properties + + + + unnamed + + + + addToolbar + + + &Add... + + + + + removeToolbar + + + &Remove + + + + + spacer7 + + + Horizontal + + + Fixed + + + + 16 + 20 + + + + + + TextLabel2 + + + Tool &tip: + + + lineToolTip + + + + + lineToolTip + + + + + TextLabel1_2 + + + Te&xt: + + + lineText + + + + + actionIcon + + + + 0 + 0 + 0 + 0 + + + + + 32 + 32 + + + + + 32 + 32 + + + + + + + 22 + + + + + lineText + + + + + buttonGroup4_2 + + + Shortcut + + + + unnamed + + + + customShortcut + + + C&ustom + + + + + shortcutKeyButton + + + false + + + None + + + + + noShortcut + + + &None + + + true + + + + + + + toolbarListBox + + + + + textLabel2 + + + Container toolbars: + + + + + + Tag + + + + + Script + + + + + Text + + + + typeCombo + + + + 7 + 0 + 0 + 0 + + + + + + textLabel3 + + + T&ype: + + + typeCombo + + + + + buttonGroup13 + + + Detailed Settings + + + + unnamed + + + + widgetStack1 + + + + page + + + 0 + + + + unnamed + + + + TextLabel5_2_2_2 + + + <tag> : + + + + + lineTag + + + + + lineClosingTag + + + + + useClosingTag + + + </tag> : + + + true + + + + + useActionDialog + + + Run "Edit tag" dialog if available + + + true + + + + + + + page + + + 1 + + + + unnamed + + + + scriptPath + + + + 7 + 0 + 0 + 0 + + + + + 64 + 20 + + + + + + textLabel1_2 + + + + 1 + 5 + 0 + 0 + + + + &Input: + + + inputBox + + + + + + None + + + + + Current Document + + + + + Selected Text + + + + inputBox + + + + 3 + 0 + 0 + 0 + + + + + + textLabel2_2 + + + + 1 + 5 + 0 + 0 + + + + &Output: + + + outputBox + + + + + + None + + + + + Insert in Cursor Position + + + + + Replace Selection + + + + + Replace Current Document + + + + + Create New Document + + + + + Message Window + + + + outputBox + + + + 3 + 0 + 0 + 0 + + + + 5 + + + + + + None + + + + + Insert in cursor position + + + + + Replace selection + + + + + Replace current document + + + + + Create a new document + + + + + Message window + + + + errorBox + + + + 3 + 0 + 0 + 0 + + + + 5 + + + + + textLabel3_2 + + + + 1 + 5 + 0 + 0 + + + + &Error: + + + errorBox + + + + + + + page + + + 2 + + + + unnamed + + + + textEdit + + + + + + + + + + + + spacer15 + + + Horizontal + + + Expanding + + + + 55 + 20 + + + + + + + + + + + FileCombo +
filecombo.h
+ + -1 + -1 + + 0 + + 5 + 5 + 0 + 0 + + image0 + slotFileSelect() + text +
+
+ + + 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000011a494441541895d595318ac3301045bf1617ba860c7b83ade6186149b104f6762952e418aa72838551b324e9d2aa3028852c90a3911c9c75b1bf195bd85f6ffe085b596bb186de56715dd3b87be621220af9bdb556cdbd334b9c4c7333220a69fd71d324d51a1e110589ee990e9ac4b596ff240a49b5f67315512c1994a4c9a920a2100e5fc0c7262e9c8e500dbad6a6e5714ba6e37538d4a95465b8b2717aa9ffac3b66caa3cb37918d4f470000334343c3c3cfd6beefe789d5760f66c6e57a010640771a7ef070cec11833a900b0fbde157997c76da4d5d0b17691c83907f36e26b5a5c2586df738f319eed7c536070ff73312663549a295898198dd42d2a4226366c6ed7a9b662a90b66845e3c7e92e55f3ebf68afedfafe90ee225a4cc1198386d0000000049454e44ae426082 + + + + + typeCombo + activated(int) + widgetStack1 + raiseWidget(int) + + + customShortcut + toggled(bool) + shortcutKeyButton + setEnabled(bool) + + + buttonCancel + clicked() + ActionConfigDialogS + reject() + + + buttonOk + clicked() + ActionConfigDialogS + accept() + + + typeCombo + highlighted(int) + widgetStack1 + raiseWidget(int) + + + useClosingTag + toggled(bool) + lineClosingTag + setEnabled(bool) + + + addAction + clicked() + ActionConfigDialogS + slotNewAction() + + + deleteAction + clicked() + ActionConfigDialogS + slotDeleteAction() + + + addToolbar + clicked() + ActionConfigDialogS + slotAddContainerToolbar() + + + removeToolbar + clicked() + ActionConfigDialogS + slotRemoveContainerToolbar() + + + buttonApply + clicked() + ActionConfigDialogS + slotApply() + + + lineText + textChanged(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + lineTag + textChanged(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + lineClosingTag + textChanged(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + textEdit + textChanged() + ActionConfigDialogS + slotTextChanged() + + + customShortcut + toggled(bool) + ActionConfigDialogS + slotToggled(bool) + + + noShortcut + toggled(bool) + ActionConfigDialogS + slotToggled(bool) + + + useClosingTag + toggled(bool) + ActionConfigDialogS + slotToggled(bool) + + + useActionDialog + toggled(bool) + ActionConfigDialogS + slotToggled(bool) + + + actionIcon + toggled(bool) + ActionConfigDialogS + slotToggled(bool) + + + lineToolTip + textChanged(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + typeCombo + activated(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + inputBox + activated(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + outputBox + activated(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + errorBox + activated(const QString&) + ActionConfigDialogS + slotTextChanged(const QString&) + + + shortcutKeyButton + toggled(bool) + ActionConfigDialogS + slotToggled(bool) + + + customShortcut + clicked() + shortcutKeyButton + animateClick() + + + actionIcon + clicked() + ActionConfigDialogS + slotTextChanged() + + + + actionTreeView + addAction + deleteAction + typeCombo + lineText + actionIcon + lineToolTip + noShortcut + shortcutKeyButton + toolbarListBox + addToolbar + removeToolbar + lineTag + useClosingTag + lineClosingTag + useActionDialog + inputBox + outputBox + errorBox + textEdit + buttonOk + buttonApply + buttonCancel + + + kkeybutton.h + kpushbutton.h + + + buttonOk_clicked() + slotNewAction() + slotDeleteAction() + slotAddContainerToolbar() + slotRemoveContainerToolbar() + slotApply() + lineText_selectionChanged() + typeCombo_activated(const QString&) + slotTextChanged(const QString&) + shortcutKeyButton_toggled(bool) + slotToggled(bool) + slotTextChanged() + + + + klistview.h + kicondialog.h + kkeybutton.h + klistbox.h + filecombo.h + +
diff --git a/quanta/dialogs/casewidget.ui b/quanta/dialogs/casewidget.ui new file mode 100644 index 00000000..f7f064f9 --- /dev/null +++ b/quanta/dialogs/casewidget.ui @@ -0,0 +1,108 @@ + +CaseWidget + + + CaseWidget + + + + 0 + 0 + 500 + 158 + + + + + 500 + 100 + + + + + unnamed + + + + buttonGroup2 + + + Tag Case + + + + unnamed + + + + upperTag + + + Upper case + + + + + lowerTag + + + Lower case + + + + + unchangedTag + + + Unchanged + + + true + + + + + + + buttonGroup3 + + + Attribute Case + + + + unnamed + + + + upperAttr + + + Upper case + + + + + lowerAttr + + + Lower case + + + + + unchangedAttr + + + Unchanged + + + true + + + + + + + + diff --git a/quanta/dialogs/copyto.cpp b/quanta/dialogs/copyto.cpp new file mode 100644 index 00000000..429fa457 --- /dev/null +++ b/quanta/dialogs/copyto.cpp @@ -0,0 +1,127 @@ +/*************************************************************************** + copytodlg.cpp - description + ------------------- + begin : Mon Mar 27 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2001-2002 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +// qt includes + +// kde includes +#include +#include + +//app includes +#include "copyto.h" +#include "qextfileinfo.h" + +CopyTo::CopyTo(const KURL& dirURL) +{ + m_InitialDirUrl = dirURL; +} + +CopyTo::~CopyTo(){ +} + +KURL CopyTo::copy(const KURL& urlToCopy, const KURL& destination) +{ + m_destList.clear(); + KURL targetDirURL = KURL(); + if ( destination.isEmpty() ) + { + targetDirURL = m_InitialDirUrl; + } else + { + targetDirURL = destination; + } + targetDirURL.adjustPath(1); + + bool doCopy = true; + if (!QExtFileInfo::exists(targetDirURL, false, 0L)) + { + doCopy = QExtFileInfo::createDir(targetDirURL, 0L); + } + + KURL destURL; + if (doCopy) + { + KIO::UDSEntry entry; + KIO::NetAccess::stat(urlToCopy, entry, 0); + KFileItem item(entry, urlToCopy, false, true); + destURL = targetDirURL; + destURL.setPath(destURL.path(1) + urlToCopy.fileName(false)); + if (item.isDir()) + destURL.adjustPath(1); + + KIO::CopyJob *job = KIO::copy(urlToCopy, destURL, true); + connect( job, SIGNAL(result( KIO::Job *)), + SLOT (slotResult( KIO::Job *))); + + QString path = destURL.path(); + if (path != "." && path != "..") + m_destList.append(destURL); + } + + return destURL; +} + +void CopyTo::slotResult( KIO::Job *) +{ + emit addFilesToProject(m_destList); + emit deleteDialog(this); +} + +KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination ) +{ + m_listCopy = true; + m_destList.clear(); + KURL targetDirURL = KURL(); + if ( destination.isEmpty() ) + { + targetDirURL = m_InitialDirUrl; + } else + { + targetDirURL = destination; + } + bool doCopy = true; + if (!QExtFileInfo::exists(targetDirURL, false, 0L)) + { + doCopy = QExtFileInfo::createDir(targetDirURL, 0L); + } + + KIO::UDSEntry entry; + if (doCopy) + { + QString path; + for (uint i = 0; i < sourceList.count(); i++) + { + KURL srcURL = sourceList[i]; + KIO::NetAccess::stat(srcURL, entry, 0); + KFileItem item(entry, srcURL, false, true); + KURL u = targetDirURL; + u.setPath(targetDirURL.path(1) + srcURL.fileName()); + if (item.isDir()) + u.adjustPath(1); + path = u.path(); + if (path != "." && path != "..") + m_destList.append(u); + } + + KIO::CopyJob *job = KIO::copy(sourceList, targetDirURL, true); + connect( job, SIGNAL(result( KIO::Job *)), + SLOT (slotResult( KIO::Job *))); + } + + return m_destList; + +} +#include "copyto.moc" diff --git a/quanta/dialogs/copyto.h b/quanta/dialogs/copyto.h new file mode 100644 index 00000000..452919aa --- /dev/null +++ b/quanta/dialogs/copyto.h @@ -0,0 +1,53 @@ +/*************************************************************************** + copytodlg.h - description + ------------------- + begin : Mon Mar 27 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2001-2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef COPYTO_H +#define COPYTO_H + +// kde includes +#include + + +/** + *@author Yacovlev Alexander & Dmitry Poplavsky + */ + +class KURL; + +class CopyTo : public QObject{ +Q_OBJECT +public: + CopyTo(const KURL& dirURL); + ~CopyTo(); + + KURL copy( const KURL& sourceURL, const KURL &destination); + KURL::List copy(const KURL::List& sourceList, const KURL &destination ); + +public slots: // Public slots + void slotResult( KIO::Job *); + +signals: + void addFilesToProject(const KURL::List&); + void deleteDialog(CopyTo*); + +private: + KURL m_InitialDirUrl; + bool m_listCopy; + KURL::List m_destList; +}; + +#endif diff --git a/quanta/dialogs/debuggeroptionss.ui b/quanta/dialogs/debuggeroptionss.ui new file mode 100644 index 00000000..8e1910f4 --- /dev/null +++ b/quanta/dialogs/debuggeroptionss.ui @@ -0,0 +1,141 @@ + +DebuggerOptionsS + + + DebuggerOptionsS + + + + 0 + 0 + 350 + 220 + + + + + 3 + 3 + 0 + 0 + + + + + 350 + 220 + + + + + unnamed + + + 11 + + + 6 + + + + checkDebugger + + + Enable debugger + + + true + + + + + ButtonGroup1 + + + + 7 + 5 + 0 + 0 + + + + + + + + unnamed + + + 11 + + + 6 + + + + radioPhp3 + + + PHP3 listener + + + + + radioPhp4 + + + PHP4 debugger + + + true + + + + + Spacer6 + + + Horizontal + + + Expanding + + + + 20 + 20 + + + + + + + + Spacer2 + + + Vertical + + + Expanding + + + + 20 + 20 + + + + + + + + checkDebugger + toggled(bool) + ButtonGroup1 + setEnabled(bool) + + + + diff --git a/quanta/dialogs/dirtydialog.ui b/quanta/dialogs/dirtydialog.ui new file mode 100644 index 00000000..3d46130e --- /dev/null +++ b/quanta/dialogs/dirtydialog.ui @@ -0,0 +1,154 @@ + +DirtyDialog +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2002 Andras Mantia <amantia@kde.org> + + + DirtyDialog + + + + 0 + 0 + 609 + 288 + + + + + 5 + 5 + 0 + 0 + + + + + 400 + 220 + + + + File Changed + + + + unnamed + + + + textLabel + + + + 5 + 1 + 0 + 0 + + + + The file was changed outside of the Quanta editor. + + + + + ButtonGroup2 + + + How Do You Want to Proceed? + + + + unnamed + + + 11 + + + 6 + + + + buttonIgnore + + + &Do not load the modified version from disk + + + + + buttonLoad + + + &Use the version from disk (will lose the current content) + + + + + warningLabel + + + + 3 + 5 + 0 + 0 + + + + (If you later save the document, you will lose what was on the disk.) + + + WordBreak|AlignVCenter + + + + + Spacer2 + + + Horizontal + + + Fixed + + + + 20 + 20 + + + + + + buttonCompare + + + &Compare the two versions and load the result + + + true + + + Use Kompare if available. Otherwise this checkbox is disabled. + + + + + + + + buttonCompare + buttonIgnore + buttonLoad + + + diff --git a/quanta/dialogs/dirtydlg.cpp b/quanta/dialogs/dirtydlg.cpp new file mode 100644 index 00000000..ad9e408b --- /dev/null +++ b/quanta/dialogs/dirtydlg.cpp @@ -0,0 +1,112 @@ +/*************************************************************************** + dirtydlg.cpp - description + ------------------- + begin : Fri Sep 13 2002 + copyright : (C) 2002, 2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +//qt includes +#include +#include +#include +#include + +//kde includes +#include +#include +#include +#include +#include +#include +#include + +//app includes +#include "dirtydialog.h" +#include "dirtydlg.h" +#include "resource.h" +#include "qextfileinfo.h" + +DirtyDlg::DirtyDlg(const QString& srcName, const QString& destName, bool createBackup, QWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n("File Changed"), KDialogBase::Ok) +{ + m_src.setPath(srcName); + m_dest.setPath(destName); + m_busy = false; + m_createBackup = createBackup; + m_mainWidget = new DirtyDialog(this); + m_mainWidget->textLabel->setText(i18n("The file %1 was changed outside of the Quanta editor.").arg(srcName)); + setMainWidget(m_mainWidget); +} + +DirtyDlg::~DirtyDlg(){ +} +/** No descriptions */ +void DirtyDlg::slotOk() +{ + if (m_mainWidget->buttonCompare->isChecked()) + { + m_busy = true; + KProcess *proc = new KProcess(); + *proc << "kompare" << m_src.path() << m_dest.path(); + proc->start(); + connect(proc, SIGNAL(processExited(KProcess*)),SLOT(slotCompareDone(KProcess*))); + enableButton(KDialogBase::Ok, false); + enableButton(KDialogBase::Cancel, false); + } else + if (m_mainWidget->buttonLoad->isChecked()) + { + accept(); + } else + { + reject(); + } +} + +/** No descriptions */ +void DirtyDlg::slotCompareDone(KProcess* proc) +{ + delete proc; + + if (m_createBackup) + { + KURL backupURL = m_src; + backupURL.setPath(backupURL.path()+".backup"); + QExtFileInfo::copy(m_src, backupURL, -1, true, false, this); + } + + KIO::UDSEntry entry; + KIO::NetAccess::stat(m_src, entry, this); + KFileItem item(entry, m_src, false, true); + m_permissions = item.permissions(); + //TODO: Replace with KIO::NetAccess::file_move, when KDE 3.1 support + //is dropped + KIO::FileCopyJob *job = KIO::file_move(m_dest, m_src, m_permissions, true, false,false ); + connect( job, SIGNAL(result( KIO::Job *)), + SLOT (slotResult( KIO::Job *))); +} + + +/** No descriptions */ +void DirtyDlg::slotResult(KIO::Job *) +{ + m_busy = false; + accept(); +} + +/** No descriptions */ +void DirtyDlg::closeEvent(QCloseEvent* ev) +{ + if (m_busy) + ev->ignore(); + else + ev->accept(); +} + +#include "dirtydlg.moc" diff --git a/quanta/dialogs/dirtydlg.h b/quanta/dialogs/dirtydlg.h new file mode 100644 index 00000000..83d05339 --- /dev/null +++ b/quanta/dialogs/dirtydlg.h @@ -0,0 +1,55 @@ +/*************************************************************************** + dirtydlg.h - description + ------------------- + begin : Fri Sep 13 2002 + copyright : (C) 2002, 2003 by Andras Mantia + email : amantia@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef DIRTYDLG_H +#define DIRTYDLG_H + +// kde includes +#include + +class DirtyDialog; +class KDialogBase; + +class KProcess; +class QCloseEvent; + +class DirtyDlg : public KDialogBase { + Q_OBJECT + +public: + DirtyDlg(const QString& srcName, const QString& destName, bool createBackup = false, QWidget *parent=0, const char *name=0); + ~DirtyDlg(); + +protected slots: // Protected slots + /** No descriptions */ + void slotOk(); + /** No descriptions */ + void slotCompareDone(KProcess*); + /** No descriptions */ + void slotResult(KIO::Job *); + /** No descriptions */ + virtual void closeEvent(QCloseEvent* ev); + +protected: // Protected attributes + KURL m_src; + KURL m_dest; + bool m_busy; + bool m_createBackup; + int m_permissions; + DirtyDialog* m_mainWidget; +}; + +#endif diff --git a/quanta/dialogs/donationdialog.ui b/quanta/dialogs/donationdialog.ui new file mode 100644 index 00000000..e5aab152 --- /dev/null +++ b/quanta/dialogs/donationdialog.ui @@ -0,0 +1,155 @@ + +DonationDialog +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2002, 2003 Andras Mantia <amantia@kde.org>, (C) 2002, 2003, 2004 Eric Laffoon <sequitur@kde.org> + + + DonationDialog + + + + 0 + 0 + 497 + 407 + + + + + 5 + 1 + 0 + 0 + + + + Support Quanta with Financial Donation + + + + unnamed + + + + closeButton + + + &Close + + + + + KTextBrowser5 + + + + 7 + 3 + 0 + 0 + + + + Raised + + + RichText + + + <div align="center"><h2>Your Contribution Can Make a Difference</h2></div>&nbsp;&nbsp;&nbsp;Quanta Plus would not be what it is today without sponsored developers. Andras Mantia has been full time since mid 2002 and Michal Rudolf came on part time in spring of 2004. Over the life of the project development has been largely sponsored by the efforts of the Project Manager, Eric Laffoon. In addition to his minimum 10-20 hour a week time commitment, his company, <a href="http://kittyhooch.com" target="_blank">Kitty Hooch</a> LLP has an ongoing financial commitment to keep Quanta in continuous development. Our sponsored developers are also a catalyst to our volunteer developers. +<br>&nbsp;&nbsp;&nbsp;&nbsp;Kitty Hooch is a small company with no employees, 2 active partners and several contract workers. After test marketing in the fall of 2001 they began wholesale and retail to national and international markets in early 2002. Kitty Hooch controls all aspects of their product production and marketing. Quanta sponsorship is no small expense for a small start up company. In 2003 cash flow and a bout with typhoid fever left Eric in debt and unable to keep up payments to Andras without help from the community. Thankfully a number of people stepped up. We now have several large sponsors along with a number of generous contributors. This has enabled us to bring Michal on part time. Now we are looking to be able to move him to full time. The challenge for this project to assume a leading role as a "killer desktop application" is great. +<div align="center"><h3>Balancing open source ideals and fiscal +reality</h3></div> +&nbsp;&nbsp;&nbsp;&nbsp;We believe that the open source model +is the future of software, but it is no guarantee of success. How many open source projects that we had high hopes for are unmaintained today? In early 2002 many people thought that Quanta Plus was dead. One person, Eric Laffoon, was not about to let the dream die. Quanta is more than surviving now, but developing a best-in-class tool is no easy task. We believe the key is consistent momentum. Nothing ensures this better than programmers who can work without financial or time distractions. Why do you think OSS projects die?<br>&nbsp;&nbsp;&nbsp;&nbsp;As Quanta grows the project management demands are increasing and ironically impacting the revenue stream it requires to continue. The impact of our sponsored developers has been huge! We are looking to make Quanta grow even faster. Eric needs to be able to free even more time to bring several new and exciting ideas through coding to release. We have other expenses too, with conferences and keeping our systems up to date so we don't lose time fighting old hardware. <i>We want to make Quanta the best web tool anywhere!</i>. This will require a nucleus of active core developers. We hope professional developers and companies using Quanta will help us to reach our goals with sponsorship donations that will relieve financial stresses. +<div align="center"><h3>Could Quanta die without your support?</h3></div>&nbsp;&nbsp;&nbsp;&nbsp;We'd like to think not! But from February 2001 to June 2002 there was very little activity and many months with no work done at all. This came about because of cash flow problems which led to the original developers leaving to do a commercial project. The fact remains that our most productive volunteer developers, as much as we think they're wonderful, go long periods where they just can't make time to code on the project. We estimate our active users number well over a million, yet we have only a few dozen people a year supporting the project. In fact 3-4 people account for over half of our current support. Clearly the actions of a few people make a huge difference, and yours can make a difference too. +<br><div align="center"><h3>Will you help make a difference?</h3></div> +&nbsp;&nbsp;&nbsp;&nbsp;If you wish to donate through PayPal +(online money transfer or credit card), visit our <a href="http://kdewebdev.org/donate.php">donation page</a>. +<br>&nbsp;&nbsp;&nbsp;&nbsp;If you are outside the PayPal area or wish to discuss corporate sponsorship contact the project manager:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Eric Laffoon, <a href="mailto:sequitur@kde.org?subject=Quanta%20sponsorship%20inquiry">sequitur@kde.org</a> + + + + + spacer1 + + + Horizontal + + + Expanding + + + + 365 + 20 + + + + + + KTextBrowser2 + + + true + + + + 7 + 3 + 0 + 0 + + + + + 0 + 30 + + + + + 32767 + 40 + + + + WindowOrigin + + + WheelFocus + + + StyledPanel + + + Raised + + + <a href="http://kdewebdev.org/donate.php">Donate</a> through PayPal now. + + + + + + KTextBrowser5 + KTextBrowser2 + closeButton + + + init() + + + + kpushbutton.h + ktextbrowser.h + ktextbrowser.h + + diff --git a/quanta/dialogs/dtdselectdialog.ui b/quanta/dialogs/dtdselectdialog.ui new file mode 100644 index 00000000..525a0429 --- /dev/null +++ b/quanta/dialogs/dtdselectdialog.ui @@ -0,0 +1,112 @@ + +DTDSelectDialog +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2002, 2003 Andras Mantia <amantia@kde.org> + + + DTDSelectDialog + + + + 0 + 0 + 440 + 161 + + + + + 440 + 160 + + + + DTD Selector + + + + unnamed + + + + messageLabel + + + Dialog message: +Dialog message2: + + + true + + + WordBreak|AlignVCenter + + + + + dtdCombo + + + + + textLabel + + + Current DTD: + + + + + comboLabel + + + Select DTD: + + + + + currentDTD + + + true + + + + + convertDTD + + + Conver&t the document to the selected DTD + + + + + useClosestMatching + + + Do not show this dialog, use the closest matching DTD + + + + + + dtdCombo + currentDTD + convertDTD + useClosestMatching + + + dtdselectdialog.ui.h + + + init() + + + diff --git a/quanta/dialogs/dtepeditdlg.cpp b/quanta/dialogs/dtepeditdlg.cpp new file mode 100644 index 00000000..c0bf4797 --- /dev/null +++ b/quanta/dialogs/dtepeditdlg.cpp @@ -0,0 +1,556 @@ +/*************************************************************************** + dtepeditdlg.cpp - description + ------------------- + begin : Tue Feb 1 11:07:24 2005 + copyright : (C) 2005 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include + + +//kde includes +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//own includes +#include "dtepeditdlg.h" +#include "dtepstructureeditdlgs.h" +#include "dtds.h" +#include "resource.h" +#include "quantacommon.h" + +DTEPEditDlg::DTEPEditDlg(const QString& descriptionFile, QWidget *parent, const char *name) + : DTEPEditDlgS(parent, name) +{ + nameEdit->setFocus(); + m_descriptionFile = descriptionFile; + + m_config = new KConfig(m_descriptionFile, false, false); + init(); + +} + + +DTEPEditDlg::~DTEPEditDlg() +{ + delete m_config; +} + +void DTEPEditDlg::slotFamilyChanged(int family) +{ + if (family == 0 && m_family != 0) + tabWidget->insertTab(m_pagesWidget, i18n("&Pages"), 1); + else + if (family == 1) + tabWidget->removePage(m_pagesWidget); + m_family = family; +} + +void DTEPEditDlg::init() +{ + m_pagesWidget = tabWidget->page(1); + readGeneral(); + if (m_family == 0) + readPages(); + else + tabWidget->removePage(m_pagesWidget); + readParserRules(); + readStructures(); +} + +void DTEPEditDlg::readGeneral() +{ + m_config->setGroup("General"); + nameEdit->setText(m_config->readEntry("Name")); + nickNameEdit->setText(m_config->readEntry("NickName")); + m_family = m_config->readNumEntry("Family", 1) - 1; + extensionEdit->setText(m_config->readEntry("DefaultExtension")); + mimeTypeEdit->setText(m_config->readEntry("MimeTypes")); + typeCombo->setCurrentItem(m_family); + rulesWidgetStack->raiseWidget(m_family); + generalWidgetStack->raiseWidget(m_family); + caseSensitive->setChecked(m_config->readBoolEntry("CaseSensitive", false)); + QString inherits = m_config->readEntry("Inherits"); + QStringList lst(DTDs::ref()->nameList()); + inheritsCombo->insertStringList(lst); + int idx = lst.findIndex(inherits); + if (idx == -1) + inheritsCombo->insertItem(inherits, 0); + else + inheritsCombo->setCurrentItem(idx); + + urlEdit->setText(m_config->readEntry("URL")); + doctypeEdit->setText(m_config->readEntry("DoctypeString")); + topLevel->setChecked(m_config->readBoolEntry("TopLevel", false)); + + m_config->setGroup("Toolbars"); + toolbarFolderEdit->setText(QuantaCommon::readPathEntry(m_config, "Location")); + toolbarsEdit->setText(m_config->readEntry("Names")); + +} + +void DTEPEditDlg::readPages() +{ + int i = 1; + while (m_config->hasGroup(QString("Page%1").arg(i)) && i < 6) + { + m_config->setGroup(QString("Page%1").arg(i)); + QString title = m_config->readEntry("Title"); + QString groups = m_config->readEntry("Groups"); + if (i == 1) + { + enablePage1->setChecked(true); + pageTitleEdit1->setText(title); + groupsEdit1->setText(groups); + } else + if (i == 2) + { + enablePage2->setChecked(true); + pageTitleEdit2->setText(title); + groupsEdit2->setText(groups); + } else + if (i == 3) + { + enablePage3->setChecked(true); + pageTitleEdit3->setText(title); + groupsEdit3->setText(groups); + } else + if (i == 4) + { + enablePage4->setChecked(true); + pageTitleEdit4->setText(title); + groupsEdit4->setText(groups); + } else + if (i == 5) + { + enablePage5->setChecked(true); + pageTitleEdit5->setText(title); + groupsEdit5->setText(groups); + } + i++; + } +} + +void DTEPEditDlg::readParserRules() +{ + m_config->setGroup("Extra rules"); + enableMinusInWords->setChecked(m_config->readBoolEntry("MinusAllowedInWord", false)); + attributeSeparatorEdit->setText(m_config->readEntry("AttributeSeparator")); + tagSeparatorEdit->setText(m_config->readEntry("TagSeparator")); + tagAfterEdit->setText(m_config->readEntry("TagAutoCompleteAfter")); + + if (m_family == 0) + { + extendedBooleans->setChecked(m_config->readEntry("BooleanAttributes", "extended") == "extended"); + trueEdit->setText(m_config->readEntry("BooleanTrue","true")); + falseEdit->setText(m_config->readEntry("BooleanFalse","false")); + xmlStyleTags->setChecked(m_config->readEntry("Single Tag Style", "xml").lower() == "xml"); + } else + { + attributesAfterEdit->setText(m_config->readEntry("AttributeAutoCompleteAfter")); + membersAfterEdit->setText(m_config->readEntry("MemberAutoCompleteAfter")); + } + + m_config->setGroup("Parsing rules"); + commentsEdit->setText(m_config->readEntry("Comments")); + mayContainEdit->setText(m_config->readEntry("MayContain")); + + if (m_family == 0) + { + specialAreasEdit->setText(m_config->readEntry("SpecialAreas")); + specialAreaNamesEdit->setText(m_config->readEntry("SpecialAreaNames")); + specialTagsEdit->setText(m_config->readEntry("SpecialTags")); + useCommonRules->setChecked(m_config->readBoolEntry("AppendCommonSpecialAreas", true)); + } else + { + areaBordersEdit->setText(m_config->readEntry("AreaBorders")); + definitionTagsEdit->setText(m_config->readEntry("Tags")); + structKeywordsEdit->setText(m_config->readEntry("StructKeywords")); + localStructKeywordsEdit->setText(m_config->readEntry("LocalScopeKeywords")); + structBeginEdit->setText(m_config->readEntry("StructBeginStr")); + structEndEdit->setText(m_config->readEntry("StructEndStr")); + structRxEdit->setText(m_config->readEntry("StructRx")); + } + +} + +void DTEPEditDlg::saveResult() +{ + QString targetFile = m_descriptionFile; + QFileInfo f(targetFile); + if (!f.isWritable()) + { + if (f.exists()) + { + if (KMessageBox::questionYesNo(this, i18n("The file %1 is not writable.
Do you want to save the configuration to a different file?
").arg(f.filePath()),i18n("Save As"),i18n("Save to Different File"), i18n("Do Not Save")) == KMessageBox::Yes) + { + targetFile = KFileDialog::getSaveFileName(locateLocal("data", resourceDir + "dtep/description.rc"), i18n("*.rc|DTEP Description"), this, i18n("Save Description As")); + } else + targetFile = ""; + } + } + if (!targetFile.isEmpty()) + { + QFile f(targetFile); + if (f.exists()) + f.remove(); + KConfig* newConfig = m_config->copyTo(targetFile); + newConfig->sync(); + writeGeneral(newConfig); + writePages(newConfig); + writeParserRules(newConfig); + writeStructures(newConfig); + newConfig->sync(); + delete newConfig; + } +} + +void DTEPEditDlg::writeGeneral(KConfig *config) +{ + config->setGroup("General"); + writeEntry(config, "Name", nameEdit->text()); + writeEntry(config, "NickName", nickNameEdit->text()); + config->writeEntry("Family", typeCombo->currentItem() + 1); + config->writeEntry("CaseSensitive", caseSensitive->isChecked()); + writeEntry(config, "Inherits", inheritsCombo->currentText()); + writeEntry(config, "URL", urlEdit->text()); + writeEntry(config, "DoctypeString", doctypeEdit->text()); + writeEntry(config, "DefaultExtension", extensionEdit->text()); + writeEntry(config, "MimeTypes", mimeTypeEdit->text()); + if (m_family == 1) + config->writeEntry("TopLevel", topLevel->isChecked()); + + config->setGroup("Toolbars"); + writeEntry(config, "Location", toolbarFolderEdit->text()); + writeEntry(config, "Names", toolbarsEdit->text()); +} + +void DTEPEditDlg::writePages(KConfig *config) +{ + config->deleteGroup("Pages"); + if (m_family == 0) + { + int num = 0; + if (enablePage1->isChecked()) + { + num++; + config->setGroup(QString("Page%1").arg(num)); + writeEntry(config, "Title", pageTitleEdit1->text()); + writeEntry(config, "Groups", groupsEdit1->text()); + } + if (enablePage2->isChecked()) + { + num++; + config->setGroup(QString("Page%1").arg(num)); + writeEntry(config, "Title", pageTitleEdit2->text()); + writeEntry(config, "Groups", groupsEdit2->text()); + } + if (enablePage3->isChecked()) + { + num++; + config->setGroup(QString("Page%1").arg(num)); + writeEntry(config, "Title", pageTitleEdit3->text()); + writeEntry(config, "Groups", groupsEdit3->text()); + } + if (enablePage4->isChecked()) + { + num++; + config->setGroup(QString("Page%1").arg(num)); + writeEntry(config, "Title", pageTitleEdit4->text()); + writeEntry(config, "Groups", groupsEdit4->text()); + } + if (enablePage5->isChecked()) + { + num++; + config->setGroup(QString("Page%1").arg(num)); + writeEntry(config, "Title", pageTitleEdit5->text()); + writeEntry(config, "Groups", groupsEdit5->text()); + } + config->setGroup("General"); + config->writeEntry("NumOfPages", num); + } +} + +void DTEPEditDlg::writeParserRules(KConfig *config) +{ + config->setGroup("Extra rules"); + config->writeEntry("MinusAllowedInWord", enableMinusInWords->isChecked()); + writeEntry(config, "AttributeSeparator", attributeSeparatorEdit->text()); + writeEntry(config, "TagSeparator", tagSeparatorEdit->text()); + writeEntry(config, "TagAutoCompleteAfter", tagAfterEdit->text()); + + if (m_family == 0) + { + writeEntry(config, "BooleanAttributes", extendedBooleans->isChecked() ? "extended" : "simple"); + writeEntry(config, "BooleanTrue", trueEdit->text()); + writeEntry(config, "BooleanFalse", falseEdit->text()); + writeEntry(config, "Single Tag Style", xmlStyleTags->isChecked() ? "xml" : "html"); + } else + { + writeEntry(config, "AttributeAutoCompleteAfter", attributesAfterEdit->text()); + writeEntry(config, "MemberAutoCompleteAfter", membersAfterEdit->text()); + } + + config->setGroup("Parsing rules"); + writeEntry(config, "Comments", commentsEdit->text()); + writeEntry(config, "MayContain", mayContainEdit->text()); + + if (m_family == 0) + { + writeEntry(config, "SpecialAreas", specialAreasEdit->text()); + writeEntry(config, "SpecialAreaNames", specialAreaNamesEdit->text()); + writeEntry(config, "SpecialTags", specialTagsEdit->text()); + config->writeEntry("AppendCommonSpecialAreas", useCommonRules->isChecked()); + } else + { + writeEntry(config, "AreaBorders", areaBordersEdit->text()); + writeEntry(config, "Tags", definitionTagsEdit->text()); + writeEntry(config, "StructKeywords", structKeywordsEdit->text()); + writeEntry(config, "LocalScopeKeywords", localStructKeywordsEdit->text()); + writeEntry(config, "StructBeginStr", structBeginEdit->text()); + writeEntry(config, "StructEndStr", structEndEdit->text()); + writeEntry(config, "StructRx", structRxEdit->text()); + } +} + +void DTEPEditDlg::readStructures() +{ + m_config->setGroup("Extra rules"); + int variableGroupId = m_config->readNumEntry("VariableGroupIndex", -1); + int functionGroupId = m_config->readNumEntry("FunctionGroupIndex", -1); + int classGroupId = m_config->readNumEntry("ClassGroupIndex", -1); + int objectGroupId = m_config->readNumEntry("ObjectGroupIndex", -1); + + int i = 1; + while (m_config->hasGroup(QString("StructGroup_%1").arg(i))) + { + StructGroup group; + m_config->setGroup(QString("StructGroup_%1").arg(i)); + group.name = m_config->readEntry("Name"); + group.noName = m_config->readEntry("No_Name"); + group.icon = m_config->readEntry("Icon"); + group.tag = m_config->readEntry("Tag"); + group.hasFileName = m_config->readBoolEntry("HasFileName", false); + group.fileNameRx = m_config->readEntry("FileNameRx"); + group.appendToTags = m_config->readBoolEntry("AppendToTags", false); + group.parentGroup = m_config->readEntry("ParentGroup"); + group.definitionRx = m_config->readEntry("DefinitionRx"); + group.definitionRxMinimal = m_config->readBoolEntry("DefinitionRx_Minimal", false); + group.usageRx = m_config->readEntry("UsageRx"); + group.typeRx = m_config->readEntry("TypeRx"); + group.tagType = m_config->readEntry("TagType"); + group.parseFile = m_config->readBoolEntry("ParseFile", false); + group.completeAfterRx = m_config->readEntry("AutoCompleteAfter"); + group.removeRx = m_config->readEntry("RemoveFromAutoCompleteWord"); + group.variableGroup = (variableGroupId == i); + group.functionGroup = (functionGroupId == i); + group.classGroup = (classGroupId == i); + group.objectGroup = (objectGroupId == i); + group.simpleGroup = (!group.variableGroup && !group.functionGroup && !group.classGroup && !group.objectGroup); + + m_structGroups.append(group); + i++; + } + for (QValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + { + structuresList->insertItem((*it).name); + } +} + +void DTEPEditDlg::writeStructures(KConfig *config) +{ + config->setGroup("Extra rules"); + config->writeEntry("StructGroupsCount", m_structGroups.count()); + + int i = 1; + for (QValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + { + StructGroup group = *it; + config->setGroup(QString("StructGroup_%1").arg(i)); + writeEntry(config, "Name", group.name); + writeEntry(config, "No_Name", group.noName); + writeEntry(config, "Icon", group.icon); + writeEntry(config, "Tag", group.tag); + config->writeEntry("HasFileName", group.hasFileName); + writeEntry(config, "FileNameRx", group.fileNameRx); + config->writeEntry("AppendToTags", group.appendToTags); + if (m_family == 1) + { + writeEntry(config, "ParentGroup", group.parentGroup); + writeEntry(config, "DefinitionRx", group.definitionRx); + config->writeEntry("DefinitionRx_Minimal", group.definitionRxMinimal); + writeEntry(config, "UsageRx", group.usageRx); + writeEntry(config, "TypeRx", group.typeRx); + writeEntry(config, "TagType", group.tagType); + config->writeEntry("ParseFile", group.parseFile); + writeEntry(config, "AutoCompleteAfter", group.completeAfterRx); + writeEntry(config, "RemoveFromAutoCompleteWord", group.removeRx); + if (group.variableGroup) + { + config->setGroup("Extra rules"); + config->writeEntry("VariableGroupIndex", i); + } else + if (group.functionGroup) + { + config->setGroup("Extra rules"); + config->writeEntry("FunctionGroupIndex", i); + } else + if (group.classGroup) + { + config->setGroup("Extra rules"); + config->writeEntry("ClassGroupIndex", i); + } else + if (group.objectGroup) + { + config->setGroup("Extra rules"); + config->writeEntry("ObjectGroupIndex", i); + } + } + + i++; + } + for (QValueList::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + { + structuresList->insertItem((*it).name); + } +} + +void DTEPEditDlg::slotEditStructGroup() +{ + int currentItem = structuresList->currentItem(); + if (currentItem != -1) + { + KDialogBase editDlg(this, "edit_group", true, i18n("Edit Structure Group"), KDialogBase::Ok | KDialogBase::Cancel); + DTEPStructureEditDlgS structDlg(&editDlg); + editDlg.setMainWidget(&structDlg); + + StructGroup group = m_structGroups[currentItem]; + structDlg.nameEdit->setText(group.name); + structDlg.noNameEdit->setText(group.noName); + structDlg.iconButton->setIcon(group.icon); + structDlg.tagEdit->setText(group.tag); + structDlg.hasFilename->setChecked(group.hasFileName); + structDlg.fileNameRxEdit->setText(group.fileNameRx); + structDlg.appendToTags->setChecked(group.appendToTags); + structDlg.parentGroupEdit->setText(group.parentGroup); + for (int i = 0; i < structDlg.tagTypeCombo->count(); i++) + { + if (structDlg.tagTypeCombo->text(i) == group.tagType) + { + structDlg.tagTypeCombo->setCurrentItem(i); + break; + } + } + + structDlg.definitionRxEdit->setText(group.definitionRx); + structDlg.definitionRxMinimal->setChecked(group.definitionRxMinimal); + structDlg.usageRxEdit->setText(group.usageRx); + structDlg.typeRxEdit->setText(group.typeRx); + structDlg.autoCompleteRxEdit->setText(group.completeAfterRx); + structDlg.removeRxEdit->setText(group.removeRx); + structDlg.parseFile->setChecked(group.parseFile); + structDlg.simpleGroup->setChecked(group.simpleGroup); + structDlg.variableGroup->setChecked(group.variableGroup); + structDlg.functionGroup->setChecked(group.functionGroup); + structDlg.classGroup->setChecked(group.classGroup); + structDlg.objectGroup->setChecked(group.objectGroup); + + if (m_family == 0) + structDlg.pseudoGroupBox->setEnabled(false); + + if (editDlg.exec()) + { + StructGroup group = readFromStructDlg(&structDlg); + m_structGroups[currentItem] = group; + structuresList->removeItem(currentItem); + structuresList->insertItem(group.name, currentItem); + } + } +} + +void DTEPEditDlg::slotAddStructGroup() +{ + KDialogBase editDlg(this, "edit_group", true, i18n("Add Structure Group"), KDialogBase::Ok | KDialogBase::Cancel); + DTEPStructureEditDlgS structDlg(&editDlg); + editDlg.setMainWidget(&structDlg); + if (editDlg.exec()) + { + StructGroup group = readFromStructDlg(&structDlg); + m_structGroups.append(group); + structuresList->insertItem(group.name); + } +} + +StructGroup DTEPEditDlg::readFromStructDlg(DTEPStructureEditDlgS *structDlg) +{ + StructGroup group; + + group.name = structDlg->nameEdit->text(); + group.noName = structDlg->noNameEdit->text(); + group.icon = structDlg->iconButton->icon(); + group.tag = structDlg->tagEdit->text(); + group.hasFileName = structDlg->hasFilename->isChecked(); + group.fileNameRx = structDlg->fileNameRxEdit->text(); + group.appendToTags = structDlg->appendToTags->isChecked(); + group.parentGroup = structDlg->parentGroupEdit->text(); + group.tagType = structDlg->tagTypeCombo->currentText(); + group.definitionRx = structDlg->definitionRxEdit->text(); + group.definitionRxMinimal = structDlg->definitionRxMinimal->isChecked(); + group.usageRx = structDlg->usageRxEdit->text(); + group.typeRx = structDlg->typeRxEdit->text(); + group.completeAfterRx = structDlg->autoCompleteRxEdit->text(); + group.removeRx = structDlg->removeRxEdit->text(); + group.parseFile = structDlg->parseFile->isChecked(); + group.simpleGroup = structDlg->simpleGroup->isChecked(); + group.variableGroup = structDlg->variableGroup->isChecked(); + group.functionGroup = structDlg->functionGroup->isChecked(); + group.classGroup = structDlg->classGroup->isChecked(); + group.objectGroup = structDlg->objectGroup->isChecked(); + + return group; +} + +void DTEPEditDlg::slotDeleteStructGroup() +{ + int currentItem = structuresList->currentItem(); + if (currentItem != -1) + { + if (KMessageBox::warningContinueCancel(this, i18n("Do you really want to delete the %1 group?").arg(structuresList->currentText()), i18n("Delete Group"),KStdGuiItem::del()) == KMessageBox::Continue) + { + m_structGroups.remove(m_structGroups.at(currentItem)); + structuresList->removeItem(currentItem); + } + } +} + +void DTEPEditDlg::writeEntry(KConfig *config, const QString &key, const QString &value) +{ + if (value.isEmpty()) + config->deleteEntry(key); + else + config->writeEntry(key, value); +} + + +#include "dtepeditdlg.moc" diff --git a/quanta/dialogs/dtepeditdlg.h b/quanta/dialogs/dtepeditdlg.h new file mode 100644 index 00000000..45bd3d6d --- /dev/null +++ b/quanta/dialogs/dtepeditdlg.h @@ -0,0 +1,89 @@ +/*************************************************************************** + dtepeditdlg.h - description + ------------------- + begin : Tue Feb 1 11:07:24 2005 + copyright : (C) 2005 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef DTEPEDITDLG_H +#define DTEPEDITDLG_H + +//qt includes +#include + +//own includes +#include "dtepeditdlgs.h" + +/** +@author Andras Mantia +*/ + +class KConfig; +class DTEPStructureEditDlgS; + +struct StructGroup { + QString name; /// m_structGroups; +}; + +#endif diff --git a/quanta/dialogs/dtepeditdlgs.ui b/quanta/dialogs/dtepeditdlgs.ui new file mode 100644 index 00000000..739ffcc5 --- /dev/null +++ b/quanta/dialogs/dtepeditdlgs.ui @@ -0,0 +1,1967 @@ + +DTEPEditDlgS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2005 Andras Mantia <amantia@kde.org> + + + DTEPEditDlgS + + + + 0 + 0 + 655 + 598 + + + + Configure DTEP + + + + unnamed + + + + tabWidget + + + + tab + + + &General + + + + unnamed + + + + textLabel1 + + + + 1 + 5 + 0 + 0 + + + + Name: + + + kLineEdit1 + + + DTD definition string + + + The real name of the DTEP. In case of XML DTEPs this should be the DTD definition string, like -<i>//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN</i>. + + + + + textLabel2 + + + + 1 + 5 + 0 + 0 + + + + Short name: + + + kLineEdit2 + + + Beautified, user visible name + + + The user visible, beautified name. If not defined, the real name is used. + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + nameEdit + + + + 7 + 0 + 0 + 0 + + + + DTD definition string + + + The real name of the DTEP. In case of XML DTEPs this should be the DTD definition string, like -<i>//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN</i>. + + + + + nickNameEdit + + + + 7 + 0 + 0 + 0 + + + + Beautified, user visible name + + + The user visible, beautified name. If not defined, the real name is used. + + + + + spacer3 + + + Vertical + + + Expanding + + + + 20 + 50 + + + + + + groupBox1 + + + Type Specific Settings + + + + unnamed + + + + generalWidgetStack + + + + WStackPage + + + 0 + + + + unnamed + + + + textLabel3 + + + URL: + + + urlEdit + + + URL pointing to the DTD definiton file + + + URL pointing to the DTD definiton file, like <i>http://www.w3.org/TR/html4/loose.dtd</i>. + + + + + textLabel4 + + + DOCT&YPE string: + + + doctypeEdit + + + The string that should appear in the !DOCTYPE tag + + + The string that should appear in the !DOCTYPE tag, like<br> +<i>HTML&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"&nbsp;&nbsp;&nbsp;<br>"http://www.w3.org/TR/html4/loose.dtd"</i> + + + + + urlEdit + + + URL pointing to the DTD definiton file + + + URL pointing to the DTD definiton file, like <i>http://www.w3.org/TR/html4/loose.dtd</i>. + + + + + doctypeEdit + + + The string that should appear in the !DOCTYPE tag + + + The string that should appear in the !DOCTYPE tag, like<br> +<i>HTML&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"&nbsp;&nbsp;&nbsp;<br>"http://www.w3.org/TR/html4/loose.dtd"</i> + + + + + + + WStackPage + + + 1 + + + + topLevel + + + + 10 + 10 + 107 + 27 + + + + Top level + + + Check if the DTEP can act as a top level DTEP. + + + Check if the DTEP can act as a top level DTEP. This means that the document can be of this type. Some pseudo DTEPs cannot act as a top level DTEP, like <i>PHP</i> as they are always included as part of another DTEP, while some others can be included and act as standalone as well, like the case of <i>CSS</i>. + + + + + + + + + textLabel9 + + + Toolbar folder: + + + toolbarFolderEdit + + + The name of the folder where the toolbars are stored + + + The name of the folder where the toolbars are stored. This is a relative name to <br><i>$KDEDIR(&nbsp;or&nbsp;$KDEHOME)/share/apps/quanta/toolbars</i> . + + + + + toolbarFolderEdit + + + The name of the folder where the toolbars are stored + + + The name of the folder where the toolbars are stored. This is a relative name to <br><i>$KDEDIR(&nbsp;or&nbsp;$KDEHOME)/share/apps/quanta/toolbars</i> . + + + + + textLabel10 + + + &Autoloaded toolbars: + + + toolbarsEdit + + + Comma separated list of toolbars + + + Comma separated list of toolbars from the toolbar folder that will be loaded when a document with this DTEP is loaded. + + + + + toolbarsEdit + + + Comma separated list of toolbars + + + Comma separated list of toolbars from the toolbar folder that will be loaded when a document with this DTEP is loaded. + + + + + caseSensitive + + + + 7 + 0 + 0 + 0 + + + + Case sensitive + + + true + + + Check if the DTEP has case sensitive tags + + + Indicates whether the DTEP has case sensitive tags. In case of XML this should be checked, but for example HTML variants are not case sensitive. + + + + + textLabel7 + + + + 1 + 5 + 0 + 0 + + + + Type: + + + The family to where this DTEP belongs. + + + The family to where this DTEP belong. There are two families:<br><p><b>XML style</b>:DTEP describing an XML like language</p> +<p><b>Pseudo type</b>:DTEP describing some other language, where the notion of a tag is not the same as in XML. Examples are <i>PHP, JavaScript, CSS</i>.</p> + + + + + textLabel8 + + + Inherits: + + + The DTEP name from where this DTEP inherits the tags. + + + The real name of the DTEP (like -<i>//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN</i>) from where the current DTEP inherits the tags. + + + + + + XML Style + + + + + Pseudo Type + + + + typeCombo + + + + 5 + 0 + 0 + 0 + + + + The family to where this DTEP belongs. + + + The family to where this DTEP belong. There are two families:<br><p><b>XML style</b>:DTEP describing an XML like language</p> +<p><b>Pseudo type</b>:DTEP describing some other language, where the notion of a tag is not the same as in XML. Examples are <i>PHP, JavaScript, CSS</i>.</p> + + + + + textLabel1_2 + + + Mimet&ypes: + + + mimeTypeEdit + + + + + inheritsCombo + + + + 7 + 0 + 0 + 0 + + + + true + + + The DTEP name from where this DTEP inherits the tags. + + + The real name of the DTEP (like -<i>//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN</i>) from where the current DTEP inherits the tags. + + + + + mimeTypeEdit + + + Comma separated list of mimetypes + + + Comma separated list of mimetypes. Files of these types are treated as belonging to this DTEP, unless the !DOCTYPE entry says something else. + + + + + extensionEdit + + + The default extension of files belonging to this DTEP + + + + + textLabel2_2 + + + E&xtension: + + + extensionEdit + + + + + spacer6 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + + + tab + + + P&ages + + + + unnamed + + + + spacer4 + + + Vertical + + + Expanding + + + + 20 + 50 + + + + + + enablePage1 + + + Enable the first extra page + + + Every tab edit dialog will have one more extra page aside of the main page + + + Every tab edit dialog will have one more extra page aside of the main page. You can configure what will be on this page in the below fields. + + + + + textLabel11 + + + false + + + Title: + + + The title of the page + + + The title of the page, like <b>Core && i18n</b>. As you see, the ampersand must be doubled. + + + + + textLabel12 + + + false + + + Groups: + + + Comma separated list of the common attribute groups + + + Comma separated list of the common attribute groups. The attributes from the listed groups will appear on this page.<br>The common attributes are specified in each DTEP's <i>common.tag</i> file, where the <i>common="yes"</i> attribute must be set.<br>The following example defined the common I18n attribute group:<br><p><b> +&lt;tag name="I18n" common="yes"><br> +&nbsp;&nbsp;&lt;attr name="lang" type="input" /><br> +&nbsp;&nbsp;&lt;attr name="dir" type="input" /><br> +&lt;/tag> +</b></p> + + + + + enablePage2 + + + false + + + Enable the second extra page + + + See the tooltip and "What's This?" information for the first checkbox + + + + + enablePage3 + + + false + + + Enable the third extra page + + + See the tooltip and "What's This?" information for the first checkbox + + + + + enablePage4 + + + false + + + Enable the fourth extra page + + + See the tooltip and "What's This?" information for the first checkbox + + + + + enablePage5 + + + false + + + Enable the fifth extra page + + + See the tooltip and "What's This?" information for the first checkbox + + + + + pageTitleEdit1 + + + false + + + The title of the page + + + The title of the page, like <b>Core && i18n</b>. As you see, the ampersand must be doubled. + + + + + groupsEdit1 + + + false + + + Comma separated list of the common attribute groups + + + Comma separated list of the common attribute groups. The attributes from the listed groups will appear on this page.<br>The common attributes are specified in each DTEP's <i>common.tag</i> file, where the <i>common="yes"</i> attribute must be set.<br>The following example defined the common I18n attribute group:<br><p><b> +&lt;tag name="I18n" common="yes"><br> +&nbsp;&nbsp;&lt;attr name="lang" type="input" /><br> +&nbsp;&nbsp;&lt;attr name="dir" type="input" /><br> +&lt;/tag> +</b></p> + + + + + pageTitleEdit4 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel12_3 + + + false + + + Groups: + + + See the tooltip and "What's This?" information for the first page fields + + + + + pageTitleEdit2 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel11_3_2 + + + false + + + Title: + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel11_2 + + + false + + + Title: + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel12_2 + + + false + + + Groups: + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel11_3 + + + false + + + Title: + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel12_3_2 + + + false + + + Groups: + + + See the tooltip and "What's This?" information for the first page fields + + + + + groupsEdit2 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel11_5 + + + false + + + Title: + + + See the tooltip and "What's This?" information for the first page fields + + + + + groupsEdit4 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + textLabel12_5 + + + false + + + Groups: + + + See the tooltip and "What's This?" information for the first page fields + + + + + pageTitleEdit3 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + groupsEdit3 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + groupsEdit5 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + pageTitleEdit5 + + + false + + + See the tooltip and "What's This?" information for the first page fields + + + + + + + TabPage + + + Parsing &Rules + + + + unnamed + + + + enableMinusInWords + + + Enable minus in words + + + Treat the minus sign as part of a word + + + If enabled <b>this-is-a-word</b> is treated like a word. Otherwise it is treated like 4 words. + + + + + textLabel13 + + + Comments: + + + kLineEdit10 + + + Comma separated list of area borders for comments + + + Comma separated list of area borders for comments. <i>EOL</i> means end of line, used for single line comments.<br> +Example: <b>//&nbsp;EOL,&nbsp;/*&nbsp;*/</b> + + + + + groupBox7 + + + + 1 + 5 + 0 + 0 + + + + Type Specific Rules + + + + unnamed + + + + rulesWidgetStack + + + + WStackPage + + + 0 + + + + unnamed + + + + xmlStyleTags + + + XML style single tags + + + true + + + Check to use XML style single tags + + + Check to use XML style single tags (<b>&lt;single_tag /&gt;</b>), otherwise HTML style single tags (<b>&lt;single_tag&gt;</b>) are used. + + + + + useCommonRules + + + Use common rules + + + true + + + Append common parsing rules + + + Check it to append common parsing rules. These are: +<p><b> +&nbsp;&nbsp;SpecialAreas=&lt;?xml ?&gt;, &lt;!-- --&gt;, &lt;! &gt; +&nbsp;&nbsp;SpecialAreaNames = XML PI, comment, DTD +&nbsp;&nbsp;Comments = &lt;!-- --&gt; +</b></p> + + + + + extendedBooleans + + + Extended booleans + + + Check if the booleans are stored in extended form + + + Check if you want extended booleans in the language.<br> +Examples:<br> +<i>Simple boolean</i>: <b>&lt;tag&nbsp;booleanAttr&gt;</b><br> +<i>Extended boolean</i>: <b>&lt;tag&nbsp;booleanAttr="1"&gt;</b> or <b>&lt;tag&nbsp;booleanAttr="true"&gt;</b>. +<br> +See the <b>True</b> and <b>False</b> boxes to define the values for true and false. + + + + + falseEdit + + + false + + + + 2 + 0 + 0 + 0 + + + + The value of "true" in case of extended booleans + + + + + trueEdit + + + false + + + + 2 + 0 + 0 + 0 + + + + The value of "true" in case of extended booleans + + + + + textLabel39 + + + false + + + False: + + + AlignVCenter|AlignRight + + + + + textLabel38 + + + false + + + True: + + + AlignVCenter|AlignRight + + + + + spacer12 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + specialAreasEdit + + + Comma separated list of the beginning and closing string for special areas + + + The beginning and closing string of special areas, separated by a comma.<br> + Special areas are not parsed according to this DTD's rules, but according to their own rules.<br> + A special area can be a pseudo DTD, a comment or something like that, for example <i>&lt;!--&nbsp;--&gt;</i>. + + + + + textLabel27 + + + Special areas: + + + kLineEdit11 + + + Comma separated list of the beginning and closing string for special areas + + + The beginning and closing string of special areas, separated by a comma.<br> + Special areas are not parsed according to this DTD's rules, but according to their own rules.<br> + A special area can be a pseudo DTD, a comment or something like that, for example <i>&lt;!--&nbsp;--&gt;</i>. + + + + + specialAreaNamesEdit + + + Comma-separated list of the names for the above-defined special areas + + + + + textLabel28 + + + Special area names: + + + kLineEdit12 + + + Comma-separated list of the names for the above-defined special areas + + + + + textLabel40 + + + Special tags: + + + Specifies a tag that defines the start of a special area + + + Specifies a tag which defines the start of a special area in the form of <i>tagname(attributename)</i>.<br> +Example:<b>script(language)</b> means that any <b>&lt;script&gt;</b> tag having a <b>language</b> attribute indicates a special area. + + + + + specialTagsEdit + + + Specifies a tag that defines the start of a special area + + + Specifies a tag which defines the start of a special area in the form of <i>tagname(attributename)</i>.<br> +Example:<b>script(language)</b> means that any <b>&lt;script&gt;</b> tag having a <b>language</b> attribute indicates a special area. + + + + + + + WStackPage + + + 1 + + + + unnamed + + + + textLabel21 + + + Definition tags: + + + kLineEdit14 + + + Tags and attributes defining this DTEP + + + Comma separated list of tags that define this DTEP. The format used is <i>tagname(attribute[defaultvalue])</i>. If the parent (a real) DTEP has a tag with <i>tagname</i> and +the <i>attribute value</i> of this tag is equal with the name of this DTEP, the tag area +is parsed according to the rules of this DTEP.<br> +If <i>[defaultvalue]</i> is present, it means that if the attribute is not present in the tag it is taken as present with <i>value = defaultvalue</i>.<br> +Example: <b>Tags=style(type[text/css])</b> means that both <b>&lt;style&gt;</b> and <b>&lt;style&nbsp;type="text/css"&gt;</b> are treated the same way and the DTEP defined by this tag is named <b>text/css</b>. + + + + + textLabel20 + + + Area borders: + + + kLineEdit13 + + + Comma separated list of the area borders + + + Comma separated list of the area borders encapsulating this pseudo DTEP. In the case of PHP it is:<br> +<b>&lt;?&nbsp;?&gt;,&nbsp;&lt;*&nbsp;*&gt;,&nbsp;&lt;%&nbsp;%&gt;</b> + + + + + textLabel22 + + + Structure keywords: + + + kLineEdit15 + + + Comma separated list of structure keywords + + + Comma separated list of structure keywords. The keywords used here are used to create new node (nodes for structures) in the structure tree, like for a function, class or if block. + + + + + textLabel26 + + + Structure delimiting: + + + kLineEdit19 + + + Regular expression that finds the beginning or end of a structure + + + Regular expression that finds the beginning or end of a structure. This is usually the combination of <b>Structure beginning</b> and <b>Structure end</b>, like <b>\{&nbsp;|&nbsp;\}</b> + + + + + textLabel24 + + + Structure beginning: + + + kLineEdit17 + + + A string specifying the beginning of a structure + + + A string specifying the beginning of a structure, like <b>{</b> in many cases. + + + + + textLabel23 + + + Local scope keywords: + + + kLineEdit16 + + + Comma separated list of the local scope defining keywords + + + Comma separated list of the local scope defining keywords. Other structure group elements found under a structure node that was created based on a keyword from this list are treated as local elements. For example if this list contains <b>function</b>, it means that elements, like variables found under a <b>function</b> are local, relative to the node that holds the <b>function</b>. + + + + + localStructKeywordsEdit + + + Comma separated list of the local scope defining keywords + + + Comma separated list of the local scope defining keywords. Other structure group elements found under a structure node that was created based on a keyword from this list are treated as local elements. For example if this list contains <b>function</b>, it means that elements, like variables found under a <b>function</b> are local, relative to the node that holds the <b>function</b>. + + + + + structKeywordsEdit + + + Comma separated list of structure keywords + + + Comma separated list of structure keywords. The keywords used here are used to create new node (nodes for structures) in the structure tree, like for a function, class or if block. + + + + + definitionTagsEdit + + + Tags and attributes defining this DTEP + + + Comma separated list of tags that define this DTEP. The format used is <i>tagname(attribute[defaultvalue])</i>. If the parent (a real) DTEP has a tag with <i>tagname</i> and +the <i>attribute value</i> of this tag is equal with the name of this DTEP, the tag area +is parsed according to the rules of this DTEP.<br> +If <i>[defaultvalue]</i> is present, it means that if the attribute is not present in the tag it is taken as present with <i>value = defaultvalue</i>.<br> +Example: <b>Tags=style(type[text/css])</b> means that both <b>&lt;style&gt;</b> and <b>&lt;style&nbsp;type="text/css"&gt;</b> are treated the same way and the DTEP defined by this tag is named <b>text/css</b>. + + + + + areaBordersEdit + + + Comma separated list of the area borders + + + Comma separated list of the area borders encapsulating this pseudo DTEP. In the case of PHP it is:<br> +<b>&lt;?&nbsp;?&gt;,&nbsp;&lt;*&nbsp;*&gt;,&nbsp;&lt;%&nbsp;%&gt;</b> + + + + + structEndEdit + + + A string specifying the end of a structure + + + A string specifying the end of a structure, like <b>}</b> in many cases. + + + + + textLabel25 + + + Structure end: + + + kLineEdit18 + + + A string specifying the end of a structure + + + A string specifying the end of a structure, like <b>}</b> in many cases. + + + + + structBeginEdit + + + A string specifying the beginning of a structure + + + A string specifying the beginning of a structure, like <b>{</b> in many cases. + + + + + textLabel19 + + + + 1 + 5 + 0 + 0 + + + + Complete class members after: + + + kLineEdit21 + + + Regular expression to find out when to invoke member autocompletion + + + Regular expression to find out when to invoke member autocompletion. <br> +Example:<br> +- we have a class called <b>foo</b> with some member variables<br> +- the object of type <b>foo</b> is used in the document as $<b>objFoo</b><br> +- the members can appear as <b>$objFoo->member</b> or <b>$objFoo.member</b> +- in the above case this entry should look like <b>(?:-&gt;|\.)$</b> (autocomplete if the object is followed by <b>-&gt;</b> or <b>.</b>)<br> + The regular expression must be terminated with <b>$</b> (match end of line). + + + + + textLabel18 + + + + 1 + 5 + 0 + 0 + + + + Complete attributes after: + + + kLineEdit20 + + + Autocomplete attributes after this character. See the information for the same entry valid for tags. + + + + + attributesAfterEdit + + + Autocomplete attributes after this character. See the information for the same entry valid for tags. + + + + + membersAfterEdit + + + Regular expression to find out when to invoke member autocompletion + + + Regular expression to find out when to invoke member autocompletion. <br> +Example:<br> +- we have a class called <b>foo</b> with some member variables<br> +- the object of type <b>foo</b> is used in the document as $<b>objFoo</b><br> +- the members can appear as <b>$objFoo->member</b> or <b>$objFoo.member</b> +- in the above case this entry shoul look like <b>(?:-&gt;|\.)$</b> (autocomplete if the object is followed by <b>-&gt;</b> or <b>.</b>)<br> + The regular expression must be terminated with <b>$</b> (match end of line). + + + + + structRxEdit + + + Regular expression that finds the beginning or end of a structure + + + Regular expression that finds the beginning or end of a structure. This is usually the combination of <b>Structure beginning</b> and <b>Structure end</b>, like <b>\{&nbsp;|&nbsp;\}</b> + + + + + + + + + + textLabel15 + + + Attribute separator: + + + kLineEdit22 + + + The character specifying the end of an attribute + + + The character specifying the end of an attribute. By default it is <b>"</b> for XML DTEPs and <b>,</b> for pseudo DTEPs. + + + + + commentsEdit + + + Comma separated list of area borders for comments + + + Comma separated list of area borders for comments. <i>EOL</i> means end of line, used for single line comments.<br> +Example: <b>//&nbsp;EOL,&nbsp;/*&nbsp;*/</b> + + + + + textLabel17 + + + Included DTEPs: + + + kLineEdit25 + + + Comma-separated list of DTEPs that can be present inside this DTEP + + + Comma-separated list of DTEPs that can be present inside this DTEP. The list consist usually of pseudo DTEPs. + + + + + textLabel16 + + + Autocomplete tags after: + + + kLineEdit24 + + + The character after which the list of tags should be shown + + + The autocompletion box is brought up automatically once this character is entered or space is pressed after this character.<br> For real DTEPs it's usually <b>&lt;</b>, but for example for the CSS pseudo DTEP it is <b>{</b>. The text <b>none</b> instead of a character specifies that the tag completion box should not be brought up automatically, only if the user requests it. + + + + + tagAfterEdit + + + The character after which the list of tags should be shown + + + The autocompletion box is brought up automatically once this character is entered or space is pressed after this character<br>. For real DTEPs it's usually <b>&lt;</b>, but for example for the CSS pseudo DTEP it is <b>{</b>. The text <b>none</b> instead of a character specifies that the tag completion box should not be brought up automatically, only if the user requests it. + + + + + tagSeparatorEdit + + + + 1 + 0 + 0 + 0 + + + + The character specifying the end of a tag. See the information for the attribute separator for details. + + + + + textLabel14 + + + Tag separator: + + + kLineEdit23 + + + The character specifying the end of a tag. See the information for the attribute separator for details. + + + + + attributeSeparatorEdit + + + The character specifying the end of an attribute + + + The character specifying the end of an attribute. By default it is <b>"</b> for XML DTEPs and <b>,</b> for pseudo DTEPs. + + + + + mayContainEdit + + + Comma-separated list of DTEPs that can be present inside this DTEP + + + Comma-separated list of DTEPs that can be present inside this DTEP. The list consist usually of pseudo DTEPs. + + + + + + + TabPage + + + Structures + + + + unnamed + + + + textLabel29 + + + Available groups: + + + listBox1 + + + + + spacer5 + + + Vertical + + + Expanding + + + + 20 + 270 + + + + + + addStructButton + + + &Add... + + + + + editStructButton + + + &Edit... + + + + + deleteStructButton + + + &Delete + + + + + structuresList + + + + + + + + + + enablePage1 + toggled(bool) + textLabel11 + setEnabled(bool) + + + enablePage1 + toggled(bool) + pageTitleEdit1 + setEnabled(bool) + + + enablePage1 + toggled(bool) + groupsEdit1 + setEnabled(bool) + + + enablePage1 + toggled(bool) + textLabel12 + setEnabled(bool) + + + enablePage1 + toggled(bool) + enablePage2 + setEnabled(bool) + + + enablePage2 + toggled(bool) + pageTitleEdit2 + setEnabled(bool) + + + enablePage2 + toggled(bool) + groupsEdit2 + setEnabled(bool) + + + enablePage2 + toggled(bool) + textLabel11_2 + setEnabled(bool) + + + enablePage2 + toggled(bool) + textLabel12_2 + setEnabled(bool) + + + enablePage2 + toggled(bool) + enablePage3 + setEnabled(bool) + + + enablePage3 + toggled(bool) + pageTitleEdit3 + setEnabled(bool) + + + enablePage3 + toggled(bool) + groupsEdit3 + setEnabled(bool) + + + enablePage3 + toggled(bool) + textLabel11_3 + setEnabled(bool) + + + enablePage3 + toggled(bool) + textLabel12_3 + setEnabled(bool) + + + enablePage3 + toggled(bool) + enablePage4 + setEnabled(bool) + + + enablePage4 + toggled(bool) + pageTitleEdit4 + setEnabled(bool) + + + enablePage4 + toggled(bool) + groupsEdit4 + setEnabled(bool) + + + enablePage4 + toggled(bool) + textLabel11_3_2 + setEnabled(bool) + + + enablePage4 + toggled(bool) + textLabel12_3_2 + setEnabled(bool) + + + enablePage4 + toggled(bool) + enablePage5 + setEnabled(bool) + + + enablePage5 + toggled(bool) + pageTitleEdit5 + setEnabled(bool) + + + enablePage5 + toggled(bool) + groupsEdit5 + setEnabled(bool) + + + enablePage5 + toggled(bool) + textLabel11_5 + setEnabled(bool) + + + enablePage5 + toggled(bool) + textLabel12_5 + setEnabled(bool) + + + typeCombo + activated(int) + rulesWidgetStack + raiseWidget(int) + + + addStructButton + clicked() + DTEPEditDlgS + slotAddStructGroup() + + + deleteStructButton + clicked() + DTEPEditDlgS + slotDeleteStructGroup() + + + editStructButton + clicked() + DTEPEditDlgS + slotEditStructGroup() + + + typeCombo + activated(int) + generalWidgetStack + raiseWidget(int) + + + typeCombo + activated(int) + DTEPEditDlgS + slotFamilyChanged(int) + + + extendedBooleans + toggled(bool) + textLabel38 + setEnabled(bool) + + + extendedBooleans + toggled(bool) + trueEdit + setEnabled(bool) + + + extendedBooleans + toggled(bool) + textLabel39 + setEnabled(bool) + + + extendedBooleans + toggled(bool) + falseEdit + setEnabled(bool) + + + structuresList + doubleClicked(QListBoxItem*) + editStructButton + animateClick() + + + + tabWidget + nameEdit + nickNameEdit + inheritsCombo + typeCombo + mimeTypeEdit + extensionEdit + toolbarFolderEdit + toolbarsEdit + caseSensitive + topLevel + urlEdit + doctypeEdit + enablePage1 + pageTitleEdit1 + groupsEdit1 + enablePage2 + pageTitleEdit2 + groupsEdit2 + enablePage3 + pageTitleEdit3 + groupsEdit3 + enablePage4 + pageTitleEdit4 + groupsEdit4 + enablePage5 + pageTitleEdit5 + groupsEdit5 + areaBordersEdit + definitionTagsEdit + structKeywordsEdit + localStructKeywordsEdit + structBeginEdit + structEndEdit + structRxEdit + attributesAfterEdit + membersAfterEdit + specialAreasEdit + specialAreaNamesEdit + specialTagsEdit + extendedBooleans + trueEdit + falseEdit + xmlStyleTags + useCommonRules + enableMinusInWords + commentsEdit + attributeSeparatorEdit + tagSeparatorEdit + tagAfterEdit + mayContainEdit + structuresList + addStructButton + editStructButton + deleteStructButton + + + slotEditStructGroup() + slotAddStructGroup() + slotDeleteStructGroup() + slotFamilyChanged(int) + + + diff --git a/quanta/dialogs/dtepstructureeditdlgs.ui b/quanta/dialogs/dtepstructureeditdlgs.ui new file mode 100644 index 00000000..12abe665 --- /dev/null +++ b/quanta/dialogs/dtepstructureeditdlgs.ui @@ -0,0 +1,646 @@ + +DTEPStructureEditDlgS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2005 Andras Mantia <amantia@kde.org> + + + DTEPStructureEditDlgS + + + + 0 + 0 + 628 + 666 + + + + Structure Group Editor + + + + unnamed + + + + textLabel30 + + + &Name: + + + nameEdit + + + + + nameEdit + + + The name of the group + + + The user visible name of the group. It will be shown in the structure tree as a top node when there are elements belonging to this group in the document. + + + + + textLabel32 + + + &Icon: + + + AlignVCenter|AlignRight + + + iconButton + + + + + iconButton + + + + 0 + 0 + 0 + 0 + + + + + 50 + 50 + + + + + 50 + 50 + + + + + + + + + textLabel34 + + + false + + + Filen&ame definition: + + + fileNameRxEdit + + + Regular expression to get the filename + + + Regular expression to get the filename. The expression is used to <b>remove</b> the unnecessary strings from the element's text. + + + + + hasFilename + + + Contains a &filename + + + True if the element's text contains a filename + + + + + fileNameRxEdit + + + false + + + Regular expression to get the filename + + + Regular expression to get the filename. The expression is used to <b>remove</b> the unnecessary strings from the element's text. + + + + + textLabel33 + + + &Tag: + + + tagEdit + + + Elements identified by this entry will belong to this group + + + Defines which tags belong to this group. The format is <i>tagname(attribute1, attribute2, ...)</i>. Tags with name <i>tagname</i> will appear under this group. The item text of the corresponding node in the tree will be <i>attribute1_value | attribute2_value | ...</i>Currently only one tag may be listed here. + + + + + textLabel31 + + + "No" na&me: + + + noNameEdit + + + The name that appears when no element were found + + + The user visible name of the group. It will be shown in the structure tree as a top node when there are <b>no</b> elements belonging to this group in the document. + + + + + noNameEdit + + + The name that appears when no element were found + + + The user visible name of the group. It will be shown in the structure tree as a top node when there are <b>no</b> elements belonging to this group in the document. + + + + + tagEdit + + + true + + + Elements ideintified by this entry will belong to this group + + + Defines which tags belong to this group. The format is <i>tagname(attribute1, attribute2, ...)</i>. Tags with name <i>tagname</i> will appear under this group. The item text of the corresponding node in the tree will be <i>attribute1_value | attribute2_value | ...</i>Currently only one tag may be listed here. + + + + + spacer6 + + + Vertical + + + Fixed + + + + 20 + 16 + + + + + + appendToTags + + + Use elements as tags + + + Treat elements as new tags + + + Treat elements as new tags, so they will show up during tag autocompletion. + + + + + pseudoGroupBox + + + &Pseudo DTEP Specific Settings + + + + unnamed + + + + typeRxEdit + + + Regular expression to find the type of the element + + + Regular expression to find the type of the element. The pattern is searched on the result of the <i>DefinitionRx</i> match and the first captured area will hold the element type.<br> +Example (simplified):<br> +<b>DefinitionRx=\$+([a-zA-Z]+)=new\\s[a-zA-Z]+;<br> +TypeRx=new\\s([a-zA-Z]+);</b><br><br> +This will match strings like <b>$fooObj=new foo;</b>. Now this string is searched and it will find <b>new foo;</b>, where <b>foo</b> is the first captured text (the regular expression matching <b>foo</b> is between brackets).<br> +So the type of <b>$fooObj</b> is <b>foo</b>. + + + + + textLabel36 + + + &Usage expression: + + + usageRxEdit + + + Regular expression to find the usage of a group element + + + Regular expression to find the usage of a group element in the document.<br> +Example 1:<br> +- classes are defined as <b>class foo {...}</b><br> +- classes are used as <b>$objFoo</b><br><br> +Example 2:<br> +- variables are defined as <b>int i</b><br> +- variables are used as <b>@i</b><br><br> +Example 3:<br> +- variables are defined as <b>$i</b><br> +- variables are used as <b>$i</b>. In this case <i>UsageRx </i>is the same as <i>DefinitionRx</i>. + + + + + textLabel37 + + + Element t&ype expression: + + + typeRxEdit + + + Regular expression to find the type of the element + + + Regular expression to find the type of the element. The pattern is searched on the result of the <i>DefinitionRx</i> match and the first captured area will hold the element type.<br> +Example (simplified):<br> +<b>DefinitionRx=\$+([a-zA-Z]+)=new\\s[a-zA-Z]+;<br> +TypeRx=new\\s([a-zA-Z]+);</b><br><br> +This will match strings like <b>$fooObj=new foo;</b>. Now this string is searched and it will find <b>new foo;</b>, where <b>foo</b> is the first captured text (the regular expression matching <b>foo</b> is between brackets).<br> +So the type of <b>$fooObj</b> is <b>foo</b>. + + + + + textLabel35 + + + Definition e&xpression: + + + definitionRxEdit + + + Regular expression to find what belong to this group + + + Regular expression used to find text areas in the document, which will belong to this group. The first captured area shouldbe the actual name of the group entry.<br> +Example for a <i>class</i> group:<br> +<b>\bclass[\\s]+([0-9a-zA-Z_\x7f-\xff]*)[\\s]*</b><br> +The first captured area (between "<b>(</b>" and "<b>)</b>") holds the class name. + + + + + usageRxEdit + + + Regular expression to find the usage of a group element + + + Regular expression to find the usage of a group element in the document.<br> +Example 1:<br> +- classes are defined as <b>class foo {...}</b><br> +- classes are used as <b>$objFoo</b><br><br> +Example 2:<br> +- variables are defined as <b>int i</b><br> +- variables are used as <b>@i</b><br><br> +Example 3:<br> +- variables are defined as <b>$i</b><br> +- variables are used as <b>$i</b>. In this case <i>UsageRx </i>is the same as <i>DefinitionRx</i>. + + + + + textLabel41 + + + Parent group: + + + The name of the group that may be the parent of this + + + The name of the group that may be the parent of this. For example <b>classes</b> might be a parent of <b>functions</b> in case of member functions. This entry indicates this possible relationship and is used to provide functionality like member autocompletion. + + + + + parentGroupEdit + + + The name of the group that may be the parent of this + + + The name of the group that may be the parent of this. For example <b>classes</b> might be a parent of <b>functions</b> in case of member functions. This entry indicates this possible relationship and is used to provide functionality like member autocompletion. + + + + + textLabel42 + + + Searched tags: + + + Only tags of this type can be part of the group + + + + + textLabel44 + + + Remove when autocompleting: + + + Regular expression used to remove unwanted strings from the completion text + + + + + textLabel43 + + + Autocomplete after: + + + Regular expression to tell when to bring up the completion box with the elements of this group + + + Regular expression to tell when to bring up the completion box with the elements of this group.<br> +Example:<b>\bnew[\\s]+$</b> tells that after typing <b>new&nbsp;</b>, the completion box with the elements should be shown. + + + + + autoCompleteRxEdit + + + Regular expression to tell when to bring up the completion box with the elements of this group + + + Regular expression to tell when to bring up the completion box with the elements of this group.<br> +Example:<b>\bnew[\\s]+$</b> tells that after typing <b>new&nbsp;</b>, the completion box with the elements should be shown. + + + + + removeRxEdit + + + Regular expression used to remove unwanted strings from the completion text + + + + + + Text + + + + + XmlTag + + + + + XmlTagEnd + + + + + Comment + + + + + CSS + + + + + ScriptTag + + + + + ScriptStructureBegin + + + + + ScriptStructureEnd + + + + tagTypeCombo + + + Only tags of this type can be part of the group + + + + + spacer13 + + + Horizontal + + + Expanding + + + + 340 + 20 + + + + + + parseFile + + + Parse file + + + Check if the filename that is in the elements text should be parsed + + + Check if the filename that is in the elements text should be parsed. This makes sense only if the element may contain a filename and the <i>FileNameRx</i> is specified. + + + + + buttonGroup1 + + + Type + + + + unnamed + + + + simpleGroup + + + Simple + + + This is a simple group, nothing special + + + + + variableGroup + + + Variable group + + + The group's elements are variables + + + + + functionGroup + + + Function group + + + The group's elements are functions + + + + + classGroup + + + Class group + + + The group's elements are classes + + + + + objectGroup + + + Ob&ject group + + + The group's elements are objects + + + + + + + definitionRxEdit + + + Regular expression to find what belong to this group + + + Regular expression used to find text areas in the document, which will belong to this group. The first captured area shouldbe the actual name of the group entry.<br> +Example for a <i>class</i> group:<br> +<b>\bclass[\\s]+([0-9a-zA-Z_\x7f-\xff]*)[\\s]*</b><br> +The first captured area (between "<b>(</b>" and "<b>)</b>") holds the class name. + + + + + definitionRxMinimal + + + Minimal search mode + + + Enable to use the minimal style search for definition instead of the standard (greedy) matching + + + + + + + + + + + hasFilename + toggled(bool) + textLabel34 + setEnabled(bool) + + + hasFilename + toggled(bool) + fileNameRxEdit + setEnabled(bool) + + + + nameEdit + iconButton + noNameEdit + tagEdit + hasFilename + fileNameRxEdit + appendToTags + parentGroupEdit + tagTypeCombo + definitionRxEdit + definitionRxMinimal + usageRxEdit + typeRxEdit + autoCompleteRxEdit + removeRxEdit + parseFile + simpleGroup + functionGroup + objectGroup + variableGroup + classGroup + + + + kicondialog.h + + diff --git a/quanta/dialogs/filecombo.cpp b/quanta/dialogs/filecombo.cpp new file mode 100644 index 00000000..40415757 --- /dev/null +++ b/quanta/dialogs/filecombo.cpp @@ -0,0 +1,122 @@ +/*************************************************************************** + filecombo.cpp - description + ------------------- + begin : Wed Sep 27 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon + (C) 2002-2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// QT includes +#include +#include +#include + +// KDE includes +#include +#include +#include + +// app include +#include "filecombo.h" +#include "qextfileinfo.h" + +FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name ) + :QWidget(parent,name) +{ + baseURL = a_baseURL; + m_absolutePath = false; + + QHBoxLayout *layout = new QHBoxLayout(this); + + combo = new QComboBox(true,this); + combo->setEditable(true); + button = new QPushButton(this); + + button ->setFixedSize(35,25); + button ->setText(i18n("...")); + + layout ->addWidget( combo ); + layout ->addWidget( button ); + + connect( button, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); + connect( combo, SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&))); + connect( combo, SIGNAL(textChanged(const QString&)), SLOT(slotComboActivated(const QString&))); + setFocusProxy(combo); +} + +FileCombo::FileCombo( QWidget *parent, const char *name ) + :QWidget( parent, name ) +{ + baseURL.setPath("."); + + QHBoxLayout *layout = new QHBoxLayout(this); + + combo = new QComboBox(true,this); + button = new QPushButton(this); + + button ->setFixedSize(35,25); + button ->setText(i18n("...")); + + layout ->addWidget( combo ); + layout ->addWidget( button ); + + connect( button, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); + connect( combo, SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&))); + connect( combo, SIGNAL(textChanged(const QString&)), SLOT(slotComboActivated(const QString&))); + setFocusProxy(combo); +} + +FileCombo::~FileCombo(){ +} + +QString FileCombo::text() const +{ + return combo->currentText(); +} + +void FileCombo::setText( const QString &_txt ) +{ + combo ->setEditText( _txt ); +} + +void FileCombo::slotFileSelect() +{ + KFileDialog *dlg = new KFileDialog(baseURL.url(), i18n("*|All Files"), this, "", true); + dlg->setMode(KFile::File | KFile::Directory | KFile::ExistingOnly); + dlg->exec(); + KURL url = dlg->selectedURL(); + delete dlg; + if ( !url.isEmpty() ) + { + if (!m_absolutePath) url = QExtFileInfo::toRelative(url, baseURL); + combo->setEditText( url.path() ); + } +} + +/** No descriptions */ +void FileCombo::setBaseURL(const KURL& a_baseURL) +{ + baseURL = a_baseURL; +} + +/** No descriptions */ +void FileCombo::setReturnAbsolutePath(bool absolutePath) +{ + m_absolutePath = absolutePath; +} + +void FileCombo::slotComboActivated(const QString&s) +{ + emit activated(s); +} + +#include "filecombo.moc" diff --git a/quanta/dialogs/filecombo.h b/quanta/dialogs/filecombo.h new file mode 100644 index 00000000..9403b808 --- /dev/null +++ b/quanta/dialogs/filecombo.h @@ -0,0 +1,62 @@ +/*************************************************************************** + filecombo.h - description + ------------------- + begin : Wed Sep 27 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon + (C) 2002 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FILECOMBO_H +#define FILECOMBO_H + +#include +#include + +/** + *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon & Andras Mantia + */ + +class QComboBox; +class QPushButton; +class KURL; + +class FileCombo : public QWidget { + Q_OBJECT +public: + FileCombo(const KURL& a_baseURL, QWidget *parent=0, const char *name=0); + FileCombo(QWidget *parent=0, const char *name=0); + ~FileCombo(); + + QString text() const; + void setText( const QString &); + /** The select URL dialogs shows this URL, and the returned value is relative to this */ + void setBaseURL(const KURL& a_baseURL); + /** The selected URL will be stored with absolute path if absolutePath is true */ + void setReturnAbsolutePath(bool absolutePath); + +public slots: + void slotFileSelect(); + void slotComboActivated(const QString&); + +signals: + void activated(const QString&); + +protected: + KURL baseURL; + bool m_absolutePath; + + QComboBox *combo; + QPushButton *button; + +}; + +#endif diff --git a/quanta/dialogs/fourbuttonmessagebox.ui b/quanta/dialogs/fourbuttonmessagebox.ui new file mode 100644 index 00000000..fba27fc4 --- /dev/null +++ b/quanta/dialogs/fourbuttonmessagebox.ui @@ -0,0 +1,164 @@ + +FourButtonMessageBox +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2003 Andras Mantia <amantia@kde.org> + + + FourButtonMessageBox + + + + 0 + 0 + 425 + 150 + + + + + 0 + 150 + + + + + unnamed + + + + pixmapLabel + + + + 32 + 32 + + + + + + textLabel + + + + + + + + layout2 + + + + unnamed + + + + user1Button + + + &Save + + + + + user2Button + + + Save &As... + + + + + user3Button + + + + 1 + 0 + 0 + 0 + + + + &Do Not Save + + + + + cancelButton + + + &Cancel + + + + + + + spacer1 + + + Vertical + + + Fixed + + + + 20 + 16 + + + + + + + + cancelButton + clicked() + FourButtonMessageBox + cancelButton_clicked() + + + user1Button + clicked() + FourButtonMessageBox + user1Button_clicked() + + + user2Button + clicked() + FourButtonMessageBox + user2Button_clicked() + + + user3Button + clicked() + FourButtonMessageBox + user3Button_clicked() + + + + fourbuttonmessagebox.ui.h + + + int m_status; + + + cancelButton_clicked() + user1Button_clicked() + user2Button_clicked() + user3Button_clicked() + + + status() + + + diff --git a/quanta/dialogs/fourbuttonmessagebox.ui.h b/quanta/dialogs/fourbuttonmessagebox.ui.h new file mode 100644 index 00000000..00f31046 --- /dev/null +++ b/quanta/dialogs/fourbuttonmessagebox.ui.h @@ -0,0 +1,51 @@ + +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you wish to add, delete or rename functions or slots use +** Qt Designer which will update this file, preserving your code. Create an +** init() function in place of a constructor, and a destroy() function in +** place of a destructor. +*****************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ +//(C) 2003 Andras Mantia + +void FourButtonMessageBox::cancelButton_clicked() +{ + m_status = -1; + reject(); +} + + +void FourButtonMessageBox::user1Button_clicked() +{ + m_status = 1; + accept(); +} + + +void FourButtonMessageBox::user2Button_clicked() +{ + m_status = 2; + accept(); +} + + +void FourButtonMessageBox::user3Button_clicked() +{ + m_status = 3; + accept(); +} + + +int FourButtonMessageBox::status() +{ + return m_status; +} diff --git a/quanta/dialogs/loadentitydlgs.ui b/quanta/dialogs/loadentitydlgs.ui new file mode 100644 index 00000000..dffdaa17 --- /dev/null +++ b/quanta/dialogs/loadentitydlgs.ui @@ -0,0 +1,72 @@ + +LoadEntityDlgS + + + LoadEntityDlgS + + + + 0 + 0 + 452 + 116 + + + + + + + + unnamed + + + + textLabel1 + + + Source DTD: + + + + + textLabel2 + + + Target DTEP: + + + + + sourceDTDRequester + + + *.dtd|DTD Definitions + DTD Definitions + + + + + targetDTEPCombo + + + + + spacer1 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + diff --git a/quanta/dialogs/settings/Makefile.am b/quanta/dialogs/settings/Makefile.am new file mode 100644 index 00000000..0df307eb --- /dev/null +++ b/quanta/dialogs/settings/Makefile.am @@ -0,0 +1,13 @@ +noinst_LTLIBRARIES = libsettingsdialogs.la + +libsettingsdialogs_la_SOURCES = parseroptionsui.ui parseroptions.cpp \ + previewoptionss.ui previewoptions.cpp filemaskss.ui filemasks.cpp styleoptionss.ui \ + abbreviations.ui abbreviation.cpp codetemplatedlgs.ui + +METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/src \ + $(all_includes) + diff --git a/quanta/dialogs/settings/abbreviation.cpp b/quanta/dialogs/settings/abbreviation.cpp new file mode 100644 index 00000000..56f81c0e --- /dev/null +++ b/quanta/dialogs/settings/abbreviation.cpp @@ -0,0 +1,277 @@ +/*************************************************************************** + abbreviation.cpp - description + ------------------- + copyright : (C) 2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +//qt includes +#include +#include +#include +#include +#include +#include +#include + +//kde includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//app includes +#include "abbreviation.h" +#include "codetemplatedlgs.h" +#include "resource.h" +#include "quantacommon.h" +#include "dtds.h" + + +AbbreviationDlg::AbbreviationDlg(QWidget *parent, const char *name): + AbbreviationDlgS(parent, name) +{ + m_oldItem = 0L; + m_currentAbbrev = 0L; + + QMapConstIterator it; + for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it) + { + groupCombo->insertItem(it.key()); + } + slotGroupChanged(groupCombo->currentText()); +} + +AbbreviationDlg::~AbbreviationDlg() +{ +} + +void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) +{ + //save the current template + QListViewItem *item = templatesList->currentItem(); + if (item && m_currentAbbrev) + m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); + dtepList->clear(); + templatesList->clear(); + codeEdit->clear(); + m_oldItem = 0L; + m_currentAbbrev = &qConfig.abbreviations[newGroupName]; + QString templateStr; + QString templateName; + QMap::ConstIterator it; + for ( it = m_currentAbbrev->abbreviations.constBegin(); it != m_currentAbbrev->abbreviations.constEnd(); ++it ) + { + templateStr = it.key(); + templateName = templateStr.mid(templateStr.find(' ') + 1); + templateStr = templateStr.left(templateStr.find(' ')); + new KListViewItem(templatesList, templateStr, templateName); + } + for ( QStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit ) + { + dtepList->insertItem(DTDs::ref()->getDTDNickNameFromName(*dtepit)); + } + templatesList->sort(); + templatesList->setCurrentItem(templatesList->firstChild()); + templatesList->setSelected(templatesList->firstChild(), true); +} + +void AbbreviationDlg::slotNewGroup() +{ + bool ok; + QString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this); + if (ok && !groupName.isEmpty()) + { + if (qConfig.abbreviations.contains(groupName)) + { + KMessageBox::error(this, i18n("There is already an abbreviation group called %1. Choose an unique name for the new group.").arg(groupName), i18n("Group already exists")); + QTimer::singleShot(0, this, SLOT(slotNewGroup())); + } else + { + groupCombo->insertItem(groupName); + groupCombo->setCurrentItem(groupCombo->count()-1); + slotGroupChanged(groupName); + } + } +} + +void AbbreviationDlg::slotAddDTEP() +{ + QStringList lst = DTDs::ref()->nickNameList(false); + for (uint i = 0; i < dtepList->count(); i++) + lst.remove(dtepList->text(i)); + bool ok = false; + QStringList res = KInputDialog::getItemList( + i18n( "Add DTEP" ), + i18n( "Select a DTEP:" ), lst, 0, true, &ok, this ); + if (ok) + { + dtepList->insertStringList(res); + for (QStringList::ConstIterator it = res.constBegin(); it != res.constEnd(); ++it) + { + m_currentAbbrev->dteps.append(DTDs::ref()->getDTDNameFromNickName(*it)); + } + } +} + +void AbbreviationDlg::slotRemoveDTEP() +{ + bool hasSelected = false; + for (uint i = 0; i < dtepList->count(); i++) + { + if (dtepList->isSelected(i)) + { + m_currentAbbrev->dteps.remove(DTDs::ref()->getDTDNameFromNickName(dtepList->text(i))); + dtepList->removeItem(i); + i--; + hasSelected = true; + } + } + if (!hasSelected) + { + KMessageBox::error(this, i18n("Select a DTEP from the list before using Remove."), i18n("No DTEP Selected")); + } +} + +void AbbreviationDlg::slotTemplateSelectionChanged(QListViewItem* item) +{ + if (!item) + return; + //QListViewItem *m_oldItem = templatesList->currentItem(); + if (m_oldItem) + { + QString key = m_oldItem->text(0)+" " +m_oldItem->text(1); + m_currentAbbrev->abbreviations.insert(key, codeEdit->text()); + } + + QString code = m_currentAbbrev->abbreviations[item->text(0)+" " +item->text(1)]; + codeEdit->setText(code); + m_oldItem = item; +} + +void AbbreviationDlg::slotAddTemplate() +{ + KDialogBase dlg(this, 0, true, i18n("Add Code Template"), KDialogBase::Ok | KDialogBase::Cancel); + CodeTemplateDlgS w(&dlg); + dlg.setMainWidget(&w); + w.templateEdit->setFocus(); + if (dlg.exec()) + { + QString templateName = w.templateEdit->text(); + QString description = w.descriptionEdit->text(); + if (!templateName.isEmpty()) + { + QListViewItem *item = new KListViewItem(templatesList, templateName, description); + templatesList->setCurrentItem(item); + templatesList->setSelected(item, true); + templatesList->ensureItemVisible(item); + codeEdit->setFocus(); + } + } +} + +void AbbreviationDlg::slotRemoveTemplate() +{ + QListViewItem *item = templatesList->currentItem(); + if (item && + KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the %1 template?").arg(item->text(1)),QString::null,KStdGuiItem::del()) == KMessageBox::Continue) + { + m_currentAbbrev->abbreviations.remove(item->text(0)+" "+item->text(1)); + delete item; + m_oldItem = 0L; + slotTemplateSelectionChanged(templatesList->currentItem()); + } +} + +void AbbreviationDlg::slotEditTemplate() +{ + QListViewItem *item = templatesList->currentItem(); + if (!item) + return; + KDialogBase dlg(this, 0, true, i18n("Edit Code Template"), KDialogBase::Ok | KDialogBase::Cancel); + CodeTemplateDlgS w(&dlg); + dlg.setMainWidget(&w); + w.templateEdit->setText(item->text(0)); + w.descriptionEdit->setText(item->text(1)); + if (dlg.exec()) + { + m_currentAbbrev->abbreviations.remove(item->text(0)+" "+item->text(1)); + item->setText(0, w.templateEdit->text()); + item->setText(1, w.descriptionEdit->text()); + m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); + } +} + + +void AbbreviationDlg::saveTemplates() +{ + QListViewItem *item = templatesList->currentItem(); + if (item && m_currentAbbrev) + m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); + QString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml"; + QString s = "\n\n\n"; + QString s2; + QDomDocument doc; + doc.setContent(s); + QDomNode firstNode = doc.firstChild(); + Abbreviation abbrev; + QMap::ConstIterator abbrevIt; + for (abbrevIt = qConfig.abbreviations.constBegin(); abbrevIt != qConfig.abbreviations.constEnd(); ++abbrevIt) + { + QDomElement groupEl = doc.createElement("Group"); + groupEl.setAttribute("name", abbrevIt.key()); + abbrev = abbrevIt.data(); + for (QStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt) + { + QDomElement el = doc.createElement("DTEP"); + el.setAttribute("name", *dtepIt); + groupEl.appendChild(el); + } + int pos; + QMap::ConstIterator it; + for (it = abbrev.abbreviations.constBegin(); it != abbrev.abbreviations.constEnd(); ++it) + { + QDomElement el = doc.createElement("Template"); + el.setAttribute("code", it.data()); + s = it.key(); + s2 = ""; + pos = s.find(' '); + if (pos != -1) + { + s2 = s.mid(pos+1); + s = s.left(pos); + } + el.setAttribute("name", s); + el.setAttribute("description", s2); + groupEl.appendChild(el); + } + firstNode.appendChild(groupEl); + } + + QFile f(abbrevFile); + if (f.open(IO_WriteOnly | IO_Truncate)) + { + QTextStream str(&f); + str.setEncoding(QTextStream::UnicodeUTF8); + str << doc.toString(); + f.close(); + } else + { + KMessageBox::error(this, i18n("Cannot open the file %1 for writing.\nModified abbreviations will be lost when you quit Quanta.").arg(s)); + } +} + +#include "abbreviation.moc" diff --git a/quanta/dialogs/settings/abbreviation.h b/quanta/dialogs/settings/abbreviation.h new file mode 100644 index 00000000..0e2a34c6 --- /dev/null +++ b/quanta/dialogs/settings/abbreviation.h @@ -0,0 +1,53 @@ +/*************************************************************************** + abbreviation.cpp - description + ------------------- + copyright : (C) 2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef ABBREVIATION_H +#define ABBREVIATION_H + +#include +#include + +#include + +class QListViewItem; +class Abbreviation; +struct DTDStruct; + +class AbbreviationDlg : public AbbreviationDlgS +{ + Q_OBJECT +public: + AbbreviationDlg(QWidget *parent, const char *name = 0); + ~AbbreviationDlg(); + + void saveTemplates(); + +public slots: + void slotGroupChanged(const QString& newGroupName); + +private slots: + void slotNewGroup(); + void slotAddDTEP(); + void slotRemoveDTEP(); + void slotTemplateSelectionChanged(QListViewItem*); + void slotAddTemplate(); + void slotRemoveTemplate(); + void slotEditTemplate(); + +private: + QListViewItem *m_oldItem; + Abbreviation *m_currentAbbrev; +}; + +#endif diff --git a/quanta/dialogs/settings/abbreviations.ui b/quanta/dialogs/settings/abbreviations.ui new file mode 100644 index 00000000..9274fdc6 --- /dev/null +++ b/quanta/dialogs/settings/abbreviations.ui @@ -0,0 +1,354 @@ + +AbbreviationDlgS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2003 Andras Mantia <amantia@kde.org> + + + AbbreviationDlgS + + + + 0 + 0 + 600 + 480 + + + + Abbreviations + + + + unnamed + + + + addDTEPButton + + + Add... + + + + + removeDTEPButton + + + Remove + + + + + newGroupButton + + + &New... + + + + + textLabel1_2 + + + + 1 + 1 + 0 + 0 + + + + &Group: + + + groupCombo + + + + + textLabel1 + + + + 1 + 1 + 0 + 0 + + + + &Valid for: + + + dtepList + + + + + groupCombo + + + + 3 + 0 + 0 + 0 + + + + + + codeEdit + + + PlainText + + + + + + Template + + + true + + + true + + + + + Description + + + true + + + true + + + + templatesList + + + + 7 + 5 + 0 + 0 + + + + LastColumn + + + true + + + + + addButton + + + &Add... + + + + + spacer4 + + + Vertical + + + Preferred + + + + 20 + 30 + + + + + + removeButton + + + &Remove + + + + + editButton + + + &Edit... + + + + + textLabel2 + + + NoFrame + + + Plain + + + Expands to: + + + codeEdit + + + + + textLabel3 + + + + 1 + 5 + 0 + 0 + + + + &Templates: + + + templatesList + + + + + dtepList + + + + 7 + 7 + 0 + 0 + + + + Extended + + + + + spacer2 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + + + templatesList + selectionChanged(QListViewItem*) + AbbreviationDlgS + slotTemplateSelectionChanged(QListViewItem*) + + + addButton + clicked() + AbbreviationDlgS + slotAddTemplate() + + + removeButton + clicked() + AbbreviationDlgS + slotRemoveTemplate() + + + editButton + clicked() + AbbreviationDlgS + slotEditTemplate() + + + groupCombo + activated(const QString&) + AbbreviationDlgS + slotGroupChanged(const QString&) + + + newGroupButton + clicked() + AbbreviationDlgS + slotNewGroup() + + + addDTEPButton + clicked() + AbbreviationDlgS + slotAddDTEP() + + + removeDTEPButton + clicked() + AbbreviationDlgS + slotRemoveDTEP() + + + templatesList + doubleClicked(QListViewItem*) + AbbreviationDlgS + slotEditTemplate() + + + + templatesList + groupCombo + newGroupButton + dtepList + addDTEPButton + removeDTEPButton + addButton + removeButton + editButton + codeEdit + + + slotTemplateSelectionChanged(QListViewItem*) + dtdCombo_activated(const QString&) + slotGroupChanged(const QString&) + slotAddTemplate() + slotRemoveTemplate() + templatesList_currentChanged(QListViewItem*) + slotEditTemplate() + slotAddDTEP() + slotRemoveDTEP() + slotNewGroup() + + + + klistview.h + klistbox.h + + diff --git a/quanta/dialogs/settings/codetemplatedlgs.ui b/quanta/dialogs/settings/codetemplatedlgs.ui new file mode 100644 index 00000000..5aa9254f --- /dev/null +++ b/quanta/dialogs/settings/codetemplatedlgs.ui @@ -0,0 +1,81 @@ + +CodeTemplateDlgS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2003 by Andras Mantia <amantia@kde.org> + + + CodeTemplateDlgS + + + + 0 + 0 + 400 + 72 + + + + + 400 + 70 + + + + Add Code Template + + + + unnamed + + + + textLabel1 + + + &Template: + + + templateEdit + + + + + textLabel2 + + + &Description: + + + descriptionEdit + + + + + templateEdit + + + + + descriptionEdit + + + + + + templateEdit + descriptionEdit + + + accept() + reject() + pushButton4_clicked() + + + diff --git a/quanta/dialogs/settings/filemasks.cpp b/quanta/dialogs/settings/filemasks.cpp new file mode 100644 index 00000000..14e824c1 --- /dev/null +++ b/quanta/dialogs/settings/filemasks.cpp @@ -0,0 +1,67 @@ +/*************************************************************************** + filesmask.cpp - description + ------------------- + begin : Fri May 19 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2002 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "filemasks.h" +#include "filemasks.moc" +// qt includes +#include +#include + +//kde includes +#include + +FileMasks::FileMasks(QWidget *parent, const char *name) + :FileMasksS(parent,name) +{ + connect(buttonDefault, SIGNAL(clicked()), this, SLOT(setToDefault())); +} + +FileMasks::~FileMasks(){ +} +/** set masks to default */ +void FileMasks::setToDefault() +{ + KMimeType::List list = KMimeType::allMimeTypes(); + KMimeType::List::iterator it; + QString markup, script, image, text; + markup = "text/css; text/html; text/sgml; text/xml; "; + script = "text/x-perl; text/x-python; text/x-php; text/x-java; text/x-asp; "; + QString name; + for ( it = list.begin(); it != list.end(); ++it ) + { + name = (*it)->name(); + if (name.contains("text")) + { + if (!markup.contains(name) && !script.contains(name)) + text += name+"; "; + } + if (name.contains("image")) + { + image += name +"; "; + } + } + lineMarkup->setText(markup); + lineScript->setText(script); + lineImage->setText(image); + lineText->setText(text); + +/* + lineHTML->setText("*.*html *.*htm *.php* *.asp *.cfm *.css *.inc* *.*HTML *.*HTM *.PHP* *.ASP *.CFM *.CSS *.INC* "); + linePHP->setText( "*.php* *.PHP*" ); + lineImages->setText("*.gif *.jpg *.png *.jpeg *.bmp *.GIF *.JPG *.PNG *.JPEG *.BMP "); + lineText->setText( "*.txt *.TXT " ); + */ +} diff --git a/quanta/dialogs/settings/filemasks.h b/quanta/dialogs/settings/filemasks.h new file mode 100644 index 00000000..2d13c1f5 --- /dev/null +++ b/quanta/dialogs/settings/filemasks.h @@ -0,0 +1,35 @@ +/*************************************************************************** + filesmask.h - description + ------------------- + begin : Fri May 19 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2002 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FILEMASKS_H +#define FILEMASKS_H + +#include "filemaskss.h" + + +class FileMasks : public FileMasksS +{ + Q_OBJECT +public: + FileMasks(QWidget *parent=0, const char *name=0); + ~FileMasks(); + +public slots: + void setToDefault(); +}; + +#endif diff --git a/quanta/dialogs/settings/filemaskss.ui b/quanta/dialogs/settings/filemaskss.ui new file mode 100644 index 00000000..f8cdb4f6 --- /dev/null +++ b/quanta/dialogs/settings/filemaskss.ui @@ -0,0 +1,336 @@ + +FileMasksS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + + + FileMasksS + + + + 0 + 0 + 571 + 571 + + + + + 3 + 3 + 0 + 0 + + + + + 0 + 0 + + + + + unnamed + + + + encodingCombo + + + + + defaultDTDCombo + + + New files will have the extension and highlighting according to this setting + + + + + GroupBox1 + + + GroupBoxPanel + + + Sunken + + + Mimetypes + + + + unnamed + + + + lineMarkup + + + AlignLeft + + + + + lineImage + + + AlignLeft + + + + + buttonDefault + + + &Reset to Default + + + + + TextLabel4_2 + + + Te&xts: + + + lineText + + + + + TextLabel1_3 + + + &Markups: + + + lineMarkup + + + + + TextLabel3_2 + + + &Images: + + + lineImage + + + + + lineText + + + AlignLeft + + + + + TextLabel2_2 + + + + 1 + 1 + 0 + 0 + + + + + 0 + 0 + + + + &Scripts: + + + false + + + lineScript + + + + + Spacer2_2 + + + Horizontal + + + Expanding + + + + 153 + 20 + + + + + + lineScript + + + AlignLeft + + + + + + + TextLabel1_2 + + + Default character &encoding: + + + AlignVCenter|AlignLeft + + + encodingCombo + + + + + TextLabel1_2_3 + + + Default &DTD: + + + defaultDTDCombo + + + + + spacer3 + + + Vertical + + + Expanding + + + + 20 + 50 + + + + + + buttonGroup7 + + + Startup Options + + + + unnamed + + + + reloadFiles + + + L&oad last-opened files + + + + + showSplash + + + S&how splashscreen + + + + + reloadProject + + + &Load last-opened project + + + + + + + layout2 + + + + unnamed + + + + tlAutoSave + + + Create backups every + + + + + sbAutoSave + + + 30000 + + + 1 + + + 15 + + + + + textLabel1 + + + minutes + + + + + + + showDTDSelectDialog + + + Show the DTD selection dialog when loading files with &unknown DTD + + + + + + lineMarkup + lineScript + lineImage + lineText + buttonDefault + encodingCombo + defaultDTDCombo + showDTDSelectDialog + sbAutoSave + showSplash + reloadProject + reloadFiles + + + diff --git a/quanta/dialogs/settings/parseroptions.cpp b/quanta/dialogs/settings/parseroptions.cpp new file mode 100644 index 00000000..0ad00d73 --- /dev/null +++ b/quanta/dialogs/settings/parseroptions.cpp @@ -0,0 +1,86 @@ +/*************************************************************************** + parseroptions.cpp - description + ------------------- + begin : Fri Aug 23 2002 + copyright : (C) 2002 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#include "parseroptions.h" +#include "parseroptions.moc" +#include +#include + +#include +#include + +/* + * Constructs a ParserOptions which is a child of 'parent', with the + * name 'name' and widget flags set to 'f' + */ +ParserOptions::ParserOptions( KConfig *a_config, QWidget* parent, const char* name ) + : ParserOptionsUI( parent, name ) +{ + config = a_config; + config->setGroup("Parser options"); + + QString handleLBM = config->readEntry("LBM", i18n("Find Tag & Open Tree")); + QString handleMBM = config->readEntry("MBM", i18n("Nothing")); + QString handleRBM = config->readEntry("RBM", i18n("Popup Menu")); + QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area")); + + + if ( !name ) + setName( "ParserOptions" ); + + if ( handleLBM == i18n("Find Tag & Open Tree") ) + { + comboLBM->setCurrentItem(1); + } + else + { + comboLBM->setCurrentItem(0); + } + + if ( handleMBM == i18n("Find Tag & Open Tree") ) comboMBM->setCurrentItem(0); + if ( handleMBM == i18n("Find Tag") ) comboMBM->setCurrentItem(1); + if ( handleMBM == i18n("Go to End of Tag") ) comboMBM->setCurrentItem(2); + if ( handleMBM == i18n("Select Tag Area") ) comboMBM->setCurrentItem(3); + if ( handleMBM == i18n("Nothing")) comboMBM->setCurrentItem(4); + + if ( handleDoubleClick == i18n("Select Tag Area") ) + { + comboDoubleClick->setCurrentItem(0); + } + else + { + comboDoubleClick->setCurrentItem(1); + } +} + +/* + * Destroys the object and frees any allocated resources + */ +ParserOptions::~ParserOptions() +{ + // no need to delete child widgets, Qt does it all for us +} + + +void ParserOptions::updateConfig() +{ + + config->setGroup("Parser options"); + + config->writeEntry("MBM",comboMBM->currentText()); + config->writeEntry("LBM",comboLBM->currentText()); + config->writeEntry("RBM",comboRBM->currentText()); + config->writeEntry("Double click",comboDoubleClick->currentText()); +} diff --git a/quanta/dialogs/settings/parseroptions.h b/quanta/dialogs/settings/parseroptions.h new file mode 100644 index 00000000..a4bdd0f5 --- /dev/null +++ b/quanta/dialogs/settings/parseroptions.h @@ -0,0 +1,37 @@ +/*************************************************************************** + parseroptions.h - description + ------------------- + begin : Fri Aug 23 2002 + copyright : (C) 2002 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +#ifndef PARSEROPTIONS_H +#define PARSEROPTIONS_H + +#include "parseroptionsui.h" + +class KConfig; + +class ParserOptions : public ParserOptionsUI +{ + Q_OBJECT + +public: + ParserOptions( KConfig *config, QWidget* parent = 0, const char* name = 0); + ~ParserOptions(); + + void updateConfig(); + +protected: + KConfig *config; +}; + +#endif // PARSEROPTIONS_H diff --git a/quanta/dialogs/settings/parseroptionsui.ui b/quanta/dialogs/settings/parseroptionsui.ui new file mode 100644 index 00000000..34a54cd6 --- /dev/null +++ b/quanta/dialogs/settings/parseroptionsui.ui @@ -0,0 +1,314 @@ + +ParserOptionsUI +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2002 Andras Mantia <amantia@kde.org> + + + ParserOptionsUI + + + + 0 + 0 + 470 + 413 + + + + + 5 + 5 + 0 + 0 + + + + + 0 + 0 + + + + + unnamed + + + + buttonGroup1 + + + Structure Tree Look && Feel + + + + unnamed + + + + refreshFrequency + + + 0 + + + 5 + + + Use 0 to disable the automatic refresh of structure tree + + + + + Spacer4_2 + + + Horizontal + + + Expanding + + + + 122 + 20 + + + + + + instantUpdate + + + Instant update + + + Update the structure tree after every keystroke + + + + + Spacer2 + + + Horizontal + + + Expanding + + + + 122 + 20 + + + + + + showClosingTags + + + Show closing tags + + + + + showEmptyNodes + + + Show empt&y nodes and groups + + + + + spinExpand + + + 4 + + + Set to 0 in order to expand the whole tree + + + + + TextLabel1_5 + + + Refresh frequency (in seconds): + + + + + TextLabel2_2 + + + Expand tree when reparse to level: + + + + + + + GroupBox1 + + + Clicks on Structure Tree Items + + + Update the structure tree after every keystroke + + + + unnamed + + + + + Select Tag Area + + + + + Nothing + + + + comboDoubleClick + + + + + + Find Tag + + + + + Find Tag & Open Tree + + + + comboLBM + + + + + TextLabel1 + + + Left button: + + + + + + Popup Menu + + + + comboRBM + + + + + TextLabel1_4 + + + Double click: + + + + + TextLabel1_2 + + + Middle button: + + + + + TextLabel1_3 + + + Right button: + + + + + + Find Tag & Open Tree + + + + + Find Tag + + + + + Go to End of Tag + + + + + Select Tag Area + + + + + Nothing + + + + comboMBM + + + + + + + spacer3 + + + Vertical + + + Expanding + + + + 20 + 40 + + + + + + + + instantUpdate + toggled(bool) + refreshFrequency + setDisabled(bool) + + + + comboLBM + comboMBM + comboRBM + comboDoubleClick + showEmptyNodes + showClosingTags + instantUpdate + refreshFrequency + spinExpand + + + diff --git a/quanta/dialogs/settings/previewoptions.cpp b/quanta/dialogs/settings/previewoptions.cpp new file mode 100644 index 00000000..c445c52d --- /dev/null +++ b/quanta/dialogs/settings/previewoptions.cpp @@ -0,0 +1,127 @@ +/*************************************************************************** + previewoptions.cpp - description + ------------------- + begin : Fri Aug 4 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon + (C) 2002, 2004 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "previewoptions.h" +#include "previewoptions.moc" +// qt includes +#include +#include +// kde includes +#include +#include + +PreviewOptions::PreviewOptions(QWidget *parent, const char *name) + : PreviewOptionsS(parent,name) +{ +} + +PreviewOptions::~PreviewOptions(){ +} + +void PreviewOptions::setWindowLayout(const QString& layout ) +{ + if ( layout == "Default") resetLayout->setChecked(true); + else resetLayout->setChecked(false); +} + +void PreviewOptions::setPosition(const QString& position ) +{ + radioEditor->setChecked(true); + if ( position == "Toolview" ) radioToolview->setChecked(true); +} + +QString PreviewOptions::position() +{ + QString position = "Editor"; + if ( radioToolview->isChecked() ) + position = "Toolview"; + return position; +} + +void PreviewOptions::setDocPosition(const QString &position) +{ + radioNewDocTab->setChecked(true); + if (position == "Toolview") radioSeparateDocView->setChecked(true); +} + +QString PreviewOptions::docPosition() +{ + QString position = "Tab"; + if (radioSeparateDocView->isChecked()) position = "Toolview"; + return position; +} + +QString PreviewOptions::layout() +{ + QString layout = "Custom"; + if ( resetLayout->isChecked() ) + layout = "Default"; + return layout; +} + +QString PreviewOptions::closeButtons() +{ + QString closeButtonState = "ShowAlways"; + if (radioDelayedCloseButtons->isChecked()) + closeButtonState = "ShowDelayed"; + if (radioNoCloseButtons->isChecked()) + closeButtonState = "Disabled"; + return closeButtonState; +} + +void PreviewOptions::setCloseButtons(const QString &state) +{ + if (state == "ShowAlways") radioShowCloseButtons->setChecked(true); + if (state == "ShowDelayed") radioDelayedCloseButtons->setChecked(true); + if (state == "Disabled") radioNoCloseButtons->setChecked(true); +} + +void PreviewOptions::setToolviewTabs(uint state) +{ + radioIcon->setChecked(true); + if (state == 3) radioIconText->setChecked(true); + if (state == 1) radioText->setChecked(true); + m_toolviewTabs = state; +} + +uint PreviewOptions::toolviewTabs() +{ + uint state = 0; + if (radioIconText->isChecked()) state = 3; + if (radioText->isChecked()) state = 1; + return state; +} + +void PreviewOptions::setHiddenFiles(bool show) +{ + showHidden->setChecked(show); +} + +bool PreviewOptions::hiddenFiles() +{ + return showHidden->isChecked(); +} + + +void PreviewOptions::setSaveTrees(bool show) +{ + saveLocalTrees->setChecked(show); +} + +bool PreviewOptions::saveTrees() +{ + return saveLocalTrees->isChecked(); +} diff --git a/quanta/dialogs/settings/previewoptions.h b/quanta/dialogs/settings/previewoptions.h new file mode 100644 index 00000000..cb1f6719 --- /dev/null +++ b/quanta/dialogs/settings/previewoptions.h @@ -0,0 +1,50 @@ +/*************************************************************************** + previewoptions.h - description + ------------------- + begin : Fri Aug 4 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon + (C) 2002, 2004 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PREVIEWOPTIONS_H +#define PREVIEWOPTIONS_H + +#include "previewoptionss.h" + +class KConfig; + +class PreviewOptions : public PreviewOptionsS { + Q_OBJECT +public: + PreviewOptions(QWidget *parent=0, const char *name=0); + ~PreviewOptions(); + + QString position(); + QString layout(); + QString closeButtons(); + QString docPosition(); + uint toolviewTabs(); + bool hiddenFiles(); + bool saveTrees(); + void setPosition(const QString&); + void setWindowLayout(const QString&); + void setCloseButtons(const QString&); + void setToolviewTabs(uint); + void setDocPosition(const QString&); + void setHiddenFiles(bool show); + void setSaveTrees(bool show); + +private: + uint m_toolviewTabs; +}; + +#endif diff --git a/quanta/dialogs/settings/previewoptionss.ui b/quanta/dialogs/settings/previewoptionss.ui new file mode 100644 index 00000000..a27a164b --- /dev/null +++ b/quanta/dialogs/settings/previewoptionss.ui @@ -0,0 +1,280 @@ + +PreviewOptionsS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + + + PreviewOptionsS + + + + 0 + 0 + 498 + 512 + + + + + 350 + 220 + + + + + unnamed + + + + resetLayout + + + Reset window layout to the default on the next startup + + + + + showHidden + + + Show hidden files in files tree + + + + + saveLocalTrees + + + Save tree status for local trees + + + + + buttonGroup3 + + + Close Buttons on Tabs + + + + unnamed + + + + radioShowCloseButtons + + + &Always show + + + true + + + + + radioNoCloseButtons + + + &Do not show + + + + + radioDelayedCloseButtons + + + Show dela&yed + + + + + + + buttonGroup3_2 + + + Documentation + + + + unnamed + + + + radioNewDocTab + + + New tab + + + true + + + + + radioSeparateDocView + + + Separate toolview + + + + + + + buttonGroup4 + + + Toolview Tabs + + + + unnamed + + + + radioIconText + + + Icon and text + + + true + + + + + radioText + + + Text + + + + + radioIcon + + + Icon + + + + + + + ButtonGroup1 + + + Preview + + + + unnamed + + + 11 + + + 6 + + + + radioToolview + + + Separate toolview + + + + + radioEditor + + + Editor area + + + true + + + + + + + Spacer1 + + + Vertical + + + Expanding + + + + 20 + 30 + + + + + + buttonGroup1 + + + &Warning Messages + + + + unnamed + + + + warnBinaryOpening + + + Warn about opening binar&y/unknown files + + + + + warnEventActions + + + Warn when executing &actions associated with events + + + + + warnAll + + + Show all warning messages + + + + + + + + radioEditor + radioNewDocTab + radioShowCloseButtons + radioIconText + resetLayout + showHidden + saveLocalTrees + warnBinaryOpening + warnEventActions + warnAll + radioToolview + radioNoCloseButtons + radioDelayedCloseButtons + + + diff --git a/quanta/dialogs/settings/styleoptionss.ui b/quanta/dialogs/settings/styleoptionss.ui new file mode 100644 index 00000000..13ed198d --- /dev/null +++ b/quanta/dialogs/settings/styleoptionss.ui @@ -0,0 +1,201 @@ + +StyleOptionsS +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + + + StyleOptionsS + + + + 0 + 0 + 410 + 300 + + + + + 3 + 3 + 0 + 0 + + + + + 410 + 250 + + + + + unnamed + + + + TextLabel3 + + + Attribute quotation: + + + + + + Double Quotes + + + + + Single Quotes + + + + attributeQuotation + + + + + TextLabel1 + + + Tag case: + + + + + TextLabel2 + + + Attribute case: + + + + + + Default Case + + + + + Lower Case + + + + + Upper Case + + + + attributeCase + + + + + optionalTagAutoClose + + + Auto-close o&ptional tags + + + + + + Default Case + + + + + Lower Case + + + + + Upper Case + + + + tagCase + + + + + tagAutoClose + + + Auto-close &non single and non optional tags + + + + + spacer1 + + + Vertical + + + Expanding + + + + 20 + 30 + + + + + + tagUpdateClosing + + + &Update opening/closing tag automatically + + + + + useAutoCompletion + + + + 1 + 0 + 0 + 0 + + + + Use &auto-completion + + + + + replaceAccented + + + Automatic &replacement of the accented characters + + + If this option is turned on the accented characters, like <b>&#225;</b>, will be automatically replaced by their unicode style notation, for the above case with <b>&#038;#225;</b>.<br> +We suggest to leave this option off and use an unicode or locale encoding for your documents. + + + + + + tagCase + attributeCase + attributeQuotation + optionalTagAutoClose + tagAutoClose + useAutoCompletion + + + diff --git a/quanta/dialogs/specialchardialog.cpp b/quanta/dialogs/specialchardialog.cpp new file mode 100644 index 00000000..e8f662ea --- /dev/null +++ b/quanta/dialogs/specialchardialog.cpp @@ -0,0 +1,88 @@ +/*************************************************************************** + specialchardialog.cpp + ------------------- + + copyright : (C) 2004 - Michal Rudolf + email : mrudolf@kdewebdev.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "specialchardialog.h" +#include "resource.h" + +SpecialCharDialog::SpecialCharDialog( QWidget* parent, const char* name, bool modal, WFlags fl) + :SpecialCharDialogS( parent, name, modal, fl ) +{ + connect ( FilterLineEdit, SIGNAL(textChanged(const QString&)), + SLOT(filterChars(const QString&)) ); + connect ( CharsListBox, SIGNAL(doubleClicked(QListBoxItem*)), + SLOT(insertCode()) ); + connect (buttonOk, SIGNAL(clicked()), SLOT(insertCode())); + connect (buttonChar, SIGNAL(clicked()), SLOT(insertChar())); + connect (buttonCancel, SIGNAL(clicked()), SLOT(cancel())); + filterChars(""); +} + +SpecialCharDialog::~SpecialCharDialog() +{ +} + +void SpecialCharDialog::filterChars(const QString& filter) +{ + CharsListBox->clear(); + if (filter.isEmpty()) + CharsListBox->insertStringList(charList); + else { + for (QStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it) + if ( (*it).contains(filter, false) ) + CharsListBox->insertItem(*it); + } + if (CharsListBox->currentItem() == -1 && CharsListBox->count()) + CharsListBox->setCurrentItem(0); +} + +QString SpecialCharDialog::selection() +{ + return m_selection; +} + +void SpecialCharDialog::insertCode() +{ + QString selected = CharsListBox->text(CharsListBox->currentItem()); + int begin = selected.find("(&")+1; + int length = selected.find(";)") - begin + 1; + m_selection = selected.mid(begin, length); + done(QDialog::Accepted); +} + +void SpecialCharDialog::insertChar() +{ + m_selection = CharsListBox->text(CharsListBox->currentItem()).left(1); + done(QDialog::Accepted); +} + +void SpecialCharDialog::cancel() +{ + m_selection = ""; + done(QDialog::Rejected); +} + +#include "specialchardialog.moc" diff --git a/quanta/dialogs/specialchardialog.h b/quanta/dialogs/specialchardialog.h new file mode 100644 index 00000000..23e5dc8d --- /dev/null +++ b/quanta/dialogs/specialchardialog.h @@ -0,0 +1,46 @@ +/*************************************************************************** + specialchardialog.h + ------------------- + + copyright : (C) 2004 - Michal Rudolf + email : mrudolf@kdewebdev.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef SPECIALCHARDIALOG_H +#define SPECIALCHARDIALOG_H + +#include +#include "specialchardialogs.h" + +class SpecialCharDialog : public SpecialCharDialogS +{ + Q_OBJECT + +public: + + SpecialCharDialog( QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0); + ~SpecialCharDialog(); + QString selection(); + +public slots: + void filterChars(const QString&); + void insertChar(); + void insertCode(); + void cancel(); + +private slots: + +private: + QString m_selection; +}; + +#endif diff --git a/quanta/dialogs/specialchardialogs.ui b/quanta/dialogs/specialchardialogs.ui new file mode 100644 index 00000000..acc52e53 --- /dev/null +++ b/quanta/dialogs/specialchardialogs.ui @@ -0,0 +1,153 @@ + +SpecialCharDialogS + + + SpecialCharDialogS + + + + 0 + 0 + 409 + 303 + + + + Insert Special Character + + + true + + + + unnamed + + + + layout4 + + + + unnamed + + + + buttonOk + + + + 100 + 0 + + + + &Insert Code + + + true + + + true + + + + + buttonChar + + + + 100 + 0 + + + + Insert C&har + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 112 + 20 + + + + + + buttonCancel + + + + 100 + 0 + + + + &Cancel + + + + + + true + + + + + + + layout3 + + + + unnamed + + + + textLabel1 + + + &Filter: + + + FilterLineEdit + + + + + FilterLineEdit + + + + + + + CharsListBox + + + + + + + + FilterLineEdit + CharsListBox + buttonOk + buttonChar + buttonCancel + + + + klineedit.h + klistbox.h + + diff --git a/quanta/dialogs/tagdialogs/Makefile.am b/quanta/dialogs/tagdialogs/Makefile.am new file mode 100644 index 00000000..ac7fd23f --- /dev/null +++ b/quanta/dialogs/tagdialogs/Makefile.am @@ -0,0 +1,18 @@ +noinst_LTLIBRARIES = libtagdialogs.la + +libtagdialogs_la_SOURCES = tagmisc.ui listdlg.cpp tagmaildlg.cpp \ + tagquicklistdlg.cpp tagquicklistdlgdata.cpp tagdialog.cpp tagattr.cpp pictureview.cpp \ + tagimgdlg.cpp tagxml.cpp tagwidget.cpp colorcombo.cpp tagimgdlgdata.cpp \ + tagmiscdlg.cpp tagmail.ui + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/dialogs \ + -I$(top_srcdir)/quanta/components/csseditor \ + -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/quanta/parts/kafka \ + -I$(top_srcdir)/lib \ + $(KMDI_INCLUDES) $(all_includes) + +METASOURCES = AUTO + diff --git a/quanta/dialogs/tagdialogs/colorcombo.cpp b/quanta/dialogs/tagdialogs/colorcombo.cpp new file mode 100644 index 00000000..2dcb6aa2 --- /dev/null +++ b/quanta/dialogs/tagdialogs/colorcombo.cpp @@ -0,0 +1,313 @@ +/* This file is part of the KDE libraries + Copyright (C) 1997 Martin Jones (mjones@kde.org) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +//----------------------------------------------------------------------------- +// KDE color selection dialog. +// +// 1999-09-27 Espen Sand +// KColorDialog is now subclassed from KDialogBase. I have also extended +// KColorDialog::getColor() so that in contains a parent argument. This +// improves centering capability. +// +// layout management added Oct 1997 by Mario Weilguni +// +// + + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "colorcombo.h" +#include "colorcombo.moc" + +// This is repeated from the KColorDlg, but I didn't +// want to make it public BL. +// We define it out when compiling with --enable-final in which case +// we use the version defined in KColorDlg + +#define STANDARD_PAL_SIZE 17 + +ColorCombo::ColorCombo( QWidget *parent, const char *name ) + : QComboBox( parent, name ) +{ + customColor.setRgb( 255, 255, 255 ); + internalcolor.setRgb( 255, 255, 255 ); + + hascolor = false; + + createStandardPalette(); + + addColors(); + + connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); + connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) ); +} + +ColorCombo::~ColorCombo() +{ + delete []standardPalette; + delete []standardPaletteNames; +} + +/** + Sets the current color + */ +void ColorCombo::setColor( const QColor &col ) +{ + internalcolor = col; + hascolor = true; + + addColors(); +} + + +/** + Returns the currently selected color + */ +QColor ColorCombo::color() const { + return internalcolor; +} + + +bool ColorCombo::hasColor() const{ + return hascolor; +} + + +void ColorCombo::setColorName( const QString &color ) +{ + + QColor c(color); + + if ( c.isValid() && !color.isEmpty() ) { + setColor( c ); + } + else { + hascolor = false; + addColors(); + } + +} + +QString ColorCombo::colorName() +{ + if ( hascolor ) { + int i; + + for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) + if ( standardPalette[i] == internalcolor ) + return standardPaletteNames[i]; + + return internalcolor.name(); + + } + else + return ""; +} + + +void ColorCombo::resizeEvent( QResizeEvent *re ) +{ + QComboBox::resizeEvent( re ); + + addColors(); +} + +void ColorCombo::slotActivated( int index ) +{ + hascolor = ( index != 0); + + if ( index == 1 ) + { + if ( KColorDialog::getColor( customColor ) == QDialog::Accepted ) + { + QRect rect( 0, 0, width(), 20 ); + QPixmap pixmap( rect.width(), rect.height() ); + QPainter painter; + QPen pen; + + if ( qGray( customColor.rgb() ) < 128 ) + pen.setColor( white ); + else + pen.setColor( black ); + + painter.begin( &pixmap ); + QBrush brush( customColor ); + painter.fillRect( rect, brush ); + painter.setPen( pen ); + painter.drawText( 2, painter.fontMetrics().height(), + i18n("Custom...") ); + painter.end(); + + changeItem( pixmap, 1 ); + pixmap.detach(); + } + + internalcolor = customColor; + } + else + if ( index > 1 ) + internalcolor = standardPalette[ index - 2 ]; + + emit activated( internalcolor ); +} + +void ColorCombo::slotHighlighted( int index ) +{ + if ( index < 2 ) + internalcolor = customColor; + else + internalcolor = standardPalette[ index - 2 ]; + + emit highlighted( internalcolor ); +} + +void ColorCombo::addColors() +{ + QRect rect( 0, 0, width(), 20 ); + QPixmap pixmap( rect.width(), rect.height() ); + QPainter painter; + QPen pen; + int i; + + clear(); + + for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) + if ( standardPalette[i] == internalcolor ) break; + + if ( i == STANDARD_PAL_SIZE ) + customColor = internalcolor; + + insertItem( i18n("None") ); + + if ( qGray( customColor.rgb() ) < 128 ) + pen.setColor( white ); + else + pen.setColor( black ); + + painter.begin( &pixmap ); + QBrush brush( customColor ); + painter.fillRect( rect, brush ); + painter.setPen( pen ); + + painter.drawText( 2, painter.fontMetrics().height(), i18n("Custom...") ); + painter.end(); + + insertItem( pixmap ); + pixmap.detach(); + + bool findColor = false; + + for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) + { + painter.begin( &pixmap ); + QBrush brush( standardPalette[i] ); + painter.fillRect( rect, brush ); + painter.end(); + + insertItem( pixmap ); + pixmap.detach(); + + if ( standardPalette[i] == internalcolor ) { + setCurrentItem( i + 2 ); + findColor = true; + } + } + + if ( !findColor ) + setCurrentItem(1); + + + + if ( !hascolor ) + setCurrentItem(0); + +} + +void ColorCombo::createStandardPalette() +{ + + standardPalette = new QColor [STANDARD_PAL_SIZE]; + + int i = 0; + + standardPalette[i++] = Qt::red; + standardPalette[i++] = Qt::green; + standardPalette[i++] = Qt::blue; + standardPalette[i++] = Qt::cyan; + standardPalette[i++] = Qt::magenta; + standardPalette[i++] = Qt::yellow; + standardPalette[i++] = Qt::darkRed; + standardPalette[i++] = Qt::darkGreen; + standardPalette[i++] = Qt::darkBlue; + standardPalette[i++] = Qt::darkCyan; + standardPalette[i++] = Qt::darkMagenta; + standardPalette[i++] = Qt::darkYellow; + standardPalette[i++] = Qt::white; + standardPalette[i++] = Qt::lightGray; + standardPalette[i++] = Qt::gray; + standardPalette[i++] = Qt::darkGray; + standardPalette[i++] = Qt::black; + + + standardPaletteNames = new QString [STANDARD_PAL_SIZE]; + + i = 0; + + standardPaletteNames[i++] = "red"; + standardPaletteNames[i++] = "green"; + standardPaletteNames[i++] = "blue"; + standardPaletteNames[i++] = "cyan"; + standardPaletteNames[i++] = "magenta"; + standardPaletteNames[i++] = "yellow"; + standardPaletteNames[i++] = "darkRed"; + standardPaletteNames[i++] = "darkGreen"; + standardPaletteNames[i++] = "darkBlue"; + standardPaletteNames[i++] = "darkCyan"; + standardPaletteNames[i++] = "darkMagenta"; + standardPaletteNames[i++] = "darkYellow"; + standardPaletteNames[i++] = "white"; + standardPaletteNames[i++] = "lightGray"; + standardPaletteNames[i++] = "gray"; + standardPaletteNames[i++] = "darkGray"; + standardPaletteNames[i++] = "black"; +} diff --git a/quanta/dialogs/tagdialogs/colorcombo.h b/quanta/dialogs/tagdialogs/colorcombo.h new file mode 100644 index 00000000..35eae54a --- /dev/null +++ b/quanta/dialogs/tagdialogs/colorcombo.h @@ -0,0 +1,85 @@ +/* This file is part of the KDE libraries + Copyright (C) 1997 Martin Jones (mjones@kde.org) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +//----------------------------------------------------------------------------- +// KDE color selection combo box + +// layout management added Oct 1997 by Mario Weilguni +// + + +#ifndef COLORCOMBO_H +#define COLORCOMBO_H + +#include +#include +#include +#include +#include +#include "kselect.h" + + +/** + * Combobox for colours. + */ +class ColorCombo : public QComboBox +{ + Q_OBJECT +public: + ColorCombo( QWidget *parent = 0L, const char *name = 0L ); + ~ColorCombo(); + + void setColor( const QColor &col ); + void setColorName(const QString &color); + QString colorName(); + /** + * Retrieve the currently selected color. + **/ + QColor color() const; + + bool hasColor() const; + +public slots: + void slotActivated( int index ); + void slotHighlighted( int index ); + +signals: + void activated( const QColor &col ); + void highlighted( const QColor &col ); + +protected: + /** + * @reimplemented + */ + virtual void resizeEvent( QResizeEvent *re ); + +private: + void createStandardPalette(); + void addColors(); + QColor customColor; + QColor internalcolor; + + bool hascolor; + + QColor *standardPalette; + QString *standardPaletteNames; + + +}; + +#endif // COLORCOMBO_H diff --git a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp new file mode 100644 index 00000000..13a488e5 --- /dev/null +++ b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp @@ -0,0 +1,76 @@ +/*************************************************************************** + corewidgetdlg.cpp - description + ------------------- + begin : Thu Mar 30 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + email : pdima@mail.univ.kiev.ua + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "corewidgetdlg.h" +#include "corewidgetdlg.moc" +#include "tagwidget.h" + +#include +#include + +CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) + :CoreWidgetDlgS(parent,name), TagWidget(parent,name) +{ +} + +CoreWidgetDlg::~CoreWidgetDlg(){ +} + +void CoreWidgetDlg::readAttributes( QDict *d ) +{ + dict = d; + + updateDict("id", lineId ); + updateDict("class", lineClass ); + updateDict("style", lineStyle ); + updateDict("title", lineTitle ); + + updateDict("lang", lineLang ); + updateDict("dir", lineDir ); + +} + +void CoreWidgetDlg::writeAttributes( QDict *d ) +{ + dict = d; + QString *t; // value of attr. + + if (( t=d->find("id") )) setValue(*t, lineId); + if (( t=d->find("class") )) setValue(*t, lineClass); + if (( t=d->find("style") )) setValue(*t, lineStyle); + if (( t=d->find("title") )) setValue(*t, lineTitle); + + if (( t=d->find("lang") )) setValue(*t, lineLang); + if (( t=d->find("dir") )) setValue(*t, lineDir); +} + + + + +/** */ +void CoreWidgetDlg::disableCoreAttribs() +{ + lineId->setEnabled(false); + lineClass->setEnabled(false); + lineStyle->setEnabled(false); + lineTitle->setEnabled(false); +} +/** */ +void CoreWidgetDlg::disableI18nAttribs() +{ + lineLang->setEnabled(false); + lineDir->setEnabled(false); +} diff --git a/quanta/dialogs/tagdialogs/listdlg.cpp b/quanta/dialogs/tagdialogs/listdlg.cpp new file mode 100644 index 00000000..396143c2 --- /dev/null +++ b/quanta/dialogs/tagdialogs/listdlg.cpp @@ -0,0 +1,60 @@ +/*************************************************************************** + listdlg.cpp - description + ------------------- + begin : Mon Nov 26 2001 + copyright : (C) 2001 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * (at your option) any later version. * + ***************************************************************************/ + +#include "listdlg.h" + +//kde include +#include +#include + +//qt includes +#include +#include +#include + +ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) + :KDialogBase(parent,name), listbox(new KListBox(this)) +{ + Q_CHECK_PTR(listbox); + setMainWidget(listbox); + showButtonApply(false); + enableButtonSeparator(true); + + listbox->clear(); + listbox->insertStringList(entryList); + if(entryList.count()>0) + { + listbox->setCurrentItem(0); + } + listbox->setMinimumSize(350,150); + adjustSize(); + resize(sizeHint()); + + connect(listbox,SIGNAL(doubleClicked( QListBoxItem * )), SLOT(slotOk())); +} + +ListDlg::~ListDlg(){ +} + +QString ListDlg::getEntry() +{ + return listbox->currentText(); +} + +int ListDlg::getEntryNum() +{ + return listbox->currentItem(); +} +#include "listdlg.moc" diff --git a/quanta/dialogs/tagdialogs/listdlg.h b/quanta/dialogs/tagdialogs/listdlg.h new file mode 100644 index 00000000..be1605f2 --- /dev/null +++ b/quanta/dialogs/tagdialogs/listdlg.h @@ -0,0 +1,45 @@ +/*************************************************************************** + listdlg.h - description + ------------------- + begin : Mon Nov 26 2001 + copyright : (C) 2001 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef LISTDLG_H +#define LISTDLG_H + +#include + +class QPushButton; +class QString; +class QStringList; +class KListBox; + +/**Select an item from a list. The list is given in +the constructor as a parameter. After calling +the exec() method, you can check the +selected item with the getEntry() method. + *@author Andras Mantia + */ + +class ListDlg : public KDialogBase { +Q_OBJECT +public: + ListDlg(QStringList &entryList,QWidget* parent=0, const char *name =0); + ~ListDlg(); + QString getEntry(); + int getEntryNum(); +private: // Private attributes + /** */ + KListBox * listbox; +}; + +#endif diff --git a/quanta/dialogs/tagdialogs/pictureview.cpp b/quanta/dialogs/tagdialogs/pictureview.cpp new file mode 100644 index 00000000..0082d379 --- /dev/null +++ b/quanta/dialogs/tagdialogs/pictureview.cpp @@ -0,0 +1,103 @@ +/*************************************************************************** + pictureview.cpp - description + ------------------- + begin : Mon Nov 29 1999 + copyright : (C) 1999 by Dmitry Poplavsky & Yacovlev Alexander + email : pdima@mail.univ.kiev.ua + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "pictureview.h" +#include "pictureview.moc" +#include "qpainter.h" +#include + +PictureView::PictureView(QWidget *parent, char *file, const char *name ) : QFrame(parent,name) +{ + if ( file ) { + pix = new QImage(file); + picwidth = pix->width(); + picheight = pix->height(); + x_of = 0; + y_of = 0; + scale(); + } else { + pix = new QImage(); + picwidth = 0; + picheight = 0; + x_of = 0; + y_of = 0; + } + + + setFrameStyle ( Box|Sunken ); +} + +PictureView::~PictureView() +{ +} + +void PictureView::paintEvent( QPaintEvent * e ) +{ + QPainter p; + p.begin( this ); + p.drawImage( x_of, y_of, *pix ); + p.end(); + + QFrame::paintEvent(e); + +} + +void PictureView::resizeEvent ( QResizeEvent * e){ + scale(); + QFrame::resizeEvent(e); +} + +/** set image */ +void PictureView::slotSetImage(const QString& file) +{ + pix->load( file ); + picwidth = pix->width(); + picheight = pix->height(); + + scale(); + repaint(); +} + +/** try scale image */ +void PictureView::scale(){ + float width_ot,height_ot; + + width_ot = 1; + height_ot = 1; + x_of = y_of = 0; + + if ( picwidth > size().width() ) width_ot = (float)size().width()/(float)picwidth; + else x_of = (size().width()-picwidth)/2; + if ( picheight > size().height() ) height_ot = (float)size().height()/(float)picheight; + else y_of = (size().height()-picheight)/2; + + if ( width_ot < 1 || height_ot < 1) { + if ( width_ot < height_ot) { + *pix = pix->smoothScale( (int)(width_ot*picwidth), (int)(width_ot*picheight)); + y_of = ( size().height()-(int)(width_ot*picheight) )/2; + } + else { + *pix = pix->smoothScale( (int)(height_ot*picwidth), (int)(height_ot*picheight)); + x_of = ( size().width()-(int)(height_ot*picwidth) )/2; + } + + picwidth = size().width(); + picheight = size().height(); + } + + +} diff --git a/quanta/dialogs/tagdialogs/pictureview.h b/quanta/dialogs/tagdialogs/pictureview.h new file mode 100644 index 00000000..aaf9186e --- /dev/null +++ b/quanta/dialogs/tagdialogs/pictureview.h @@ -0,0 +1,59 @@ +/*************************************************************************** + pictureview.h - description + ------------------- + begin : Mon Nov 29 1999 + copyright : (C) 1999 by Dmitry Poplavsky & Yacovlev Alexander + email : pdima@mail.univ.kiev.ua + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef PICTUREVIEW_H +#define PICTUREVIEW_H + +#include +#include +class QImage; + +/**Class for images preview +used by TagImgDlg + *@author Dmitry Poplavsky & Yacovlev Alexander + */ + +class PictureView : public QFrame { + Q_OBJECT +public: + PictureView(QWidget *parent=0, char *file=0, const char *name=0); + /** try scale image */ + void scale(); +public slots: // Public slots + /** set image */ + void slotSetImage(const QString& file); +protected: // Protected methods + /** */ + virtual void resizeEvent ( QResizeEvent * e); + ~PictureView(); + +protected: + virtual void paintEvent( QPaintEvent * ); + +private: // Private attributes + /** height of image */ + int picheight; + int x_of; +private: // Private attributes + /** width of image */ + int picwidth; + int y_of; + + QImage *pix; +}; + +#endif diff --git a/quanta/dialogs/tagdialogs/tagattr.cpp b/quanta/dialogs/tagdialogs/tagattr.cpp new file mode 100644 index 00000000..772da4fb --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagattr.cpp @@ -0,0 +1,97 @@ +/*************************************************************************** + tagxml.cpp - description + ------------------- + begin : ����25 14:34:07 EEST 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev + (C) 2004 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +//kde includes +#include +#include +#include +#include + +//qt includes +#include +#include + +//app includes +#include "tagattr.h" +#include "node.h" +#include "colorcombo.h" +#include "qtag.h" +#include "quantacommon.h" + +QString Attr::attrName() const +{ + return name; +} + + +Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) + : Attr(el, w, dtdTag) +{ + combo = (QComboBox *)w; + + QString source = el.attribute("source"); + if (source == "dcop") //fill the list with a result of a DCOP call + { + QString method = el.attribute("method"); + QString interface = el.attribute("interface", "QuantaIf"); + QString arguments = el.attribute("arguments"); + arguments.replace("%tagname%", m_dtdTag->name()); + DCOPReply reply = QuantaCommon::callDCOPMethod(interface, method, arguments); + if (reply.isValid()) + { + QStringList list = reply; + combo->insertStringList(list); + } + } + + for ( QDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "items" ) { + QDomElement item = n.firstChild().toElement(); + while ( !item.isNull() ) { + combo->insertItem( item.text() ); + item = item.nextSibling().toElement(); + } + } + } + + setValue(""); +} + +void Attr_list::setValue(const QString &value) +{ + + for ( int i=0; icount(); i++ ) + if ( value == combo->text(i) ) { + combo->setCurrentItem(i); + return; + } + + combo->insertItem(value); + combo->setCurrentItem( combo->count() - 1 ); + +} + + +QDomNode findChild( QDomNode &parent, const QString &name ) +{ + for ( QDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) + if ( n.nodeName() == name ) + return n; + return QDomNode(); +} + diff --git a/quanta/dialogs/tagdialogs/tagattr.h b/quanta/dialogs/tagdialogs/tagattr.h new file mode 100644 index 00000000..30b5220d --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagattr.h @@ -0,0 +1,137 @@ +/*************************************************************************** + tagxml.h - description + ------------------- + begin : ����25 14:34:07 EEST 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev + (C) 2004 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGATTR_H +#define TAGATTR_H + +//qt includes +#include +#include +#include +#include + +//kde includes +#include +#include + +//app includes +#include "colorcombo.h" +#include "filecombo.h" + +class QDomElement; +class QWidget; +class QTag; + + +QDomNode findChild( QDomNode &parent, const QString &name ); + + +class Attr +{ + public: + Attr( QDomElement const& el, QWidget *, QTag *dtdTag ) + : domEl(el), name(domEl.attribute("name","")), m_dtdTag(dtdTag) {} + //{ domEl = el; name = domEl->attribute("name",""); m_dtdTag = dtdTag;} + virtual ~Attr(){} + + virtual QString value()=0; + virtual void setValue(const QString &value)=0; + + QString attrName() const; + QDomElement const& domElement() const { return domEl; } + + protected: + QDomElement domEl; + QString name; + QTag *m_dtdTag; +}; + + +class Attr_line : public Attr +{ + protected: + QLineEdit *line; + + public: + Attr_line( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { line = (QLineEdit *)w; } + virtual ~Attr_line(){}; + + virtual QString value() { return line->text(); } + virtual void setValue(const QString &value) { line->setText(value); } +}; + + +class Attr_color : public Attr +{ + protected: + ColorCombo *color; + + public: + Attr_color( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { color = (ColorCombo *)w; } + virtual ~Attr_color(){}; + + virtual QString value() { return color->colorName(); } + virtual void setValue(const QString &value) { color->setColorName(value); } +}; + +class Attr_file : public Attr +{ + protected: + FileCombo *file; + + public: + Attr_file( QDomElement const& el, QWidget *w , QTag * dtdTag ) : Attr(el, w, dtdTag) + { file = (FileCombo *)w; } + virtual ~Attr_file(){}; + + virtual QString value() { return file->text(); } + virtual void setValue(const QString &value) { file->setText(value); } +}; + +class Attr_list : public Attr +{ + protected: + QComboBox *combo; + + public: + Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ); + virtual ~Attr_list(){}; + + virtual QString value() { return combo->currentText(); } + virtual void setValue(const QString &value); +}; + + +class Attr_check : public Attr +{ + protected: + QCheckBox *check; + + public: + Attr_check( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { check = (QCheckBox *)w; } + virtual ~Attr_check(){}; + + virtual QString value() { return check->isChecked() ? "checked" : "unchecked" ; } + virtual void setValue(const QString &value) { check->setChecked( !value.isEmpty() ); } +}; + + + +#endif diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp new file mode 100644 index 00000000..b0da2f8b --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -0,0 +1,486 @@ +/*************************************************************************** + tagdialog.cpp - description + ------------------- + begin : Sat Apr 1 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2002-2004 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// include qt headers +#include +#include +#include + +// include kde headers +#include +#include +#include +#include +#include +#include +#include + +#include "tagattr.h" +#include "tagdialog.h" +#include "tagwidget.h" +#include "tagimgdlg.h" +#include "tagxml.h" + +#include "document.h" +#include "qextfileinfo.h" +#include "quantacommon.h" +#include "resource.h" +#include "qtag.h" +#include "kafkacommon.h" + +TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) + : QTabDialog( 0L, "tagdialog", true) +{ + init(dtdTag, a_baseURL); + + m_tag = tag; + if (m_tag) + { + for (int i = 0; i < m_tag->attrCount(); i++) + { + dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + } + } + mainDlg = 0L; + parseTag(); + +} + +TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_baseURL) + : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +{ + init(dtdTag, a_baseURL); + + m_tag = tag; + if (m_tag) + { + for (int i = 0; i < m_tag->attrCount(); i++) + { + dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + } + } + mainDlg = 0L; + parseTag(); +} + +TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) + : QTabDialog( 0L, "tagdialog", true) +{ + init(dtdTag, a_baseURL); + if ( !attrs.isNull() ) + { + parseAttributes(attrs); + } + mainDlg = 0L; + m_tag = 0L; + parseTag(); +} + +TagDialog::TagDialog(QTag* dtdTag, const QString& selection, QString attrs, KURL a_baseURL) + : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +{ + init(dtdTag, a_baseURL); + if ( !attrs.isNull() ) + { + parseAttributes(attrs); + } + mainDlg = 0L; + m_tag = 0L; + parseTag(); +} + +TagDialog::~TagDialog() +{ + if (deleteTag) + { + delete dtdTag; + } + delete dict; +} + + +void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) +{ + setOkButton(KStdGuiItem::ok().text()); + setCancelButton(KStdGuiItem::cancel().text()); + + connect( this, SIGNAL(applyButtonPressed()), SLOT(slotAccept()) ); + connect( this, SIGNAL(cancelButtonPressed()), SLOT(reject()) ); + + if (!a_dtdTag) //the tag is invalid, let's create a default one + { + dtdTag = new QTag(); + dtdTag->setName(i18n("Unknown tag")); + deleteTag = true; + } else + { + dtdTag = a_dtdTag; + deleteTag = false; + } + dict = new QDict(1,false); + dict->setAutoDelete(true); + m_baseURL = a_baseURL; + + QString caption = i18n("Tag Properties: "); + caption += dtdTag->name(); + setCaption( caption); + resize(420,400); +} +/** */ +void TagDialog::parseTag() +{ + if (dtdTag->name() != i18n("Unknown tag")) //read from the extra tags + { + QDomDocument doc; + if (dtdTag->name().lower() == "img") //NOTE: HTML specific code! + { + mainDlg = new TagImgDlg(dtdTag->parentDTD, this); + ((TagImgDlg *)mainDlg)->writeAttributes( dict ); + } + //read the tag file it is available + else if (QFileInfo(dtdTag->fileName()).exists()) + { + QFile f( dtdTag->fileName() ); + f.open( IO_ReadOnly ); + if ( doc.setContent( &f ) ) + { + QString tagName = dtdTag->name(); + QDomNodeList nodeList = doc.elementsByTagName("tag"); + for ( uint i = 0; i < nodeList.count(); i++) + { + QDomNode n = nodeList.item(i); + QString nodeTagName = n.toElement().attribute("name"); + if (!dtdTag->parentDTD->caseSensitive) + nodeTagName = nodeTagName.upper(); + if (nodeTagName == tagName && n.toElement().elementsByTagName("attr").count() > 0) //read a tag + { + mainDlg = new Tagxml( n, dtdTag, m_selection, this ); + ((Tagxml *)mainDlg)->writeAttributes( dict ); + break; + } + } + } + f.close(); + } + else + { + QString docString = "\n\n"; + docString += QString("\n").arg(dtdTag->name()); + docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes()); + docString += "\n\n"; + doc.setContent(docString); + QDomNode domNode2 = doc.firstChild().firstChild(); + mainDlg = new Tagxml( domNode2, dtdTag, m_selection, this ); + } + + if ( mainDlg ) + { + addTab( mainDlg, i18n("Main") ); + } + + KConfig *dtdConfig = new KConfig(dtdTag->parentDTD->fileName); + dtdConfig->setGroup("General"); + int numOfPages = dtdConfig->readNumEntry("NumOfPages"); + extraPageList = new QPtrList(); + extraPageList->setAutoDelete(true); + for (int i = 1; i <= numOfPages; i++) + { + Tagxml *extraPage = 0L; + dtdConfig->setGroup(QString("Page%1").arg(i)); + QString title = dtdConfig->readEntry("Title"); + QStringList groupList; + groupList = dtdConfig->readListEntry("Groups"); + QDomDocument extraDoc; //build an internal tag XML for the groups + bool addPage = false; + QString docString = "\n\n"; + docString += QString("\n").arg(i); + for (uint j = 0; j < groupList.count(); j++) + { + groupList[j] = groupList[j].stripWhiteSpace(); + } + QDomDocument commonDoc; + QString commonFileName = QFileInfo(dtdTag->fileName()).dirPath() + "/common.tag"; + if (QFile(commonFileName).exists()) + { + QFile commonFile(commonFileName); + commonFile.open(IO_ReadOnly); + if (doc.setContent(&commonFile)) + { + int row = 0; + QDomNodeList nodeList = doc.elementsByTagName("tag"); + for ( uint j = 0; j < nodeList.count(); j++) + { + QDomNode node = nodeList.item(j); + QString nodeTagName = node.toElement().attribute("name"); + if (groupList.contains(nodeTagName) && dtdTag->commonGroups.contains(nodeTagName)) //add the attributes of this common tag to a new tab + { + QString s; + QTextStream str(&s, IO_ReadWrite); + QString s2; + QTextStream str2(&s2, IO_ReadWrite); + for ( QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) + { + if (n.nodeName() == "attr") + { + QDomElement el = n.toElement(); + str.reset(); + str << "" << endl; + str << " " << el.attribute("name") << "" << endl; + str << " " << endl; + str << " " << endl; + QDomNodeList childNodes = n.childNodes(); + for ( uint k = 0; k < childNodes.count(); k++) + { + QDomNode childNode = childNodes.item(j); + childNode.save(str2, 2); + str << s2; + } + str << "" << endl; + row++; + } + + } + docString += s; + addPage = true; + } + } + commonFile.close(); + } + } + + docString += "\n\n"; + if (addPage) + { + extraDoc.setContent(docString); + QDomNode domNode = extraDoc.firstChild().firstChild(); + extraPage = new Tagxml( domNode, dtdTag, m_selection, this ); + extraPage->writeAttributes( dict ); + addTab( extraPage, i18n(title.utf8()) ); + extraPageList->append(extraPage); + } +// delete attrs; + } + } +} + +/** Insert an attribute to dict*/ +void TagDialog::insertAttribute(QString *attr, QString *value) +{ + dict->insert( *attr , value ); +} + +/** Return the attributes in QDict format*/ +QDict * TagDialog::getAttributes() +{ + return dict; +} + + +/** Return all the attributes in one string*/ +QString TagDialog::getAttributeString() +{ + QDictIterator it( *dict ); + + QString attrStr; + + while ( it.current() ) { + QString attr = QuantaCommon::attrCase(it.currentKey()); + QString val = *it.current(); + + QString attrval = " "; // attr=value + + if ( val.isEmpty()) { + attrval += attr; // for checkboxes dont print ="" + } + else { + attrval += attr + "=" + qConfig.attrValueQuotation + val + qConfig.attrValueQuotation; + } + attrStr = attrval + attrStr; + + ++it; + } + return attrStr; +} + +/**Return the value of the attribute specified by attr. */ +QString TagDialog::getAttribute(const QString& attr) +{ + QString attrStr = getAttributeString()+" "; + int pos = attrStr.upper().find(attr.upper()); + if (pos != -1) + { + pos = attrStr.find("=",pos+1) + 1; + return attrStr.mid(pos, attrStr.find(" ",pos) - pos); + } + else + { + return QString::null; + } + +} + +/** */ +void TagDialog::slotAccept() +{ + + if (dtdTag->name() != i18n("Unknown tag")) + { + if ( mainDlg ) + ((Tagxml *)mainDlg)->readAttributes( dict ); + for (uint i = 0; i < extraPageList->count(); i++) + { + extraPageList->at(i)->readAttributes( dict ); + } + delete extraPageList; + } + accept(); +} + +/** return document path */ +KURL TagDialog::baseURL() +{ + return m_baseURL; +} + + +void TagDialog::parseAttributes(const QString &attrs) +{ + QString t = attrs; + + t = t.stripWhiteSpace(); + + while ( !t.isEmpty() ) + { + int i = 0; + while ( !t[i].isSpace() && !t[i].isNull() && t[i] != '=' ) i++; + + QString attr = t.left(i); + QString *value = new QString(); + + t = t.remove(0,i).stripWhiteSpace(); + + if ( t[0] == '=' ) { + t = t.remove(0,1).stripWhiteSpace(); + + if ( t[0] == '"' ) { + i = 1; + while ( t[i] != '"' && !t[i].isNull() ) i++; + if ( t[i] == '"' ) + *value = t.mid(1,i-1); + else + *value = t.mid(1,i); + t = t.remove(0,i+1).stripWhiteSpace(); + } + else + if ( t[0] == '\'' ) { + i = 1; + while ( t[i] != '\'' && !t[i].isNull() ) i++; + if ( t[i] == '\'' ) + *value = t.mid(1,i-1); + else + *value = t.mid(1,i); + t = t.remove(0,i+1).stripWhiteSpace(); + } + else { + + i=0; + while ( !t[i].isSpace() && !t[i].isNull() ) i++; + + *value = t.left(i); + t = t.remove(0,i).stripWhiteSpace(); + } + + // debug ( name+" , "+attr[attrcount]+"="+value[attrcount]+";" ); + + + + + } + // qDebug("attr :%s; value :%s;",attr.data(),value->data() ); + dict->insert( attr , value ); + } + +} + +/** Insert the new tag into the Document*/ +void TagDialog::insertTag(Document *w, bool insertInLine) +{ + if (dtdTag->name() != i18n("Unknown tag")) + { + QString newTag = getAttributeString(); + newTag = QString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; + + if ( dtdTag->parentDTD->singleTagStyle == "xml" && + (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional())) + ) + { + newTag.append(" /"); + } + newTag.append(">"); + + QString secondPartOfTag = QString("name())+">"; + + if ( !insertInLine ) + { + QString space=""; + space.fill( ' ',w->viewCursorIf->cursorColumnReal() ); + newTag += "\n" + space + " "; + secondPartOfTag = "\n" + space + secondPartOfTag; + } + + if ( (!qConfig.closeTags && !dtdTag->isSingle()) || + (dtdTag->isSingle()) || + (!qConfig.closeOptionalTags && dtdTag->isOptional()) ) + { + secondPartOfTag = ""; + } + + w->insertTag( newTag, secondPartOfTag); + } +} + +Node *TagDialog::buildNode(Document *w) +{ + Node *node; + QString attrStr(""); + QDictIterator it( *dict ); + + + node = kafkaCommon::createNode(dtdTag->name(), "", Tag::XmlTag, w); + + while (it.current()) + { + node->tag->editAttribute(QuantaCommon::attrCase(it.currentKey()), *it.current()); + ++it; + } + + return node; +} + +void TagDialog::showEvent(QShowEvent *ev) +{ + QTabDialog::showEvent(ev); + if (dynamic_cast(mainDlg)) + static_cast(mainDlg)->focusToFirstItem(); +} + +#include "tagdialog.moc" diff --git a/quanta/dialogs/tagdialogs/tagdialog.h b/quanta/dialogs/tagdialogs/tagdialog.h new file mode 100644 index 00000000..67809bb0 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagdialog.h @@ -0,0 +1,102 @@ +/*************************************************************************** + tagdialog.h - description + ------------------- + begin : Sat Apr 1 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2002-2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGDIALOG_H +#define TAGDIALOG_H + +#include +#include +#include +#include + +#include "resource.h" + +/**class for insert/edit tags + *@author Yacovlev Alexander & Dmitry Poplavsky & Andras Mantia + */ + +class Document; +class TagWidget; +class Tagxml; +class QTag; +class Tag; +class KURL; +class QShowEvent; + +class TagDialog : public QTabDialog { + Q_OBJECT + +public: + /** + constructor: edit tag if "tag" == 0L or insert new tag if tag != 0L + attr format: "attr1='value1' attr2='value2'..." + insertInLine : + true : + false: + + + */ + TagDialog(QTag* dtdTag, Tag* tag, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, Tag* tag, const QString& selection, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, QString attrs=QString::null, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, const QString& selection, QString attrs=QString::null, KURL a_baseURL = KURL()); + ~TagDialog(); + /** Insert an attribute to dict*/ + void insertAttribute(QString *attr, QString *value); + /** */ + void parseTag(); + /** returen doc path */ + KURL baseURL(); + + + /** Return the attributes in QDict format*/ + QDict * getAttributes(); + /** Return all the attributes in one string*/ + QString getAttributeString(); + /**Return the value of the attribute specified by attr. */ + QString getAttribute(const QString& attr); + /** Insert the new tag into the Document*/ + void insertTag(Document *w, bool insertInLine = true); + /** build and return the new Node.*/ + Node *buildNode(Document *w); + +public: + + QWidget *mainDlg; + + QDict *dict; + KURL m_baseURL; + +public slots: // Public slots + void slotAccept(); + +protected slots: + virtual void showEvent(QShowEvent *ev); + +private: + bool deleteTag; + Tag *m_tag; + QTag* dtdTag; + QString m_selection; + + QPtrList *extraPageList; + + void init(QTag* dtdTag, KURL a_baseURL); + void parseAttributes(const QString &attrs); +}; + +#endif diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp new file mode 100644 index 00000000..efacc768 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -0,0 +1,170 @@ +/*************************************************************************** + tagimgdlg.cpp - description + ------------------- + begin : Sat Nov 27 1999 + copyright : (C) 1999 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2002, 2006 Andras Mantia + email : pdima@mail.univ.kiev.ua, amantia@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +//qt includes +#include +#include +//kde includes +#include +#include +#include +#include +#include + +//app includes +#include "pictureview.h" +#include "qextfileinfo.h" +#include "quantacommon.h" +#include "tagdialog.h" +#include "tagimgdlg.h" +#include "tagimgdlg.moc" + + +TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) + : QWidget(parent,name), TagWidget(parent,name) +{ + m_dtd = dtd; + img = 0L; + isTmpFile = false; + setCaption(name); + initDialog(); + + + connect( buttonImgSource, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); + connect( buttonRecalcImgSize, SIGNAL(clicked()), this, SLOT(slotRecalcImgSize()) ); + connect( lineImgSource, SIGNAL( returnPressed()), this, SLOT(slotLineFileSelect()) ); +} + +TagImgDlg::~TagImgDlg() +{ + if (isTmpFile) + { + KIO::NetAccess::removeTempFile(imgFileName); + isTmpFile = false; + } +} + +/** Choose new image */ +void TagImgDlg::slotImageSet(const KURL& imageURL) +{ + if (isTmpFile) + { + KIO::NetAccess::removeTempFile(imgFileName); + isTmpFile = false; + } + if (imageURL.isLocalFile()) + { + imgFileName = imageURL.path(); + } else + { + KIO::NetAccess::download(imageURL, imgFileName, this); + isTmpFile = true; + } + widgetImg->slotSetImage(imgFileName); + + img = new QImage(imgFileName); + if (!img->isNull() && lineWidth && lineHeight) + { + QString s; + s.setNum(img->width()); + lineWidth->setText(s); + s.setNum(img->height()); + lineHeight->setText(s); + } +} + +/** recalculate image size */ +void TagImgDlg::slotRecalcImgSize() +{ + if (img && lineWidth && lineHeight) { + QString s; + s.setNum( img->width() ); + lineWidth->setText( s ); + s.setNum( img->height() ); + lineHeight->setText( s ); + } +} + +/** select image */ +void TagImgDlg::slotFileSelect() +{ +//TODO: Implemented only for local files, but maybe it is enough + KURL url = KFileDialog::getOpenURL( baseURL.url(), "*.gif *.jpg *.png *.jpeg *.bmp *.GIF *.JPG *.PNG *.JPEG *.BMP"+i18n("|Image Files\n*|All Files")); + if ( !url.isEmpty() ) + { + slotImageSet( url ); + url = QExtFileInfo::toRelative(url, baseURL); + lineImgSource->setText( url.path() ); + } +} + +void TagImgDlg::slotLineFileSelect() +{ + KURL url; + QuantaCommon::setUrl(url, lineImgSource->text()); + slotImageSet(url); +} + +void TagImgDlg::readAttributes( QDict *d ) +{ + dict = d; + + updateDict("src", lineImgSource ); + updateDict("alt", lineAltText ); + if (lineWidth) + updateDict("width", lineWidth ); + if (lineHeight) + updateDict("height",lineHeight ); + if (lineHSpace) + updateDict("hspace",lineHSpace ); + if (lineVSpace) + updateDict("vspace",lineVSpace ); + if (comboAlign) + updateDict("align", comboAlign ); + if (spinBorder) + updateDict("border",spinBorder ); +} + +void TagImgDlg::writeAttributes( QDict *d ) +{ + dict = d; + QString *t; // value of attr. + + if (( t=d->find("src") )) + { + lineImgSource->setText(*t); + KURL url = baseURL; + QuantaCommon::setUrl(url, *t); + url = QExtFileInfo::toAbsolute(url, baseURL); + slotImageSet( url ); + } + if ( (t=d->find("alt")) ) + setValue(*t, lineAltText); + if ( (t=d->find("width")) && lineWidth ) + setValue(*t, lineWidth); + if ( (t=d->find("height")) && lineHeight ) + setValue(*t, lineHeight); + if ( (t=d->find("hspace")) && lineHSpace) + setValue(*t, lineHSpace); + if ( (t=d->find("vspace")) && lineVSpace ) + setValue(*t, lineVSpace); + if ( (t=d->find("align")) && comboAlign ) + setValue(*t, comboAlign); + if ( (t=d->find("border")) && spinBorder ) + setValue(*t, spinBorder); +} diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.h b/quanta/dialogs/tagdialogs/tagimgdlg.h new file mode 100644 index 00000000..f1229ee2 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagimgdlg.h @@ -0,0 +1,93 @@ +/*************************************************************************** + tagimgdlg.h - description + ------------------- + begin : Sat Nov 27 1999 + copyright : (C) 1999 by Yacovlev Alexander & Dmitry Poplavsky + (C) 2002, 2006 Andras Mantia + email : pdima@mail.univ.kiev.ua, amantia@kde.org + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGIMGDLG_H +#define TAGIMGDLG_H + +//Generated area. DO NOT EDIT!!!(begin) +#include +#include +#include +#include +#include +//Generated area. DO NOT EDIT!!!(end) + +#include "tagwidget.h" +#include "qtag.h" + +class PictureView; +class QSpinBox; +class QImage; + +/** + *@author Dmitry Poplavsky & Yacovlev Alexander + */ + +class TagImgDlg : public QWidget, TagWidget { + Q_OBJECT +public: + TagImgDlg(const DTDStruct *dtd, QWidget *parent=0, const char *name=0); + ~TagImgDlg(); + +public: + void initDialog(); + //Generated area. DO NOT EDIT!!!(begin) + QLabel *labelImgSource; + KLineEdit *lineImgSource; + QPushButton *buttonImgSource; + QPushButton *buttonRecalcImgSize; + QLabel *QLabel_4; + KLineEdit *lineWidth; + QLabel *QLabel_5; + KLineEdit *lineHeight; + QLabel *QLabel_6; + KLineEdit *lineHSpace; + QLabel *QLabel_7; + KLineEdit *lineVSpace; + QLabel *QLabel_8; + KLineEdit *lineAltText; + QLabel *QLabel_9; + QSpinBox *spinBorder; + QLabel *QLabel_10; + QComboBox *comboAlign; + PictureView *widgetImg; + QPushButton *buttonOk; + QPushButton *buttonCancel; + //Generated area. DO NOT EDIT!!!(end) + +private: + QImage *img; + QString imgFileName; + bool isTmpFile; + const DTDStruct *m_dtd; + +public slots: // Public slots + /** Choose new image */ + void slotImageSet( const KURL& imageURL); + /** select image */ + void slotFileSelect(); + void slotLineFileSelect(); + + void readAttributes( QDict *d ); + void writeAttributes( QDict *d ); + /** recalculate image size */ + void slotRecalcImgSize(); +}; + +#endif + diff --git a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp new file mode 100644 index 00000000..ec4a6a36 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp @@ -0,0 +1,129 @@ +/********************************************************************** + --- KDevelop (KDlgEdit) generated file --- + + Last generated: Fri Apr 7 23:17:41 2000 + + DO NOT EDIT!!! This file will be automatically + regenerated by KDevelop. All changes will be lost. + + (C) 2006 Andras Mantia +**********************************************************************/ +#include +#include +#include +#include + +#include +#include + +#include "pictureview.h" +#include "tagimgdlg.h" + +void TagImgDlg::initDialog(){ + QGridLayout *grid = new QGridLayout( this ); + grid->setSpacing( 13 ); + grid->setMargin( 11 ); + labelImgSource= new QLabel(this,"labelImgSource"); + labelImgSource->setText(i18n("Image source:")); + grid->addMultiCellWidget(labelImgSource, 0, 0, 0, 0); + + lineImgSource= new KLineEdit(this,"lineImgSource"); + grid->addMultiCellWidget(lineImgSource, 0, 0, 1, 3); + + buttonImgSource= new QPushButton(this,"NoName"); + buttonImgSource->setText(i18n("...")); + grid->addMultiCellWidget(buttonImgSource, 0, 0, 4, 4); + + QTag *imgTag = m_dtd->tagsList->find("img"); + + if (!imgTag) + return; + + lineWidth = 0L; + if (imgTag->attribute("width")) + { + QLabel_4= new QLabel(this,"NoName"); + QLabel_4->setText(i18n("Width:")); + grid->addMultiCellWidget(QLabel_4, 1, 1, 0, 0); + + lineWidth= new KLineEdit(this,"NoName"); + lineWidth->setValidator( new KFloatValidator( lineWidth ) ); + grid->addMultiCellWidget(lineWidth, 1, 1, 1, 1); + } + + lineHeight = 0L; + if (imgTag->attribute("height")) + { + QLabel_5= new QLabel(this,"NoName"); + QLabel_5->setText(i18n("Height:")); + grid->addMultiCellWidget(QLabel_5, 1, 1, 2, 2); + + lineHeight= new KLineEdit(this,"NoName"); + lineHeight->setValidator( new KFloatValidator( lineHeight ) ); + grid->addMultiCellWidget(lineHeight, 1, 1, 3, 3); + } + + buttonRecalcImgSize= new QPushButton(this,"NoName"); + buttonRecalcImgSize->setText(i18n("...")); + grid->addMultiCellWidget(buttonRecalcImgSize, 1, 1, 4, 4); + + lineHSpace = 0L; + if (imgTag->attribute("hspace")) + { + QLabel_6= new QLabel(this,"NoName"); + QLabel_6->setText(i18n("HSpace:")); + grid->addMultiCellWidget(QLabel_6, 2, 2, 0, 0); + + lineHSpace= new KLineEdit(this,"NoName"); + grid->addMultiCellWidget(lineHSpace, 2, 2, 1, 1); + } + + lineVSpace = 0L; + if (imgTag->attribute("vspace")) + { + QLabel_7= new QLabel(this,"NoName"); + QLabel_7->setText(i18n("VSpace:")); + grid->addMultiCellWidget(QLabel_7, 2, 2, 2, 2); + + lineVSpace= new KLineEdit(this,"NoName"); + grid->addMultiCellWidget(lineVSpace, 2, 2, 3, 3); + } + + QLabel_8= new QLabel(this,"NoName"); + QLabel_8->setText(i18n("Alternate text:")); + grid->addMultiCellWidget(QLabel_8, 3, 3, 0, 0); + + lineAltText= new KLineEdit(this,"NoName"); + grid->addMultiCellWidget(lineAltText, 3, 3, 1, 4); + + spinBorder = 0L; + if (imgTag->attribute("border")) + { + QLabel_9= new QLabel(this,"NoName"); + QLabel_9->setText(i18n("Border:")); + grid->addMultiCellWidget(QLabel_9, 4, 4, 0, 0); + + spinBorder= new QSpinBox(this,"NoName"); + spinBorder->setRange(0,20); + grid->addMultiCellWidget(spinBorder, 4, 4, 1, 1); + } + + comboAlign = 0L; + if (imgTag->attribute("align")) + { + QLabel_10= new QLabel(this,"NoName"); + QLabel_10->setText(i18n("Align:")); + grid->addMultiCellWidget(QLabel_10, 4, 4, 2, 2); + + comboAlign= new QComboBox(this,"NoName"); + grid->addMultiCellWidget(comboAlign, 4, 4, 3, 4); + comboAlign->insertStringList(imgTag->attribute("align")->values); + } + + widgetImg= new PictureView(this); + grid->addMultiCellWidget(widgetImg, 5, 10, 0, 4); + + buttonImgSource->setPixmap( SmallIcon("fileopen") ); + buttonRecalcImgSize->setPixmap( SmallIcon("reload") ); + +} diff --git a/quanta/dialogs/tagdialogs/tagmail.ui b/quanta/dialogs/tagdialogs/tagmail.ui new file mode 100644 index 00000000..1ec00314 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagmail.ui @@ -0,0 +1,130 @@ + +TagMail + + + TagMail + + + + 0 + 0 + 477 + 254 + + + + + + + + unnamed + + + + AddressLabel + + + Email address: + + + + + buttonAddressSelect + + + + 0 + 0 + 0 + 0 + + + + + 32 + 32767 + + + + ... + + + + + lineEmail + + + + + lineSubject + + + + + SubjectLabel + + + Subject: + + + + + TitleLabel + + + + 5 + 5 + 0 + 0 + + + + Title: + + + + + titleEdit + + + + + buttonOk + + + &OK + + + true + + + + + buttonCancel + + + &Cancel + + + + + spacer2 + + + Horizontal + + + Expanding + + + + 40 + 20 + + + + + + + diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.cpp b/quanta/dialogs/tagdialogs/tagmaildlg.cpp new file mode 100644 index 00000000..329ffd59 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagmaildlg.cpp @@ -0,0 +1,108 @@ +/*************************************************************************** + tagmaildlg.cpp - description + ------------------- + begin : Sat Nov 24 2001 + copyright : (C) 2001-2002 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * (at your option) any later version. * + ***************************************************************************/ + + +#include "tagmaildlg.h" +#include "listdlg.h" +#include "resource.h" +#include "quantacommon.h" + +//kde includes +#include +#include +#include +#include +#include +#include + +//qt includes +#include +#include +#include +#include + + +TagMailDlg::TagMailDlg(QWidget *parent, const char *name) + :TagMail(parent, name) +{ + setCaption(name); + setModal(true); + + connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); + connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); + connect( buttonAddressSelect, SIGNAL(clicked()), SLOT(slotSelectAddress()) ); + buttonOk->setIconSet(SmallIconSet("button_ok")); + buttonCancel->setIconSet(SmallIconSet("button_cancel")); + lineEmail->setFocus(); +} + +TagMailDlg::~TagMailDlg(){ +} +/** Select a mail address, using the KabApi */ +void TagMailDlg::slotSelectAddress() +{ +//Based on KMail + QString addr, email, emailString; + QStringList result; + KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); + KABC::AddressBook::Iterator it; + for( it = addressBook->begin(); it != addressBook->end(); ++it ) { + QStringList emails = (*it).emails(); + QString n = (*it).prefix() + " " + + (*it).givenName() + " " + + (*it).additionalName() + " " + + (*it).familyName() + " " + + (*it).suffix(); + n = n.simplifyWhiteSpace(); + for( unsigned int i = 0; i < emails.count(); ++i ) { + if (!emails[i].isEmpty()) { + if (n.isEmpty() || (emails[i].find( "<" ) != -1)) + addr = ""; + else { /* do we really need quotes around this name ? */ + if (n.find(QRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) + addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " "; + else + addr = n + " "; + } + email = emails[i]; + if (!addr.isEmpty() && (email.find( "<" ) == -1) + && (email.find( ">" ) == -1) + && (email.find( "," ) == -1)) + addr += "<" + email + ">"; + else + addr += email; + addr.stripWhiteSpace(); + result.append( addr ); + } + } + } + result.sort(); + + if ( result.count() > 0 ) + { + ListDlg listDlg(result); + listDlg.setCaption(i18n("Select Address")); + if (!listDlg.exec()) return; + emailString = listDlg.getEntry(); + lineEmail->setText(emailString); + } else + { +//Actually this may mean also other erros, but the result is the same for us: cannot get the +//e-mail address + KMessageBox::error(this,i18n("No addresses found.")); + } +} + +#include "tagmaildlg.moc" diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.h b/quanta/dialogs/tagdialogs/tagmaildlg.h new file mode 100644 index 00000000..590c646b --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagmaildlg.h @@ -0,0 +1,35 @@ +/*************************************************************************** + tagmaildlg.h - description + ------------------- + begin : Sat Nov 24 2001 + copyright : (C) 2001 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef TAGMAILDLG_H +#define TAGMAILDLG_H + +#include "tagmail.h" + +/** + *@author Andras Mantia + */ + +class TagMailDlg : public TagMail { +Q_OBJECT +public: + TagMailDlg(QWidget *parent=0, const char *name=0); + ~TagMailDlg(); +private slots: // Private slots + /** Select a mail address, using the KABC */ + void slotSelectAddress(); +}; + +#endif diff --git a/quanta/dialogs/tagdialogs/tagmisc.ui b/quanta/dialogs/tagdialogs/tagmisc.ui new file mode 100644 index 00000000..39f044c9 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagmisc.ui @@ -0,0 +1,68 @@ + +TagMisc +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * (at your option) any later version. * + ***************************************************************************/ + +(C) 2001, 2003 Andras Mantia <amantia@kde.org> + + + TagMisc + + + + 0 + 0 + 350 + 61 + + + + + 350 + 60 + + + + Misc. Tag + + + + unnamed + + + + elementName + + + + + TextLabel1 + + + Element name: + + + + + addClosingTag + + + &Add closing tag + + + true + + + + + + elementName + addClosingTag + + + diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp new file mode 100644 index 00000000..13893a53 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp @@ -0,0 +1,54 @@ +/*************************************************************************** + tagmiscdlg.h - description + ------------------- + copyright : (C) 2005 Laurent Montel + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "tagmiscdlg.h" +#include "tagmisc.h" +#include +#include +#include + +TagMiscDlg::TagMiscDlg( QWidget* parent, const char* name, bool addClosingTag, const QString &element ) + :KDialogBase( parent, name, true, i18n("Misc. Tag"), KDialogBase::Ok | KDialogBase::Cancel ) +{ + miscWidget = new TagMisc(this); + connect( miscWidget->elementName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotMiscTagChanged(const QString & ) ) ); + setMainWidget(miscWidget); + miscWidget->addClosingTag->setChecked(addClosingTag); + miscWidget->elementName->setText(element); + slotMiscTagChanged( element ); +} + +TagMiscDlg::~TagMiscDlg() +{ +} + + +void TagMiscDlg::slotMiscTagChanged( const QString &_tag ) +{ + enableButtonOK( !_tag.isEmpty() ); +} + + +QString TagMiscDlg::elementTagName() const +{ + return miscWidget->elementName->text(); +} + +bool TagMiscDlg::addClosingTag() const +{ + return miscWidget->addClosingTag->isChecked(); +} + +#include "tagmiscdlg.moc" diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.h b/quanta/dialogs/tagdialogs/tagmiscdlg.h new file mode 100644 index 00000000..8e9ded91 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.h @@ -0,0 +1,42 @@ +/*************************************************************************** + tagmiscdlg.h - description + ------------------- + copyright : (C) 2005 Laurent Montel + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGMISCDLG_H +#define TAGMISCDLG_H + +#include + + +class TagMisc; + +class TagMiscDlg : public KDialogBase +{ + Q_OBJECT + +public: + TagMiscDlg( QWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const QString &element=QString::null ); + ~TagMiscDlg(); + + QString elementTagName() const; + bool addClosingTag() const; + +protected slots: + void slotMiscTagChanged( const QString & ); + +private: + TagMisc *miscWidget; +}; + +#endif // TAGMISCDLG_H diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp new file mode 100644 index 00000000..ef971e83 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp @@ -0,0 +1,41 @@ +/*************************************************************************** + tagquicklistdlg.cpp - description + ------------------- + begin : Sun Nov 28 1999 + copyright : (C) 1999 by Yacovlev Alexander & Dmitry Poplavsky + email : pdima@mail.univ.kiev.ua + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +#include "tagquicklistdlg.h" +#include "tagquicklistdlg.moc" +#include +#include +#include +#include +#include +#include + +TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) + : QDialog(parent,name,true) +{ + setCaption(name); + + initDialog(); + + groupBox->insert(radioOrdered); + groupBox->insert(radioUnordered); + + connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); + connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); +} + +TagQuickListDlg::~TagQuickListDlg(){ +} diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.h b/quanta/dialogs/tagdialogs/tagquicklistdlg.h new file mode 100644 index 00000000..f2426fb3 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.h @@ -0,0 +1,54 @@ +/*************************************************************************** + tagquicklistdlg.h - description + ------------------- + begin : Sun Nov 28 1999 + copyright : (C) 1999 by Yacovlev Alexander & Dmitry Poplavsky + email : pdima@mail.univ.kiev.ua + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGQUICKLISTDLG_H +#define TAGQUICKLISTDLG_H + +#include + +#include +class QLabel; +class QSpinBox; +class QPushButton; +class QRadioButton; +class QButtonGroup; + +/** + *@author Dmitry Poplavsky & Yacovlev Alexander + */ + +class TagQuickListDlg : public QDialog { + Q_OBJECT +public: + TagQuickListDlg(QWidget *parent=0, const char *name=0); + ~TagQuickListDlg(); + +public: + void initDialog(); + QLabel *QLabel_1; + QSpinBox *spinBoxRows; + QPushButton *buttonOk; + QLabel *QLabel_2; + QRadioButton *radioOrdered; + QRadioButton *radioUnordered; + QPushButton *buttonCancel; + QButtonGroup *groupBox; + +private: +}; + +#endif diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp new file mode 100644 index 00000000..331aefbb --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp @@ -0,0 +1,63 @@ +/********************************************************************** + --- KDevelop (KDlgEdit) generated file --- + + Last generated: Tue Dec 7 16:51:35 1999 + + DO NOT EDIT!!! This file will be automatically + regenerated by KDevelop. All changes will be lost. + +**********************************************************************/ +#include +#include +#include +#include "tagquicklistdlg.h" +#include +#include +#include +#include +#include + +void TagQuickListDlg::initDialog() +{ + resize(230,150); + + QLabel_1= new QLabel(this,"NoName"); + QLabel_1->setGeometry(10,10,100,30); + QLabel_1->setMinimumSize(0,0); + QLabel_1->setText(i18n("Rows:")); + + spinBoxRows= new QSpinBox(this,"NoName"); + spinBoxRows->setGeometry(120,10,100,25); + spinBoxRows->setMinimumSize(0,0); + spinBoxRows->setRange(1,99); + + buttonOk= new KPushButton(KStdGuiItem::ok(),this,"NoName"); + buttonOk->setGeometry(10,110,100,30); + buttonOk->setMinimumSize(0,0); + + QLabel_2= new QLabel(this,"NoName"); + QLabel_2->setGeometry(10,40,100,30); + QLabel_2->setMinimumSize(0,0); + QLabel_2->setText(i18n("Style:")); + + buttonCancel= new QPushButton(this,"NoName"); + buttonCancel->setGeometry(120,110,100,30); + buttonCancel->setMinimumSize(0,0); + buttonCancel->setText(KStdGuiItem::cancel().text()); + + groupBox= new QButtonGroup(this,"NoName"); + groupBox->setGeometry(120,40,100,60); + groupBox->setMinimumSize(0,0); + + radioOrdered= new QRadioButton(groupBox,"NoName"); + radioOrdered->setGeometry(5,5,90,25); + radioOrdered->setMinimumSize(0,0); + radioOrdered->setText(i18n("Ordered")); + radioOrdered->setChecked(true); + + radioUnordered= new QRadioButton(groupBox,"NoName"); + radioUnordered->setGeometry(5,30,90,25); + radioUnordered->setMinimumSize(0,0); + radioUnordered->setText(i18n("Unordered")); + radioUnordered->setChecked(false); +} diff --git a/quanta/dialogs/tagdialogs/tagwidget.cpp b/quanta/dialogs/tagdialogs/tagwidget.cpp new file mode 100644 index 00000000..0d01f7a3 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagwidget.cpp @@ -0,0 +1,119 @@ +/*************************************************************************** + tagwidget.cpp - description + ------------------- + begin : Sat Apr 1 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// QT files +#include +#include +#include +#include +#include + +// KDE files +#include +#include + +// application's headers +#include "tagwidget.h" +#include "tagdialog.h" +#include "resource.h" + +TagWidget::TagWidget(QObject *parent, const char *) +{ + baseURL = ((TagDialog *)parent)->baseURL(); +} + +TagWidget::~TagWidget(){ +} + +void TagWidget::updateDict(const QString &attr, QComboBox *combo ) +{ + QString *s = new QString(combo->currentText()); + if (s->isEmpty()) + { + dict->remove(attr); + delete s; + } + else + dict->replace(attr, s); +} + +void TagWidget::setValue(const QString &val, QComboBox *combo) +{ + bool found = false; + int num = combo->count(); + + for ( int i = 0; i < num; i++) + { + if (val == combo->text(i)) + { + combo->setCurrentItem(i); + found = true; + } + } + + if (!found) + combo->setEditText(val); +} + +void TagWidget::setValue(const QString &val, QLineEdit *line) +{ + line->setText(val); +} + +void TagWidget::setValue(const QString &val, QSpinBox *spin) +{ + spin->setValue(val.toInt()); +} + +void TagWidget::setValue(const QString &val, KColorButton *button) +{ + button->setColor(val); +} + +void TagWidget::updateDict(const QString &attr, QLineEdit *line ) +{ + QString *s = new QString(line->text()); + if (s->isEmpty()) + { + dict->remove(attr); + delete s; + } + else + dict->replace(attr, s); +} + +void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) +{ + QString *s = new QString(spin->text()); + if (s->isEmpty()) + { + dict->remove(attr); + delete s; + } + else + dict->replace(attr, s); +} + +void TagWidget::updateDict(const QString &attr, QCheckBox *check ) +{ + if (!check->isChecked()) + dict->remove(attr); + else + { + if (!dict->find(attr)) + dict->insert(attr, new QString("")); + } +} diff --git a/quanta/dialogs/tagdialogs/tagwidget.h b/quanta/dialogs/tagdialogs/tagwidget.h new file mode 100644 index 00000000..89f8e371 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagwidget.h @@ -0,0 +1,56 @@ +/*************************************************************************** + tagwidget.h - description + ------------------- + begin : Sat Apr 1 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGWIDGET_H +#define TAGWIDGET_H + +#include +#include + +class QComboBox; +class QLineEdit; +class QSpinBox; +class QCheckBox; +class KColorButton; +class KURL; + +/**base class for tag widgets + *@author Yacovlev Alexander & Dmitry Poplavsky + */ + +class TagWidget { +public: + TagWidget(QObject *parent=0, const char *name=0); + virtual ~TagWidget(); + + virtual void readAttributes(QDict *) {}; + virtual void writeAttributes(QDict *) {}; + void updateDict(const QString &attr, QComboBox *combo); + void updateDict(const QString &attr, QLineEdit *line); + void updateDict(const QString &attr, QSpinBox *spin); + void updateDict(const QString &attr, QCheckBox *check); + + void setValue(const QString &val, QComboBox *combo); + void setValue(const QString &val, QLineEdit *line); + void setValue(const QString &val, QSpinBox *spin); + void setValue(const QString &val, KColorButton *button); + +protected: + QDict *dict; // dictionary of attributes and values + KURL baseURL; +}; + +#endif diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp new file mode 100644 index 00000000..c9114d62 --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -0,0 +1,343 @@ +/*************************************************************************** + tagxml.cpp - description + ------------------- + begin : � � 25 14:34:07 EEST 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon + (C) 2002-2004 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "tagxml.h" +#include "tagattr.h" +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "styleeditor.h" + +Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, QWidget *parent, const char *name) + :QWidget(parent,name), TagWidget(parent,name), doc(d) +{ + initialize(d, dtdTag); +} + +Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, const QString& selection, QWidget *parent, const char *name) + : QWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) +{ + initialize(d, dtdTag); +} + +Tagxml::~Tagxml() +{ +} + +void Tagxml::initialize(QDomNode &d, QTag *dtdTag) +{ + m_dtd = dtdTag->parentDTD; + m_dtdTag = dtdTag; + QGridLayout *grid = new QGridLayout( this ); + grid->setSpacing( 13 ); + grid->setMargin( 11 ); + m_firstItem = 0L; +//parse the tag XML file, in order to build up the dialog + for ( QDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) + { + QDomNode location = findChild(n,"location"); + if ( location.isNull() ) + continue; + + //debug( n.nodeName() ); + + QDomElement el = location.toElement(); + + int row = el.attribute("row","0").toInt(); + int col = el.attribute("col","0").toInt(); + int colspan = el.attribute("colspan","1").toInt()-1; + int rowspan = el.attribute("rowspan","1").toInt()-1; + + location = findChild(n,"textlocation"); + el = location.toElement(); + int textrow = el.attribute("row","0").toInt(); + int textcol = el.attribute("col","0").toInt(); + int textcolspan = el.attribute("colspan","1").toInt()-1; + int textrowspan = el.attribute("rowspan","1").toInt()-1; + + // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); + + QString tip; + QDomNode tooltip = findChild( n ,"tooltip" ); + if ( !tooltip.isNull() ) { + if ( tooltip.firstChild().isText() ) { + QDomText text = tooltip.firstChild().toText(); + tip = text.data(); + } + } + QString whatsThis; + QDomNode what = findChild( n ,"whatsthis" ); + if ( !what.isNull() ) { + if ( what.firstChild().isText() ) { + QDomText text = what.firstChild().toText(); + whatsThis = text.data(); + } + } + + if ( n.nodeName() == "label" ) //a static label + { + QLabel *label = new QLabel(this); + QDomElement ltext = findChild(n,"text").toElement(); + if ( !ltext.isNull() ) + label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + + if ( !tip.isNull() ) + QToolTip::add( label, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( label, whatsThis ); + + grid->addMultiCellWidget( label, row, row+rowspan, col, col+colspan ); + } + + if ( n.nodeName() == "attr" ) //an attribute + { + + QDomElement el(n.toElement()); + QString type = el.attribute("type","input"); + + QDomElement ltext = findChild(n,"text").toElement(); + if ( !ltext.isNull() && (type != "check") ) //if there is a text label for the attribute + { + QLabel *label = new QLabel(this); + label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + + if ( !tip.isNull() ) + QToolTip::add( label, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( label, whatsThis ); + grid->addMultiCellWidget( label, textrow, textrow+textrowspan, textcol, textcol+textcolspan ); + } + + + //look for the different attribute types + if ( type == "input" ) + { + KLineEdit *w = new KLineEdit(this); + grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); + + if ( !tip.isNull() ) + QToolTip::add( w, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( w, whatsThis ); + + Attr_line *attr = new Attr_line(el, w, m_dtdTag); + attributes.append(attr); + if (!m_firstItem) + m_firstItem = w; + } + else + if ( type == "check" ) + { + QCheckBox *w = new QCheckBox(this); + grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); + + QDomElement ltext = findChild(n,"text").toElement(); + if ( !ltext.isNull() ) + w->setText( ltext.text() ); + if ( !tip.isNull() ) + QToolTip::add( w, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( w, whatsThis ); + + Attr_check *attr = new Attr_check(el, w, m_dtdTag); + attributes.append(attr); + if (!m_firstItem) + m_firstItem = w; + } else + if ( type == "list" ) + { + QComboBox *w = new QComboBox(true, this); + grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); + if ( !tip.isNull() ) + QToolTip::add( w, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( w, whatsThis ); + Attr_list *attr = new Attr_list(el, w, dtdTag); + attributes.append(attr); + if (!m_firstItem) + m_firstItem = w; + } else + if ( type == "color" ) + { + ColorCombo *w = new ColorCombo(this); + grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); + + if ( !tip.isNull() ) + QToolTip::add( w, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( w, whatsThis ); + + Attr_color *attr = new Attr_color(el, w, m_dtdTag); + attributes.append(attr); + if (!m_firstItem) + m_firstItem = w; + } else + if ( type == "url" ) + { + FileCombo *w = new FileCombo(baseURL, this); + grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); + + if ( !tip.isNull() ) + QToolTip::add( w, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( w, whatsThis ); + Attr_file *attr = new Attr_file(el, w, m_dtdTag); + attributes.append(attr); + if (!m_firstItem) + m_firstItem = w; + } + + else + if ( type == "css-style" ) + { + StyleEditor *w = new StyleEditor(this); + grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); + + if ( !tip.isNull() ) + QToolTip::add( w, tip ); + if ( !whatsThis.isNull() ) + QWhatsThis::add( w, whatsThis ); + + Attr_line *attr = new Attr_line(el, w->lineEdit(), m_dtdTag); + attributes.append(attr); + + if (!m_firstItem) + m_firstItem = w; + + } + + } + + if ( n.nodeName() == "spacer") + { + QDomElement el = n.toElement(); + + QSpacerItem* spacer; + + if ( el.attribute("orientation","v") == "v" ) + spacer = new QSpacerItem( 5, 10, QSizePolicy::Fixed, QSizePolicy::Expanding ); + else + spacer = new QSpacerItem( 10, 5, QSizePolicy::Expanding, QSizePolicy::Fixed ); + grid->addItem(spacer,row,col); + } + + } +} + +void Tagxml::focusToFirstItem() +{ + if(m_firstItem) + m_firstItem->setFocus(); +} + +void Tagxml::readAttributes( QDict *d ) +{ + QString name,value; + + Attr * attr = attributes.first(); + while ( attr ) { + name = attr->attrName(); + value = attr->value(); + + if ( value.isEmpty() ) + d->remove(name); + else + { + if ( dynamic_cast(attr) ) // checkbox + { + if (value == "checked") + { + if (m_dtd->booleanAttributes == "simple") + { + d->replace(name, new QString("") ); + } else + { + d->replace(name, new QString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all + } + } + else + { + d->remove(name); + } +/* } else + { + value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; + d->replace(name, new QString(value)); + } */ + } else + if (dynamic_cast(attr)) + { +// value = KURL::encode_string(value); + d->replace(name, new QString(value)); + } else { + value.replace(QRegExp("&(?!amp;)"), "&"); + d->replace(name, new QString(value) ); + } + } + + + attr = attributes.next(); + } + +} + +void Tagxml::writeAttributes( QDict *d ) +{ + QString name,value; + + Attr * attr = attributes.first(); + + int count = 0; + while ( attr ) { + + name = attr->attrName(); + + QString *v = d->find(name); + if ( v ) { + v->replace("&","&"); + if ( dynamic_cast(attr) ) // checkbox + value = "checked"; + else + if ( dynamic_cast(attr)) + value = KURL::decode_string(*v); + else + value = *v; + } + else + { + value = ""; + + Attribute* attrib = m_dtdTag->attribute(name); + if(attrib && attrib->source.lower() == "selection") + value = m_selection; + } + + attr->setValue( value ); + + attr = attributes.next(); + ++count; + } +} + +#include "tagxml.moc" diff --git a/quanta/dialogs/tagdialogs/tagxml.h b/quanta/dialogs/tagdialogs/tagxml.h new file mode 100644 index 00000000..52c2973d --- /dev/null +++ b/quanta/dialogs/tagdialogs/tagxml.h @@ -0,0 +1,56 @@ +/*************************************************************************** + tagxml.h - description + ------------------- + begin : � � 25 14:34:07 EEST 2000 + copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon + (C) 2003, 2004 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef TAGXML_H +#define TAGXML_H + +#include +#include +#include + +#include "tagattr.h" +#include "tagwidget.h" +#include "qtag.h" + +class Tagxml : public QWidget, TagWidget { + Q_OBJECT + public: + /** construtor */ + Tagxml(QDomNode &d, QTag *dtdTag, QWidget* parent=0, const char *name=0); + Tagxml(QDomNode &d, QTag *dtdTag, const QString& selection, QWidget* parent=0, const char *name=0); + /** destructor */ + ~Tagxml(); + + QPtrList attributes; + + void readAttributes( QDict *d); + void writeAttributes( QDict *d ); + void focusToFirstItem(); + + private: + void initialize(QDomNode &d, QTag *dtdTag); + + QDomNode doc; + const DTDStruct *m_dtd; + QWidget *m_firstItem; + QTag *m_dtdTag; + QString m_selection; +}; + + + +#endif diff --git a/quanta/messages/Makefile.am b/quanta/messages/Makefile.am new file mode 100644 index 00000000..625869eb --- /dev/null +++ b/quanta/messages/Makefile.am @@ -0,0 +1,13 @@ +noinst_LTLIBRARIES = libmessages.la + +libmessages_la_SOURCES = messageoutput.cpp messageitem.cpp annotationoutput.cpp +METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/quanta/project \ + -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/lib \ + $(all_includes) + +noinst_HEADERS = annotationoutput.h diff --git a/quanta/messages/annotationoutput.cpp b/quanta/messages/annotationoutput.cpp new file mode 100644 index 00000000..8c8d7d90 --- /dev/null +++ b/quanta/messages/annotationoutput.cpp @@ -0,0 +1,355 @@ +// +// C++ Implementation: annotationoutput +// +// Description: +// +// +// Author: Andras Mantia , (C) 2005 +// +// Copyright: See COPYING file that comes with this distribution +// +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "annotationoutput.h" +#include "messageoutput.h" +#include "project.h" +#include "projectlist.h" +#include "qextfileinfo.h" +#include "quantacommon.h" +#include "viewmanager.h" + +AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name) + : KTabWidget(parent, name) +{ + m_currentFileAnnotations = new MessageOutput(this); + addTab(m_currentFileAnnotations, i18n("Current File")); + + m_yourAnnotations = new KListView(this); + m_yourAnnotations->addColumn("1", -1); + m_yourAnnotations->addColumn("2", 0); + m_yourAnnotations->setRootIsDecorated(true); + m_yourAnnotations->header()->hide(); + m_yourAnnotations->setSorting(1); + m_yourAnnotations->setLineWidth(2); + addTab(m_yourAnnotations, i18n("For You")); + + connect(m_yourAnnotations, SIGNAL(executed(QListViewItem*)), SLOT(yourAnnotationsItemExecuted(QListViewItem *))); + + m_allAnnotations = new KListView(this); + m_allAnnotations->addColumn("1", -1); + m_allAnnotations->addColumn("2", 0); + m_allAnnotations->setRootIsDecorated(true); + m_allAnnotations->header()->hide(); + m_allAnnotations->setSorting(1); + m_allAnnotations->setLineWidth(2); + connect(m_allAnnotations, SIGNAL(executed(QListViewItem*)), SLOT(allAnnotationsItemExecuted(QListViewItem *))); + addTab(m_allAnnotations, i18n("All Files")); + + + connect(this, SIGNAL(currentChanged(QWidget*)), SLOT(tabChanged(QWidget*))); + + m_updateTimer = new QTimer(this); + connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(slotUpdateNextFile())); + + m_yourAnnotationsNum = 0; +} + +AnnotationOutput::~AnnotationOutput() +{ +} + +void AnnotationOutput::tabChanged(QWidget *w) +{ + if (w == m_allAnnotations || w == m_yourAnnotations) + readAnnotations(); +} + +void AnnotationOutput::insertAnnotation(uint line, const QString& fileName, const QPair& annotation) +{ + line++; + QString s = i18n("Line %1: %2").arg(line).arg(annotation.first); + s.replace('\n', ' '); + m_currentFileAnnotations->showMessage(line, 1, fileName, s); +} + +void AnnotationOutput::clearAnnotations() +{ + m_currentFileAnnotations->clear(); +} + +void AnnotationOutput::readAnnotations() +{ + if (!Project::ref()->hasProject()) + { + m_allAnnotations->clear(); + m_yourAnnotations->clear(); + m_yourAnnotationsNum = 0; + setTabLabel(m_yourAnnotations, i18n("For You")); + return; + } + + KURL baseURL = Project::ref()->projectBaseURL(); + QStringList openedItems; + QListViewItem *item = m_allAnnotations->firstChild(); + while (item) + { + if (item->isOpen()) + openedItems += item->text(0); + item = item->nextSibling(); + } + m_allAnnotations->clear(); + m_annotatedFileItems.clear(); + m_fileNames.clear(); + m_lines.clear(); + + QStringList yourOpenedItems; + item = m_yourAnnotations->firstChild(); + while (item) + { + if (item->isOpen()) + yourOpenedItems += item->text(0); + item = item->nextSibling(); + } + + m_yourAnnotations->clear(); + m_yourFileItems.clear(); + m_yourFileNames.clear(); + m_yourLines.clear(); + m_yourAnnotationsNum = 0; + + QDomElement annotationElement = Project::ref()->dom()->firstChild().firstChild().namedItem("annotations").toElement(); + if (annotationElement.isNull()) + return; + QString yourself = Project::ref()->yourself().lower(); + QStringList roles = Project::ref()->yourRoles(); + QDomNodeList nodes = annotationElement.childNodes(); + int count = nodes.count(); + for (int i = 0; i < count; i++) + { + QDomElement el = nodes.item(i).toElement(); + QString fileName = el.attribute("url"); + KURL u = baseURL; + QuantaCommon::setUrl(u, fileName); + u = QExtFileInfo::toAbsolute(u, baseURL); + if (Project::ref()->contains(u)) + { + bool ok; + int line = el.attribute("line").toInt(&ok, 10); + QString text = el.attribute("text"); + QString receiver = el.attribute("receiver"); + text.replace('\n',' '); + QString lineText = QString("%1").arg(line); + if (lineText.length() < 20) + { + QString s; + s.fill('0', 20 - lineText.length()); + lineText.prepend(s); + } + KListViewItem *fileIt = m_annotatedFileItems[fileName]; + if (!fileIt) + { + fileIt = new KListViewItem(m_allAnnotations, fileName); + m_annotatedFileItems.insert(fileName, fileIt); + m_fileNames[fileIt] = u.url(); + } + KListViewItem *it = new KListViewItem(fileIt, fileIt, text, lineText); + if (openedItems.contains(fileName)) + fileIt->setOpen(true); + m_fileNames[it] = u.url(); + m_lines[it] = line; + + if (!yourself.isEmpty() && (receiver == yourself || roles.contains(receiver))) + { + m_yourAnnotationsNum++; + KListViewItem *fileIt = m_yourFileItems[fileName]; + if (!fileIt) + { + fileIt = new KListViewItem(m_yourAnnotations, fileName); + m_yourFileItems.insert(fileName, fileIt); + m_yourFileNames[fileIt] = u.url(); + } + KListViewItem *it = new KListViewItem(fileIt, fileIt, text, lineText); + if (yourOpenedItems.contains(fileName)) + fileIt->setOpen(true); + m_yourFileNames[it] = u.url(); + m_yourLines[it] = line; + } + } else + { + annotationElement.removeChild(el); + } + } + if (m_yourAnnotationsNum > 0) + { + setTabLabel(m_yourAnnotations, i18n("For You: %1").arg(m_yourAnnotationsNum)); + } else + { + setTabLabel(m_yourAnnotations, i18n("For You")); + } +} + +void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap > &a_annotations) +{ + m_annotatedFileItems.clear(); + m_fileNames.clear(); + m_lines.clear(); + m_yourFileItems.clear(); + m_yourFileNames.clear(); + m_yourLines.clear(); + + bool modified = false; + QMap > annotations = a_annotations; + QDomDocument *dom = Project::ref()->dom(); + QDomElement annotationElement = dom->firstChild().firstChild().namedItem("annotations").toElement(); + if (annotationElement.isNull()) + { + annotationElement = dom->createElement("annotations"); + dom->firstChild().firstChild().appendChild(annotationElement); + } + QDomNode n = annotationElement.firstChild(); + while ( !n.isNull() ) + { + QDomElement el = n.toElement(); + QString fName = el.attribute("url"); + QDomNode n2 = n.nextSibling(); + if (fileName == fName) + { + QString text = el.attribute("text"); + bool ok; + int line = el.attribute("line").toInt(&ok, 10); + if (!annotations.contains(line) || (annotations[line].first != text)) + { + n.parentNode().removeChild(n); + modified = true; + } else + annotations.remove(line); + } + n = n2; + } + for (QMap >::ConstIterator it = annotations.constBegin(); it != annotations.constEnd(); ++it) + { + QDomElement el = dom->createElement("annotation"); + el.setAttribute("url", fileName); + el.setAttribute("line", it.key()); + el.setAttribute("text", it.data().first); + el.setAttribute("receiver", it.data().second.lower()); + annotationElement.appendChild(el); + modified = true; + } + if (modified) + Project::ref()->setModified(true); + if (m_allAnnotations->isVisible() || m_yourAnnotations->isVisible()) + readAnnotations(); +} + +void AnnotationOutput::allAnnotationsItemExecuted(QListViewItem *item) +{ + if (dynamic_cast (item->parent()) != m_allAnnotations) + { + emit clicked(m_fileNames[item], m_lines[item], 0); + } else + emit clicked(m_fileNames[item], 0, 0); +} + +void AnnotationOutput::yourAnnotationsItemExecuted(QListViewItem *item) +{ + if (dynamic_cast (item->parent()) != m_yourAnnotations) + { + emit clicked(m_yourFileNames[item], m_yourLines[item], 0); + } else + emit clicked(m_yourFileNames[item], 0, 0); +} + +void AnnotationOutput::updateAnnotations() +{ + m_updateTimer->stop(); + m_currentFileAnnotations->clear(); + readAnnotations(); + if (Project::ref()->hasProject() && Project::ref()->projectBaseURL().isLocalFile()) + { + m_files = Project::ref()->files(); + m_fileIndex = 0; + m_updateTimer->start(0, true); + } +} + +void AnnotationOutput::updateAnnotationForFile(const KURL& url) +{ + static const QRegExp rx("-->|\\*/"); + if (!ViewManager::ref()->isOpened(url) && QuantaCommon::checkMimeGroup(url, "text" )) + { + // kdDebug(24000) << "Testing " << url << endl; + QFile f(url.path()); + if (f.open(IO_ReadOnly)) + { + QMap > annotations; + uint i = 0; + QTextStream stream(&f); + stream.setEncoding(QTextStream::UnicodeUTF8); + QString line; + while (!stream.atEnd()) + { + line = stream.readLine(); + int pos = line.find("@annotation"); + if (pos != -1) + { + QString receiver; + pos += 11; + if (line[pos] == '(') + { + int p = pos; + pos = line.find(')'); + if (pos != -1) + { + receiver = line.mid(p + 1, pos - p - 1); + pos += 2; + } + } else + pos++; + int pos2 = line.find(rx); + annotations.insert(i, qMakePair(line.mid(pos, pos2 - pos).stripWhiteSpace(), receiver)); + } + ++i; + } + f.close(); + if (!annotations.isEmpty()) + { + KURL u = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()); + writeAnnotations(QuantaCommon::qUrl(u), annotations); + } + } + } +} + +void AnnotationOutput::slotUpdateNextFile() +{ + updateAnnotationForFile(m_files[m_fileIndex]); + if (m_fileIndex < m_files.count()) + { + m_fileIndex++; + m_updateTimer->start(2, true); + } else + if (m_yourAnnotationsNum > 0) + { + KMessageBox::information(this, i18n("There are annotations addressed for you.
To view them select the For You tab in the Annotations toolview.
"), i18n("New Annotations"), "Show Your Annotations"); + } +} + +#include "annotationoutput.moc" diff --git a/quanta/messages/annotationoutput.h b/quanta/messages/annotationoutput.h new file mode 100644 index 00000000..0c5ab748 --- /dev/null +++ b/quanta/messages/annotationoutput.h @@ -0,0 +1,90 @@ +// +// C++ Interface: annotationoutput +// +// Description: +// +// +// Author: Andras Mantia , (C) 2005 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef ANNOTATIONOUTPUT_H +#define ANNOTATIONOUTPUT_H + +#include +#include + +/** +@author Andras Mantia +*/ + +class QDomDocument; +class QListViewItem; +class QTimer; + +class KListView; +class KListViewItem; + +class MessageOutput; + +enum AnnotationScope +{ + CurrentFile = 0, + AllFiles +}; + +class AnnotationOutput : public KTabWidget +{ +Q_OBJECT +public: + AnnotationOutput(QWidget *parent = 0, const char *name = 0); + + ~AnnotationOutput(); + MessageOutput *currentFileAnnotations() const {return m_currentFileAnnotations;} + KListView *allAnnotations() const {return m_allAnnotations;} + void writeAnnotations(const QString &fileName, const QMap > &annotations); + +public slots: + /** + * Scans the project files to see if there were annotations added or modified outside of Quanta. The scan is done in background. + */ + void updateAnnotations(); + void readAnnotations(); + void clearAnnotations(); + void insertAnnotation(uint line, const QString& fileName, const QPair& annotation); + +private slots: + void tabChanged(QWidget *w); + void allAnnotationsItemExecuted(QListViewItem *item); + void yourAnnotationsItemExecuted(QListViewItem *item); + void slotUpdateNextFile(); + +signals: + void clicked(const QString& fname, int line, int col); + +private: + /** + * Updates the annotation for a file. + * @param url + */ + void updateAnnotationForFile(const KURL& url); + + MessageOutput *m_currentFileAnnotations; + KListView *m_allAnnotations; + QDict m_annotatedFileItems; + QMap m_fileNames; + QMap m_lines; + uint m_yourAnnotationsNum; + + KListView *m_yourAnnotations; + QDict m_yourFileItems; + QMap m_yourFileNames; + QMap m_yourLines; + + QTimer *m_updateTimer; + KURL::List m_files; + uint m_fileIndex; +}; + +#endif diff --git a/quanta/messages/messageitem.cpp b/quanta/messages/messageitem.cpp new file mode 100644 index 00000000..7f906041 --- /dev/null +++ b/quanta/messages/messageitem.cpp @@ -0,0 +1,92 @@ +/*************************************************************************** + messageoutput.cpp - description + ------------------- + begin : Jan 12 2001 + copyright : (C) 2001 by Dmitry Poplavsky + (C) 2002-2005 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "messageitem.h" +#include +#include + +MessageItem::MessageItem( QListBox * listbox, const QString &text, int line, int column, const QString &fname ) + :QListBoxText(listbox,text),lineNumber(line),columnNumber(column),filename(fname) +{ +} + +int MessageItem::line() +{ + if ( lineNumber != -1 ) { + return lineNumber; + } + else { // try to find first number in text + QString s = text(); + int pos = s.find( QRegExp("[0-9]")); + if ( pos == -1 ) + return lineNumber; + int pos2 = pos; + while ( s[pos2].isDigit() ) pos2++; + + QString snum = s.mid(pos, pos2-pos); + return snum.toInt(); + + } +} + +int MessageItem::column() +{ + if (columnNumber != -1) + { + return columnNumber; + } else + { + QString s = text(); + QRegExp exp("(?:\\D|^)(\\d{1,4})(?:\\D|$)"); + + int pos = exp.search(s); + if ( pos == -1 ) + return 0; + pos = exp.search(s, pos + exp.cap(1).length()); + if ( pos == -1 ) + return 0; + s = exp.cap(1); + return s.toInt(); + } +} + +QString MessageItem::fileName() +{ + if (filename.isEmpty()) + { + QString fname; + QString s = text(); + int pos = s.find(i18n("File: ")); + if (pos != -1) + { + int pos2 = s.find(i18n(", "), pos); + if (pos2 != -1) + fname = s.mid(pos, pos2-pos); + else + fname = s.mid(pos); + fname.remove(i18n("File: ")); + } + return fname; + } else + return filename; +} + +void MessageItem::addText(const QString &t) +{ + setText( text() + t ); +} + diff --git a/quanta/messages/messageitem.h b/quanta/messages/messageitem.h new file mode 100644 index 00000000..01e04b35 --- /dev/null +++ b/quanta/messages/messageitem.h @@ -0,0 +1,54 @@ +/*************************************************************************** + messageoutput.h - description + ------------------- + begin : Jan 12 2001 + copyright : (C) 2001 by Dmitry Poplavsky + (C) 2002-2005 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef MESSAGEITEM_H +#define MESSAGEITEM_H + +#include + +/** + Like QListBoxText with storing of filename and line in it. +*/ + +class MessageItem : public QListBoxText { + public: + + MessageItem( QListBox *listbox, const QString &text = QString::null, int line = -1, int column = -1, const QString &fname = QString::null); + + /** return line number for file , associated with this message */ + int line(); + /** return column number for file , associated with this message */ + int column(); + /** return name of file , associated with this message */ + QString fileName(); + + void setLine(int line) { lineNumber = line; } + void setColumn(int line) { columnNumber = line; } + void setFileName(const QString &fileName ) { filename = fileName; } + void addText(const QString &text); + private: + + // line number and filename , associated with this line + int lineNumber; ///< the line of the item. -1 if not defined + int columnNumber; ///< the column of the item. -1 if not defined + QString filename; ///< the filename (URL) of the item. Empty if not defined + +}; + +#endif + diff --git a/quanta/messages/messageoutput.cpp b/quanta/messages/messageoutput.cpp new file mode 100644 index 00000000..6b89aaa9 --- /dev/null +++ b/quanta/messages/messageoutput.cpp @@ -0,0 +1,179 @@ +/*************************************************************************** + messageoutput.cpp - description + ------------------- + begin : Thu Feb 24 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavski + (C) 2003-2005 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +// KDE includes +#include +#include +#include +#include +#include +#include +#include + +// Qt includes +#include +#include +#include + +#include "messageoutput.h" +#include "messageitem.h" + +MessageOutput::MessageOutput(QWidget *parent, const char *name ) + : QListBox(parent,name) +{ + m_maxItems = 2000; + + QPalette pal = palette(); + pal.setColor(QColorGroup::HighlightedText, pal.color(QPalette::Normal, QColorGroup::Text)); + pal.setColor(QColorGroup::Highlight, pal.color(QPalette::Normal, QColorGroup::Mid)); + setPalette(pal); + setFocusPolicy( NoFocus ); + + m_popupMenu = new KPopupMenu(this); + connect(this, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)), + this, SLOT(showMenu(QListBoxItem*, const QPoint&))); + m_popupMenu->insertItem( SmallIconSet("editcopy"), i18n("&Copy"), this, SLOT(copyContent()) ) ; + m_popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save As..."), this, SLOT(saveContent()) ) ; + m_popupMenu->insertSeparator(); + m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clear()) ) ; + + connect( this, SIGNAL(clicked(QListBoxItem*)), SLOT(clickItem(QListBoxItem*)) ); +} + +MessageOutput::~MessageOutput() +{ +} + +MessageItem *MessageOutput::insertItem(const QString& s) +{ + checkMaxItems(); + MessageItem *it = new MessageItem(this, s); + setBottomItem(count()>0?count()-1:0); + return it; +} + +void MessageOutput::addToLastItem(const QString& s) +{ + int ind = count() - 1; + if ( ind != -1 ) { + MessageItem *it = dynamic_cast( item(ind) ); + if ( it ) + it->addText( s ); + else + changeItem( text( ind )+ s, ind ); + } +} + +void MessageOutput::showMessage(int line, int col, const QString &fileName, const QString& s, bool append) +{ + MessageItem *it = 0L; + QString message = s; + int endPos; + if ( !count() || (!append && !text(count()-1).stripWhiteSpace().isEmpty()) ) + it = insertItem(""); + while ( ( endPos = message.find('\n') ) != -1 ) { + if (it) + { + it->setLine(line); + it->setColumn(col); + it->setFileName(fileName); + } + addToLastItem( message.left(endPos) ); + it = insertItem(""); + message.remove(0,endPos+1); + } + if (!message.isEmpty()) + { + if (it) + { + it->setLine(line); + it->setColumn(col); + it->setFileName(fileName); + } + addToLastItem( message); + } + setBottomItem(count()>0?count()-1:0); +} + +void MessageOutput::showMessage(const QString& s, bool append) +{ + showMessage(-1, -1, "", s, append); +} + + +void MessageOutput::checkMaxItems() +{ + if ( count() >= m_maxItems ) + removeItem( index(firstItem()) ); +} + +void MessageOutput::clickItem( QListBoxItem * l_item ) +{ + MessageItem *item = dynamic_cast(l_item); + if ( item ) { +// kdDebug(24000) << "Column: " << item->column() << endl; + if ( item->line() != -1 ) + emit clicked( item->fileName(), item->line() - 1, item->column() - 1); + } +} + +void MessageOutput::showMenu( QListBoxItem*, const QPoint& l_point ) +{ + m_popupMenu->exec(l_point); +} + +QString MessageOutput::content() +{ + QString p_content; + for (uint i=0; iclipboard()->setText(content(), QClipboard::Clipboard); +} + +void MessageOutput::saveContent() +{ + KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(), + i18n("*.log|Log Files (*.log)\n*|All Files"), this, i18n("Save Log File")); + if (url.isEmpty()) + return; + + QFileInfo fileinfo(url.path()); + if (fileinfo.exists() && KMessageBox::warningContinueCancel(0, + i18n("File
%1
already exists. Overwrite it?
") + .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel) + return; + + QFile file(url.path()); + if (!file.open(IO_WriteOnly)) { + KMessageBox::error(0, i18n("Cannot save log file
%1
") + .arg(url.url())); + return; + } + + QTextStream textfile(&file); + textfile << content(); + file.close(); + +} + + +#include "messageoutput.moc" diff --git a/quanta/messages/messageoutput.h b/quanta/messages/messageoutput.h new file mode 100644 index 00000000..223470bd --- /dev/null +++ b/quanta/messages/messageoutput.h @@ -0,0 +1,90 @@ +/*************************************************************************** + messageoutput.h - description + ------------------- + begin : Thu Feb 24 2000 + copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavski + (C) 2002-2005 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef MESSAGEOUTPUT_H +#define MESSAGEOUTPUT_H + +#include + +class KProcess; +class KPopupMenu; + +class MessageItem; + +/**class for displaing of +weblint output + *@author Yacovlev Alexander & Dmitry Poplavski + */ + +class MessageOutput : public QListBox { + Q_OBJECT +public: + MessageOutput(QWidget *parent=0, const char *name=0); + ~MessageOutput(); + // Return whole content as a single string with EOLs + QString content(); + +public slots: + /** Inserts an item with the content s to the end of the list*/ + MessageItem *insertItem(const QString& s); + + /** Insert message for each line of string (EOL-separated). + @param line The line this message refers to. -1 if it's not specified (the first number is taken from the message string) + @param column The column this message refers to. -1 if it's not specified (the second number is taken from the message string) + @param fileName The URL of the file this message refers to. If empty, the string following the "File: " string in the message is used. + @param message The message itself + @param append Append the message to the previous one or start a new line. Default is false, start a new line. + */ + void showMessage(int line, int column, const QString &fileName, const QString& message, bool append = false); + /** Insert message for each line of string (EOL-separated). + @param message The message itself + @param append Append the message to the previous one or start a new line. Default is false, start a new line. + */ + void showMessage(const QString& message, bool append = false); + /** Append message string to the last item + @param line The line this message refers to. -1 if it's not specified (the first number is taken from the message string) + @param column The column this message refers to. -1 if it's not specified (the second number is taken from the message string) + @param fileName The URL of the file this message refers to. If empty, the string following the "File: " string in the message is used. + @param message The message itself + */ + void addToLastItem(const QString& message); + // Copy message content to clipboard + void copyContent(); + // Save message content to clipboard + void saveContent(); + + +public: + uint maxItems() const { return m_maxItems; } + void setMaxItems( uint items ) { m_maxItems = items; } + /** remove first items , if count > m_maxItem */ + void checkMaxItems(); + +signals: + void clicked(const QString& fname, int line, int col); + +protected slots: + void clickItem( QListBoxItem *); + // Show context menu + void showMenu(QListBoxItem*, const QPoint&); + +private: + uint m_maxItems; + KPopupMenu* m_popupMenu; +}; + +#endif diff --git a/quanta/parsers/Makefile.am b/quanta/parsers/Makefile.am new file mode 100644 index 00000000..ef11528d --- /dev/null +++ b/quanta/parsers/Makefile.am @@ -0,0 +1,16 @@ +SUBDIRS = dtd +METASOURCES = AUTO + +noinst_LTLIBRARIES = libparser.la +libparser_la_SOURCES = qtag.cpp node.cpp tag.cpp parser.cpp saparser.cpp \ + parsercommon.cpp sagroupparser.cpp + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/src \ + -I$(top_srcdir)/quanta/parts/kafka \ + -I$(top_srcdir)/quanta/treeviews \ + -I$(top_srcdir)/lib \ + $(KMDI_INCLUDES) $(all_includes) + + +noinst_HEADERS = saparser.h parsercommon.h sagroupparser.h diff --git a/quanta/parsers/dtd/Makefile.am b/quanta/parsers/dtd/Makefile.am new file mode 100644 index 00000000..80f647fb --- /dev/null +++ b/quanta/parsers/dtd/Makefile.am @@ -0,0 +1,11 @@ +noinst_LTLIBRARIES = libdtdparser.la +libdtdparser_la_SOURCES = dtepcreationdlg.ui dtdparser.cpp + +METASOURCES = AUTO + +AM_CPPFLAGS = -I$(top_srcdir)/quanta/parsers \ + -I$(top_srcdir)/quanta/utility \ + -I$(top_srcdir)/quanta/dialogs \ + -I$(top_builddir)/quanta/dialogs \ + -I$(top_srcdir)/lib \ + $(LIBXML_CFLAGS) $(all_includes) diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp new file mode 100644 index 00000000..18e3d712 --- /dev/null +++ b/quanta/parsers/dtd/dtd.cpp @@ -0,0 +1,415 @@ +/*************************************************************************** + dtdparser.cpp - description + ------------------- + begin : Tue Jul 30 15:26:20 EEST 2002 + copyright : (C) 2002 by Jason P. Hanley + (C) 2002, 2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "dtd.h" +#include "../quantacommon.h" +#include "../qextfileinfo.h" + + +DTD::DTD(const KURL &dtdURL, const QString &dtepDir) +{ + m_dtdURL = dtdURL; + m_dtepDir = dtepDir + "/"+QFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user +} + +DTD::~DTD() +{ +} + +QStringList DTD::getTags() +{ + return tags; +} + +AttributeList* DTD::getTagAttributes(QString tag) +{ + return tagAttributes.find(tag); +} + + +QStringList DTD::getTextCompletion(QString tag) +{ + return QStringList(); +} + +void DTD::printContents() +{ + for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { + QString tag = *tagIt; + kdDebug(24000) << tag << endl; + AttributeList *attributes = getTagAttributes(tag); + for ( uint i = 0; i < attributes->count(); i++) + { + Attribute *attribute = attributes->at(i); + QString s = " " + attribute->name + ": "; + for (uint j = 0; j < attribute->values.count(); j++) + { + s += attribute->values[j] + ", "; + } + kdDebug(24000) << s << endl; + } + } +} + +void DTD::writeTagFiles() +{ + QString dirName = m_dtepDir; + KURL u; + u.setPath(dirName); + if (!QExtFileInfo::createDir(dirName)) { + QuantaCommon::dirCreationError(0, u); + return; + } + dirName.append("/"); + for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) { + QString tag = *tagIt; + + QFile file( dirName + tag.lower() + ".tag" ); + if ( file.open( IO_WriteOnly ) ) { + QTextStream stream( &file ); + stream.setEncoding(QTextStream::UnicodeUTF8); + stream << "" << endl + << "" << endl + << "" << endl << endl; + + AttributeList *attributes = getTagAttributes(tag); + stream << QuantaCommon::xmlFromAttributes(attributes); + + stream << "" << endl + << "" << endl; + + file.close(); + } else { + kdDebug(24000) << "Unable to write tag file: " << file.name() << endl; + } + } + + KConfig config(dirName + "description.rc"); + config.setGroup("General"); + config.writeEntry("Name", QFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the DTD! + config.writeEntry("NickName", QFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the user! + config.sync(); +} + +bool DTD::parseDTD(const KURL &url) +{ + QString fileName = QString::null; + if (!KIO::NetAccess::download(url, fileName)) + { + KMessageBox::error(0, i18n("Cannot download the DTD from %1.").arg(url.prettyURL(0, KURL::StripFileProtocol))); + return false; + } + QFile file(fileName); + if (file.open(IO_ReadOnly)) + { + QTextStream fileStream(&file); + fileStream.setEncoding(QTextStream::UnicodeUTF8); + QString entireDTD = fileStream.read(); + file.close(); + removeComments(entireDTD); + + QString line; + QStringList lines = QStringList::split("\n",entireDTD); + QStringList::Iterator it = lines.begin(); + while (it != lines.end()) { + line = *it; + + if (line.startsWith("<")) { + while (!line.endsWith(">") && it != lines.end()) { + ++it; + line += " \\end" + *it; + } + } else if (line.startsWith("%")) { + while (!line.endsWith(";") && it != lines.end()) { + ++it; + line += *it; + } + } + + line = line.stripWhiteSpace(); + line = line.simplifyWhiteSpace(); + + //kdDebug(24000) << "Parsed line is: " << line << endl; + + if ( line.startsWith("")) + { + parseDTDEntity(line); + } + else + if (line.startsWith("")) + { + parseDTDElement(line); + } + else + if (line.startsWith("")) + { + parseDTDAttlist(line); + } + else + if (line.startsWith("%") && line.endsWith(";")) + { + line.remove(0,1); + line.truncate(line.length()-1); + KURL entityURL = url; + entityURL.setPath(url.directory()+ "/" + line + ".ent"); + parseDTD(entityURL); + } else + { + kdDebug(24000) << QString("Unknown tag: [%1]").arg(line) << endl; + } + + if (it != lines.end()) ++it; + } + } +} + +void DTD::parseDTDEntity(QString line) { + QString name; + QString *value; + + line.replace("\\end", " "); + name = line.mid(11); + int firstSpace = name.find(' '); + name = name.remove(firstSpace, name.length()-firstSpace); + + value = new QString(line.mid(11+firstSpace)); + value->remove(0, value->find("\"")+1); + value->remove(value->findRev("\""), value->length()); + + parseDTDReplace(value); + stripSpaces(value); + + entities.insert(name, value); + + //kdDebug() << "Entity --- Name: " << name << " --- Value: " << *value << endl; +} + +void DTD::parseDTDElement(const QString &l) { + QString name; + QString *value; + + QString line = l; + line.replace("\\end", " "); + name = line.mid(10); + int firstSpace = name.find(' '); + name.remove(firstSpace, name.length()-firstSpace); + + value = new QString(line.mid(10+firstSpace)); + //value->remove(0, value->find("\"")+1); + value->remove(value->find(">"), 10000); + + parseDTDReplace(&name); + parseDTDReplace(value); + + if ( name.startsWith("(") && name.endsWith(")") ) { + name.remove(0,1); + name.remove(name.length()-1,1); + QStringList multipleTags = QStringList::split("|", name); + QStringList::Iterator it = multipleTags.begin(); + while(it != multipleTags.end()) { + name = *it; + name = name.stripWhiteSpace(); + elements.insert(name, value); + tags.append(name); + //kdDebug() << "Element --- Name: " << name << " --- Value: " << *value << endl; + ++it; + } + } else { + elements.insert(name, value); + tags.append(name); + //kdDebug() << "Element --- Name: " << name << " --- Value: " << *value << endl; + } +} + +void DTD::parseDTDAttlist(const QString &l) { + QString name; + QString *value; + + QString line = l; + line.replace("\\end", " "); + name = line.mid(10); + int firstSpace = name.find(' '); + name.remove(firstSpace, name.length()-firstSpace); + + value = new QString(line.mid(10+firstSpace)); + //value->remove(0, value->find("\"")+1); + value->remove(value->find(">"), 10000); + + parseDTDReplace(&name); + parseDTDReplace(value); + + if ( name.startsWith("(") && name.endsWith(")") ) { + name.remove(0,1); + name.remove(name.length()-1,1); + QStringList multipleTags = QStringList::split("|", name); + QStringList::Iterator it = multipleTags.begin(); + while(it != multipleTags.end()) { + name = *it; + name = name.stripWhiteSpace(); + //elements.insert(name, value); + parseTagAttributeValues(name, value); + //kdDebug() << "Attlist --- Name: " << name << " --- Value: " << *value << endl; + ++it; + } + } else { + //elements.insert(name, value); + parseTagAttributeValues(name, value); + //kdDebug() << "Attlist --- Name: " << name << " --- Value: " << *value << endl; + } + +} + +void DTD::parseTagAttributeValues(const QString &name, QString *value) { + AttributeList *attributes = new AttributeList(); + + QStringList attrLines = QStringList::split("\\end",*value); + QStringList::Iterator lineIt = attrLines.begin(); + while (lineIt != attrLines.end()) //iterate through the attribute lines + { + //split the attribute line + QStringList all = QStringList::split(" ", *lineIt); + QStringList::Iterator it = all.begin(); + while(it != all.end()) + { + Attribute *attr = new Attribute(); + attr->name = *it; + //kdDebug() << "Inserting for tag " << name << ": " << *it << endl; + ++it; + + QString values = *it; + //list of possible values + if ( values.startsWith("(") && values.endsWith(")") ) + { + values.remove(0,1); + values.remove(values.length()-1,1); + attr->values = QStringList::split("|", values); + QString s = (attr->values[0]+attr->values[1]).lower(); + stripSpaces(&s); + if ((s == "truefalse") || (s == "falsetrue")) + { + attr->type = "check"; + } else + { + attr->type = "list"; + } + } else + { + attr->values = values; + attr->type = "input"; + } + + //kdDebug() << " --- values: " << *it << endl; + if (it != all.end()) + { + ++it; + QString s=*it; + if (s.startsWith("\"") && s.endsWith("\"") && it!=all.end()) + { + s.remove(0,1); + s.remove(s.length()-1,1); + attr->defaultValue = s; + } + if (s.startsWith("#") && it != all.end()) + { + s.remove(0,1); + attr->status = s.lower(); + } + if (*it == "#FIXED" && it != all.end()) + { + ++it; + attr->values.append(*it); + } + } + + if (it != all.end()) + { + ++it; + } + attributes->append(attr); + } + ++lineIt; + } + tagAttributes.insert(name, attributes); +} + +void DTD::parseDTDReplace(QString *value) { + int begin, end; + begin = value->find("%"); + end = value->find(";"); + while (begin != -1 && end != -1) { + QString replaceText = value->mid(begin+1, end-begin-1); + QString *replaceValue = entities.find(replaceText); + + if (replaceValue != 0L) { + value->replace(begin, end-begin+1, *replaceValue); + } else { + kdDebug(24000) << "Can not find entity: " << replaceText << endl; + return; + } + + begin = value->find("%"); + end = value->find(";"); + } +} + +void DTD::stripSpaces(QString *value) { + int index=-1; + while ( (index=value->find(' ',++index)) != -1 ) { + if ( value->findRev('(',index) != -1 && value->find(')',index) != -1) + value->remove(index,1); + } +} + +void DTD::removeComments(QString &value) { + int begin, end; + begin = value.find("",begin+2); + while (begin != -1 && end != -1) { + value.remove(begin, end-begin+3); + begin = value.find("",begin+2); + } + + begin = value.find("--"); + end = value.find("--",begin+2); + while (begin != -1 && end != -1) { + value.remove(begin, end-begin+2); + begin = value.find("--"); + end = value.find("--",begin+2); + } + + value.replace(QRegExp(""), ""); +} + +bool DTD::parseDTD() +{ + return parseDTD(m_dtdURL); +} diff --git a/quanta/parsers/dtd/dtd.h b/quanta/parsers/dtd/dtd.h new file mode 100644 index 00000000..45b0e213 --- /dev/null +++ b/quanta/parsers/dtd/dtd.h @@ -0,0 +1,64 @@ +/*************************************************************************** + dtdparser.cpp - description + ------------------- + begin : Tue Jul 30 15:26:20 EEST 2002 + copyright : (C) 2002 by Jason P. Hanley + (C) 2002, 2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef DTD_H +#define DTD_H + +//qt includes +#include + +//app includes +#include "qtag.h" + +class KURL; + +class DTD +{ + +public: + DTD(const KURL &dtdURL, const QString& dtepDir); + ~DTD(); + +public: + QStringList getTags(); + AttributeList* getTagAttributes(QString tag); + QStringList getTextCompletion(QString tag); + void printContents(); + void writeTagFiles(); + /** No descriptions */ + bool parseDTD(); + +private: + bool parseDTD(const KURL& url); + void parseDTDEntity(const QString &line); + void parseDTDElement(const QString &line); + void parseDTDAttlist(const QString &line); + void parseTagAttributeValues(const QString &name, QString *value); + void parseDTDReplace(QString *value); + void stripSpaces(QString *value); + void removeComments(QString &value); + + QDict entities; + QDict elements; + QStringList tags; + QDict tagAttributes; + /** From where to load the DTD file. */ + KURL m_dtdURL; + QString m_dtepDir; +}; + +#endif diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp new file mode 100644 index 00000000..86060967 --- /dev/null +++ b/quanta/parsers/dtd/dtdparser.cpp @@ -0,0 +1,362 @@ +/*************************************************************************** + dtdparser.cpp - description + ------------------- + begin : Sun Oct 19 16:47:20 EEST 2003 + copyright : (C) 2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +//qt includes +#include +#include +#include +#include +#include +#include +#include + +//kde includes +#include +#include +#include +#include +#include +#include +#include + +//other includes +#ifdef LIBXML_2_5 +#include +#endif + +#include +#include + +//own includes +#include "dtepeditdlg.h" +#include "dtdparser.h" +#include "qtag.h" +#include "dtepcreationdlg.h" +#include "quantacommon.h" +#include "qextfileinfo.h" + +#define MAX_CHILD_ELEMENTS 100 + +namespace DTD +{ + QString dirName; + xmlDtdPtr dtd_ptr; /* Pointer to the parsed DTD */ + QTextStream entityStream; +} + +void saveElement(xmlElementPtr elem, xmlBufferPtr buf); +void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf); + +DTDParser::DTDParser(const KURL& dtdURL, const QString &dtepDir) +{ + m_dtdURL = dtdURL; + m_dtepDir = dtepDir; +} + +DTDParser::~DTDParser() +{ +} + +bool DTDParser::parse(const QString &targetDir, bool entitiesOnly) +{ + bool fineTune = false; + QString fileName = QString::null; + if (!KIO::NetAccess::download(m_dtdURL, fileName, 0)) + { + KMessageBox::error(0, i18n("Cannot download the DTD from %1.").arg( m_dtdURL.prettyURL(0, KURL::StripFileProtocol))); + return false; + } + DTD::dtd_ptr = xmlParseDTD(NULL, xmlCharStrndup(fileName.utf8(), fileName.utf8().length())); + if( DTD::dtd_ptr == NULL ) + { + QString errorStr = i18n("Unknown"); +#ifndef LIBXML_2_5 + xmlErrorPtr errorPtr = xmlGetLastError(); + if (errorPtr != NULL) + { + QString s = QString::fromLatin1(errorPtr->message); + if (!s.isEmpty()) + errorStr = s; + s = QString::fromLatin1(errorPtr->str1); + if (!s.isEmpty()) + errorStr += "
" + s; + s = QString::fromLatin1(errorPtr->str2); + if (!s.isEmpty()) + errorStr += "
" + s; + s = QString::fromLatin1(errorPtr->str2); + if (!s.isEmpty()) + errorStr += "
" + s; + errorStr += QString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2); + xmlResetError(errorPtr); + } +#endif + KMessageBox::error(0, i18n("Error while parsing the DTD.
The error message is:
%1
").arg(errorStr)); + return false; + } + if (targetDir.isEmpty()) + { + KDialogBase dlg(0L, 0L, true, i18n("DTD - > DTEP Conversion"), KDialogBase::Ok | KDialogBase::Cancel); + DTEPCreationDlg w(&dlg); + dlg.setMainWidget(&w); + QString name = QString((const char*)DTD::dtd_ptr->name); + if (name == "none") + name = QFileInfo(m_dtdURL.fileName()).baseName(); + w.dtdName->setText(name); + w.nickName->setText(name); + w.directory->setText(QFileInfo(m_dtdURL.fileName()).baseName()); + w.doctype->setText(QString((const char*)DTD::dtd_ptr->ExternalID)); + w.dtdURL->setText(QString((const char*)DTD::dtd_ptr->SystemID)); + if (!dlg.exec()) + return false; + m_name = w.dtdName->text(); + m_nickName = w.nickName->text(); + m_doctype = w.doctype->text(); + m_doctype.replace(QRegExp("")); + m_dtdURLLine = w.dtdURL->text(); + m_defaultExtension = w.defaultExtension->text(); + m_caseSensitive = w.caseSensitive->isChecked(); + DTD::dirName = m_dtepDir + "/" + w.directory->text(); + fineTune = w.fineTune->isChecked(); + } else + DTD::dirName = targetDir; + KURL u; + u.setPath(DTD::dirName); + if (!QExtFileInfo::createDir(u, 0L)) { + QuantaCommon::dirCreationError(0L, u); + return false; + } + DTD::dirName.append("/"); + if (DTD::dtd_ptr->entities) + { + QFile file( DTD::dirName + "entities.tag" ); + if ( file.open( IO_WriteOnly ) ) + { + DTD::entityStream.setDevice(&file); + DTD::entityStream.setEncoding(QTextStream::UnicodeUTF8); + DTD::entityStream << "" << endl; + DTD::entityStream << "" << endl + << "" << endl; + xmlHashScan((xmlEntitiesTablePtr)DTD::dtd_ptr->entities, (xmlHashScanner)saveEntity, 0); + DTD::entityStream << "" << endl; + file.close(); + } else + { + KMessageBox::error(0L, i18n("Cannot create the
%1 file.
Check that you have write permission in the parent folder.
") + .arg(file.name())); + return false; + } + } + if (!entitiesOnly) + { + if (DTD::dtd_ptr->elements) + { + xmlHashScan((xmlElementTablePtr)DTD::dtd_ptr->elements, (xmlHashScanner)saveElement, 0); + } else + { + KMessageBox::error(0, i18n("No elements were found in the DTD.")); + return false; + } + } + xmlFreeDtd(DTD::dtd_ptr); + if (!entitiesOnly) + { + writeDescriptionRC(); + if (fineTune) + { + KDialogBase editDlg(0L, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel); + DTEPEditDlg dtepDlg(DTD::dirName + "description.rc", &editDlg); + editDlg.setMainWidget(&dtepDlg); + if (editDlg.exec()) + { + dtepDlg.saveResult(); + } + } + } + return true; +} + +void DTDParser::writeDescriptionRC() +{ + KConfig config(DTD::dirName + "description.rc"); + config.setGroup("General"); + config.writeEntry("Name", m_name); + config.writeEntry("NickName", m_nickName); + config.writeEntry("DoctypeString", m_doctype); + config.writeEntry("URL", m_dtdURLLine); + config.writeEntry("DefaultExtension", m_defaultExtension); + config.writeEntry("Family", "1"); + config.writeEntry("CaseSensitive", m_caseSensitive); +// config.setGroup("Parsing rules"); +// config.writeEntry("SpecialAreas",",,"); +// config.writeEntry("SpecialAreaNames","comment,XML PI,DTD"); + + config.sync(); +} + +void saveElement(xmlElementPtr elem, xmlBufferPtr buf) +{ + Q_UNUSED(buf); + if (elem) + { + QString elemName = QString((const char*)elem->name); + QFile file( DTD::dirName + elemName + ".tag" ); + if ( file.open( IO_WriteOnly ) ) + { + QTextStream stream( &file ); + stream.setEncoding(QTextStream::UnicodeUTF8); + stream << "" << endl; + stream << "" << endl + << "" << endl + << "" << endl << endl; + + xmlElementPtr el_ptr; /* Pointer to an element description */ + xmlAttributePtr at_ptr; + el_ptr = xmlGetDtdElementDesc(DTD::dtd_ptr, elem->name); + AttributeList attributes; + attributes.setAutoDelete(true); + if (el_ptr) + { + at_ptr = el_ptr->attributes; + while (at_ptr) { + Attribute *attr = new Attribute; + attr->name = QString((const char*)at_ptr->name); + switch (at_ptr->def) { + case 1: {attr->status = "optional"; break;} //NONE + case 2: {attr->status = "required"; break;} //REQUIRED + case 3: {attr->status = "implied"; break;} //IMPLIED + case 4: {attr->status = "fixed"; break;} //FIXED + } + attr->defaultValue = QString((const char*)at_ptr->defaultValue); + xmlEnumerationPtr enum_ptr; + enum_ptr = at_ptr->tree; + while (enum_ptr) { + attr->values += QString((const char*)enum_ptr->name); + enum_ptr = enum_ptr->next; + } + QString attrtype; + switch (at_ptr->atype) { + case 9: {attrtype = "list"; break;} + default: {attrtype = "input"; break;} //TODO handle the rest of types + } + attr->type = attrtype; + attributes.append(attr); + at_ptr = at_ptr->nexth; + } + + if (!attributes.isEmpty()) + stream << QuantaCommon::xmlFromAttributes(&attributes); + const xmlChar *list_ptr[MAX_CHILD_ELEMENTS]; + int childNum = 0; + childNum = xmlValidGetPotentialChildren(el_ptr->content, list_ptr, + &childNum, MAX_CHILD_ELEMENTS); + + if (childNum > 0) + { + stream << "" << endl; + for( int i = 0; i < childNum; i++ ) + { + stream << " content && child_ptr->content->ocur) + { + //if (child_ptr->content->ocur == XML_ELEMENT_CONTENT_PLUS) + //{ + // stream << " usage=\"required\""; + // } + QString ocur; + switch (child_ptr->content->ocur) + { + case 1: {ocur = "once"; break;} + case 2: {ocur = "opt"; break;} + case 3: {ocur = "mult"; break;} + case 4: {ocur = "plus"; break;} + } + stream << " usage=\"" << ocur << "\""; + QString name = QString((const char*)child_ptr->content->name); + if (name == "#PCDATA") + name == "#text"; + stream << " name2=\"" << name << "\""; + } + stream << " />" << endl; + } + + stream << "" << endl; + stream << endl; + } + /* + xmlElementContentPtr content_ptr = el_ptr->content; + if (content_ptr) + { + stream << "" << endl; + while (content_ptr) + { + if (!QString((const char*)content_ptr->name).isEmpty()) + { + stream << " name) << "\""; + QString ocur; + switch (content_ptr->ocur) + { + case 1: {ocur = "once"; break;} + case 2: {ocur = "opt"; break;} + case 3: {ocur = "mult"; break;} + case 4: {ocur = "plus"; break;} + } + stream << " usage=\"" << ocur << "\""; + stream << " />" << endl; + } + if (content_ptr->c1) + content_ptr = content_ptr->c1; + else if (content_ptr->c2) + content_ptr = content_ptr->c2; + else + { + if (content_ptr == el_ptr->content) + break; + if (content_ptr->parent) + { + if (content_ptr == content_ptr->parent->c1) + content_ptr->c1 = 0L; + else + content_ptr->c2 = 0L; + } + content_ptr = content_ptr->parent; + } + } + stream << "" << endl; + } */ + } + stream << "" << endl + << "" << endl; + file.close(); + } + } +} + +void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf) +{ + Q_UNUSED(buf); + if (entity) + { + QString name = QString((const char*)entity->name); + DTD::entityStream << "" << endl << endl; + } +} + +QString DTDParser::dirName() +{ + return DTD::dirName; +} + diff --git a/quanta/parsers/dtd/dtdparser.h b/quanta/parsers/dtd/dtdparser.h new file mode 100644 index 00000000..b5b66d01 --- /dev/null +++ b/quanta/parsers/dtd/dtdparser.h @@ -0,0 +1,55 @@ +/*************************************************************************** + dtdparser.h - description + ------------------- + begin : Sun Oct 19 16:47:20 EEST 2003 + copyright : (C) 2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ +#ifndef DTDPARSER_H +#define DTDPARSER_H + +//qt includes +#include + +//forward declarations +class KURL; +class QString; +struct Attribute; + +/** libxml2 based XML DTD parser and DTEP creation class*/ +class DTDParser { +public: + DTDParser(const KURL& dtdURL, const QString &dtepDir); + ~DTDParser(); + QString dirName(); + /** + * Parse the DTD file. + * @param targetDir the directory of the destination DTEP. If empty, a dialog is shown to configure the destination. + * @param entitiesOnly if true, only the entities are extracted from the DTD into the entities.tag file + * @return true on success, false if some error happened + */ + bool parse(const QString &targetDir = QString::null, bool entitiesOnly = false); + +protected: + void writeDescriptionRC(); + +private: + KURL m_dtdURL; + QString m_dtepDir; + QString m_name; + QString m_nickName; + QString m_doctype; + QString m_dtdURLLine; + bool m_caseSensitive; + QString m_defaultExtension; + QDict m_tags; +}; + +#endif diff --git a/quanta/parsers/dtd/dtepcreationdlg.ui b/quanta/parsers/dtd/dtepcreationdlg.ui new file mode 100644 index 00000000..3247c7ae --- /dev/null +++ b/quanta/parsers/dtd/dtepcreationdlg.ui @@ -0,0 +1,152 @@ + +DTEPCreationDlg +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +(C) 2003 Andras Mantia <amantia@kde.org> + + + DTEPCreationDlg + + + + 0 + 0 + 500 + 285 + + + + + 500 + 200 + + + + DTD - > DTEP Conversion + + + true + + + + unnamed + + + + nickName + + + + + dtdURL + + + + + textLabel1 + + + Name: + + + + + textLabel2 + + + Nickname: + + + + + textLabel3 + + + !DOCTYPE definition line: + + + + + directory + + + + + doctype + + + + + dtdName + + + + + textLabel5 + + + DTD URL: + + + + + textLabel4 + + + Target directory name: + + + + + textLabel1_2 + + + Default extension: + + + + + defaultExtension + + + + + caseSensitive + + + Case-sensitive tags and attributes + + + true + + + + + fineTune + + + &Fine-tune the DTEP after conversion + + + true + + + + + + directory + dtdName + nickName + doctype + dtdURL + defaultExtension + caseSensitive + + + diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp new file mode 100644 index 00000000..0831a67c --- /dev/null +++ b/quanta/parsers/node.cpp @@ -0,0 +1,559 @@ +/*************************************************************************** + node.cpp - description + ------------------- + begin : Sun Apr 16 2000 + copyright : (C) 2000 by Dmitry Poplavsky + (C) 2001-2003 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ +//qt includes +#include +#include + +#include + +#include "node.h" +#include "tag.h" +#include "qtag.h" +#include "quantacommon.h" +#include "structtreetag.h" +#include "kafkacommon.h" + +QMap nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen... + +int NN = 0; //for debugging purposes: count the Node objects + +GroupElementMapList globalGroupMap; + +Node::Node(Node *parent) +{ + this->parent = parent; + prev = next = child = 0L; + tag = 0L; + mainListItem = 0L; + opened = false; + removeAll = true; + closesPrevious = false; + insideSpecial = false; + _closingNode = 0L; + m_rootNode = 0L; + m_leafNode = 0L; + m_groupElements.clear(); + NN++; +// if (nodes.contains(this) == 0) + nodes[this] = 1; +// else +// { +// kdError(24000) << "A node with this address " << this << " already exists!" << endl; +// } +} + +bool Node::deleteNode(Node *node) +{ + if (!node) + return true; + if (!nodes.contains(node)) + { + kdDebug(24000) << "Trying to delete a node with address " << node << " that was not allocated!" << endl; + return false; + } + delete node; + return true; +} + +Node::~Node() +{ +// if (!nodes.contains(this)) +// { +// kdError(24000) << "No node with this address " << this << " was allocated!" << endl; +// return; +// } + + //It has no use, except to know when it crash why it has crashed. + //If it has crashed here, the Node doesn't exist anymore. + // If it has crashed the next line, it is a GroupElements bug. + //FIXME: Andras: or it is a VPL undo/redo bug... + Q_ASSERT(tag); + if (tag) + tag->setCleanStrBuilt(false); + + detachNode(); + nodes.erase(this); + if (prev && prev->next == this) + prev->next = 0L; + if (parent && parent->child == this) + parent->child = 0L; + if (removeAll) + { + deleteNode(child); + child = 0L; + deleteNode(next); + next = 0L; + } else + { + if (next && next->prev == this) + next->prev = 0L; + if (child && child->parent == this) + child->parent = 0L; + } + + delete tag; + tag = 0L; + delete m_rootNode; + delete m_leafNode; + NN--; +} + +void Node::save(QDomElement& element) const +{ + //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; + QDomElement child_element; + if(next) + { + child_element = element.ownerDocument().createElement("nodeNext"); + element.appendChild(child_element); + next->save(child_element); + } + if(child) + { + child_element = element.ownerDocument().createElement("nodeChild"); + element.appendChild(child_element); + child->save(child_element); + } + if(_closingNode) + { + if(_closingNode != next) + { + child_element = element.ownerDocument().createElement("nodeClosing"); + element.appendChild(child_element); + _closingNode->save(child_element); + } + } + + Q_ASSERT(tag); + child_element = element.ownerDocument().createElement("tag"); + element.appendChild(child_element); + tag->save(child_element); + + element.setAttribute("closesPrevious", closesPrevious); // bool + element.setAttribute("opened", opened); // bool + element.setAttribute("removeAll", removeAll); // bool + element.setAttribute("insideSpecial", insideSpecial); // bool + element.setAttribute("specialInsideXml", specialInsideXml); // bool + element.setAttribute("fileName", fileName); // QString + +/* QString s_element; + QTextStream stream(&s_element, IO_WriteOnly); + element.save(stream, 3);*/ + //kdDebug(25001) << "Load:\n" << s_element << endl; + //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; +} + +bool Node::load(QDomElement const& element) +{ +/* QString s_element; + QTextStream stream(&s_element, IO_WriteOnly); + element.save(stream, 3);*/ + //kdDebug(25001) << "Load:\n" << s_element << endl; + + QDomNodeList list = element.childNodes(); + for(unsigned int i = 0; i != list.count(); ++i) + { + if(list.item(i).isElement()) + { + QDomElement e = list.item(i).toElement(); + if(e.tagName() == "nodeNext") + { + next = new Node(0); + next->prev = this; + next->parent = this->parent; + next->load(e); + } + else if(e.tagName() == "nodeChild") + { + child = new Node(0); + child->parent = this; + child->load(e); + } + else if(e.tagName() == "nodeClosing") + { + _closingNode = new Node(0); + _closingNode->load(e); + } + else if(e.tagName() == "tag") + { + tag = new Tag(); + tag->load(e); + } + } + } + + closesPrevious = QString(element.attribute("closesPrevious")).toInt(); // bool + opened = QString(element.attribute("opened")).toInt(); // bool + removeAll = QString(element.attribute("removeAll")).toInt(); // bool + insideSpecial = QString(element.attribute("insideSpecial")).toInt(); // bool + specialInsideXml = QString(element.attribute("specialInsideXml")).toInt(); // bool + fileName = element.attribute("fileName"); // QString + + //kafkaCommon::coutTree(this, 3); + + return true; +} + +Node *Node::nextSibling() +{ + Node *result = 0L; + if (child) + { + result = child; + } + else + if (next) + { + result = next; + } + else + { + Node *n = this; + while (n) + { + if (n->parent && n->parent->next) + { + result = n->parent->next; + break; + } + else + { + n = n->parent; + } + } + } + + return result; +} + + +Node *Node::previousSibling() +{ + Node *result = 0L; + if (prev) + { + Node *n = prev; + while (n->child) + { + n = n->child; + while (n->next) + n = n->next; + } + result = n; + } + else + { + result = parent; + } + + return result; +} + +Node *Node::nextNotChild() +{ + if (next) + return next; + else + { + Node *n = this; + while (n) + { + if (n->parent && n->parent->next) + { + n = n->parent->next; + break; + } + else + { + n = n->parent; + } + } + + return n; + } +} + +QString Node::nodeName() +{ + if(tag) + return tag->name; + return QString::null; +} + +QString Node::nodeValue() +{ + if(tag) + return tag->tagStr(); + return QString::null; +} + +void Node::setNodeValue(const QString &value) +{ + if(!tag) + tag = new Tag(); + tag->setStr(value); + kdDebug(24000) << "Node::setNodeValue: dtd is 0L for " << value << endl; +} + +Node* Node::lastChild() +{ + Node *n, *m = 0; + n = child; + while(n) + { + m = n; + n = n->next; + } + return m; +} + +Node *Node::nextNE() +{ + Node *n = next; + while(n && n->tag->type == Tag::Empty) + n = n->next; + return n; +} + +Node *Node::prevNE() +{ + Node *n = prev; + while(n && n->tag->type == Tag::Empty) + n = n->prev; + return n; +} + +Node *Node::firstChildNE() +{ + Node *n = child; + while(n && n->tag->type == Tag::Empty) + n = n->next; + return n; +} + +Node *Node::lastChildNE() +{ + Node *n = lastChild(); + while(n && n->tag->type == Tag::Empty) + n = n->prev; + return n; +} + +Node *Node::SPrev() +{ + Node *node = prev; + int bCol, bLine, eCol, eLine, col, line; + + if(parent) + { + parent->tag->beginPos(bLine, bCol); + parent->tag->endPos(eLine, eCol); + } + + while(node && node->tag->type != Tag::XmlTag && node->tag->type != Tag::Text) + { + if (parent && node->tag->type == Tag::ScriptTag) + { + //Check if it is an embedded ScriptTag. If it is, continue. + node->tag->beginPos(line, col); + if(QuantaCommon::isBetween(line, col, bLine, bCol, eLine, eCol) != 0) + break; + } + node = node->prev; + } + + return node; +} + +Node *Node::SNext() +{ + Node *node = next; + int bCol, bLine, eCol, eLine, col, line; + + if(parent) + { + tag->beginPos(bLine, bCol); + tag->endPos(eLine, eCol); + } + + while(node && node->tag->type != Tag::XmlTag && node->tag->type != Tag::Text) + { + if (parent && node->tag->type == Tag::ScriptTag) + { + //Check if it is an embedded ScriptTag. If it is, continue. + node->tag->beginPos(line, col); + if(QuantaCommon::isBetween(line, col, bLine, bCol, eLine, eCol) != 0) + break; + } + node = node->next; + } + + return node; +} + +Node *Node::SFirstChild() +{ + Node *node = child; + int bCol, bLine, eCol, eLine, col, line; + + tag->beginPos(bLine, bCol); + tag->endPos(eLine, eCol); + while(node && node->tag->type != Tag::XmlTag && node->tag->type != Tag::Text) + { + if(node->tag->type == Tag::ScriptTag) + { + //Check if it is an embedded ScriptTag. If it is, continue. + node->tag->beginPos(line, col); + if(QuantaCommon::isBetween(line, col, bLine, bCol, eLine, eCol) != 0) + break; + } + node = node->next; + } + + return node; +} + +Node *Node::SLastChild() +{ + Node *node = lastChild(); + int bCol, bLine, eCol, eLine, col, line; + + tag->beginPos(bLine, bCol); + tag->endPos(eLine, eCol); + while(node && node->tag->type != Tag::XmlTag && node->tag->type != Tag::Text) + { + if(node->tag->type == Tag::ScriptTag) + { + //Check if it is an embedded ScriptTag. If it is, continue. + node->tag->beginPos(line, col); + if(QuantaCommon::isBetween(line, col, bLine, bCol, eLine, eCol) != 0) + break; + } + node = node->prev; + } + + return node; +} + +bool Node::hasForChild(Node *node) +{ + //TODO: NOT EFFICIENT AT ALL!! Change by using kafkaCommon::getLocation() and compare! + Node *n; + bool goUp = false; + + if(child) + { + n = child; + goUp = false; + while(n) + { + if(n == node) + return true; + n = kafkaCommon::getNextNode(n, goUp, this); + } + } + return false; +} + +Node *Node::getClosingNode() +{ + Node* n = next; + + if(next && tag && (tag->type == Tag::XmlTag || tag->type == Tag::ScriptTag) && !tag->single) + { + while (n && n->tag->type == Tag::Empty) + n = n->next; + if (n && n->tag->type == Tag::XmlTagEnd && ((tag->type == Tag::XmlTag && QuantaCommon::closesTag(tag, n->tag)) || (tag->type == Tag::ScriptTag && n->tag->name.isEmpty()))) + return n; + } + return 0L; +} + +Node *Node::getOpeningNode() +{ + Node *n = prev; + if(prev && tag && tag->type == Tag::XmlTagEnd) + { + while(n && n->tag->type == Tag::Empty) + n = n->prev; + if(n && ((n->tag->type == Tag::XmlTag && QuantaCommon::closesTag(n->tag, tag)) + || (n->tag->type == Tag::ScriptTag && tag->name.isEmpty()))) + return n; + } + return 0L; +} + +int Node::size() +{ + int l = tag->size(); + l += 5*sizeof(Node*) + sizeof(QListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); + return l; +} + +void Node::operator =(Node* node) +{ + (*this) = (*node); + prev = 0L; + next = 0L; + parent = 0L; + child = 0L; + mainListItem = 0L; + m_groupElements.clear(); + setRootNode(0L); + setLeafNode(0L); + tag = new Tag(*(node->tag)); +} + +void Node::detachNode() +{ + if (nodes.contains(this) == 0) + { + kdError(24000) << "No node with this address " << this << " was allocated!" << endl; + return; + } + + int count = 0; + //kdDebug(24000) << &m_groupElements << " " << this << endl; + //Remove the references to this node from the list of group elements. + //They are actually stored in globalGroupMap. + for (QValueListIterator it = m_groupElements.begin(); it != m_groupElements.end(); ++it) + { + GroupElement *groupElement = (*it); + groupElement->node = 0L; + groupElement->deleted = true; + groupElement->group = 0L; +#ifdef DEBUG_PARSER + kdDebug(24001) << "GroupElement scheduled for deletion: " << groupElement << " "<< groupElement->tag->area().bLine << " " << groupElement->tag->area().bCol << " "<< groupElement->tag->area().eLine << " "<< groupElement->tag->area().eCol << " " << groupElement->tag->tagStr() << " " << groupElement->type << endl; +#endif + count++; + } +#ifdef DEBUG_PARSER + if (count > 0) + kdDebug(24001) << count << " GroupElement scheduled for deletion. " << &m_groupElements << endl; +#endif + + QValueListIterator listItem; + for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem) + { + static_cast(*listItem)->node = 0L; + static_cast(*listItem)->groupTag = 0L; + } + mainListItem = 0L; + listItems.clear(); + m_groupElements.clear(); + //kdDebug(24000) << m_groupElements.count() << " " << this << endl; +} diff --git a/quanta/parsers/node.h b/quanta/parsers/node.h new file mode 100644 index 00000000..e3587c05 --- /dev/null +++ b/quanta/parsers/node.h @@ -0,0 +1,185 @@ +/*************************************************************************** + node.h - description + ------------------- + begin : Sun Apr 16 2000 + copyright : (C) 2000 by Dmitry Poplavsky + (C) 2001-2004 Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef NODE_H +#define NODE_H + +#include +#include +#include +#include + +class QDomElement; +class QListViewItem; + +class Tag; +class Node; +class StructTreeGroup; +class XMLStructGroup; + +struct GroupElement{ + /*The node which contains the element */ + Node *node; + /* The tag which point to the actual place in the node */ + Tag *tag; + /*The parent node indicating the beginning of a structure */ + Node *parentNode; + bool global; + bool deleted; + QString type; + XMLStructGroup *group; /// GroupElementList; +typedef QMap GroupElementMapList; + +/** + * A Node is a basic unit of a Tree. It keeps track of his parent, his left neighbour, his right neighbour + * and his first child. + * It contains some functions to navigate through the tree, but some more are located at kafkacommon.h + * (and should be moved here...) + * It also contains a pointer to a Tag object which contains informations about the contents of the Node. + * We use this class to represent the XML/SGML document as a tree ( a DOM like tree) when each Node represent + * a part of the document ( A tag, a text, ... see tag.h) + * The tree is built with the parser (see parser.h) + */ + +class Node { + +public: + Node( Node *parent ); + ~Node(); + + /** + * Deletes the node. Use this instead of delete node; as it checkes if there + * node was really allocated or not and avoid nasty crashes. + * @return true - if node existed and is deleted + * false - if the node did not exist + */ + static bool deleteNode(Node *node); + + /** + * Copy everything from node except prev, next, child, parent, listItem, group, groupTag, which are set to Null + * The groupElementsList is cleared. + */ + void operator =(Node* node); + + /** For Kafka copy/paste */ + void save(QDomElement& element) const; + bool load(QDomElement const& element); + + Node *next; + Node *prev; + Node *parent; + Node *child; + + /** Returns the child if available, else the next node, else the next node of the first parent which has one, else 0L. + WARNING: it doesn't behave like DOM::Node::nextSibling() which give the next Node, or 0L if there is no next Node */ + Node *nextSibling(); + Node *previousSibling(); + /** Returns the next node, or the parent's next, if next doesn't exists, + or the granparent's next, if parent's next doesn't exists, etc. */ + Node *nextNotChild(); + +/** DOM like functions cf dom/dom_node.h */ + QString nodeName(); + QString nodeValue(); + void setNodeValue(const QString &value); + Node* parentNode() {return parent;} + Node* firstChild() {return child;} + Node* lastChild(); + Node* DOMpreviousSibling() {return prev;} + Node* DOMnextSibling() {return next;} + /**Node* insertBefore(Node *newChild, Node *refChild); + Node* replaceChild(Node *newChild, Node *oldChild); + Node* removeChild(Node *oldChild); + Node* appendChild(Node *newChild);*/ + bool hasChildNodes() {return child;} + + /** Others functions. */ + // check if Node has node in its child subtree (and grand-child,...) + bool hasForChild(Node *node); + void setParent(Node *nodeParent) {parent = nodeParent;} + //If Node is of type XmlTag or ScriptTag, return the corresponding XmlTagEnd if available + Node *getClosingNode(); + //If Node is of type XmlTagEnd, return the corresponding XmlTag or ScriptTag if available + Node *getOpeningNode(); + + /** The Node link skipping Empty Nodes. */ + //Returns the first next non-Empty Node + Node *nextNE(); + //Returns the first prev non-Empty Node + Node *prevNE(); + //Returns the first non-Empty child + Node *firstChildNE(); + //Returns the last non-Empty child + Node *lastChildNE(); + +/** + * The main problem manipulating the default links prev/next/parent/child is that we often want + * to manipulate only the "significant" Nodes e.g. XmlTag, Text, ScriptNode, like in a DOM::Node tree. + * These functions, prefixed with "S" which stands for "simplified" or "significant", will only return + * and manipulate XmlTag, Text and ScriptNode. + */ + //Returns the first significant previous sibling. + Node *SPrev(); + //Returns the first significant next sibling. + Node *SNext(); + //Returns the first significant child. + Node *SFirstChild(); + //Returns the last significant child. + Node *SLastChild(); + void detachNode(); + + + + int size(); + +//set/get the corresponding DOM::Node of this node. +//See more informations about rootNode/leafNode below. + DOM::Node* rootNode() {return m_rootNode;} + DOM::Node* leafNode() { return m_leafNode;} + void setRootNode(DOM::Node *rootNode) {m_rootNode = rootNode;} + void setLeafNode(DOM::Node *leafNode) {m_leafNode = leafNode;} + Node* _closingNode; + + /** + * The contents of the Node is inside the Tag. Should _never_ be null. + */ + Tag *tag; + + QValueList listItems; /// + QString fileName; //the node is in this file. If empty, it's in the current document + QValueList m_groupElements; ///< all the group elements pointing to this node + +private: + /** + * For VPL use. + * Usually for a XmlTag or Text Node there is one corresponding DOM::Node. But sdmetimes there are more + * e.g. in the DOM::Node tree the TABLE DOM::Node require the TBODY DOM::Node even if not necessary according + * to the specs. So m_rootNode points to the TABLE DOM::Node and m_leafNode points to the TBODY DOM::Node. + */ + DOM::Node *m_rootNode, *m_leafNode; +}; + +#endif diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp new file mode 100644 index 00000000..7559f1ec --- /dev/null +++ b/quanta/parsers/parser.cpp @@ -0,0 +1,1757 @@ +/*************************************************************************** + parser.cpp - description + ------------------- + begin : Sun Sep 1 2002 + copyright : (C) 2002, 2003 by Andras Mantia + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; version 2 of the License. * + * * + ***************************************************************************/ + +//qt includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//standard library includes +#include +#include +//#include + +//app includes +#include "parser.h" +#include "saparser.h" +#include "parsercommon.h" +#include "node.h" +#include "tag.h" +#include "resource.h" +#include "quantaview.h" +#include "quantacommon.h" +#include "document.h" +#include "qextfileinfo.h" + + +#include "kafkacommon.h" +#include "undoredo.h" + +#include "dtds.h" +#include "structtreetag.h" + +#include "viewmanager.h" + +//kde includes +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern GroupElementMapList globalGroupMap; +static const QChar space(' '); + +extern int NN; +extern QMap nodes; + +Parser::Parser() +{ + m_node = 0L; + write = 0L; + oldMaxLines = 0; + m_parsingEnabled = true; + m_parsingNeeded = true; + m_parseIncludedFiles = true; + m_saParser = new SAParser(); + connect(m_saParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool))); + connect(m_saParser, SIGNAL(cleanGroups()), SLOT(cleanGroups())); + ParserCommon::includeWatch = new KDirWatch(); + connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&))); +} + +Parser::~Parser() +{ + delete m_saParser; +} + +/** Parse a string, using as start position sLine, sCol. */ +Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, Node **lastNode, Node *a_node) +{ + //first parse as an XML document + QString textLine; + textLine.fill(space, startCol); + int line = startLine; + int col = 0; + int tagStartLine = 0; + int tagEndLine, tagEndCol; + int tagStartPos, specialStartPos; + int lastLineLength; + // if (endCol == 0) + if (endLine > maxLines) + { + if (endLine > 0) + endLine--; + lastLineLength = write->editIf->lineLength(endLine) - 1; + endCol = lastLineLength + 1; + } else + lastLineLength = write->editIf->lineLength(endLine) - 1; + int specialAreaCount = m_dtd->specialAreas.count(); + bool nodeFound = false; + bool goUp; + Node *rootNode = 0L; + Node *parentNode = a_node; + Node *currentNode = a_node; + if (currentNode && (currentNode->tag->type != Tag::XmlTag || + currentNode->tag->single)) + parentNode = currentNode->parent; + Tag *tag = 0L; + QTag *qTag = 0L; + textLine.append(write->text(startLine, startCol, startLine, write->editIf->lineLength(startLine))); + if (line == endLine) + { + if (endCol > 0) + textLine.truncate(endCol + 1); + else + textLine = ""; + } + if (m_dtd->family == Xml) + { + while (line <= endLine) + { + nodeFound = false; + goUp = false; + //find the first "<" and the first special area start definition in this line + tagStartPos = textLine.find('<', col); + specialStartPos = specialAreaCount ? textLine.find(m_dtd->specialAreaStartRx, col): -1; + //if the special area start definition is before the first "<" it means + //that we have found a special area + if ( specialStartPos != -1 && + (specialStartPos <= tagStartPos || tagStartPos == -1) ) + { + currentNode = ParserCommon::createTextNode(write, currentNode, line, specialStartPos, parentNode); + if (!rootNode) + rootNode = currentNode; + QString foundText = m_dtd->specialAreaStartRx.cap(); + //create a toplevel node for the special area + AreaStruct area(line, specialStartPos, line, specialStartPos + foundText.length() - 1); + Node *node = ParserCommon::createScriptTagNode(write, area, foundText, m_dtd, parentNode, currentNode); + if (node->parent && node->prev == node->parent) //some strange cases, but it's possible, eg.: + { + node->prev->next = 0L; + node->prev = 0L; + } + if (node->tag->name.lower().startsWith("comment")) + node->tag->type = Tag::Comment; + + if (!rootNode) + rootNode = node; + + area.eLine = endLine; + area.eCol = endCol; + currentNode = m_saParser->parseArea(area, foundText, "", node, false, true); + line = m_saParser->lastParsedLine(); + textLine = ParserCommon::getLine(write, line, endLine, endCol); + col = m_saParser->lastParsedColumn() + 1; + continue; + } else + //if we have found an XML tag start ("<") + if ( tagStartPos != -1 /*&& + (tagStartPos < specialStartPos || specialStartPos == -1) */) + { + int openNum = 1; + tagStartLine = line; + tagEndLine = endLine; + tagEndCol = lastLineLength; + int sCol = tagStartPos + 1; + int firstStartCol = lastLineLength + 1; + int firstStartLine = endLine; + bool firstOpenFound = false; + bool insideSingleQuotes = false; + bool insideDoubleQuotes = false; + //find the matching ">" in the document + while (line <= endLine && openNum > 0 && !firstOpenFound) + { + textLine = ParserCommon::getLine(write, line, endLine, endCol); + uint textLineLen = textLine.length(); + for (uint i = sCol; i < textLineLen; i++) + { + if (i == 0 || (i > 0 && textLine[i-1] != '\\')) + { + if (textLine[i] == '\'' && !insideDoubleQuotes) + insideSingleQuotes = !insideSingleQuotes; + if (textLine[i] == '"' && !insideSingleQuotes) + insideDoubleQuotes = !insideDoubleQuotes; + } + if (!insideSingleQuotes && !insideDoubleQuotes) + { + if (textLine[i] == '<') + { + openNum++; + if (!firstOpenFound && + (i < textLineLen -1 && (textLine[i + 1] == '/' || textLine[i + 1].isLetter()) || + i == textLineLen -1) + ) + { + firstStartCol = i; + firstStartLine = line; + firstOpenFound = true; + break; + } + } else + if (textLine[i] == '>') openNum--; + } + if (openNum == 0) + { + tagEndCol = i; + tagEndLine = line; + break; + } + } + sCol = 0; + if (openNum != 0) + line++; + } + //the matching closing tag was not found + if (openNum != 0) + { + tagEndLine = firstStartLine; + tagEndCol = firstStartCol - 1; + if (tagEndCol < 0) + { + tagEndLine--; + if (tagEndLine < 0) + tagEndLine = 0; + tagEndCol = write->editIf->lineLength(tagEndLine); + } + line = tagEndLine; + textLine = ParserCommon::getLine(write, line, endLine, endCol); + } + col = tagEndCol; + nodeFound = true; + //build an xml tag node here + AreaStruct area(tagStartLine, tagStartPos, tagEndLine, tagEndCol); + tag = new Tag(area, write, m_dtd, true); + QString tagStr = tag->tagStr(); + tag->type = Tag::XmlTag; + tag->validXMLTag = (openNum == 0); + tag->single = QuantaCommon::isSingleTag(m_dtd->name, tag->name); + if (tag->isClosingTag()) + { + tag->type = Tag::XmlTagEnd; + tag->single = true; + } + if (tagStr.right(2) == "/>" || tag->name.isEmpty()) + { + tag->single = true; + if (tag->name.length() > 1 && tag->name.endsWith("/")) + tag->name.truncate(tag->name.length() - 1); + } + //the tag we found indicates the beginning of a special area, like