summaryrefslogtreecommitdiffstats
path: root/quanta
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /quanta
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
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
Diffstat (limited to 'quanta')
-rw-r--r--quanta/AUTHORS11
-rw-r--r--quanta/ChangeLog1172
-rw-r--r--quanta/DESIGN338
-rw-r--r--quanta/HACKING55
-rw-r--r--quanta/Makefile.am24
-rw-r--r--quanta/NEWS4
-rw-r--r--quanta/Quanta-3.3-plan.kno106
-rw-r--r--quanta/README250
-rw-r--r--quanta/TODO42
-rw-r--r--quanta/VERSION1
-rw-r--r--quanta/components/Makefile.am5
-rw-r--r--quanta/components/csseditor/Makefile.am18
-rw-r--r--quanta/components/csseditor/colorrequester.cpp129
-rw-r--r--quanta/components/csseditor/colorrequester.h50
-rw-r--r--quanta/components/csseditor/colorslider.cpp85
-rw-r--r--quanta/components/csseditor/colorslider.h69
-rw-r--r--quanta/components/csseditor/csseditor.cpp697
-rw-r--r--quanta/components/csseditor/csseditor.h117
-rw-r--r--quanta/components/csseditor/csseditor_globals.cpp50
-rw-r--r--quanta/components/csseditor/csseditor_globals.h63
-rw-r--r--quanta/components/csseditor/csseditors.ui411
-rw-r--r--quanta/components/csseditor/cssselector.cpp395
-rw-r--r--quanta/components/csseditor/cssselector.h74
-rw-r--r--quanta/components/csseditor/cssselectors.ui985
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.cpp127
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.h46
-rw-r--r--quanta/components/csseditor/data/Makefile.am3
-rw-r--r--quanta/components/csseditor/data/atrules.xml7
-rw-r--r--quanta/components/csseditor/data/config.xml609
-rw-r--r--quanta/components/csseditor/data/dtdTags.xml19
-rw-r--r--quanta/components/csseditor/data/pseudo.xml14
-rw-r--r--quanta/components/csseditor/doubleeditors.cpp120
-rw-r--r--quanta/components/csseditor/doubleeditors.h86
-rw-r--r--quanta/components/csseditor/encodingselector.cpp47
-rw-r--r--quanta/components/csseditor/encodingselector.h40
-rw-r--r--quanta/components/csseditor/encodingselectors.ui115
-rw-r--r--quanta/components/csseditor/fontfamilychooser.cpp175
-rw-r--r--quanta/components/csseditor/fontfamilychooser.h52
-rw-r--r--quanta/components/csseditor/fontfamilychoosers.ui441
-rw-r--r--quanta/components/csseditor/minieditor.h37
-rw-r--r--quanta/components/csseditor/percentageeditor.cpp38
-rw-r--r--quanta/components/csseditor/percentageeditor.h52
-rw-r--r--quanta/components/csseditor/propertysetter.cpp129
-rw-r--r--quanta/components/csseditor/propertysetter.h64
-rw-r--r--quanta/components/csseditor/qmyhighlighter.cpp65
-rw-r--r--quanta/components/csseditor/qmyhighlighter.h36
-rw-r--r--quanta/components/csseditor/shorthandformer.cpp781
-rw-r--r--quanta/components/csseditor/shorthandformer.h117
-rw-r--r--quanta/components/csseditor/specialsb.cpp127
-rw-r--r--quanta/components/csseditor/specialsb.h79
-rw-r--r--quanta/components/csseditor/styleeditor.cpp109
-rw-r--r--quanta/components/csseditor/styleeditor.h42
-rw-r--r--quanta/components/csseditor/stylesheetparser.cpp245
-rw-r--r--quanta/components/csseditor/stylesheetparser.h58
-rw-r--r--quanta/components/csseditor/tlpeditors.cpp174
-rw-r--r--quanta/components/csseditor/tlpeditors.h94
-rw-r--r--quanta/components/cvsservice/Makefile.am13
-rw-r--r--quanta/components/cvsservice/cvscommitdlgs.ui150
-rw-r--r--quanta/components/cvsservice/cvsservice.cpp555
-rw-r--r--quanta/components/cvsservice/cvsservice.h118
-rw-r--r--quanta/components/cvsservice/cvsservicedcopif.h30
-rw-r--r--quanta/components/cvsservice/cvsupdatetodlgs.ui198
-rw-r--r--quanta/components/debugger/Makefile.am25
-rw-r--r--quanta/components/debugger/backtracelistview.cpp128
-rw-r--r--quanta/components/debugger/backtracelistview.h93
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.cpp100
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.h56
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialogs.ui329
-rw-r--r--quanta/components/debugger/dbgp/Makefile.am17
-rw-r--r--quanta/components/debugger/dbgp/dbgpnetwork.cpp314
-rw-r--r--quanta/components/debugger/dbgp/dbgpnetwork.h76
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettings.cpp44
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettings.h35
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettingss.ui728
-rw-r--r--quanta/components/debugger/dbgp/qbytearrayfifo.cpp76
-rw-r--r--quanta/components/debugger/dbgp/qbytearrayfifo.h43
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp1042
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.desktop44
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.h166
-rw-r--r--quanta/components/debugger/debuggerbreakpoint.cpp181
-rw-r--r--quanta/components/debugger/debuggerbreakpoint.h85
-rw-r--r--quanta/components/debugger/debuggerbreakpointlist.cpp193
-rw-r--r--quanta/components/debugger/debuggerbreakpointlist.h58
-rw-r--r--quanta/components/debugger/debuggerbreakpointview.cpp193
-rw-r--r--quanta/components/debugger/debuggerbreakpointview.h74
-rw-r--r--quanta/components/debugger/debuggermanager.cpp850
-rw-r--r--quanta/components/debugger/debuggermanager.h128
-rw-r--r--quanta/components/debugger/debuggerui.cpp205
-rw-r--r--quanta/components/debugger/debuggerui.h90
-rw-r--r--quanta/components/debugger/debuggervariable.cpp283
-rw-r--r--quanta/components/debugger/debuggervariable.h103
-rw-r--r--quanta/components/debugger/debuggervariablesets.ui185
-rw-r--r--quanta/components/debugger/gubed/Makefile.am18
-rw-r--r--quanta/components/debugger/gubed/gubedsettings.cpp41
-rw-r--r--quanta/components/debugger/gubed/gubedsettings.h36
-rw-r--r--quanta/components/debugger/gubed/gubedsettingss.ui762
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.cpp1247
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.desktop48
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.h153
-rw-r--r--quanta/components/debugger/interfaces/Makefile.am17
-rw-r--r--quanta/components/debugger/interfaces/debuggerclient.cpp160
-rw-r--r--quanta/components/debugger/interfaces/debuggerclient.h115
-rw-r--r--quanta/components/debugger/interfaces/debuggerinterface.cpp26
-rw-r--r--quanta/components/debugger/interfaces/debuggerinterface.h80
-rw-r--r--quanta/components/debugger/interfaces/quantadebugger.desktop45
-rw-r--r--quanta/components/debugger/pathmapper.cpp228
-rw-r--r--quanta/components/debugger/pathmapper.h55
-rw-r--r--quanta/components/debugger/pathmapperdialog.cpp102
-rw-r--r--quanta/components/debugger/pathmapperdialog.h52
-rw-r--r--quanta/components/debugger/pathmapperdialogs.ui345
-rw-r--r--quanta/components/debugger/quantadebuggerinterface.cpp176
-rw-r--r--quanta/components/debugger/quantadebuggerinterface.h75
-rw-r--r--quanta/components/debugger/variableslistview.cpp290
-rw-r--r--quanta/components/debugger/variableslistview.h71
-rw-r--r--quanta/components/framewizard/Makefile.am9
-rw-r--r--quanta/components/framewizard/areaattributedb.cpp40
-rw-r--r--quanta/components/framewizard/areaattributedb.h49
-rw-r--r--quanta/components/framewizard/fmfpeditor.cpp111
-rw-r--r--quanta/components/framewizard/fmfpeditor.h42
-rw-r--r--quanta/components/framewizard/fmfpeditors.ui541
-rw-r--r--quanta/components/framewizard/fmrceditor.cpp34
-rw-r--r--quanta/components/framewizard/fmrceditor.h38
-rw-r--r--quanta/components/framewizard/fmrceditors.ui149
-rw-r--r--quanta/components/framewizard/framewizard.cpp120
-rw-r--r--quanta/components/framewizard/framewizard.h61
-rw-r--r--quanta/components/framewizard/framewizards.ui369
-rw-r--r--quanta/components/framewizard/fwglobal.cpp22
-rw-r--r--quanta/components/framewizard/fwglobal.h24
-rw-r--r--quanta/components/framewizard/selectablearea.cpp57
-rw-r--r--quanta/components/framewizard/selectablearea.h53
-rw-r--r--quanta/components/framewizard/treenode.cpp135
-rw-r--r--quanta/components/framewizard/treenode.h87
-rw-r--r--quanta/components/framewizard/visualframeeditor.cpp449
-rw-r--r--quanta/components/framewizard/visualframeeditor.h66
-rw-r--r--quanta/components/tableeditor/Makefile.am15
-rw-r--r--quanta/components/tableeditor/tableeditor.cpp1298
-rw-r--r--quanta/components/tableeditor/tableeditor.h132
-rw-r--r--quanta/components/tableeditor/tableeditors.ui642
-rw-r--r--quanta/components/tableeditor/tableitem.cpp94
-rw-r--r--quanta/components/tableeditor/tableitem.h56
-rw-r--r--quanta/data/Makefile.am5
-rw-r--r--quanta/data/chars170
-rw-r--r--quanta/data/config/Makefile.am13
-rw-r--r--quanta/data/config/actions.rc21
-rw-r--r--quanta/data/config/plugins.rc66
-rw-r--r--quanta/data/config/quanta_preview_config.desktop44
-rw-r--r--quanta/data/config/quantaui.rc293
-rw-r--r--quanta/data/doc/Makefile.am3
-rw-r--r--quanta/data/doc/README.FIRST9
-rw-r--r--quanta/data/doc/aniquanta.gifbin0 -> 6305 bytes
-rw-r--r--quanta/data/doc/background.pngbin0 -> 123424 bytes
-rw-r--r--quanta/data/doc/bgtable.pngbin0 -> 17111 bytes
-rw-r--r--quanta/data/doc/developer.html102
-rw-r--r--quanta/data/doc/documentation.html146
-rw-r--r--quanta/data/doc/faq.html239
-rw-r--r--quanta/data/doc/focus.html100
-rw-r--r--quanta/data/doc/head_bg.gifbin0 -> 205 bytes
-rw-r--r--quanta/data/doc/intro.html142
-rw-r--r--quanta/data/doc/kdelogo2.pngbin0 -> 7719 bytes
-rw-r--r--quanta/data/doc/konq.css61
-rw-r--r--quanta/data/doc/lines.pngbin0 -> 259 bytes
-rw-r--r--quanta/data/doc/lines2.pngbin0 -> 198 bytes
-rw-r--r--quanta/data/doc/maindoc.html119
-rw-r--r--quanta/data/doc/minilogo.jpgbin0 -> 2537 bytes
-rw-r--r--quanta/data/doc/minilogo.pngbin0 -> 14907 bytes
-rw-r--r--quanta/data/doc/more.pngbin0 -> 640 bytes
-rw-r--r--quanta/data/doc/qcenter2.pngbin0 -> 73836 bytes
-rw-r--r--quanta/data/doc/quanta.css9
-rw-r--r--quanta/data/doc/quanta.docrc10
-rw-r--r--quanta/data/doc/quantahdr.pngbin0 -> 19719 bytes
-rw-r--r--quanta/data/doc/shadow1.pngbin0 -> 184 bytes
-rw-r--r--quanta/data/doc/template.html81
-rw-r--r--quanta/data/doc/templates.html189
-rw-r--r--quanta/data/doc/tips.html151
-rw-r--r--quanta/data/doc/webdev.pngbin0 -> 7322 bytes
-rw-r--r--quanta/data/dtep/Makefile.am4
-rw-r--r--quanta/data/dtep/cffunct/Makefile.am3
-rw-r--r--quanta/data/dtep/cffunct/abs.tag6
-rw-r--r--quanta/data/dtep/cffunct/acos.tag6
-rw-r--r--quanta/data/dtep/cffunct/acs.tag6
-rw-r--r--quanta/data/dtep/cffunct/array.tag68
-rw-r--r--quanta/data/dtep/cffunct/asin.tag6
-rw-r--r--quanta/data/dtep/cffunct/atn.tag6
-rw-r--r--quanta/data/dtep/cffunct/authenticatedcontext.tag5
-rw-r--r--quanta/data/dtep/cffunct/authenticateduser.tag5
-rw-r--r--quanta/data/dtep/cffunct/bitand.tag7
-rw-r--r--quanta/data/dtep/cffunct/bitmaskclear.tag8
-rw-r--r--quanta/data/dtep/cffunct/bitmaskread.tag8
-rw-r--r--quanta/data/dtep/cffunct/bitmaskset.tag9
-rw-r--r--quanta/data/dtep/cffunct/bitnot.tag6
-rw-r--r--quanta/data/dtep/cffunct/bitor.tag7
-rw-r--r--quanta/data/dtep/cffunct/bitshln.tag7
-rw-r--r--quanta/data/dtep/cffunct/bitshrn.tag7
-rw-r--r--quanta/data/dtep/cffunct/bitxor.tag7
-rw-r--r--quanta/data/dtep/cffunct/ceiling.tag6
-rw-r--r--quanta/data/dtep/cffunct/chr.tag6
-rw-r--r--quanta/data/dtep/cffunct/cjustify.tag7
-rw-r--r--quanta/data/dtep/cffunct/compare.tag7
-rw-r--r--quanta/data/dtep/cffunct/comparenocase.tag7
-rw-r--r--quanta/data/dtep/cffunct/cos.tag6
-rw-r--r--quanta/data/dtep/cffunct/createobject.tag10
-rw-r--r--quanta/data/dtep/cffunct/createuuid.tag5
-rw-r--r--quanta/data/dtep/cffunct/datetime.tag91
-rw-r--r--quanta/data/dtep/cffunct/de.tag7
-rw-r--r--quanta/data/dtep/cffunct/decimalformat.tag7
-rw-r--r--quanta/data/dtep/cffunct/decrementvalue.tag7
-rw-r--r--quanta/data/dtep/cffunct/decrypt.tag8
-rw-r--r--quanta/data/dtep/cffunct/deleteclientvariable.tag7
-rw-r--r--quanta/data/dtep/cffunct/description.rc15
-rw-r--r--quanta/data/dtep/cffunct/directoryexists.tag7
-rw-r--r--quanta/data/dtep/cffunct/dollarformat.tag7
-rw-r--r--quanta/data/dtep/cffunct/duplicate.tag7
-rw-r--r--quanta/data/dtep/cffunct/encrypt.tag8
-rw-r--r--quanta/data/dtep/cffunct/evaluate.tag8
-rw-r--r--quanta/data/dtep/cffunct/exp.tag7
-rw-r--r--quanta/data/dtep/cffunct/expandpath.tag7
-rw-r--r--quanta/data/dtep/cffunct/fileexists.tag7
-rw-r--r--quanta/data/dtep/cffunct/find.tag19
-rw-r--r--quanta/data/dtep/cffunct/fix.tag7
-rw-r--r--quanta/data/dtep/cffunct/formatbasen.tag8
-rw-r--r--quanta/data/dtep/cffunct/getbasetagdata.tag8
-rw-r--r--quanta/data/dtep/cffunct/getbasetaglist.tag6
-rw-r--r--quanta/data/dtep/cffunct/getbasetemplatepath.tag6
-rw-r--r--quanta/data/dtep/cffunct/getclientvariableslist.tag6
-rw-r--r--quanta/data/dtep/cffunct/getcurrenttemplatepath.tag6
-rw-r--r--quanta/data/dtep/cffunct/getdirectoryfrompath.tag7
-rw-r--r--quanta/data/dtep/cffunct/getexception.tag7
-rw-r--r--quanta/data/dtep/cffunct/getfilefrompath.tag7
-rw-r--r--quanta/data/dtep/cffunct/getfunctionlist.tag6
-rw-r--r--quanta/data/dtep/cffunct/gethttprequestdata.tag6
-rw-r--r--quanta/data/dtep/cffunct/gethttptimestring.tag7
-rw-r--r--quanta/data/dtep/cffunct/getlocale.tag6
-rw-r--r--quanta/data/dtep/cffunct/getmetricdata.tag7
-rw-r--r--quanta/data/dtep/cffunct/getprofilestring.tag9
-rw-r--r--quanta/data/dtep/cffunct/gettempdirectory.tag6
-rw-r--r--quanta/data/dtep/cffunct/gettempfile.tag8
-rw-r--r--quanta/data/dtep/cffunct/gettemplatepath.tag6
-rw-r--r--quanta/data/dtep/cffunct/gettickcount.tag6
-rw-r--r--quanta/data/dtep/cffunct/gettoken.tag9
-rw-r--r--quanta/data/dtep/cffunct/hash.tag7
-rw-r--r--quanta/data/dtep/cffunct/htmlcodeformat.tag8
-rw-r--r--quanta/data/dtep/cffunct/htmleditformat.tag8
-rw-r--r--quanta/data/dtep/cffunct/iif.tag9
-rw-r--r--quanta/data/dtep/cffunct/incrementvalue.tag7
-rw-r--r--quanta/data/dtep/cffunct/inputbasen.tag8
-rw-r--r--quanta/data/dtep/cffunct/insert.tag9
-rw-r--r--quanta/data/dtep/cffunct/int.tag7
-rw-r--r--quanta/data/dtep/cffunct/isarray.tag7
-rw-r--r--quanta/data/dtep/cffunct/isauthenticated.tag6
-rw-r--r--quanta/data/dtep/cfml/Makefile.am3
-rw-r--r--quanta/data/dtep/cfml/cfabort.tag14
-rw-r--r--quanta/data/dtep/cfml/cfapplet.tag6
-rw-r--r--quanta/data/dtep/cfml/cfapplication.tag69
-rw-r--r--quanta/data/dtep/cfml/cfargument.tag9
-rw-r--r--quanta/data/dtep/cfml/cfassociate.tag7
-rw-r--r--quanta/data/dtep/cfml/cfauthenticate.tag32
-rw-r--r--quanta/data/dtep/cfml/cfbreak.tag4
-rw-r--r--quanta/data/dtep/cfml/cfcache.tag21
-rw-r--r--quanta/data/dtep/cfml/cfcase.tag19
-rw-r--r--quanta/data/dtep/cfml/cfcatch.tag26
-rw-r--r--quanta/data/dtep/cfml/cfchart.tag120
-rw-r--r--quanta/data/dtep/cfml/cfchartdata.tag7
-rw-r--r--quanta/data/dtep/cfml/cfchartseries.tag45
-rw-r--r--quanta/data/dtep/cfml/cfcol.tag15
-rw-r--r--quanta/data/dtep/cfml/cfcollection.tag19
-rw-r--r--quanta/data/dtep/cfml/cfcomponent.tag16
-rw-r--r--quanta/data/dtep/cfml/cfcontent.tag9
-rw-r--r--quanta/data/dtep/cfml/cfcookie.tag16
-rw-r--r--quanta/data/dtep/cfml/cfdirectory.tag19
-rw-r--r--quanta/data/dtep/cfml/cfdump.tag13
-rw-r--r--quanta/data/dtep/cfml/cferror.tag22
-rw-r--r--quanta/data/dtep/cfml/cfexecute.tag9
-rw-r--r--quanta/data/dtep/cfml/cfexit.tag12
-rw-r--r--quanta/data/dtep/cfml/cffile.tag37
-rw-r--r--quanta/data/dtep/cfml/cfflush.tag6
-rw-r--r--quanta/data/dtep/cfml/cfform.tag24
-rw-r--r--quanta/data/dtep/cfml/cfftp.tag64
-rw-r--r--quanta/data/dtep/cfml/cffunction.tag38
-rw-r--r--quanta/data/dtep/cfml/cfgrid.tag173
-rw-r--r--quanta/data/dtep/cfml/cfgridcolumn.tag86
-rw-r--r--quanta/data/dtep/cfml/cfgridrow.tag6
-rw-r--r--quanta/data/dtep/cfml/cfgridupdate.tag18
-rw-r--r--quanta/data/dtep/cfml/cfheader.tag9
-rw-r--r--quanta/data/dtep/cfml/cfhtmlhead.tag6
-rw-r--r--quanta/data/dtep/cfml/cfhttp.tag50
-rw-r--r--quanta/data/dtep/cfml/cfhttpparam.tag17
-rw-r--r--quanta/data/dtep/cfml/cfimport.tag8
-rw-r--r--quanta/data/dtep/cfml/cfinclude.tag6
-rw-r--r--quanta/data/dtep/cfml/cfindex.tag36
-rw-r--r--quanta/data/dtep/cfml/cfinput.tag42
-rw-r--r--quanta/data/dtep/cfml/cfinsert.tag12
-rw-r--r--quanta/data/dtep/cfml/cfinvoke.tag13
-rw-r--r--quanta/data/dtep/cfml/cfinvokeargument.tag7
-rw-r--r--quanta/data/dtep/cfml/cfldap.tag60
-rw-r--r--quanta/data/dtep/cfml/cflocation.tag12
-rw-r--r--quanta/data/dtep/cfml/cflock.tag26
-rw-r--r--quanta/data/dtep/cfml/cflog.tag27
-rw-r--r--quanta/data/dtep/cfml/cflogin.tag8
-rw-r--r--quanta/data/dtep/cfml/cfloginuser.tag8
-rw-r--r--quanta/data/dtep/cfml/cfloop.tag17
-rw-r--r--quanta/data/dtep/cfml/cfmail.tag34
-rw-r--r--quanta/data/dtep/cfml/cfmailparam.tag8
-rw-r--r--quanta/data/dtep/cfml/cfmodule.tag9
-rw-r--r--quanta/data/dtep/cfml/cfobject.tag37
-rw-r--r--quanta/data/dtep/cfml/cfobjectcache.tag8
-rw-r--r--quanta/data/dtep/cfml/cfoutput.tag15
-rw-r--r--quanta/data/dtep/cfml/cfparam.tag21
-rw-r--r--quanta/data/dtep/cfml/cfpop.tag28
-rw-r--r--quanta/data/dtep/cfml/cfprocessingdirective.tag13
-rw-r--r--quanta/data/dtep/cfml/cfprocparam.tag49
-rw-r--r--quanta/data/dtep/cfml/cfprocresult.tag8
-rw-r--r--quanta/data/dtep/cfml/cfproperty.tag20
-rw-r--r--quanta/data/dtep/cfml/cfquery.tag21
-rw-r--r--quanta/data/dtep/cfml/cfqueryparam.tag47
-rw-r--r--quanta/data/dtep/cfml/cfregistry.tag32
-rw-r--r--quanta/data/dtep/cfml/cfreport.tag19
-rw-r--r--quanta/data/dtep/cfml/cfsavecontent.tag6
-rw-r--r--quanta/data/dtep/cfml/cfschedule.tag40
-rw-r--r--quanta/data/dtep/cfml/cfsearch.tag17
-rw-r--r--quanta/data/dtep/cfml/cfselect.tag26
-rw-r--r--quanta/data/dtep/cfml/cfsetting.tag18
-rw-r--r--quanta/data/dtep/cfml/cfslider.tag85
-rw-r--r--quanta/data/dtep/cfml/cfstoredproc.tag22
-rw-r--r--quanta/data/dtep/cfml/cfswitch.tag6
-rw-r--r--quanta/data/dtep/cfml/cftable.tag13
-rw-r--r--quanta/data/dtep/cfml/cftextinput.tag68
-rw-r--r--quanta/data/dtep/cfml/cfthrow.tag16
-rw-r--r--quanta/data/dtep/cfml/cftrace.tag23
-rw-r--r--quanta/data/dtep/cfml/cftransaction.tag20
-rw-r--r--quanta/data/dtep/cfml/cftree.tag91
-rw-r--r--quanta/data/dtep/cfml/cftreeitem.tag37
-rw-r--r--quanta/data/dtep/cfml/cfupdate.tag12
-rw-r--r--quanta/data/dtep/cfml/cfusion.tag15
-rw-r--r--quanta/data/dtep/cfml/cfwddx.tag28
-rw-r--r--quanta/data/dtep/cfml/cfxml.tag12
-rw-r--r--quanta/data/dtep/cfml/description.rc20
-rw-r--r--quanta/data/dtep/cfml/ftp.tag64
-rw-r--r--quanta/data/dtep/cfml/test.cfm2
-rw-r--r--quanta/data/dtep/css/Makefile.am18
-rw-r--r--quanta/data/dtep/css/background.tag67
-rw-r--r--quanta/data/dtep/css/border-bottom-color.tag11
-rw-r--r--quanta/data/dtep/css/border-bottom-style.tag20
-rw-r--r--quanta/data/dtep/css/border-bottom-width.tag14
-rw-r--r--quanta/data/dtep/css/border-bottom.tag23
-rw-r--r--quanta/data/dtep/css/border-collapse.tag12
-rw-r--r--quanta/data/dtep/css/border-color.tag12
-rw-r--r--quanta/data/dtep/css/border-left-color.tag12
-rw-r--r--quanta/data/dtep/css/border-left-style.tag20
-rw-r--r--quanta/data/dtep/css/border-left-width.tag14
-rw-r--r--quanta/data/dtep/css/border-left.tag25
-rw-r--r--quanta/data/dtep/css/border-right-color.tag12
-rw-r--r--quanta/data/dtep/css/border-right-style.tag20
-rw-r--r--quanta/data/dtep/css/border-right-width.tag14
-rw-r--r--quanta/data/dtep/css/border-right.tag25
-rw-r--r--quanta/data/dtep/css/border-spacing.tag11
-rw-r--r--quanta/data/dtep/css/border-top-color.tag12
-rw-r--r--quanta/data/dtep/css/border-top-style.tag20
-rw-r--r--quanta/data/dtep/css/border-top-width.tag14
-rw-r--r--quanta/data/dtep/css/border-top.tag25
-rw-r--r--quanta/data/dtep/css/border.tag41
-rw-r--r--quanta/data/dtep/css/bottom.tag13
-rw-r--r--quanta/data/dtep/css/caption-side.tag14
-rw-r--r--quanta/data/dtep/css/clear.tag14
-rw-r--r--quanta/data/dtep/css/clip.tag12
-rw-r--r--quanta/data/dtep/css/color.tag12
-rw-r--r--quanta/data/dtep/css/content.tag18
-rw-r--r--quanta/data/dtep/css/counter-increment.tag13
-rw-r--r--quanta/data/dtep/css/counter-reset.tag13
-rw-r--r--quanta/data/dtep/css/cursor.tag28
-rw-r--r--quanta/data/dtep/css/description.rc37
-rw-r--r--quanta/data/dtep/css/direction.tag12
-rw-r--r--quanta/data/dtep/css/display.tag27
-rw-r--r--quanta/data/dtep/css/empty-cells.tag12
-rw-r--r--quanta/data/dtep/css/float.tag13
-rw-r--r--quanta/data/dtep/css/font-size-adjust.tag12
-rw-r--r--quanta/data/dtep/css/font-stretch.tag21
-rw-r--r--quanta/data/dtep/css/font.tag75
-rw-r--r--quanta/data/dtep/css/height.tag13
-rw-r--r--quanta/data/dtep/css/left.tag13
-rw-r--r--quanta/data/dtep/css/letter-spacing.tag12
-rw-r--r--quanta/data/dtep/css/line-height.tag14
-rw-r--r--quanta/data/dtep/css/list-style.tag60
-rw-r--r--quanta/data/dtep/css/margin-bottom.tag13
-rw-r--r--quanta/data/dtep/css/margin-left.tag13
-rw-r--r--quanta/data/dtep/css/margin-right.tag13
-rw-r--r--quanta/data/dtep/css/margin-top.tag13
-rw-r--r--quanta/data/dtep/css/margin.tag13
-rw-r--r--quanta/data/dtep/css/marker-offset.tag12
-rw-r--r--quanta/data/dtep/css/max-height.tag13
-rw-r--r--quanta/data/dtep/css/max-width.tag13
-rw-r--r--quanta/data/dtep/css/min-height.tag12
-rw-r--r--quanta/data/dtep/css/min-width.tag12
-rw-r--r--quanta/data/dtep/css/outline.tag49
-rw-r--r--quanta/data/dtep/css/overflow.tag14
-rw-r--r--quanta/data/dtep/css/padding-bottom.tag12
-rw-r--r--quanta/data/dtep/css/padding-left.tag12
-rw-r--r--quanta/data/dtep/css/padding-right.tag12
-rw-r--r--quanta/data/dtep/css/padding-top.tag12
-rw-r--r--quanta/data/dtep/css/padding.tag12
-rw-r--r--quanta/data/dtep/css/position.tag14
-rw-r--r--quanta/data/dtep/css/quotes.tag12
-rw-r--r--quanta/data/dtep/css/right.tag13
-rw-r--r--quanta/data/dtep/css/table-layout.tag12
-rw-r--r--quanta/data/dtep/css/text-align.tag15
-rw-r--r--quanta/data/dtep/css/text-decoration.tag15
-rw-r--r--quanta/data/dtep/css/text-indent.tag12
-rw-r--r--quanta/data/dtep/css/text-shadow.tag13
-rw-r--r--quanta/data/dtep/css/text-transform.tag14
-rw-r--r--quanta/data/dtep/css/top.tag13
-rw-r--r--quanta/data/dtep/css/unicode-bidi.tag13
-rw-r--r--quanta/data/dtep/css/vertical-align.tag20
-rw-r--r--quanta/data/dtep/css/visibility.tag13
-rw-r--r--quanta/data/dtep/css/white-space.tag13
-rw-r--r--quanta/data/dtep/css/width.tag13
-rw-r--r--quanta/data/dtep/css/word-spacing.tag12
-rw-r--r--quanta/data/dtep/css/z-index.tag12
-rw-r--r--quanta/data/dtep/docbook-4.2/Makefile.am6
-rw-r--r--quanta/data/dtep/docbook-4.2/a.tag339
-rw-r--r--quanta/data/dtep/docbook-4.2/b.tag206
-rw-r--r--quanta/data/dtep/docbook-4.2/c.tag264
-rw-r--r--quanta/data/dtep/docbook-4.2/common.tag35
-rw-r--r--quanta/data/dtep/docbook-4.2/d.tag43
-rw-r--r--quanta/data/dtep/docbook-4.2/description.rc23
-rw-r--r--quanta/data/dtep/docbook-4.2/e.tag172
-rw-r--r--quanta/data/dtep/docbook-4.2/f.tag128
-rw-r--r--quanta/data/dtep/docbook-4.2/g.tag249
-rw-r--r--quanta/data/dtep/docbook-4.2/h.tag19
-rw-r--r--quanta/data/dtep/docbook-4.2/i.tag379
-rw-r--r--quanta/data/dtep/docbook-4.2/j.tag5
-rw-r--r--quanta/data/dtep/docbook-4.2/k.tag48
-rw-r--r--quanta/data/dtep/docbook-4.2/l.tag101
-rw-r--r--quanta/data/dtep/docbook-4.2/m.tag123
-rw-r--r--quanta/data/dtep/docbook-4.2/n.tag12
-rw-r--r--quanta/data/dtep/docbook-4.2/o.tag106
-rw-r--r--quanta/data/dtep/docbook-4.2/p.tag152
-rw-r--r--quanta/data/dtep/docbook-4.2/q.tag20
-rw-r--r--quanta/data/dtep/docbook-4.2/r.tag112
-rw-r--r--quanta/data/dtep/docbook-4.2/s.tag482
-rw-r--r--quanta/data/dtep/docbook-4.2/t.tag305
-rw-r--r--quanta/data/dtep/docbook-4.2/u.tag27
-rw-r--r--quanta/data/dtep/docbook-4.2/v.tag113
-rw-r--r--quanta/data/dtep/docbook-4.2/w.tag6
-rw-r--r--quanta/data/dtep/docbook-4.2/x.tag16
-rw-r--r--quanta/data/dtep/docbook-4.2/y.tag5
-rw-r--r--quanta/data/dtep/dtd-description.txt207
-rw-r--r--quanta/data/dtep/dtd/Makefile.am3
-rw-r--r--quanta/data/dtep/dtd/description.rc25
-rw-r--r--quanta/data/dtep/empty/Makefile.am4
-rw-r--r--quanta/data/dtep/empty/description.rc9
-rw-r--r--quanta/data/dtep/html-frameset/Makefile.am3
-rw-r--r--quanta/data/dtep/html-frameset/basefont.tag44
-rw-r--r--quanta/data/dtep/html-frameset/common.tag46
-rw-r--r--quanta/data/dtep/html-frameset/description.rc59
-rw-r--r--quanta/data/dtep/html-frameset/font.tag77
-rw-r--r--quanta/data/dtep/html-frameset/frame.tag79
-rw-r--r--quanta/data/dtep/html-frameset/frameset.tag35
-rw-r--r--quanta/data/dtep/html-frameset/isindex.tag14
-rw-r--r--quanta/data/dtep/html-strict/Makefile.am5
-rw-r--r--quanta/data/dtep/html-strict/a.tag329
-rw-r--r--quanta/data/dtep/html-strict/b.tag365
-rw-r--r--quanta/data/dtep/html-strict/c.tag257
-rw-r--r--quanta/data/dtep/html-strict/common.tag46
-rw-r--r--quanta/data/dtep/html-strict/d.tag288
-rw-r--r--quanta/data/dtep/html-strict/description.rc59
-rw-r--r--quanta/data/dtep/html-strict/e.tag40
-rw-r--r--quanta/data/dtep/html-strict/f.tag136
-rw-r--r--quanta/data/dtep/html-strict/h.tag374
-rw-r--r--quanta/data/dtep/html-strict/i.tag303
-rw-r--r--quanta/data/dtep/html-strict/k.tag40
-rw-r--r--quanta/data/dtep/html-strict/l.tag314
-rw-r--r--quanta/data/dtep/html-strict/m.tag83
-rw-r--r--quanta/data/dtep/html-strict/n.tag27
-rw-r--r--quanta/data/dtep/html-strict/o.tag242
-rw-r--r--quanta/data/dtep/html-strict/p.tag133
-rw-r--r--quanta/data/dtep/html-strict/q.tag40
-rw-r--r--quanta/data/dtep/html-strict/s.tag354
-rw-r--r--quanta/data/dtep/html-strict/t.tag651
-rw-r--r--quanta/data/dtep/html-strict/u.tag72
-rw-r--r--quanta/data/dtep/html-strict/v.tag40
-rw-r--r--quanta/data/dtep/html/Makefile.am4
-rw-r--r--quanta/data/dtep/html/a.tag359
-rw-r--r--quanta/data/dtep/html/b.tag477
-rw-r--r--quanta/data/dtep/html/c.tag349
-rw-r--r--quanta/data/dtep/html/common.tag46
-rw-r--r--quanta/data/dtep/html/d.tag337
-rw-r--r--quanta/data/dtep/html/description.rc58
-rw-r--r--quanta/data/dtep/html/e.tag47
-rw-r--r--quanta/data/dtep/html/f.tag280
-rw-r--r--quanta/data/dtep/html/h.tag423
-rw-r--r--quanta/data/dtep/html/i.tag494
-rw-r--r--quanta/data/dtep/html/k.tag47
-rw-r--r--quanta/data/dtep/html/l.tag345
-rw-r--r--quanta/data/dtep/html/m.tag88
-rw-r--r--quanta/data/dtep/html/n.tag71
-rw-r--r--quanta/data/dtep/html/o.tag253
-rw-r--r--quanta/data/dtep/html/p.tag144
-rw-r--r--quanta/data/dtep/html/q.tag47
-rw-r--r--quanta/data/dtep/html/s.tag408
-rw-r--r--quanta/data/dtep/html/strong.tag51
-rw-r--r--quanta/data/dtep/html/t.tag684
-rw-r--r--quanta/data/dtep/html/u.tag72
-rw-r--r--quanta/data/dtep/html/v.tag47
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/Makefile.am6
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/a.tag255
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/b.tag152
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/c.tag174
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/common.tag35
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/d.tag12
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/description.rc23
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/e.tag106
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/f.tag109
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/g.tag148
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/h.tag17
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/i.tag252
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/k.tag48
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/l.tag76
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/m.tag62
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/n.tag12
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/o.tag52
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/p.tag91
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/q.tag19
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/r.tag104
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/s.tag296
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/t.tag238
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/u.tag27
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/v.tag15
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/w.tag5
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/x.tag16
-rw-r--r--quanta/data/dtep/kde-docbook-4.1.2/y.tag5
-rw-r--r--quanta/data/dtep/kde-docbook-4.2/Makefile.am4
-rw-r--r--quanta/data/dtep/kde-docbook-4.2/common.tag35
-rw-r--r--quanta/data/dtep/kde-docbook-4.2/description.rc24
-rw-r--r--quanta/data/dtep/php/Makefile.am144
-rw-r--r--quanta/data/dtep/php/apache.tag40
-rw-r--r--quanta/data/dtep/php/apd.tag56
-rw-r--r--quanta/data/dtep/php/array.tag319
-rw-r--r--quanta/data/dtep/php/aspell.tag19
-rw-r--r--quanta/data/dtep/php/bc.tag50
-rw-r--r--quanta/data/dtep/php/bcompiler.tag43
-rw-r--r--quanta/data/dtep/php/bzip2.tag40
-rw-r--r--quanta/data/dtep/php/calendar.tag76
-rw-r--r--quanta/data/dtep/php/ccvs.tag68
-rw-r--r--quanta/data/dtep/php/classkit.tag35
-rw-r--r--quanta/data/dtep/php/classobj.tag53
-rw-r--r--quanta/data/dtep/php/com.tag166
-rw-r--r--quanta/data/dtep/php/cpdf.tag367
-rw-r--r--quanta/data/dtep/php/crack.tag15
-rw-r--r--quanta/data/dtep/php/ctype.tag36
-rw-r--r--quanta/data/dtep/php/curl.tag60
-rw-r--r--quanta/data/dtep/php/cybercash.tag19
-rw-r--r--quanta/data/dtep/php/cybermut.tag29
-rw-r--r--quanta/data/dtep/php/cyrus.tag33
-rw-r--r--quanta/data/dtep/php/datetime.tag84
-rw-r--r--quanta/data/dtep/php/dba.tag60
-rw-r--r--quanta/data/dtep/php/dbase.tag47
-rw-r--r--quanta/data/dtep/php/dbm.tag41
-rw-r--r--quanta/data/dtep/php/dbplus.tag181
-rw-r--r--quanta/data/dtep/php/dbx.tag39
-rw-r--r--quanta/data/dtep/php/description.rc78
-rw-r--r--quanta/data/dtep/php/dio.tag41
-rw-r--r--quanta/data/dtep/php/dir.tag30
-rw-r--r--quanta/data/dtep/php/dom.tag245
-rw-r--r--quanta/data/dtep/php/domxml.tag230
-rw-r--r--quanta/data/dtep/php/dotnet.tag8
-rw-r--r--quanta/data/dtep/php/errorfunc.tag31
-rw-r--r--quanta/data/dtep/php/exec.tag46
-rw-r--r--quanta/data/dtep/php/exif.tag21
-rw-r--r--quanta/data/dtep/php/fam.tag41
-rw-r--r--quanta/data/dtep/php/fbsql.tag224
-rw-r--r--quanta/data/dtep/php/fdf.tag157
-rw-r--r--quanta/data/dtep/php/filepro.tag23
-rw-r--r--quanta/data/dtep/php/filesystem.tag272
-rw-r--r--quanta/data/dtep/php/fribidi.tag8
-rw-r--r--quanta/data/dtep/php/ftp.tag162
-rw-r--r--quanta/data/dtep/php/funchand.tag41
-rw-r--r--quanta/data/dtep/php/gettext.tag44
-rw-r--r--quanta/data/dtep/php/gmp.tag149
-rw-r--r--quanta/data/dtep/php/http.tag30
-rw-r--r--quanta/data/dtep/php/hw.tag271
-rw-r--r--quanta/data/dtep/php/hwapi.tag158
-rw-r--r--quanta/data/dtep/php/hyperwave.tag268
-rw-r--r--quanta/data/dtep/php/ibase.tag219
-rw-r--r--quanta/data/dtep/php/icap.tag58
-rw-r--r--quanta/data/dtep/php/iconv.tag55
-rw-r--r--quanta/data/dtep/php/id3.tag27
-rw-r--r--quanta/data/dtep/php/ifx.tag137
-rw-r--r--quanta/data/dtep/php/iisfunc.tag71
-rw-r--r--quanta/data/dtep/php/image.tag557
-rw-r--r--quanta/data/dtep/php/imap.tag278
-rw-r--r--quanta/data/dtep/php/includes.tag15
-rw-r--r--quanta/data/dtep/php/info.tag112
-rw-r--r--quanta/data/dtep/php/ingres-ii.tag70
-rw-r--r--quanta/data/dtep/php/ircg.tag139
-rw-r--r--quanta/data/dtep/php/java.tag7
-rw-r--r--quanta/data/dtep/php/ldap.tag205
-rw-r--r--quanta/data/dtep/php/lzf.tag11
-rw-r--r--quanta/data/dtep/php/mail.tag13
-rw-r--r--quanta/data/dtep/php/mailparse.tag49
-rw-r--r--quanta/data/dtep/php/math.tag157
-rw-r--r--quanta/data/dtep/php/mbstring.tag201
-rw-r--r--quanta/data/dtep/php/mcal.tag210
-rw-r--r--quanta/data/dtep/php/mcrypt.tag153
-rw-r--r--quanta/data/dtep/php/mcve.tag404
-rw-r--r--quanta/data/dtep/php/memcache.tag57
-rw-r--r--quanta/data/dtep/php/mhash.tag22
-rw-r--r--quanta/data/dtep/php/mime_magic.tag6
-rw-r--r--quanta/data/dtep/php/ming.tag318
-rw-r--r--quanta/data/dtep/php/misc.tag71
-rw-r--r--quanta/data/dtep/php/mnogosearch.tag96
-rw-r--r--quanta/data/dtep/php/msession.tag76
-rw-r--r--quanta/data/dtep/php/msql.tag111
-rw-r--r--quanta/data/dtep/php/mssql.tag117
-rw-r--r--quanta/data/dtep/php/muscat.tag20
-rw-r--r--quanta/data/dtep/php/mysql.tag181
-rw-r--r--quanta/data/dtep/php/mysqli.tag313
-rw-r--r--quanta/data/dtep/php/ncurses.tag535
-rw-r--r--quanta/data/dtep/php/network.tag94
-rw-r--r--quanta/data/dtep/php/nis.tag41
-rw-r--r--quanta/data/dtep/php/notes.tag60
-rw-r--r--quanta/data/dtep/php/nsapi.tag10
-rw-r--r--quanta/data/dtep/php/objaggregation.tag46
-rw-r--r--quanta/data/dtep/php/oci8.tag421
-rw-r--r--quanta/data/dtep/php/odbc.tag209
-rw-r--r--quanta/data/dtep/php/openal.tag81
-rw-r--r--quanta/data/dtep/php/openssl.tag168
-rw-r--r--quanta/data/dtep/php/oracle.tag87
-rw-r--r--quanta/data/dtep/php/outcontrol.tag46
-rw-r--r--quanta/data/dtep/php/overload.tag6
-rw-r--r--quanta/data/dtep/php/ovrimos.tag81
-rw-r--r--quanta/data/dtep/php/parsekit.tag16
-rw-r--r--quanta/data/dtep/php/pcntl.tag54
-rw-r--r--quanta/data/dtep/php/pcre.tag44
-rw-r--r--quanta/data/dtep/php/pdf.tag473
-rw-r--r--quanta/data/dtep/php/pfpro.tag29
-rw-r--r--quanta/data/dtep/php/pgsql.tag272
-rw-r--r--quanta/data/dtep/php/posix.tag86
-rw-r--r--quanta/data/dtep/php/printer.tag159
-rw-r--r--quanta/data/dtep/php/pspell.tag86
-rw-r--r--quanta/data/dtep/php/qtdom.tag8
-rw-r--r--quanta/data/dtep/php/rar.tag38
-rw-r--r--quanta/data/dtep/php/readline.tag38
-rw-r--r--quanta/data/dtep/php/recode.tag12
-rw-r--r--quanta/data/dtep/php/regex.tag36
-rw-r--r--quanta/data/dtep/php/sem.tag78
-rw-r--r--quanta/data/dtep/php/sesam.tag64
-rw-r--r--quanta/data/dtep/php/session.tag62
-rw-r--r--quanta/data/dtep/php/shmop.tag28
-rw-r--r--quanta/data/dtep/php/simplexml.tag25
-rw-r--r--quanta/data/dtep/php/snmp.tag66
-rw-r--r--quanta/data/dtep/php/soap.tag71
-rw-r--r--quanta/data/dtep/php/sockets.tag123
-rw-r--r--quanta/data/dtep/php/spl.tag190
-rw-r--r--quanta/data/dtep/php/sqlite.tag150
-rw-r--r--quanta/data/dtep/php/stream.tag136
-rw-r--r--quanta/data/dtep/php/strings.tag382
-rw-r--r--quanta/data/dtep/php/swf.tag272
-rw-r--r--quanta/data/dtep/php/sybase.tag96
-rw-r--r--quanta/data/dtep/php/tcpwrap.tag9
-rw-r--r--quanta/data/dtep/php/tidy.tag144
-rw-r--r--quanta/data/dtep/php/tokenizer.tag9
-rw-r--r--quanta/data/dtep/php/uodbc.tag211
-rw-r--r--quanta/data/dtep/php/url.tag36
-rw-r--r--quanta/data/dtep/php/var.tag99
-rw-r--r--quanta/data/dtep/php/vpopmail.tag79
-rw-r--r--quanta/data/dtep/php/w32api.tag28
-rw-r--r--quanta/data/dtep/php/wddx.tag25
-rw-r--r--quanta/data/dtep/php/xattr.tag26
-rw-r--r--quanta/data/dtep/php/xdiff.tag58
-rw-r--r--quanta/data/dtep/php/xml.tag95
-rw-r--r--quanta/data/dtep/php/xmlrpc.tag57
-rw-r--r--quanta/data/dtep/php/xsl.tag33
-rw-r--r--quanta/data/dtep/php/xslt.tag71
-rw-r--r--quanta/data/dtep/php/yaz.tag98
-rw-r--r--quanta/data/dtep/php/zip.tag36
-rw-r--r--quanta/data/dtep/php/zlib.tag79
-rw-r--r--quanta/data/dtep/relaxng/Makefile.am4
-rw-r--r--quanta/data/dtep/relaxng/anyName.tag11
-rw-r--r--quanta/data/dtep/relaxng/attribute.tag32
-rw-r--r--quanta/data/dtep/relaxng/choice.tag33
-rw-r--r--quanta/data/dtep/relaxng/data.tag13
-rw-r--r--quanta/data/dtep/relaxng/define.tag31
-rw-r--r--quanta/data/dtep/relaxng/description.rc12
-rw-r--r--quanta/data/dtep/relaxng/div.tag12
-rw-r--r--quanta/data/dtep/relaxng/element.tag34
-rw-r--r--quanta/data/dtep/relaxng/empty.tag8
-rw-r--r--quanta/data/dtep/relaxng/except.tag33
-rw-r--r--quanta/data/dtep/relaxng/externalRef.tag9
-rw-r--r--quanta/data/dtep/relaxng/grammar.tag15
-rw-r--r--quanta/data/dtep/relaxng/group.tag29
-rw-r--r--quanta/data/dtep/relaxng/include.tag14
-rw-r--r--quanta/data/dtep/relaxng/interleave.tag29
-rw-r--r--quanta/data/dtep/relaxng/list.tag24
-rw-r--r--quanta/data/dtep/relaxng/mixed.tag29
-rw-r--r--quanta/data/dtep/relaxng/name.tag8
-rw-r--r--quanta/data/dtep/relaxng/notAllowed.tag8
-rw-r--r--quanta/data/dtep/relaxng/nsName.tag11
-rw-r--r--quanta/data/dtep/relaxng/oneOrMore.tag29
-rw-r--r--quanta/data/dtep/relaxng/optional.tag29
-rw-r--r--quanta/data/dtep/relaxng/param.tag7
-rw-r--r--quanta/data/dtep/relaxng/parentRef.tag9
-rw-r--r--quanta/data/dtep/relaxng/ref.tag9
-rw-r--r--quanta/data/dtep/relaxng/start.tag21
-rw-r--r--quanta/data/dtep/relaxng/text.tag8
-rw-r--r--quanta/data/dtep/relaxng/value.tag9
-rw-r--r--quanta/data/dtep/relaxng/zeroOrMore.tag29
-rw-r--r--quanta/data/dtep/schema/Makefile.am7
-rw-r--r--quanta/data/dtep/schema/all.tag46
-rw-r--r--quanta/data/dtep/schema/annotation.tag19
-rw-r--r--quanta/data/dtep/schema/any.tag63
-rw-r--r--quanta/data/dtep/schema/anyAttribute.tag43
-rw-r--r--quanta/data/dtep/schema/appInfo.tag15
-rw-r--r--quanta/data/dtep/schema/attribute.tag110
-rw-r--r--quanta/data/dtep/schema/attributeGroup.tag52
-rw-r--r--quanta/data/dtep/schema/choice.tag43
-rw-r--r--quanta/data/dtep/schema/complexContent.tag34
-rw-r--r--quanta/data/dtep/schema/complexType.tag91
-rw-r--r--quanta/data/dtep/schema/description.rc17
-rw-r--r--quanta/data/dtep/schema/documentation.tag25
-rw-r--r--quanta/data/dtep/schema/element.tag168
-rw-r--r--quanta/data/dtep/schema/enumeration.tag18
-rw-r--r--quanta/data/dtep/schema/extension.tag35
-rw-r--r--quanta/data/dtep/schema/field.tag28
-rw-r--r--quanta/data/dtep/schema/fractionDigits.tag18
-rw-r--r--quanta/data/dtep/schema/group.tag74
-rw-r--r--quanta/data/dtep/schema/import.tag51
-rw-r--r--quanta/data/dtep/schema/include.tag41
-rw-r--r--quanta/data/dtep/schema/key.tag30
-rw-r--r--quanta/data/dtep/schema/keyref.tag40
-rw-r--r--quanta/data/dtep/schema/length.tag18
-rw-r--r--quanta/data/dtep/schema/list.tag29
-rw-r--r--quanta/data/dtep/schema/maxExclusive.tag18
-rw-r--r--quanta/data/dtep/schema/maxInclusive.tag18
-rw-r--r--quanta/data/dtep/schema/maxLength.tag18
-rw-r--r--quanta/data/dtep/schema/minExclusive.tag18
-rw-r--r--quanta/data/dtep/schema/minInclusive.tag18
-rw-r--r--quanta/data/dtep/schema/minLength.tag18
-rw-r--r--quanta/data/dtep/schema/notation.tag61
-rw-r--r--quanta/data/dtep/schema/pattern.tag18
-rw-r--r--quanta/data/dtep/schema/redefine.tag41
-rw-r--r--quanta/data/dtep/schema/restriction.tag48
-rw-r--r--quanta/data/dtep/schema/schema.tag102
-rw-r--r--quanta/data/dtep/schema/selector.tag28
-rw-r--r--quanta/data/dtep/schema/sequence.tag43
-rw-r--r--quanta/data/dtep/schema/simpleContent.tag20
-rw-r--r--quanta/data/dtep/schema/simpleType.tag44
-rw-r--r--quanta/data/dtep/schema/totalDigits.tag18
-rw-r--r--quanta/data/dtep/schema/union.tag29
-rw-r--r--quanta/data/dtep/schema/unique.tag30
-rw-r--r--quanta/data/dtep/schema/whiteSpace.tag23
-rw-r--r--quanta/data/dtep/tagxml/Makefile.am3
-rw-r--r--quanta/data/dtep/tagxml/attr.tag41
-rw-r--r--quanta/data/dtep/tagxml/childstop.tag28
-rw-r--r--quanta/data/dtep/tagxml/description.rc17
-rw-r--r--quanta/data/dtep/tagxml/location.tag178
-rw-r--r--quanta/data/dtep/tagxml/nonparams.tag12
-rw-r--r--quanta/data/dtep/tagxml/spacer.tag25
-rw-r--r--quanta/data/dtep/tagxml/tag.tag73
-rw-r--r--quanta/data/dtep/tagxml/vpl.tag65
-rw-r--r--quanta/data/dtep/wml-1-2/Makefile.am5
-rw-r--r--quanta/data/dtep/wml-1-2/a.tag30
-rw-r--r--quanta/data/dtep/wml-1-2/access.tag20
-rw-r--r--quanta/data/dtep/wml-1-2/anchor.tag24
-rw-r--r--quanta/data/dtep/wml-1-2/br.tag6
-rw-r--r--quanta/data/dtep/wml-1-2/card.tag56
-rw-r--r--quanta/data/dtep/wml-1-2/common.tag11
-rw-r--r--quanta/data/dtep/wml-1-2/description.rc58
-rw-r--r--quanta/data/dtep/wml-1-2/do.tag51
-rw-r--r--quanta/data/dtep/wml-1-2/fieldset.tag18
-rw-r--r--quanta/data/dtep/wml-1-2/go.tag44
-rw-r--r--quanta/data/dtep/wml-1-2/img.tag65
-rw-r--r--quanta/data/dtep/wml-1-2/input.tag80
-rw-r--r--quanta/data/dtep/wml-1-2/meta.tag40
-rw-r--r--quanta/data/dtep/wml-1-2/noop.tag6
-rw-r--r--quanta/data/dtep/wml-1-2/onevent.tag22
-rw-r--r--quanta/data/dtep/wml-1-2/optgroup.tag18
-rw-r--r--quanta/data/dtep/wml-1-2/option.tag30
-rw-r--r--quanta/data/dtep/wml-1-2/p.tag33
-rw-r--r--quanta/data/dtep/wml-1-2/postfield.tag18
-rw-r--r--quanta/data/dtep/wml-1-2/pre.tag12
-rw-r--r--quanta/data/dtep/wml-1-2/select.tag58
-rw-r--r--quanta/data/dtep/wml-1-2/setvar.tag18
-rw-r--r--quanta/data/dtep/wml-1-2/table.tag37
-rw-r--r--quanta/data/dtep/wml-1-2/template.tag24
-rw-r--r--quanta/data/dtep/wml-1-2/timer.tag18
-rw-r--r--quanta/data/dtep/wml-1-2/wml.tag13
-rw-r--r--quanta/data/dtep/xhtml-basic/Makefile.am6
-rw-r--r--quanta/data/dtep/xhtml-basic/a.tag76
-rw-r--r--quanta/data/dtep/xhtml-basic/base.tag11
-rw-r--r--quanta/data/dtep/xhtml-basic/blockquote.tag33
-rw-r--r--quanta/data/dtep/xhtml-basic/body.tag24
-rw-r--r--quanta/data/dtep/xhtml-basic/br.tag5
-rw-r--r--quanta/data/dtep/xhtml-basic/common.tag18
-rw-r--r--quanta/data/dtep/xhtml-basic/description.rc50
-rw-r--r--quanta/data/dtep/xhtml-basic/div.tag46
-rw-r--r--quanta/data/dtep/xhtml-basic/form.tag51
-rw-r--r--quanta/data/dtep/xhtml-basic/head.tag20
-rw-r--r--quanta/data/dtep/xhtml-basic/headings.tag161
-rw-r--r--quanta/data/dtep/xhtml-basic/html.tag24
-rw-r--r--quanta/data/dtep/xhtml-basic/input.tag104
-rw-r--r--quanta/data/dtep/xhtml-basic/li.tag48
-rw-r--r--quanta/data/dtep/xhtml-basic/link.tag70
-rw-r--r--quanta/data/dtep/xhtml-basic/meta.tag31
-rw-r--r--quanta/data/dtep/xhtml-basic/ol.tag9
-rw-r--r--quanta/data/dtep/xhtml-basic/option.tag26
-rw-r--r--quanta/data/dtep/xhtml-basic/p.tag41
-rw-r--r--quanta/data/dtep/xhtml-basic/select.tag27
-rw-r--r--quanta/data/dtep/xhtml-basic/table.tag12
-rw-r--r--quanta/data/dtep/xhtml-basic/td.tag103
-rw-r--r--quanta/data/dtep/xhtml-basic/textarea.tag29
-rw-r--r--quanta/data/dtep/xhtml-basic/th.tag103
-rw-r--r--quanta/data/dtep/xhtml-basic/tr.tag41
-rw-r--r--quanta/data/dtep/xhtml-basic/ul.tag11
-rw-r--r--quanta/data/dtep/xhtml-frameset/Makefile.am3
-rw-r--r--quanta/data/dtep/xhtml-frameset/a.tag132
-rw-r--r--quanta/data/dtep/xhtml-frameset/abbr.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/acronym.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/address.tag50
-rw-r--r--quanta/data/dtep/xhtml-frameset/applet.tag146
-rw-r--r--quanta/data/dtep/xhtml-frameset/area.tag49
-rw-r--r--quanta/data/dtep/xhtml-frameset/b.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/base.tag24
-rw-r--r--quanta/data/dtep/xhtml-frameset/basefont.tag41
-rw-r--r--quanta/data/dtep/xhtml-frameset/bdo.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/big.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/blockquote.tag82
-rw-r--r--quanta/data/dtep/xhtml-frameset/body.tag128
-rw-r--r--quanta/data/dtep/xhtml-frameset/br.tag20
-rw-r--r--quanta/data/dtep/xhtml-frameset/button.tag93
-rw-r--r--quanta/data/dtep/xhtml-frameset/caption.tag63
-rw-r--r--quanta/data/dtep/xhtml-frameset/center.tag75
-rw-r--r--quanta/data/dtep/xhtml-frameset/cite.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/code.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/col.tag57
-rw-r--r--quanta/data/dtep/xhtml-frameset/colgroup.tag61
-rw-r--r--quanta/data/dtep/xhtml-frameset/common.tag70
-rw-r--r--quanta/data/dtep/xhtml-frameset/dd.tag75
-rw-r--r--quanta/data/dtep/xhtml-frameset/del.tag87
-rw-r--r--quanta/data/dtep/xhtml-frameset/description.rc55
-rw-r--r--quanta/data/dtep/xhtml-frameset/dfn.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/dir.tag16
-rw-r--r--quanta/data/dtep/xhtml-frameset/div.tag88
-rw-r--r--quanta/data/dtep/xhtml-frameset/dl.tag16
-rw-r--r--quanta/data/dtep/xhtml-frameset/dt.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/em.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/fieldset.tag76
-rw-r--r--quanta/data/dtep/xhtml-frameset/font.tag87
-rw-r--r--quanta/data/dtep/xhtml-frameset/form.tag151
-rw-r--r--quanta/data/dtep/xhtml-frameset/frame.tag63
-rw-r--r--quanta/data/dtep/xhtml-frameset/frameset.tag37
-rw-r--r--quanta/data/dtep/xhtml-frameset/head.tag30
-rw-r--r--quanta/data/dtep/xhtml-frameset/headings.tag369
-rw-r--r--quanta/data/dtep/xhtml-frameset/hr.tag35
-rw-r--r--quanta/data/dtep/xhtml-frameset/html.tag27
-rw-r--r--quanta/data/dtep/xhtml-frameset/i.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/iframe.tag160
-rw-r--r--quanta/data/dtep/xhtml-frameset/img.tag43
-rw-r--r--quanta/data/dtep/xhtml-frameset/input.tag125
-rw-r--r--quanta/data/dtep/xhtml-frameset/ins.tag87
-rw-r--r--quanta/data/dtep/xhtml-frameset/isindex.tag13
-rw-r--r--quanta/data/dtep/xhtml-frameset/kbd.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/label.tag75
-rw-r--r--quanta/data/dtep/xhtml-frameset/legend.tag70
-rw-r--r--quanta/data/dtep/xhtml-frameset/li.tag101
-rw-r--r--quanta/data/dtep/xhtml-frameset/link.tag77
-rw-r--r--quanta/data/dtep/xhtml-frameset/map.tag44
-rw-r--r--quanta/data/dtep/xhtml-frameset/menu.tag16
-rw-r--r--quanta/data/dtep/xhtml-frameset/meta.tag37
-rw-r--r--quanta/data/dtep/xhtml-frameset/noframes.tag11
-rw-r--r--quanta/data/dtep/xhtml-frameset/noscript.tag75
-rw-r--r--quanta/data/dtep/xhtml-frameset/object.tag209
-rw-r--r--quanta/data/dtep/xhtml-frameset/ol.tag36
-rw-r--r--quanta/data/dtep/xhtml-frameset/optgroup.tag23
-rw-r--r--quanta/data/dtep/xhtml-frameset/option.tag37
-rw-r--r--quanta/data/dtep/xhtml-frameset/p.tag74
-rw-r--r--quanta/data/dtep/xhtml-frameset/param.tag53
-rw-r--r--quanta/data/dtep/xhtml-frameset/pre.tag53
-rw-r--r--quanta/data/dtep/xhtml-frameset/q.tag57
-rw-r--r--quanta/data/dtep/xhtml-frameset/s.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/samp.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/script.tag58
-rw-r--r--quanta/data/dtep/xhtml-frameset/select.tag62
-rw-r--r--quanta/data/dtep/xhtml-frameset/small.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/span.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/strike.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/strong.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/style.tag57
-rw-r--r--quanta/data/dtep/xhtml-frameset/sub.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/sup.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/table.tag97
-rw-r--r--quanta/data/dtep/xhtml-frameset/tbody.tag48
-rw-r--r--quanta/data/dtep/xhtml-frameset/td.tag187
-rw-r--r--quanta/data/dtep/xhtml-frameset/textarea.tag49
-rw-r--r--quanta/data/dtep/xhtml-frameset/tfoot.tag48
-rw-r--r--quanta/data/dtep/xhtml-frameset/th.tag187
-rw-r--r--quanta/data/dtep/xhtml-frameset/thead.tag48
-rw-r--r--quanta/data/dtep/xhtml-frameset/title.tag14
-rw-r--r--quanta/data/dtep/xhtml-frameset/tr.tag53
-rw-r--r--quanta/data/dtep/xhtml-frameset/tt.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/u.tag51
-rw-r--r--quanta/data/dtep/xhtml-frameset/ul.tag28
-rw-r--r--quanta/data/dtep/xhtml-frameset/var.tag51
-rw-r--r--quanta/data/dtep/xhtml-strict/Makefile.am3
-rw-r--r--quanta/data/dtep/xhtml-strict/a.tag119
-rw-r--r--quanta/data/dtep/xhtml-strict/abbr.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/acronym.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/address.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/area.tag43
-rw-r--r--quanta/data/dtep/xhtml-strict/b.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/base.tag17
-rw-r--r--quanta/data/dtep/xhtml-strict/bdo.tag43
-rw-r--r--quanta/data/dtep/xhtml-strict/big.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/blockquote.tag38
-rw-r--r--quanta/data/dtep/xhtml-strict/body.tag43
-rw-r--r--quanta/data/dtep/xhtml-strict/br.tag5
-rw-r--r--quanta/data/dtep/xhtml-strict/button.tag83
-rw-r--r--quanta/data/dtep/xhtml-strict/caption.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/cite.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/code.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/col.tag57
-rw-r--r--quanta/data/dtep/xhtml-strict/colgroup.tag61
-rw-r--r--quanta/data/dtep/xhtml-strict/common.tag68
-rw-r--r--quanta/data/dtep/xhtml-strict/dd.tag61
-rw-r--r--quanta/data/dtep/xhtml-strict/del.tag73
-rw-r--r--quanta/data/dtep/xhtml-strict/description.rc62
-rw-r--r--quanta/data/dtep/xhtml-strict/dfn.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/div.tag62
-rw-r--r--quanta/data/dtep/xhtml-strict/dl.tag10
-rw-r--r--quanta/data/dtep/xhtml-strict/dt.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/em.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/empty.tag12
-rw-r--r--quanta/data/dtep/xhtml-strict/fieldset.tag64
-rw-r--r--quanta/data/dtep/xhtml-strict/form.tag95
-rw-r--r--quanta/data/dtep/xhtml-strict/head.tag29
-rw-r--r--quanta/data/dtep/xhtml-strict/headings.tag244
-rw-r--r--quanta/data/dtep/xhtml-strict/hr.tag5
-rw-r--r--quanta/data/dtep/xhtml-strict/html.tag27
-rw-r--r--quanta/data/dtep/xhtml-strict/i.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/img.tag31
-rw-r--r--quanta/data/dtep/xhtml-strict/input.tag109
-rw-r--r--quanta/data/dtep/xhtml-strict/ins.tag73
-rw-r--r--quanta/data/dtep/xhtml-strict/kbd.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/label.tag66
-rw-r--r--quanta/data/dtep/xhtml-strict/legend.tag49
-rw-r--r--quanta/data/dtep/xhtml-strict/li.tag65
-rw-r--r--quanta/data/dtep/xhtml-strict/link.tag71
-rw-r--r--quanta/data/dtep/xhtml-strict/map.tag39
-rw-r--r--quanta/data/dtep/xhtml-strict/meta.tag37
-rw-r--r--quanta/data/dtep/xhtml-strict/noscript.tag31
-rw-r--r--quanta/data/dtep/xhtml-strict/object.tag163
-rw-r--r--quanta/data/dtep/xhtml-strict/ol.tag11
-rw-r--r--quanta/data/dtep/xhtml-strict/optgroup.tag23
-rw-r--r--quanta/data/dtep/xhtml-strict/option.tag37
-rw-r--r--quanta/data/dtep/xhtml-strict/p.tag54
-rw-r--r--quanta/data/dtep/xhtml-strict/param.tag53
-rw-r--r--quanta/data/dtep/xhtml-strict/pre.tag45
-rw-r--r--quanta/data/dtep/xhtml-strict/q.tag48
-rw-r--r--quanta/data/dtep/xhtml-strict/samp.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/script.tag52
-rw-r--r--quanta/data/dtep/xhtml-strict/select.tag62
-rw-r--r--quanta/data/dtep/xhtml-strict/small.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/span.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/strong.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/style.tag57
-rw-r--r--quanta/data/dtep/xhtml-strict/sub.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/sup.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/table.tag79
-rw-r--r--quanta/data/dtep/xhtml-strict/tbody.tag48
-rw-r--r--quanta/data/dtep/xhtml-strict/td.tag147
-rw-r--r--quanta/data/dtep/xhtml-strict/textarea.tag49
-rw-r--r--quanta/data/dtep/xhtml-strict/tfoot.tag48
-rw-r--r--quanta/data/dtep/xhtml-strict/th.tag148
-rw-r--r--quanta/data/dtep/xhtml-strict/thead.tag48
-rw-r--r--quanta/data/dtep/xhtml-strict/title.tag14
-rw-r--r--quanta/data/dtep/xhtml-strict/tr.tag53
-rw-r--r--quanta/data/dtep/xhtml-strict/tt.tag42
-rw-r--r--quanta/data/dtep/xhtml-strict/ul.tag11
-rw-r--r--quanta/data/dtep/xhtml-strict/var.tag42
-rw-r--r--quanta/data/dtep/xhtml/Makefile.am3
-rw-r--r--quanta/data/dtep/xhtml/a.tag132
-rw-r--r--quanta/data/dtep/xhtml/abbr.tag51
-rw-r--r--quanta/data/dtep/xhtml/acronym.tag51
-rw-r--r--quanta/data/dtep/xhtml/address.tag50
-rw-r--r--quanta/data/dtep/xhtml/applet.tag145
-rw-r--r--quanta/data/dtep/xhtml/area.tag49
-rw-r--r--quanta/data/dtep/xhtml/b.tag51
-rw-r--r--quanta/data/dtep/xhtml/base.tag24
-rw-r--r--quanta/data/dtep/xhtml/basefont.tag41
-rw-r--r--quanta/data/dtep/xhtml/bdo.tag51
-rw-r--r--quanta/data/dtep/xhtml/big.tag51
-rw-r--r--quanta/data/dtep/xhtml/blockquote.tag82
-rw-r--r--quanta/data/dtep/xhtml/body.tag128
-rw-r--r--quanta/data/dtep/xhtml/br.tag20
-rw-r--r--quanta/data/dtep/xhtml/button.tag93
-rw-r--r--quanta/data/dtep/xhtml/caption.tag63
-rw-r--r--quanta/data/dtep/xhtml/center.tag75
-rw-r--r--quanta/data/dtep/xhtml/cite.tag51
-rw-r--r--quanta/data/dtep/xhtml/code.tag51
-rw-r--r--quanta/data/dtep/xhtml/col.tag57
-rw-r--r--quanta/data/dtep/xhtml/colgroup.tag61
-rw-r--r--quanta/data/dtep/xhtml/common.tag48
-rw-r--r--quanta/data/dtep/xhtml/dd.tag75
-rw-r--r--quanta/data/dtep/xhtml/del.tag87
-rw-r--r--quanta/data/dtep/xhtml/description.rc68
-rw-r--r--quanta/data/dtep/xhtml/dfn.tag51
-rw-r--r--quanta/data/dtep/xhtml/dir.tag16
-rw-r--r--quanta/data/dtep/xhtml/div.tag88
-rw-r--r--quanta/data/dtep/xhtml/dl.tag16
-rw-r--r--quanta/data/dtep/xhtml/dt.tag51
-rw-r--r--quanta/data/dtep/xhtml/em.tag51
-rw-r--r--quanta/data/dtep/xhtml/fieldset.tag76
-rw-r--r--quanta/data/dtep/xhtml/font.tag87
-rw-r--r--quanta/data/dtep/xhtml/form.tag151
-rw-r--r--quanta/data/dtep/xhtml/head.tag30
-rw-r--r--quanta/data/dtep/xhtml/headings.tag369
-rw-r--r--quanta/data/dtep/xhtml/hr.tag35
-rw-r--r--quanta/data/dtep/xhtml/html.tag27
-rw-r--r--quanta/data/dtep/xhtml/i.tag51
-rw-r--r--quanta/data/dtep/xhtml/iframe.tag159
-rw-r--r--quanta/data/dtep/xhtml/img.tag43
-rw-r--r--quanta/data/dtep/xhtml/input.tag125
-rw-r--r--quanta/data/dtep/xhtml/ins.tag87
-rw-r--r--quanta/data/dtep/xhtml/isindex.tag13
-rw-r--r--quanta/data/dtep/xhtml/kbd.tag51
-rw-r--r--quanta/data/dtep/xhtml/label.tag75
-rw-r--r--quanta/data/dtep/xhtml/legend.tag70
-rw-r--r--quanta/data/dtep/xhtml/li.tag101
-rw-r--r--quanta/data/dtep/xhtml/link.tag77
-rw-r--r--quanta/data/dtep/xhtml/map.tag44
-rw-r--r--quanta/data/dtep/xhtml/menu.tag16
-rw-r--r--quanta/data/dtep/xhtml/meta.tag37
-rw-r--r--quanta/data/dtep/xhtml/noframes.tag74
-rw-r--r--quanta/data/dtep/xhtml/noscript.tag75
-rw-r--r--quanta/data/dtep/xhtml/object.tag209
-rw-r--r--quanta/data/dtep/xhtml/ol.tag36
-rw-r--r--quanta/data/dtep/xhtml/optgroup.tag23
-rw-r--r--quanta/data/dtep/xhtml/option.tag37
-rw-r--r--quanta/data/dtep/xhtml/p.tag74
-rw-r--r--quanta/data/dtep/xhtml/param.tag53
-rw-r--r--quanta/data/dtep/xhtml/pre.tag53
-rw-r--r--quanta/data/dtep/xhtml/q.tag57
-rw-r--r--quanta/data/dtep/xhtml/s.tag50
-rw-r--r--quanta/data/dtep/xhtml/samp.tag51
-rw-r--r--quanta/data/dtep/xhtml/script.tag58
-rw-r--r--quanta/data/dtep/xhtml/select.tag62
-rw-r--r--quanta/data/dtep/xhtml/small.tag51
-rw-r--r--quanta/data/dtep/xhtml/span.tag51
-rw-r--r--quanta/data/dtep/xhtml/strike.tag50
-rw-r--r--quanta/data/dtep/xhtml/strong.tag51
-rw-r--r--quanta/data/dtep/xhtml/style.tag57
-rw-r--r--quanta/data/dtep/xhtml/sub.tag51
-rw-r--r--quanta/data/dtep/xhtml/sup.tag51
-rw-r--r--quanta/data/dtep/xhtml/table.tag97
-rw-r--r--quanta/data/dtep/xhtml/tbody.tag48
-rw-r--r--quanta/data/dtep/xhtml/td.tag187
-rw-r--r--quanta/data/dtep/xhtml/textarea.tag49
-rw-r--r--quanta/data/dtep/xhtml/tfoot.tag48
-rw-r--r--quanta/data/dtep/xhtml/th.tag187
-rw-r--r--quanta/data/dtep/xhtml/thead.tag48
-rw-r--r--quanta/data/dtep/xhtml/title.tag14
-rw-r--r--quanta/data/dtep/xhtml/tr.tag53
-rw-r--r--quanta/data/dtep/xhtml/tt.tag51
-rw-r--r--quanta/data/dtep/xhtml/u.tag51
-rw-r--r--quanta/data/dtep/xhtml/ul.tag28
-rw-r--r--quanta/data/dtep/xhtml/var.tag51
-rw-r--r--quanta/data/dtep/xhtml11/Makefile.am14
-rw-r--r--quanta/data/dtep/xhtml11/a.tag108
-rw-r--r--quanta/data/dtep/xhtml11/abbr.tag42
-rw-r--r--quanta/data/dtep/xhtml11/acronym.tag42
-rw-r--r--quanta/data/dtep/xhtml11/address.tag42
-rw-r--r--quanta/data/dtep/xhtml11/applet.tag123
-rw-r--r--quanta/data/dtep/xhtml11/area.tag44
-rw-r--r--quanta/data/dtep/xhtml11/b.tag42
-rw-r--r--quanta/data/dtep/xhtml11/base.tag17
-rw-r--r--quanta/data/dtep/xhtml11/bdo.tag53
-rw-r--r--quanta/data/dtep/xhtml11/big.tag42
-rw-r--r--quanta/data/dtep/xhtml11/blockquote.tag36
-rw-r--r--quanta/data/dtep/xhtml11/body.tag42
-rw-r--r--quanta/data/dtep/xhtml11/br.tag5
-rw-r--r--quanta/data/dtep/xhtml11/button.tag66
-rw-r--r--quanta/data/dtep/xhtml11/caption.tag42
-rw-r--r--quanta/data/dtep/xhtml11/cite.tag42
-rw-r--r--quanta/data/dtep/xhtml11/code.tag42
-rw-r--r--quanta/data/dtep/xhtml11/col.tag60
-rw-r--r--quanta/data/dtep/xhtml11/colgroup.tag63
-rw-r--r--quanta/data/dtep/xhtml11/common.tag56
-rw-r--r--quanta/data/dtep/xhtml11/dd.tag61
-rw-r--r--quanta/data/dtep/xhtml11/del.tag73
-rw-r--r--quanta/data/dtep/xhtml11/description.rc58
-rw-r--r--quanta/data/dtep/xhtml11/dfn.tag42
-rw-r--r--quanta/data/dtep/xhtml11/div.tag61
-rw-r--r--quanta/data/dtep/xhtml11/dl.tag10
-rw-r--r--quanta/data/dtep/xhtml11/dt.tag42
-rw-r--r--quanta/data/dtep/xhtml11/em.tag42
-rw-r--r--quanta/data/dtep/xhtml11/empty.tag13
-rw-r--r--quanta/data/dtep/xhtml11/fieldset.tag65
-rw-r--r--quanta/data/dtep/xhtml11/form.tag84
-rw-r--r--quanta/data/dtep/xhtml11/head.tag29
-rw-r--r--quanta/data/dtep/xhtml11/headings.tag239
-rw-r--r--quanta/data/dtep/xhtml11/hr.tag5
-rw-r--r--quanta/data/dtep/xhtml11/html.tag25
-rw-r--r--quanta/data/dtep/xhtml11/i.tag42
-rw-r--r--quanta/data/dtep/xhtml11/image.tag48
-rw-r--r--quanta/data/dtep/xhtml11/input.tag104
-rw-r--r--quanta/data/dtep/xhtml11/ins.tag73
-rw-r--r--quanta/data/dtep/xhtml11/kbd.tag42
-rw-r--r--quanta/data/dtep/xhtml11/label.tag66
-rw-r--r--quanta/data/dtep/xhtml11/legend.tag49
-rw-r--r--quanta/data/dtep/xhtml11/li.tag65
-rw-r--r--quanta/data/dtep/xhtml11/link.tag70
-rw-r--r--quanta/data/dtep/xhtml11/map.tag33
-rw-r--r--quanta/data/dtep/xhtml11/meta.tag31
-rw-r--r--quanta/data/dtep/xhtml11/noscript.tag31
-rw-r--r--quanta/data/dtep/xhtml11/object.tag181
-rw-r--r--quanta/data/dtep/xhtml11/ol.tag11
-rw-r--r--quanta/data/dtep/xhtml11/optgroup.tag23
-rw-r--r--quanta/data/dtep/xhtml11/option.tag41
-rw-r--r--quanta/data/dtep/xhtml11/p.tag54
-rw-r--r--quanta/data/dtep/xhtml11/param.tag47
-rw-r--r--quanta/data/dtep/xhtml11/pre.tag45
-rw-r--r--quanta/data/dtep/xhtml11/q.tag48
-rw-r--r--quanta/data/dtep/xhtml11/rb.tag7
-rw-r--r--quanta/data/dtep/xhtml11/rbc.tag9
-rw-r--r--quanta/data/dtep/xhtml11/rp.tag7
-rw-r--r--quanta/data/dtep/xhtml11/rt.tag9
-rw-r--r--quanta/data/dtep/xhtml11/rtc.tag9
-rw-r--r--quanta/data/dtep/xhtml11/ruby.tag13
-rw-r--r--quanta/data/dtep/xhtml11/samp.tag42
-rw-r--r--quanta/data/dtep/xhtml11/script.tag46
-rw-r--r--quanta/data/dtep/xhtml11/select.tag55
-rw-r--r--quanta/data/dtep/xhtml11/small.tag42
-rw-r--r--quanta/data/dtep/xhtml11/span.tag42
-rw-r--r--quanta/data/dtep/xhtml11/strong.tag42
-rw-r--r--quanta/data/dtep/xhtml11/style.tag60
-rw-r--r--quanta/data/dtep/xhtml11/sub.tag42
-rw-r--r--quanta/data/dtep/xhtml11/sup.tag42
-rw-r--r--quanta/data/dtep/xhtml11/table.tag79
-rw-r--r--quanta/data/dtep/xhtml11/tbody.tag39
-rw-r--r--quanta/data/dtep/xhtml11/td.tag132
-rw-r--r--quanta/data/dtep/xhtml11/textarea.tag43
-rw-r--r--quanta/data/dtep/xhtml11/tfoot.tag38
-rw-r--r--quanta/data/dtep/xhtml11/th.tag132
-rw-r--r--quanta/data/dtep/xhtml11/thead.tag38
-rw-r--r--quanta/data/dtep/xhtml11/title.tag14
-rw-r--r--quanta/data/dtep/xhtml11/tr.tag44
-rw-r--r--quanta/data/dtep/xhtml11/tt.tag42
-rw-r--r--quanta/data/dtep/xhtml11/ul.tag11
-rw-r--r--quanta/data/dtep/xhtml11/var.tag42
-rw-r--r--quanta/data/dtep/xslt/Makefile.am2
-rw-r--r--quanta/data/dtep/xslt/apply-imports.tag6
-rw-r--r--quanta/data/dtep/xslt/attribute-set.tag24
-rw-r--r--quanta/data/dtep/xslt/attribute.tag24
-rw-r--r--quanta/data/dtep/xslt/call-template.tag15
-rw-r--r--quanta/data/dtep/xslt/choose.tag5
-rw-r--r--quanta/data/dtep/xslt/comment.tag6
-rw-r--r--quanta/data/dtep/xslt/copy-of.tag15
-rw-r--r--quanta/data/dtep/xslt/decimal-format.tag105
-rw-r--r--quanta/data/dtep/xslt/description.rc15
-rw-r--r--quanta/data/dtep/xslt/element.tag33
-rw-r--r--quanta/data/dtep/xslt/fallback.tag6
-rw-r--r--quanta/data/dtep/xslt/for-each.tag15
-rw-r--r--quanta/data/dtep/xslt/if.tag15
-rw-r--r--quanta/data/dtep/xslt/import.tag15
-rw-r--r--quanta/data/dtep/xslt/key.tag33
-rw-r--r--quanta/data/dtep/xslt/message.tag19
-rw-r--r--quanta/data/dtep/xslt/namespace-alias.tag24
-rw-r--r--quanta/data/dtep/xslt/number.tag95
-rw-r--r--quanta/data/dtep/xslt/otherwise.tag6
-rw-r--r--quanta/data/dtep/xslt/output.tag113
-rw-r--r--quanta/data/dtep/xslt/param.tag23
-rw-r--r--quanta/data/dtep/xslt/preserve-space.tag15
-rw-r--r--quanta/data/dtep/xslt/processing-instruction.tag15
-rw-r--r--quanta/data/dtep/xslt/sort.tag64
-rw-r--r--quanta/data/dtep/xslt/strip-space.tag15
-rw-r--r--quanta/data/dtep/xslt/stylesheet.tag42
-rw-r--r--quanta/data/dtep/xslt/template.tag42
-rw-r--r--quanta/data/dtep/xslt/text.tag19
-rw-r--r--quanta/data/dtep/xslt/transform.tag43
-rw-r--r--quanta/data/dtep/xslt/value-of.tag28
-rw-r--r--quanta/data/dtep/xslt/variable.tag24
-rw-r--r--quanta/data/dtep/xslt/when.tag15
-rw-r--r--quanta/data/dtep/xslt/with-param.tag24
-rw-r--r--quanta/data/icons/16x16/Makefile.am4
-rw-r--r--quanta/data/icons/16x16/debug_breakpoint.pngbin0 -> 745 bytes
-rw-r--r--quanta/data/icons/16x16/debug_connect.pngbin0 -> 1003 bytes
-rw-r--r--quanta/data/icons/16x16/debug_currentline.pngbin0 -> 133 bytes
-rw-r--r--quanta/data/icons/16x16/debug_disconnect.pngbin0 -> 1023 bytes
-rw-r--r--quanta/data/icons/16x16/debug_kill.pngbin0 -> 719 bytes
-rw-r--r--quanta/data/icons/16x16/debug_pause.pngbin0 -> 750 bytes
-rw-r--r--quanta/data/icons/16x16/delete.pngbin0 -> 892 bytes
-rw-r--r--quanta/data/icons/16x16/empty16x16.pngbin0 -> 141 bytes
-rw-r--r--quanta/data/icons/16x16/empty1x16.pngbin0 -> 229 bytes
-rw-r--r--quanta/data/icons/16x16/java.pngbin0 -> 862 bytes
-rw-r--r--quanta/data/icons/16x16/mini-book1.pngbin0 -> 290 bytes
-rw-r--r--quanta/data/icons/16x16/mini-book2.pngbin0 -> 1111 bytes
-rw-r--r--quanta/data/icons/16x16/mini-modules.pngbin0 -> 794 bytes
-rw-r--r--quanta/data/icons/16x16/tag_br_small.pngbin0 -> 308 bytes
-rw-r--r--quanta/data/icons/16x16/tag_font_small.pngbin0 -> 364 bytes
-rw-r--r--quanta/data/icons/16x16/tag_hr_small.pngbin0 -> 233 bytes
-rw-r--r--quanta/data/icons/22x22/Makefile.am172
-rw-r--r--quanta/data/icons/22x22/ball.pngbin0 -> 271 bytes
-rw-r--r--quanta/data/icons/22x22/button.pngbin0 -> 258 bytes
-rw-r--r--quanta/data/icons/22x22/check.pngbin0 -> 293 bytes
-rw-r--r--quanta/data/icons/22x22/check_clear.pngbin0 -> 186 bytes
-rw-r--r--quanta/data/icons/22x22/check_grey.pngbin0 -> 164 bytes
-rw-r--r--quanta/data/icons/22x22/css.pngbin0 -> 1133 bytes
-rw-r--r--quanta/data/icons/22x22/date.pngbin0 -> 357 bytes
-rw-r--r--quanta/data/icons/22x22/debug_leap.pngbin0 -> 244 bytes
-rw-r--r--quanta/data/icons/22x22/debug_run.pngbin0 -> 275 bytes
-rw-r--r--quanta/data/icons/22x22/debug_skip.pngbin0 -> 187 bytes
-rw-r--r--quanta/data/icons/22x22/debug_stepinto.pngbin0 -> 202 bytes
-rw-r--r--quanta/data/icons/22x22/debug_stepout.pngbin0 -> 204 bytes
-rw-r--r--quanta/data/icons/22x22/debug_stepover.pngbin0 -> 182 bytes
-rw-r--r--quanta/data/icons/22x22/div_center.pngbin0 -> 248 bytes
-rw-r--r--quanta/data/icons/22x22/div_justify.pngbin0 -> 232 bytes
-rw-r--r--quanta/data/icons/22x22/div_left.pngbin0 -> 243 bytes
-rw-r--r--quanta/data/icons/22x22/div_right.pngbin0 -> 248 bytes
-rw-r--r--quanta/data/icons/22x22/font_dec.pngbin0 -> 314 bytes
-rw-r--r--quanta/data/icons/22x22/font_inc.pngbin0 -> 324 bytes
-rw-r--r--quanta/data/icons/22x22/form.pngbin0 -> 244 bytes
-rw-r--r--quanta/data/icons/22x22/frame.pngbin0 -> 204 bytes
-rw-r--r--quanta/data/icons/22x22/ftab.pngbin0 -> 816 bytes
-rw-r--r--quanta/data/icons/22x22/ftpclient.pngbin0 -> 498 bytes
-rw-r--r--quanta/data/icons/22x22/lineedit.pngbin0 -> 299 bytes
-rw-r--r--quanta/data/icons/22x22/linepas.pngbin0 -> 306 bytes
-rw-r--r--quanta/data/icons/22x22/output_win.pngbin0 -> 358 bytes
-rw-r--r--quanta/data/icons/22x22/preview.pngbin0 -> 983 bytes
-rw-r--r--quanta/data/icons/22x22/ptab.pngbin0 -> 1356 bytes
-rw-r--r--quanta/data/icons/22x22/quick-screenshot.pngbin0 -> 369 bytes
-rw-r--r--quanta/data/icons/22x22/quick_list.pngbin0 -> 366 bytes
-rw-r--r--quanta/data/icons/22x22/quick_start.pngbin0 -> 802 bytes
-rw-r--r--quanta/data/icons/22x22/quick_table.pngbin0 -> 355 bytes
-rw-r--r--quanta/data/icons/22x22/radio.pngbin0 -> 309 bytes
-rw-r--r--quanta/data/icons/22x22/replace.pngbin0 -> 324 bytes
-rw-r--r--quanta/data/icons/22x22/reset.pngbin0 -> 310 bytes
-rw-r--r--quanta/data/icons/22x22/select.pngbin0 -> 325 bytes
-rw-r--r--quanta/data/icons/22x22/submit.pngbin0 -> 322 bytes
-rw-r--r--quanta/data/icons/22x22/table_data.pngbin0 -> 235 bytes
-rw-r--r--quanta/data/icons/22x22/table_head.pngbin0 -> 223 bytes
-rw-r--r--quanta/data/icons/22x22/tag_a.pngbin0 -> 359 bytes
-rw-r--r--quanta/data/icons/22x22/tag_a_url.pngbin0 -> 637 bytes
-rw-r--r--quanta/data/icons/22x22/tag_access.pngbin0 -> 206 bytes
-rw-r--r--quanta/data/icons/22x22/tag_all.pngbin0 -> 253 bytes
-rw-r--r--quanta/data/icons/22x22/tag_amp.pngbin0 -> 182 bytes
-rw-r--r--quanta/data/icons/22x22/tag_any.pngbin0 -> 268 bytes
-rw-r--r--quanta/data/icons/22x22/tag_anyAttribute.pngbin0 -> 2084 bytes
-rw-r--r--quanta/data/icons/22x22/tag_appInfo.pngbin0 -> 285 bytes
-rw-r--r--quanta/data/icons/22x22/tag_attr.pngbin0 -> 194 bytes
-rw-r--r--quanta/data/icons/22x22/tag_attribute.pngbin0 -> 124 bytes
-rw-r--r--quanta/data/icons/22x22/tag_attributeGroup.pngbin0 -> 184 bytes
-rw-r--r--quanta/data/icons/22x22/tag_bold.pngbin0 -> 296 bytes
-rw-r--r--quanta/data/icons/22x22/tag_br.pngbin0 -> 323 bytes
-rw-r--r--quanta/data/icons/22x22/tag_caption.pngbin0 -> 310 bytes
-rw-r--r--quanta/data/icons/22x22/tag_card.pngbin0 -> 188 bytes
-rw-r--r--quanta/data/icons/22x22/tag_cdata.pngbin0 -> 201 bytes
-rw-r--r--quanta/data/icons/22x22/tag_chapter.pngbin0 -> 891 bytes
-rw-r--r--quanta/data/icons/22x22/tag_choice.pngbin0 -> 234 bytes
-rw-r--r--quanta/data/icons/22x22/tag_comm.pngbin0 -> 226 bytes
-rw-r--r--quanta/data/icons/22x22/tag_complexContent.pngbin0 -> 406 bytes
-rw-r--r--quanta/data/icons/22x22/tag_complexType.pngbin0 -> 355 bytes
-rw-r--r--quanta/data/icons/22x22/tag_dd.pngbin0 -> 184 bytes
-rw-r--r--quanta/data/icons/22x22/tag_dl.pngbin0 -> 179 bytes
-rw-r--r--quanta/data/icons/22x22/tag_do.pngbin0 -> 157 bytes
-rw-r--r--quanta/data/icons/22x22/tag_documenation.pngbin0 -> 213 bytes
-rw-r--r--quanta/data/icons/22x22/tag_dt.pngbin0 -> 177 bytes
-rw-r--r--quanta/data/icons/22x22/tag_element.pngbin0 -> 184 bytes
-rw-r--r--quanta/data/icons/22x22/tag_em.pngbin0 -> 159 bytes
-rw-r--r--quanta/data/icons/22x22/tag_example.pngbin0 -> 740 bytes
-rw-r--r--quanta/data/icons/22x22/tag_extension.pngbin0 -> 211 bytes
-rw-r--r--quanta/data/icons/22x22/tag_field.pngbin0 -> 185 bytes
-rw-r--r--quanta/data/icons/22x22/tag_font.pngbin0 -> 381 bytes
-rw-r--r--quanta/data/icons/22x22/tag_font_base.pngbin0 -> 398 bytes
-rw-r--r--quanta/data/icons/22x22/tag_footnote.pngbin0 -> 837 bytes
-rw-r--r--quanta/data/icons/22x22/tag_footnoteref.pngbin0 -> 957 bytes
-rw-r--r--quanta/data/icons/22x22/tag_fractionDigits.pngbin0 -> 160 bytes
-rw-r--r--quanta/data/icons/22x22/tag_go.pngbin0 -> 206 bytes
-rw-r--r--quanta/data/icons/22x22/tag_group.pngbin0 -> 345 bytes
-rw-r--r--quanta/data/icons/22x22/tag_guimenu.pngbin0 -> 236 bytes
-rw-r--r--quanta/data/icons/22x22/tag_guimenuitem.pngbin0 -> 229 bytes
-rw-r--r--quanta/data/icons/22x22/tag_guisubmenu.pngbin0 -> 237 bytes
-rw-r--r--quanta/data/icons/22x22/tag_h1.pngbin0 -> 298 bytes
-rw-r--r--quanta/data/icons/22x22/tag_h2.pngbin0 -> 319 bytes
-rw-r--r--quanta/data/icons/22x22/tag_h3.pngbin0 -> 320 bytes
-rw-r--r--quanta/data/icons/22x22/tag_h4.pngbin0 -> 309 bytes
-rw-r--r--quanta/data/icons/22x22/tag_h5.pngbin0 -> 310 bytes
-rw-r--r--quanta/data/icons/22x22/tag_head.pngbin0 -> 183 bytes
-rw-r--r--quanta/data/icons/22x22/tag_hr.pngbin0 -> 166 bytes
-rw-r--r--quanta/data/icons/22x22/tag_i.pngbin0 -> 303 bytes
-rw-r--r--quanta/data/icons/22x22/tag_image.pngbin0 -> 909 bytes
-rw-r--r--quanta/data/icons/22x22/tag_imagedata.pngbin0 -> 755 bytes
-rw-r--r--quanta/data/icons/22x22/tag_import.pngbin0 -> 296 bytes
-rw-r--r--quanta/data/icons/22x22/tag_include.pngbin0 -> 219 bytes
-rw-r--r--quanta/data/icons/22x22/tag_informalexample.pngbin0 -> 202 bytes
-rw-r--r--quanta/data/icons/22x22/tag_inlinemediaobject.pngbin0 -> 623 bytes
-rw-r--r--quanta/data/icons/22x22/tag_key.pngbin0 -> 234 bytes
-rw-r--r--quanta/data/icons/22x22/tag_keycap.pngbin0 -> 478 bytes
-rw-r--r--quanta/data/icons/22x22/tag_keycombo.pngbin0 -> 612 bytes
-rw-r--r--quanta/data/icons/22x22/tag_keyref.pngbin0 -> 280 bytes
-rw-r--r--quanta/data/icons/22x22/tag_label.pngbin0 -> 265 bytes
-rw-r--r--quanta/data/icons/22x22/tag_li.pngbin0 -> 312 bytes
-rw-r--r--quanta/data/icons/22x22/tag_link.pngbin0 -> 772 bytes
-rw-r--r--quanta/data/icons/22x22/tag_list.pngbin0 -> 268 bytes
-rw-r--r--quanta/data/icons/22x22/tag_listitem.pngbin0 -> 110 bytes
-rw-r--r--quanta/data/icons/22x22/tag_loc.pngbin0 -> 446 bytes
-rw-r--r--quanta/data/icons/22x22/tag_mail.pngbin0 -> 599 bytes
-rw-r--r--quanta/data/icons/22x22/tag_member.pngbin0 -> 109 bytes
-rw-r--r--quanta/data/icons/22x22/tag_menu.pngbin0 -> 232 bytes
-rw-r--r--quanta/data/icons/22x22/tag_menuchoice.pngbin0 -> 244 bytes
-rw-r--r--quanta/data/icons/22x22/tag_meta.pngbin0 -> 235 bytes
-rw-r--r--quanta/data/icons/22x22/tag_misc.pngbin0 -> 224 bytes
-rw-r--r--quanta/data/icons/22x22/tag_nbsp.pngbin0 -> 320 bytes
-rw-r--r--quanta/data/icons/22x22/tag_noop.pngbin0 -> 162 bytes
-rw-r--r--quanta/data/icons/22x22/tag_notation.pngbin0 -> 611 bytes
-rw-r--r--quanta/data/icons/22x22/tag_ol.pngbin0 -> 285 bytes
-rw-r--r--quanta/data/icons/22x22/tag_onevent.pngbin0 -> 256 bytes
-rw-r--r--quanta/data/icons/22x22/tag_p.pngbin0 -> 324 bytes
-rw-r--r--quanta/data/icons/22x22/tag_para.pngbin0 -> 130 bytes
-rw-r--r--quanta/data/icons/22x22/tag_postfield.pngbin0 -> 262 bytes
-rw-r--r--quanta/data/icons/22x22/tag_pre.pngbin0 -> 309 bytes
-rw-r--r--quanta/data/icons/22x22/tag_procedure.pngbin0 -> 662 bytes
-rw-r--r--quanta/data/icons/22x22/tag_redefine.pngbin0 -> 606 bytes
-rw-r--r--quanta/data/icons/22x22/tag_restriction.pngbin0 -> 265 bytes
-rw-r--r--quanta/data/icons/22x22/tag_schema.pngbin0 -> 308 bytes
-rw-r--r--quanta/data/icons/22x22/tag_screenshot.pngbin0 -> 239 bytes
-rw-r--r--quanta/data/icons/22x22/tag_screenshotinfo.pngbin0 -> 303 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sect1.pngbin0 -> 794 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sect2.pngbin0 -> 817 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sect3.pngbin0 -> 817 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sect4.pngbin0 -> 795 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sect5.pngbin0 -> 812 bytes
-rw-r--r--quanta/data/icons/22x22/tag_selector.pngbin0 -> 231 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sequence.pngbin0 -> 231 bytes
-rw-r--r--quanta/data/icons/22x22/tag_setvar.pngbin0 -> 194 bytes
-rw-r--r--quanta/data/icons/22x22/tag_shortcut.pngbin0 -> 241 bytes
-rw-r--r--quanta/data/icons/22x22/tag_simpleContent.pngbin0 -> 365 bytes
-rw-r--r--quanta/data/icons/22x22/tag_simpleType.pngbin0 -> 289 bytes
-rw-r--r--quanta/data/icons/22x22/tag_step.pngbin0 -> 491 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sub.pngbin0 -> 301 bytes
-rw-r--r--quanta/data/icons/22x22/tag_substeps.pngbin0 -> 406 bytes
-rw-r--r--quanta/data/icons/22x22/tag_sup.pngbin0 -> 305 bytes
-rw-r--r--quanta/data/icons/22x22/tag_table.pngbin0 -> 228 bytes
-rw-r--r--quanta/data/icons/22x22/tag_table_body.pngbin0 -> 218 bytes
-rw-r--r--quanta/data/icons/22x22/tag_table_row.pngbin0 -> 233 bytes
-rw-r--r--quanta/data/icons/22x22/tag_tag.pngbin0 -> 239 bytes
-rw-r--r--quanta/data/icons/22x22/tag_tbody.pngbin0 -> 211 bytes
-rw-r--r--quanta/data/icons/22x22/tag_td.pngbin0 -> 230 bytes
-rw-r--r--quanta/data/icons/22x22/tag_term.pngbin0 -> 171 bytes
-rw-r--r--quanta/data/icons/22x22/tag_tgroup.pngbin0 -> 232 bytes
-rw-r--r--quanta/data/icons/22x22/tag_th.pngbin0 -> 236 bytes
-rw-r--r--quanta/data/icons/22x22/tag_title.pngbin0 -> 622 bytes
-rw-r--r--quanta/data/icons/22x22/tag_tr.pngbin0 -> 232 bytes
-rw-r--r--quanta/data/icons/22x22/tag_u.pngbin0 -> 295 bytes
-rw-r--r--quanta/data/icons/22x22/tag_ul.pngbin0 -> 262 bytes
-rw-r--r--quanta/data/icons/22x22/tag_ulink.pngbin0 -> 1262 bytes
-rw-r--r--quanta/data/icons/22x22/tag_union.pngbin0 -> 348 bytes
-rw-r--r--quanta/data/icons/22x22/tag_unique.pngbin0 -> 160 bytes
-rw-r--r--quanta/data/icons/22x22/tag_variablelist.pngbin0 -> 173 bytes
-rw-r--r--quanta/data/icons/22x22/tag_varlistentry.pngbin0 -> 178 bytes
-rw-r--r--quanta/data/icons/22x22/tag_varlistitem.pngbin0 -> 172 bytes
-rw-r--r--quanta/data/icons/22x22/tag_what.pngbin0 -> 249 bytes
-rw-r--r--quanta/data/icons/22x22/tag_wml.pngbin0 -> 179 bytes
-rw-r--r--quanta/data/icons/22x22/tag_xref.pngbin0 -> 751 bytes
-rw-r--r--quanta/data/icons/22x22/textarea.pngbin0 -> 317 bytes
-rw-r--r--quanta/data/icons/22x22/tree_win.pngbin0 -> 394 bytes
-rw-r--r--quanta/data/icons/22x22/ttab.pngbin0 -> 1104 bytes
-rw-r--r--quanta/data/icons/22x22/view_text.pngbin0 -> 801 bytes
-rw-r--r--quanta/data/icons/22x22/vpl.pngbin0 -> 732 bytes
-rw-r--r--quanta/data/icons/22x22/vpl_text.pngbin0 -> 950 bytes
-rw-r--r--quanta/data/icons/22x22/xmlval.pngbin0 -> 455 bytes
-rw-r--r--quanta/data/icons/22x22/xsltproc.pngbin0 -> 257 bytes
-rw-r--r--quanta/data/icons/Makefile.am4
-rw-r--r--quanta/data/icons/files.pngbin0 -> 1942 bytes
-rw-r--r--quanta/data/icons/hi16-app-quanta.pngbin0 -> 906 bytes
-rw-r--r--quanta/data/icons/hi16-app-quanta_be.pngbin0 -> 906 bytes
-rw-r--r--quanta/data/icons/hi22-app-quanta.pngbin0 -> 1419 bytes
-rw-r--r--quanta/data/icons/hi22-app-quanta_be.pngbin0 -> 1419 bytes
-rw-r--r--quanta/data/icons/hi32-app-quanta.pngbin0 -> 2489 bytes
-rw-r--r--quanta/data/icons/hi32-app-quanta_be.pngbin0 -> 2489 bytes
-rw-r--r--quanta/data/icons/hi48-app-quanta.pngbin0 -> 4629 bytes
-rw-r--r--quanta/data/icons/hi48-app-quanta_be.pngbin0 -> 4629 bytes
-rw-r--r--quanta/data/pics/Makefile.am3
-rw-r--r--quanta/data/pics/quantalogo.pngbin0 -> 67892 bytes
-rw-r--r--quanta/data/pics/quantalogo_be.pngbin0 -> 57598 bytes
-rw-r--r--quanta/data/pics/wiznewprjfin.pngbin0 -> 40294 bytes
-rw-r--r--quanta/data/pics/wiznewprjglb.pngbin0 -> 39644 bytes
-rw-r--r--quanta/data/pics/wiznewprjloc.pngbin0 -> 40448 bytes
-rw-r--r--quanta/data/pics/wiznewprjweb.pngbin0 -> 40448 bytes
-rw-r--r--quanta/data/templates/Makefile.am1
-rw-r--r--quanta/data/templates/binaries/Makefile.am7
-rw-r--r--quanta/data/templates/binaries/dirinfo6
-rw-r--r--quanta/data/templates/binaries/images/Makefile.am2
-rw-r--r--quanta/data/templates/binaries/images/jpg/Makefile.am2
-rw-r--r--quanta/data/templates/binaries/images/jpg/demo.jpgbin0 -> 1708 bytes
-rw-r--r--quanta/data/templates/binaries/images/others/Makefile.am2
-rw-r--r--quanta/data/templates/binaries/images/others/demo.tifbin0 -> 168 bytes
-rw-r--r--quanta/data/templates/binaries/images/png/Makefile.am2
-rw-r--r--quanta/data/templates/binaries/images/png/demo.pngbin0 -> 12773 bytes
-rw-r--r--quanta/data/templates/binaries/others/Makefile.am2
-rw-r--r--quanta/data/templates/binaries/others/print.pdfbin0 -> 3547 bytes
-rw-r--r--quanta/data/templates/documents/Makefile.am7
-rw-r--r--quanta/data/templates/documents/dirinfo6
-rw-r--r--quanta/data/templates/documents/html/Makefile.am2
-rw-r--r--quanta/data/templates/documents/html/demo.html1
-rw-r--r--quanta/data/templates/documents/others/Makefile.am2
-rw-r--r--quanta/data/templates/documents/others/demo.txt2
-rw-r--r--quanta/data/templates/documents/scripts/Makefile.am2
-rw-r--r--quanta/data/templates/documents/scripts/demo.script1
-rw-r--r--quanta/data/templates/images/Makefile.am7
-rw-r--r--quanta/data/templates/images/banners/Makefile.am2
-rw-r--r--quanta/data/templates/images/banners/demo.jpgbin0 -> 1708 bytes
-rw-r--r--quanta/data/templates/images/buttons/Makefile.am2
-rw-r--r--quanta/data/templates/images/buttons/ball.pngbin0 -> 271 bytes
-rw-r--r--quanta/data/templates/images/dirinfo4
-rw-r--r--quanta/data/templates/images/jpg/Makefile.am2
-rw-r--r--quanta/data/templates/images/jpg/demo.jpgbin0 -> 1708 bytes
-rw-r--r--quanta/data/templates/images/others/Makefile.am2
-rw-r--r--quanta/data/templates/images/others/demo.tifbin0 -> 168 bytes
-rw-r--r--quanta/data/templates/images/png/Makefile.am2
-rw-r--r--quanta/data/templates/images/png/demo.pngbin0 -> 12773 bytes
-rw-r--r--quanta/data/templates/pages/Makefile.am7
-rw-r--r--quanta/data/templates/pages/dirinfo4
-rw-r--r--quanta/data/templates/pages/docbook/Makefile.am2
-rw-r--r--quanta/data/templates/pages/docbook/kde-doc-template.docbook568
-rw-r--r--quanta/data/templates/pages/html/Makefile.am1
-rw-r--r--quanta/data/templates/pages/html/html_4.0.1/Makefile.am2
-rw-r--r--quanta/data/templates/pages/html/html_4.0.1/basic.html18
-rw-r--r--quanta/data/templates/pages/html/special/Makefile.am2
-rw-r--r--quanta/data/templates/pages/html/special/drag_n_drop_men.html156
-rw-r--r--quanta/data/templates/pages/html/xhtml/Makefile.am2
-rw-r--r--quanta/data/templates/pages/html/xhtml/Quanta_Times.html103
-rw-r--r--quanta/data/templates/pages/html/xhtml/leftMen_BB.html75
-rw-r--r--quanta/data/templates/pages/html/xhtml/leftMen_Quanta.html86
-rw-r--r--quanta/data/templates/pages/html/xhtml/rightMen_BB.html74
-rw-r--r--quanta/data/templates/pages/html/xhtml/rightMen_Quanta.html86
-rw-r--r--quanta/data/templates/pages/html/xhtml/twoSideMen_BB.html94
-rw-r--r--quanta/data/templates/pages/html/xhtml/twoSideMen_Quanta.html108
-rw-r--r--quanta/data/templates/pages/php/Makefile.am2
-rw-r--r--quanta/data/templates/pages/php/demo.php5
-rw-r--r--quanta/data/templates/scripts/Makefile.am7
-rw-r--r--quanta/data/templates/scripts/dirinfo6
-rw-r--r--quanta/data/templates/scripts/javascript/Makefile.am2
-rw-r--r--quanta/data/templates/scripts/javascript/email_validate.js63
-rw-r--r--quanta/data/templates/scripts/javascript/overlib.js1222
-rw-r--r--quanta/data/templates/scripts/javascript/preload.js24
-rw-r--r--quanta/data/templates/scripts/perl/Makefile.am2
-rw-r--r--quanta/data/templates/scripts/perl/demo.perl1
-rw-r--r--quanta/data/templates/scripts/php/Makefile.am2
-rw-r--r--quanta/data/templates/scripts/php/demo.php5
-rw-r--r--quanta/data/templates/text/Makefile.am7
-rw-r--r--quanta/data/templates/text/dirinfo6
-rw-r--r--quanta/data/templates/text/html/Makefile.am2
-rw-r--r--quanta/data/templates/text/html/demo.html1
-rw-r--r--quanta/data/templates/text/others/Makefile.am2
-rw-r--r--quanta/data/templates/text/others/demo.txt1
-rw-r--r--quanta/data/templates/text/scripts/Makefile.am2
-rw-r--r--quanta/data/templates/text/scripts/demo.php5
-rw-r--r--quanta/data/tips369
-rw-r--r--quanta/data/toolbars/Makefile.am4
-rw-r--r--quanta/data/toolbars/cfml/Makefile.am2
-rw-r--r--quanta/data/toolbars/cfml/cfml.toolbar.tgzbin0 -> 571 bytes
-rw-r--r--quanta/data/toolbars/cfml/fonts.toolbar.tgzbin0 -> 949 bytes
-rw-r--r--quanta/data/toolbars/cfml/forms.toolbar.tgzbin0 -> 635 bytes
-rw-r--r--quanta/data/toolbars/cfml/lists.toolbar.tgzbin0 -> 519 bytes
-rw-r--r--quanta/data/toolbars/cfml/standard.toolbar.tgzbin0 -> 1584 bytes
-rw-r--r--quanta/data/toolbars/cfml/tables.toolbar.tgzbin0 -> 616 bytes
-rw-r--r--quanta/data/toolbars/css/Makefile.am2
-rw-r--r--quanta/data/toolbars/css/css.toolbar.tgzbin0 -> 303 bytes
-rw-r--r--quanta/data/toolbars/debug.toolbar.tgzbin0 -> 432 bytes
-rw-r--r--quanta/data/toolbars/docbook/Makefile.am5
-rw-r--r--quanta/data/toolbars/docbook/docbook_code.toolbar.tgzbin0 -> 749 bytes
-rw-r--r--quanta/data/toolbars/docbook/docbook_ui.toolbar.tgzbin0 -> 677 bytes
-rw-r--r--quanta/data/toolbars/docbook/docbook_xml.toolbar.tgzbin0 -> 1383 bytes
-rw-r--r--quanta/data/toolbars/docbook/xmltools.toolbar.tgzbin0 -> 509 bytes
-rw-r--r--quanta/data/toolbars/html/Makefile.am2
-rw-r--r--quanta/data/toolbars/html/forms.toolbar.tgzbin0 -> 873 bytes
-rw-r--r--quanta/data/toolbars/html/lists.toolbar.tgzbin0 -> 519 bytes
-rw-r--r--quanta/data/toolbars/html/other.toolbar.tgzbin0 -> 695 bytes
-rw-r--r--quanta/data/toolbars/html/standard.toolbar.tgzbin0 -> 1722 bytes
-rw-r--r--quanta/data/toolbars/html/style.toolbar.tgzbin0 -> 2219 bytes
-rw-r--r--quanta/data/toolbars/html/tables.toolbar.tgzbin0 -> 655 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/Makefile.am8
-rw-r--r--quanta/data/toolbars/kde-docbook/kde-docbook-admonitions.toolbar.tgzbin0 -> 751 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/kde-docbook-images.toolbar.tgzbin0 -> 852 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/kde-docbook-list.toolbar.tgzbin0 -> 897 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/kde-docbook-standard.toolbar.tgzbin0 -> 720 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/kde-docbook-tables.toolbar.tgzbin0 -> 771 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/kde-docbook-uielements.toolbar.tgzbin0 -> 700 bytes
-rw-r--r--quanta/data/toolbars/kde-docbook/kdexmltools.toolbar.tgzbin0 -> 498 bytes
-rw-r--r--quanta/data/toolbars/schema/Makefile.am3
-rw-r--r--quanta/data/toolbars/schema/attributes.toolbar.tgzbin0 -> 456 bytes
-rw-r--r--quanta/data/toolbars/schema/complex.toolbar.tgzbin0 -> 799 bytes
-rw-r--r--quanta/data/toolbars/schema/documentation.toolbar.tgzbin0 -> 495 bytes
-rw-r--r--quanta/data/toolbars/schema/facets.toolbar.tgzbin0 -> 724 bytes
-rw-r--r--quanta/data/toolbars/schema/main.toolbar.tgzbin0 -> 572 bytes
-rw-r--r--quanta/data/toolbars/schema/misc.toolbar.tgzbin0 -> 573 bytes
-rw-r--r--quanta/data/toolbars/schema/simple.toolbar.tgzbin0 -> 509 bytes
-rw-r--r--quanta/data/toolbars/tagxml/Makefile.am2
-rw-r--r--quanta/data/toolbars/tagxml/tagxml.toolbar.tgzbin0 -> 992 bytes
-rw-r--r--quanta/data/toolbars/wml-1-2/Makefile.am2
-rw-r--r--quanta/data/toolbars/wml-1-2/deck.toolbar.tgzbin0 -> 577 bytes
-rw-r--r--quanta/data/toolbars/wml-1-2/forms.toolbar.tgzbin0 -> 688 bytes
-rw-r--r--quanta/data/toolbars/wml-1-2/misc.toolbar.tgzbin0 -> 896 bytes
-rw-r--r--quanta/data/toolbars/wml-1-2/table.toolbar.tgzbin0 -> 427 bytes
-rw-r--r--quanta/data/toolbars/wml-1-2/tasks.toolbar.tgzbin0 -> 648 bytes
-rw-r--r--quanta/data/toolbars/wml-1-2/text.toolbar.tgzbin0 -> 1005 bytes
-rw-r--r--quanta/data/toolbars/xml/Makefile.am2
-rw-r--r--quanta/data/toolbars/xml/fonts.toolbar.tgzbin0 -> 949 bytes
-rw-r--r--quanta/dialogs/Makefile.am18
-rw-r--r--quanta/dialogs/actionconfigdialog.cpp933
-rw-r--r--quanta/dialogs/actionconfigdialog.h92
-rw-r--r--quanta/dialogs/actionconfigdialogs.ui1001
-rw-r--r--quanta/dialogs/casewidget.ui108
-rw-r--r--quanta/dialogs/copyto.cpp127
-rw-r--r--quanta/dialogs/copyto.h53
-rw-r--r--quanta/dialogs/debuggeroptionss.ui141
-rw-r--r--quanta/dialogs/dirtydialog.ui154
-rw-r--r--quanta/dialogs/dirtydlg.cpp112
-rw-r--r--quanta/dialogs/dirtydlg.h55
-rw-r--r--quanta/dialogs/donationdialog.ui155
-rw-r--r--quanta/dialogs/dtdselectdialog.ui112
-rw-r--r--quanta/dialogs/dtepeditdlg.cpp556
-rw-r--r--quanta/dialogs/dtepeditdlg.h89
-rw-r--r--quanta/dialogs/dtepeditdlgs.ui1967
-rw-r--r--quanta/dialogs/dtepstructureeditdlgs.ui646
-rw-r--r--quanta/dialogs/filecombo.cpp122
-rw-r--r--quanta/dialogs/filecombo.h62
-rw-r--r--quanta/dialogs/fourbuttonmessagebox.ui164
-rw-r--r--quanta/dialogs/fourbuttonmessagebox.ui.h51
-rw-r--r--quanta/dialogs/loadentitydlgs.ui72
-rw-r--r--quanta/dialogs/settings/Makefile.am13
-rw-r--r--quanta/dialogs/settings/abbreviation.cpp277
-rw-r--r--quanta/dialogs/settings/abbreviation.h53
-rw-r--r--quanta/dialogs/settings/abbreviations.ui354
-rw-r--r--quanta/dialogs/settings/codetemplatedlgs.ui81
-rw-r--r--quanta/dialogs/settings/filemasks.cpp67
-rw-r--r--quanta/dialogs/settings/filemasks.h35
-rw-r--r--quanta/dialogs/settings/filemaskss.ui336
-rw-r--r--quanta/dialogs/settings/parseroptions.cpp86
-rw-r--r--quanta/dialogs/settings/parseroptions.h37
-rw-r--r--quanta/dialogs/settings/parseroptionsui.ui314
-rw-r--r--quanta/dialogs/settings/previewoptions.cpp127
-rw-r--r--quanta/dialogs/settings/previewoptions.h50
-rw-r--r--quanta/dialogs/settings/previewoptionss.ui280
-rw-r--r--quanta/dialogs/settings/styleoptionss.ui201
-rw-r--r--quanta/dialogs/specialchardialog.cpp88
-rw-r--r--quanta/dialogs/specialchardialog.h46
-rw-r--r--quanta/dialogs/specialchardialogs.ui153
-rw-r--r--quanta/dialogs/tagdialogs/Makefile.am18
-rw-r--r--quanta/dialogs/tagdialogs/colorcombo.cpp313
-rw-r--r--quanta/dialogs/tagdialogs/colorcombo.h85
-rw-r--r--quanta/dialogs/tagdialogs/corewidgetdlg.cpp76
-rw-r--r--quanta/dialogs/tagdialogs/listdlg.cpp60
-rw-r--r--quanta/dialogs/tagdialogs/listdlg.h45
-rw-r--r--quanta/dialogs/tagdialogs/pictureview.cpp103
-rw-r--r--quanta/dialogs/tagdialogs/pictureview.h59
-rw-r--r--quanta/dialogs/tagdialogs/tagattr.cpp97
-rw-r--r--quanta/dialogs/tagdialogs/tagattr.h137
-rw-r--r--quanta/dialogs/tagdialogs/tagdialog.cpp486
-rw-r--r--quanta/dialogs/tagdialogs/tagdialog.h102
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlg.cpp170
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlg.h93
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlgdata.cpp129
-rw-r--r--quanta/dialogs/tagdialogs/tagmail.ui130
-rw-r--r--quanta/dialogs/tagdialogs/tagmaildlg.cpp108
-rw-r--r--quanta/dialogs/tagdialogs/tagmaildlg.h35
-rw-r--r--quanta/dialogs/tagdialogs/tagmisc.ui68
-rw-r--r--quanta/dialogs/tagdialogs/tagmiscdlg.cpp54
-rw-r--r--quanta/dialogs/tagdialogs/tagmiscdlg.h42
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlg.cpp41
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlg.h54
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp63
-rw-r--r--quanta/dialogs/tagdialogs/tagwidget.cpp119
-rw-r--r--quanta/dialogs/tagdialogs/tagwidget.h56
-rw-r--r--quanta/dialogs/tagdialogs/tagxml.cpp343
-rw-r--r--quanta/dialogs/tagdialogs/tagxml.h56
-rw-r--r--quanta/messages/Makefile.am13
-rw-r--r--quanta/messages/annotationoutput.cpp355
-rw-r--r--quanta/messages/annotationoutput.h90
-rw-r--r--quanta/messages/messageitem.cpp92
-rw-r--r--quanta/messages/messageitem.h54
-rw-r--r--quanta/messages/messageoutput.cpp179
-rw-r--r--quanta/messages/messageoutput.h90
-rw-r--r--quanta/parsers/Makefile.am16
-rw-r--r--quanta/parsers/dtd/Makefile.am11
-rw-r--r--quanta/parsers/dtd/dtd.cpp415
-rw-r--r--quanta/parsers/dtd/dtd.h64
-rw-r--r--quanta/parsers/dtd/dtdparser.cpp362
-rw-r--r--quanta/parsers/dtd/dtdparser.h55
-rw-r--r--quanta/parsers/dtd/dtepcreationdlg.ui152
-rw-r--r--quanta/parsers/node.cpp559
-rw-r--r--quanta/parsers/node.h185
-rw-r--r--quanta/parsers/parser.cpp1757
-rw-r--r--quanta/parsers/parser.h160
-rw-r--r--quanta/parsers/parsercommon.cpp256
-rw-r--r--quanta/parsers/parsercommon.h59
-rw-r--r--quanta/parsers/qtag.cpp260
-rw-r--r--quanta/parsers/qtag.h283
-rw-r--r--quanta/parsers/sagroupparser.cpp311
-rw-r--r--quanta/parsers/sagroupparser.h63
-rw-r--r--quanta/parsers/saparser.cpp986
-rw-r--r--quanta/parsers/saparser.h150
-rw-r--r--quanta/parsers/tag.cpp672
-rw-r--r--quanta/parsers/tag.h212
-rw-r--r--quanta/parts/Makefile.am8
-rw-r--r--quanta/parts/kafka/ChangeLog25
-rw-r--r--quanta/parts/kafka/DESIGN131
-rw-r--r--quanta/parts/kafka/Makefile.am25
-rw-r--r--quanta/parts/kafka/configure.in.in42
-rw-r--r--quanta/parts/kafka/cursors.cpp103
-rw-r--r--quanta/parts/kafka/cursors.h150
-rw-r--r--quanta/parts/kafka/domtreeview.cpp157
-rw-r--r--quanta/parts/kafka/domtreeview.h77
-rw-r--r--quanta/parts/kafka/entities112
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.cpp748
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.h91
-rw-r--r--quanta/parts/kafka/htmldocumentpropertiesui.ui456
-rw-r--r--quanta/parts/kafka/htmlenhancer.cpp392
-rw-r--r--quanta/parts/kafka/htmlenhancer.h105
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp4257
-rw-r--r--quanta/parts/kafka/kafkacommon.h1177
-rw-r--r--quanta/parts/kafka/kafkadragobject.cpp90
-rw-r--r--quanta/parts/kafka/kafkadragobject.h50
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp2272
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.h315
-rw-r--r--quanta/parts/kafka/kafkaresource.h34
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.cpp85
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.h39
-rw-r--r--quanta/parts/kafka/kafkasyncoptionsui.ui196
-rw-r--r--quanta/parts/kafka/nodeenhancer.h76
-rw-r--r--quanta/parts/kafka/nodeproperties.cpp37
-rw-r--r--quanta/parts/kafka/nodeproperties.h154
-rw-r--r--quanta/parts/kafka/pics/Makefile.am2
-rw-r--r--quanta/parts/kafka/pics/comment.pngbin0 -> 278 bytes
-rw-r--r--quanta/parts/kafka/pics/php.pngbin0 -> 1147 bytes
-rw-r--r--quanta/parts/kafka/undoredo.cpp1539
-rw-r--r--quanta/parts/kafka/undoredo.h453
-rw-r--r--quanta/parts/kafka/wkafkapart.cpp2407
-rw-r--r--quanta/parts/kafka/wkafkapart.h473
-rw-r--r--quanta/parts/preview/Makefile.am7
-rw-r--r--quanta/parts/preview/whtmlpart.cpp189
-rw-r--r--quanta/parts/preview/whtmlpart.h76
-rw-r--r--quanta/plugins/Makefile.am15
-rw-r--r--quanta/plugins/pluginconfig.ui270
-rw-r--r--quanta/plugins/plugineditor.ui208
-rw-r--r--quanta/plugins/quantaplugin.cpp395
-rw-r--r--quanta/plugins/quantaplugin.h128
-rw-r--r--quanta/plugins/quantapluginconfig.cpp94
-rw-r--r--quanta/plugins/quantapluginconfig.h48
-rw-r--r--quanta/plugins/quantaplugineditor.cpp240
-rw-r--r--quanta/plugins/quantaplugineditor.h79
-rw-r--r--quanta/plugins/quantaplugininterface.cpp271
-rw-r--r--quanta/plugins/quantaplugininterface.h103
-rw-r--r--quanta/project/Makefile.am26
-rw-r--r--quanta/project/eventconfigurationdlg.cpp151
-rw-r--r--quanta/project/eventconfigurationdlg.h50
-rw-r--r--quanta/project/eventconfigurationdlgs.ui223
-rw-r--r--quanta/project/eventeditordlg.cpp407
-rw-r--r--quanta/project/eventeditordlg.h57
-rw-r--r--quanta/project/eventeditordlgs.ui236
-rw-r--r--quanta/project/membereditdlg.cpp183
-rw-r--r--quanta/project/membereditdlg.h40
-rw-r--r--quanta/project/membereditdlgs.ui196
-rw-r--r--quanta/project/project.cpp1428
-rw-r--r--quanta/project/project.h220
-rw-r--r--quanta/project/projectlist.cpp187
-rw-r--r--quanta/project/projectlist.h115
-rw-r--r--quanta/project/projectnewfinal.cpp42
-rw-r--r--quanta/project/projectnewfinal.h36
-rw-r--r--quanta/project/projectnewfinals.ui296
-rw-r--r--quanta/project/projectnewgeneral.cpp254
-rw-r--r--quanta/project/projectnewgeneral.h58
-rw-r--r--quanta/project/projectnewgenerals.ui454
-rw-r--r--quanta/project/projectnewlocal.cpp361
-rw-r--r--quanta/project/projectnewlocal.h57
-rw-r--r--quanta/project/projectnewlocals.ui344
-rw-r--r--quanta/project/projectnewweb.cpp245
-rw-r--r--quanta/project/projectnewweb.h75
-rw-r--r--quanta/project/projectnewwebs.ui292
-rw-r--r--quanta/project/projectoptions.ui540
-rw-r--r--quanta/project/projectoptions.ui.h52
-rw-r--r--quanta/project/projectprivate.cpp1675
-rw-r--r--quanta/project/projectprivate.h255
-rw-r--r--quanta/project/projectupload.cpp819
-rw-r--r--quanta/project/projectupload.h118
-rw-r--r--quanta/project/projectuploads.ui497
-rw-r--r--quanta/project/projecturl.h64
-rw-r--r--quanta/project/rescanprj.cpp249
-rw-r--r--quanta/project/rescanprj.h68
-rw-r--r--quanta/project/rescanprjdir.ui255
-rw-r--r--quanta/project/subprojecteditdlgs.ui73
-rw-r--r--quanta/project/teammembersdlg.cpp263
-rw-r--r--quanta/project/teammembersdlg.h52
-rw-r--r--quanta/project/teammembersdlgs.ui249
-rw-r--r--quanta/project/uploadprofiledlgs.ui310
-rw-r--r--quanta/project/uploadprofiles.cpp120
-rw-r--r--quanta/project/uploadprofiles.h108
-rw-r--r--quanta/project/uploadprofilespage.ui125
-rw-r--r--quanta/project/uploadprofilespage.ui.h31
-rw-r--r--quanta/quanta.kdevelop338
-rw-r--r--quanta/quanta.lsm14
-rw-r--r--quanta/quanta_uml.xmi3425
-rw-r--r--quanta/scripts/Makefile.am17
-rw-r--r--quanta/scripts/TemplateMagic.pl380
-rw-r--r--quanta/scripts/TemplateMagic.pl.info14
-rwxr-xr-xquanta/scripts/checkxml.kmdr286
-rw-r--r--quanta/scripts/checkxml.kmdr.info14
-rwxr-xr-xquanta/scripts/docbook_table.kmdr250
-rwxr-xr-xquanta/scripts/dwt.kmdr192
-rw-r--r--quanta/scripts/dwt.kmdr.info14
-rw-r--r--quanta/scripts/dwt.pl409
-rw-r--r--quanta/scripts/dwt.pl.info13
-rw-r--r--quanta/scripts/externalpreview.sh22
-rw-r--r--quanta/scripts/externalpreview.sh.info14
-rwxr-xr-xquanta/scripts/gubed_install.kmdr295
-rw-r--r--quanta/scripts/gubed_install.kmdr.info13
-rwxr-xr-xquanta/scripts/htmlquickstart.kmdr987
-rw-r--r--quanta/scripts/htmlquickstart.kmdr.info14
-rw-r--r--quanta/scripts/info.css13
-rw-r--r--quanta/scripts/info.xsl73
-rwxr-xr-xquanta/scripts/listwizard.kmdr441
-rwxr-xr-xquanta/scripts/meinproc.kmdr284
-rw-r--r--quanta/scripts/meinproc.kmdr.info14
-rwxr-xr-xquanta/scripts/picturewizard.kmdr587
-rwxr-xr-xquanta/scripts/scriptinfo.kmdr454
-rw-r--r--quanta/scripts/scriptinfo.kmdr.info13
-rwxr-xr-xquanta/scripts/tablewizard.kmdr449
-rwxr-xr-xquanta/scripts/tidy.kmdr1078
-rw-r--r--quanta/scripts/tidy.kmdr.info9
-rwxr-xr-xquanta/scripts/xmlval.kmdr499
-rw-r--r--quanta/scripts/xmlval.kmdr.info14
-rwxr-xr-xquanta/scripts/xsltproc.kmdr294
-rw-r--r--quanta/scripts/xsltproc.kmdr.info14
-rw-r--r--quanta/src/Makefile.am74
-rw-r--r--quanta/src/dcopquanta.cpp113
-rw-r--r--quanta/src/dcopquanta.h34
-rw-r--r--quanta/src/dcopquantaif.h33
-rw-r--r--quanta/src/dcopsettings.cpp51
-rw-r--r--quanta/src/dcopsettings.h35
-rw-r--r--quanta/src/dcopsettingsif.h34
-rw-r--r--quanta/src/dcopwindowmanagerif.h46
-rw-r--r--quanta/src/document.cpp3192
-rw-r--r--quanta/src/document.h352
-rw-r--r--quanta/src/dtds.cpp1103
-rw-r--r--quanta/src/dtds.h238
-rw-r--r--quanta/src/kqapp.cpp233
-rw-r--r--quanta/src/kqapp.h79
-rw-r--r--quanta/src/main.cpp217
-rw-r--r--quanta/src/quanta.cpp5390
-rw-r--r--quanta/src/quanta.desktop95
-rw-r--r--quanta/src/quanta.h664
-rw-r--r--quanta/src/quanta_be.desktop94
-rw-r--r--quanta/src/quanta_init.cpp1631
-rw-r--r--quanta/src/quanta_init.h99
-rw-r--r--quanta/src/quantadoc.cpp375
-rw-r--r--quanta/src/quantadoc.h59
-rw-r--r--quanta/src/quantaview.cpp1185
-rw-r--r--quanta/src/quantaview.h233
-rw-r--r--quanta/src/viewmanager.cpp756
-rw-r--r--quanta/src/viewmanager.h144
-rw-r--r--quanta/src/x-webprj.desktop51
-rw-r--r--quanta/treeviews/Makefile.am24
-rw-r--r--quanta/treeviews/basetreeview.cpp1233
-rw-r--r--quanta/treeviews/basetreeview.h362
-rw-r--r--quanta/treeviews/docfolder.cpp126
-rw-r--r--quanta/treeviews/docfolder.h50
-rw-r--r--quanta/treeviews/docitem.cpp52
-rw-r--r--quanta/treeviews/docitem.h45
-rw-r--r--quanta/treeviews/doctreeview.cpp194
-rw-r--r--quanta/treeviews/doctreeview.h71
-rw-r--r--quanta/treeviews/fileinfodlg.ui94
-rw-r--r--quanta/treeviews/filestreeview.cpp334
-rw-r--r--quanta/treeviews/filestreeview.h81
-rw-r--r--quanta/treeviews/newtemplatedirdlg.cpp29
-rw-r--r--quanta/treeviews/newtemplatedirdlg.h33
-rw-r--r--quanta/treeviews/projecttreeview.cpp674
-rw-r--r--quanta/treeviews/projecttreeview.h176
-rw-r--r--quanta/treeviews/quantapropertiespage.ui247
-rw-r--r--quanta/treeviews/scripttreeview.cpp425
-rw-r--r--quanta/treeviews/scripttreeview.h220
-rw-r--r--quanta/treeviews/servertreeview.cpp195
-rw-r--r--quanta/treeviews/servertreeview.h92
-rw-r--r--quanta/treeviews/structtreetag.cpp217
-rw-r--r--quanta/treeviews/structtreetag.h45
-rw-r--r--quanta/treeviews/structtreeview.cpp1071
-rw-r--r--quanta/treeviews/structtreeview.h176
-rw-r--r--quanta/treeviews/tagattributeitems.cpp538
-rw-r--r--quanta/treeviews/tagattributeitems.h178
-rw-r--r--quanta/treeviews/tagattributetree.cpp659
-rw-r--r--quanta/treeviews/tagattributetree.h143
-rw-r--r--quanta/treeviews/templatedirform.ui170
-rw-r--r--quanta/treeviews/templatestreeview.cpp1079
-rw-r--r--quanta/treeviews/templatestreeview.h162
-rw-r--r--quanta/treeviews/uploadtreefile.cpp89
-rw-r--r--quanta/treeviews/uploadtreefile.h53
-rw-r--r--quanta/treeviews/uploadtreefolder.cpp116
-rw-r--r--quanta/treeviews/uploadtreefolder.h57
-rw-r--r--quanta/treeviews/uploadtreeview.cpp451
-rw-r--r--quanta/treeviews/uploadtreeview.h60
-rw-r--r--quanta/utility/Makefile.am20
-rw-r--r--quanta/utility/myprocess.h36
-rw-r--r--quanta/utility/newstuff.cpp144
-rw-r--r--quanta/utility/newstuff.h121
-rw-r--r--quanta/utility/qpevents.cpp403
-rw-r--r--quanta/utility/qpevents.h90
-rw-r--r--quanta/utility/quantabookmarks.cpp399
-rw-r--r--quanta/utility/quantabookmarks.h99
-rw-r--r--quanta/utility/quantacommon.cpp753
-rw-r--r--quanta/utility/quantacommon.h225
-rw-r--r--quanta/utility/quantanetaccess.cpp268
-rw-r--r--quanta/utility/quantanetaccess.h86
-rw-r--r--quanta/utility/resource.h59
-rw-r--r--quanta/utility/tagaction.cpp1285
-rw-r--r--quanta/utility/tagaction.h137
-rw-r--r--quanta/utility/tagactionmanager.cpp83
-rw-r--r--quanta/utility/tagactionmanager.h74
-rw-r--r--quanta/utility/tagactionset.cpp1172
-rw-r--r--quanta/utility/tagactionset.h161
-rw-r--r--quanta/utility/toolbartabwidget.cpp351
-rw-r--r--quanta/utility/toolbartabwidget.h111
-rw-r--r--quanta/utility/toolbarxmlgui.cpp27
-rw-r--r--quanta/utility/toolbarxmlgui.h32
1820 files changed, 186179 insertions, 0 deletions
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 <sequitur@kde.org>
+ Andras Mantia <amantia@kde.org>
+
+Original authors:
+ Dmitry Poplavsky <dima@kde.org>
+ Alexander Yakovlev <yshurik@kde.org>
+
+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
+ <andrew.lowe@manildra.com.au>.
+
+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 <style> CSS area
+ - use the correct encoding in the file dialogs [#138343]
+ - don't lose upload profile settings in certain cases
+ - fix symlink handling in Project Rescan, New Project adding files/folders [#138107]
+ - do not set the current project mark to a project that could not be opened [#137186]
+ - allow closing of an untitle editor tab when an image is previewed inside [#134534]
+ - fix problems with the automatic backup system
+
+Version 3.5.5 (Release date: 11-10-2006; Started 01-09-2006):
+ - bugfixes:
+ - do not allow growing of quantarc until it crashes Quanta [#111049]
+ - symlink handling fixes (hopefully won't break anything)
+ - fix Save As problems, possibly #131728
+ - add some more special characters to the list [#130513, #124628]
+ - crash fix in CSS editor [#131849]
+ - don't crash when closing a document in VPL mode [#133082, #126585, #125153]
+ - fix crash when copying to clipboard inside VPL [#130212]
+ - show the correct column number if tabs are used in the document [#133313]
+ - only one upload dialog can be shown at any time [#132535]
+ - do not show Find in Files menu if KFileReplace is not installed [#132530]
+ - allow logging to files outside of project directory [#131782]
+ - don't send closing events for untitled, unmodified documents [#131782]
+ - respect the order of items in the .docrc [#133704]
+ - fix crash when creating project through slow links [#133705]
+ - really abort if a remote directory cannot be created [#117032]
+ - fix automatic updating of closing tags [#132357]
+ - accept float numbers for length values [#130295]
+ - handle correctly the escaped backslashes inside strings [#128819]
+
+ - improvements:
+ - make CSS completion work inside style attributes [#80605]
+ - improve usability of the File Changed dialog [#126058]
+ - improve finding a DTEP for a file [related to #129808]
+
+Version 3.5.4 (Release date: 02-08-2006; Started 24-06-2005):
+ - bugfixes:
+ - make Open File in context menu work for remote projects as well
+ - make possible to remove a shortcut assigned to an action
+ - don't become confused if exitting is cancelled during the toolbar
+ saving process
+ - default to a better place when saving a global toolbar to the local
+ toolbar directory and improve the error message if a toolbar cannot be
+ saved [#130236]
+
+Version 3.5.3 (Release date: 23-05-2006; Started 18-03-2005):
+ - bugfixes:
+ - another round of VPL fixes. Requires KDE 3.5.3 to work properly [#125434]
+ - don't crash when viewing remote files in VPL [#126314]
+ - silently ignore files from a project view that do not exist anymore [#126588 ]
+ - show a correct error message if a file does not exist [#126588 ]
+ - make the img and script tags standard compliant [#125596]
+ - don't loose important spaces when applying source indentation [#125213]
+
+- improvements:
+ - add input button to the Forms toolbar [#125202]
+
+Version 3.5.2 (Release date: 17-03-2006; Started 23-01-2005):
+ - bugfixes:
+ - allow opening of read-only remote files, like from http:// [#120632]
+ - fix insertion of files to the project [#120629]
+ - fix detection of existing shortcuts
+ - ignore special areas inside comments
+ - set the user action tooltips correctly
+ - fix random crashing when editing PHP files [#121280, #122475, #122252, #120983]
+ - fix a crash when using the attribute tree
+ - fix insertion of relative URLs from the attribute tree
+ - fix resolving of relative URLs when there are symlinks around
+ - fix addition of local directories to the project (creates weird project
+ error like #122419)
+ - fix for dtep data of xhtml1.1 [#122272]
+ - fix some bugs in the new project wizard
+ - always reload a file if the user wants it [related to #121329]
+ - fix previewing of noframes area
+ - fix previewing of read-only files
+ - reload project tree for remote projects after rescanning the project folder
+
+ - improvements:
+ - less reparsing of the document while typing is in progress
+ - open dropped files [#102605]
+ - don't try to remove an empty, unmodified buffer, if it is the last
+ opened one [#111599]
+ - remember cursor position for project documents [#101966]
+ - add the standard show/hide menubar action [#113064]
+ - add possibility to limit the number of recent files/projects. No
+ GUI, use "Recent Files Limit" in the [General Options] section [#113309]
+ - show the project name in the window titlebar
+ - mark uploaded files as uploaded even if upload fails later [#111857]
+ - new DCOP methods:
+ - WindowManagerIf::uploadURL(url, profile, markOnly):
+ uploads the url to the place described by profile. If
+ markOnly is true, it only marks as uploaded. If profile is
+ empty, the default profile is used.
+ - QuantaIf::groupElements(groupName):
+ to get a list of the elements of a structure group. Useful to have
+ autocompletion for attribute values, where the values are dynamic
+ based on other tags in the document and are gathered via a dcop call.
+ Example:
+ <attr name="id" type="list" source="dcop"
+ interface="QuantaIf" method="groupElements(QString)"
+ arguments="GroupName">
+ </attr>
+
+
+
+Version 3.5.1 (Release date: 23-01-2006; Started 30-11-2005):
+ - bugfixes:
+ - better handling of quotation marks when editing tags inside a script area [#118693]
+ - don't show the file changed dialog after using save as and save again
+ - crash fixes in VPL [#118686]
+ - don't loose the comment closing character when formatting the XML code [#118453]
+ - insert valid img tag for XHTML documents [#118805]
+ - don't show the Pages tab in DTEP editing dialog more than once [#118840]
+ - set the DTEP of the document to the one selected in the Quick Start dialog [#118814]
+ - don't have two Close actions [#118448]
+ - don't show CSS pseudo-classes in autocompletion for the class attribute [#119373]
+ - avoid deadlock when loading the DTEPs
+ - recognize PHP functions which returns references [#118914]
+
+ - improvements:
+ - add XHTML 1.1 and XHTML 1.0 Basic to the quickstart dialog [#118813]
+ - new DCOP interfaces/methods:
+ - WindowManagerIf::setDtep
+
+
+Version 3.5 (Release date: 29-11-2005; Started 04-03-2004):
+ - bugfixes:
+ - don't crash when Smart Tag Insertion is enabled and some tags are inserted to an
+ emty document
+ - add missing Romanian characters to the Insert Special Character dialog [#107549]
+ - fix layout of mailto dialogs
+ - fix lots of VPL related crashes [#112733, #112853, #108501, #115046]
+ - give to the host field more space in the upload profile dialog [#112778]
+ - remember find options between sessions [#97102]
+ - don't hide the password dialogs behind the main window [#114584]
+ - replace < and > typed in VPL with &lt; and &gt; in source [#115528]
+ - never loose the content of files passed as argument when switching to VPL [#114611]
+
+ - improvements:
+ - md5sum based file changed detection
+ - faster loading of multiple documents at once
+ - possibility to change the icon/text layout of the user toolbars from
+ inside Quanta added
+ - external preview possibility with Firefox added [#106557]
+ - make autoreplacing of accented chars smarter. The characters are replaced only if they cannot
+ be encoded in the encoding of the document
+ - escape the quotation marks of the inserted attributes inside a script
+ area if needed
+ - less annoying CSS autocompletion [#109603]
+ - Debugger
+ - The breakpoint list now shows the correct line number
+ - It is now possible to double click on a breakpoint in the breakpoint list to jump
+ to that file and line.
+ - Renamed 'Run' To 'Trace' and 'Leap' to 'Run'
+ - Updated the Gubed plugin to support Gubed version 0.2.x
+
+ - new features:
+ - loading/updating of the entities in a DTEP from a DTD
+
+Version 3.4.3 (Release date: 05-10-2005; Started 01-08-2005):
+ - bugfixes:
+ - fix crash when deleting a file which is part of a project from the tab
+ context menu [#111134]
+ - do not autoclose tag starting with <?, like <?xml
+ - create empty description files for scripts that don't have one
+ - do not allow invocation of the CSS editor in an empty non-CSS document [#109815]
+ - fix many cell-merging related errors in the table editor [#112243]
+ - fix namespace editing in the attribute editor tree
+ - fix lots of table editor bugs
+ - restore automatic conversion of accented chars behavior to pre-3.4.2
+ - save the content entered in a new file in the VPL editor [#111278]
+ - fix loading order of the project view files
+ - replace a leading ~ in an upload profile with the users home folder and avoid a hang
+ - fix lots of VPL related crashes
+ - show DT tags in VPL [#109723]
+
+Version 3.4.2 (Release date: 20-07-2005; Started 01-06-2005):
+ - bugfixes:
+ - entity autocompletion fixes
+ - don't show the name twice in the tooltip of treeview items
+ - show an upload treeview for profiles that have @ in the username
+ - allow CVS actions to be put on toolbars [#106023]
+ - open the files with the right encoding when restoring the last opened files on startup [#104512]
+ - fix the Kommander XML scripts
+ - treat "<" as the end of a tag name. Fixes autoreplacement of opening/closing
+ tags in cases when a PHP area starts directly after a tag name. [#106911]
+
+ - improvements:
+ - make single file/folder upload really quick [#105612]
+ - Paste as HTML Encoded encodes more chars to their corresponding entities [#100547, #100103]
+ - improve the automatic conversion of characters. Only those are converted that cannot be
+ encoded in the encoding of the document
+
+Version 3.4.1 (Release date: 31-05-2005; Started 04-03-2004):
+ - bugfixes:
+ - read/write the correct entry from description.rc in the editor
+ - fill only the attributes with source="selection" with the selection in the
+ tag editing dialog
+ - fix matching of excluded files from a project
+ - don't crash when Selected is pressed and nothing is selected (in the CSS editor) [#101919]
+ - show the correct relative paths in URL autocompletion
+ - fix crash when unsetting breakpoints
+
+ - improvements:
+ - nicer processing of CVS output
+ - read the image sizes for remote images as well
+ - insert an img tag for remote images as well when using D&D
+ - better context sensitiv documentation (needs updated documentation and DTEP
+ packages)
+
+Version 3.4 (Release date: 16-03-2005; Started 20-08-2004):
+ - bugfixes:
+ - Debugger
+ - Added full support for Gubeds conditional breakpoints
+ - Improved path mapping
+ - Fixed bug that objects appeared incorrectly in watch list
+ - Fixed lockup when watching large variables
+ - The debugger docks should now remember their positions
+ - VPL:
+ - enable VPL on KDE 3.3.x
+ - Update cursor position in VPL when return key is pressed. [#94816]
+ - Fix cursor disapearing. [#85292]
+ - Fix crash that happened when using backspace to delete a link.
+ - Normal editing behaviour with selected text. [#94921]
+ - mark the document as modified after the document properties dialog creates
+ a skeleton for VPL
+ - fix "Cannot insert the tag: invalid location" problem [#99340]
+ - restore the correct mouse cursor when the VPL area is left [#98177]
+ - Other bug fixes.
+ - show (again) the full filename in a tooltip
+ - don't crash if the preview widget is closed with a JavaScript command
+ from the code itself [#87533]
+ - possible crash on startup fixed
+ - don't try to autofill a closing tag for non-xml tags [#89212]
+ - when opening a Quanta 3.2 project set the upload status of the files to
+ "When Modified" not to "Never" [#88232]
+ - when adding files to a project, use the upload status of the parent
+ directory for the newly added file
+ - fix the Save As.. behavior (it defaulted to some strange directories,
+ depending on the active treeview, selected directory, etc.)
+ - update the modified status text/icon when using Save All [#87196]
+ - better, more stable switching between the different MDI modes [#89295]
+ - always find the right action to edit, even if there are more actions
+ with the same
+ - don't change the template description if writing to the .dirinfo file
+ fails (normally for global templates).
+ - fix creation of new template directories (template type was stored
+ incorrectly).
+ - always display the user-readable template type user visible name
+ - don't crash after editing a cell of a newly inserted row/column in the
+ table editor
+ - show the right index of the main cell in case of merged rows in a table
+ - don't crash on column removal form a table
+ - read the tables correctly also if the doctype definition is wrong
+ (for example HTML tables inside XHTML)
+ - fix node tree corruption while parsing scripts inside a tag [#91508]
+ - don't crash when deleting a file using the context menu [#92676]
+ - disable Proceed button in the upload dialog once the upload is started. Fixes
+ various problems like non-responding Quanta after upload and possibly the
+ bug described in #88892.
+ - don't try to add a newly created action to a non-existent All toolbar.
+ - don't crash on exit if the user removed an action
+ - don't crash when previewing a page with frames twices in a row or when
+ downloading a documentation packages from the Welcome screen [#95465]
+ - open the frames in the correct place [#66233]
+ - get the encoding correctly from Quanta in the QuickStart dialog [#96696]
+ - parse multiline quotation strings in PHP correctly
+ - enable full copy/paste from documentation and preview. Until now it worked
+ only with the mouse through the selection. [#92936]
+ - don't show directories that were removed from the project in the upload
+ dialog [#87186]
+ - follow symlinks in the project, project rescan, project upload [#71649, #92522]
+ - don't show the Upload File item in the tab context menu if the current item is not part of a project.
+ - parse PHP statements ending with a one-line comment ( //comment ?>)
+ correctly [#80289, #97437]
+ - correctly select modified files for upload [#94167]
+ - fix a bug in the auto tag updating: do not update non-XML tags [#95743]
+ - don't crash in case of corrupted quantarc
+ - avoid crashes that happen if you close Quanta quickly after it is started
+ - don't crash when pressing CTRL+[SHIFT]+SPACE while a plugin is loaded [#99064]
+ - fix crash when a menu is opened while loading a project with the
+ debugger enabled [#96723]
+ - close the file that was deleted, not something else when using delete from
+ the tab context menu [#98265]
+ - do not close the previous project if the new project dialog was cancelled
+ [#92693]
+ - extra checks added to make it possible to use editors that do not implement the KTextEditor
+ interfaces completely, like Kyzis M3
+ - fix highlighting problems (in some cases the loaded or new documents had the highlighting set to NONE)
+ - avoid crashes on exit (with a general solution)
+ - really show only the possible children in the completion box
+ - speed up the autocompletion of scripts (which in turn helps to not have big delays while typing)
+ - don't add back an action to a toolbar after switching between documents that have different DTEPs if
+ it was removed
+ - deal correctly with toolbars having the same name, but belonging to different DTEPs
+ - workaround a QTable bug, which causes the scrollbar to disappear when entering data in the table editor [#99011]
+
+
+ - behavioral/user interface changes:
+ - Toolbars->Add User Toolbar renamed to New User Toolbar
+ - extended Open With menu in the treeviews, showing the
+ list of applications that can open the current file
+ - don't show the project toolbar when no project is loaded
+ - shortcut changes to avoid conflicts with global shortcuts:
+ Reload: Shift+F5 (was Ctrl+F5)
+ View with Konqueror: F12 (was Ctrl+F6)
+ View with Mozilla: Shift+F12 (was Shift+F6)
+ View with Netscape: Shift+F6 (was Ctrl+Alt+F6)
+ View with Opera: Alt+F6 (was Ctrl+Shift+F6)
+ View with Lynx: None (was Shift+F6)
+ - Warning Messages can be configured on the User Interface page
+ - support bookmarks spanning multiple files [#79297]
+ - Spellchecker configuration from Configure Quanta was removed.
+ You can find it in Configure Editor.
+
+ - enhancements/new features:
+ - VPL:
+ - Undo/Redo.
+ - Copy/Cut/Paste supported in VPL.
+ - Context menu for table actions.
+ - smart tag insertion support in text editing mode as well
+ - New Toolbar menu entry added to the toolbar context menu [#80647]
+ - New Action menu entry added to the toolbar context menu
+ - add command line switch (--resetlayout) to reset the UI to the default mode
+ - new events:
+ - Before project closed
+ - any action can be assigned to an event, not just the user defined
+ script actions
+ - more than one action can be assigned to events
+ - possibility to disable the event actions added (without the need to
+ remove them one by one)
+ - support loading of more than one toolbar at a time
+ - don't ask for toolbar saving if the toolbar names were modified by
+ Quanta to add (1), (2), etc. at the end
+ - disable the Quanta Template page in properties if you don't have
+ writing rights to the directory
+ - show the user-readable template description for every template file,
+ not just the directories.
+ - don't allow to change the template type in the properties of a file as
+ it's valid per-directory.
+ - by default show the groups for all DTEPs present in the document
+ - allow showing the groups for more than one DTEP
+ - support for showing comments for tags when invoking autocompletion.
+ Useful to show version information about the tag.
+ - recognize one-line PHP comments starting with #
+ - autocomplete PHP functions after @
+ - Create New Folder/File item added to project and file treeview context
+ menu [#93189]
+ - allow opening of the same project in two instances if the user really
+ wants to [#94289]
+ - possibility to upload without having to confirm the upload process [#63131]
+ - possibility to add an alias for a top folder [#81131]
+ - download new documentation from a central server added
+ - add useful entries to the context menus invoked at empty areas of the various
+ treeviews
+ - better save on close dialog for multiple files
+ - more supported CVS commands in the context menus:
+ - update to HEAD
+ - update to tag/date
+ - revert
+ - add/remove to/from the repository
+ - show log
+ - add/remove to/from .cvsignore
+ - added possibility to execute CVS commands on the main project directory
+ - view the rendered document source
+ - ask for deleting the file from the servers when it's removed
+ from the project [#60877]
+ - persistent bookmarks support in a project [#65296]
+ - entity support (autocompletion, entity tag type in tagXML, recognition of inline
+ defined entities, extract entities from a DTD file)
+ - support upload of resources (DTEP, toolbar, template, script) to the central server
+ - added dialog to edit a DTEPs configuration (description.rc)
+ - possibility to invoke the tag editing dialog inside PHP added back
+ - PHP class autocompletion improved (autocomplete for $this; class methods; for classes from
+ included files)
+ - make CSS autocompletion less intrussive
+
+Version 3.3.0 (Release date: 18-08-2004; Started 07-05-2004):
+NOTE: Unfortunately I failed to update the changelog regulary, thus some new features and
+bugfixes might not be listed here.
+
+ - bugfixes:
+ - VPL:
+ - (once again) don't lose the comment text from inside a comment [#81162]
+ - fix a huge memory leakage
+ - don't crash when opening/creating a new file while VPL is visible [#82754]
+ - fix insertion of extra spaces around text in some conditions
+ - fix a nasty bug : put VPL/Source view, go to another file in Source view, the cursor
+ will be stuck at position 0:0
+ - don't forget to set the document as modified when in VPL view
+ - fix the LINK bug : the stylesheet wasn't loaded
+ - fix the return key bugs (sometimes the breakline is simply not inserted, sometime the
+ cursor disappear)
+ - other bugfixes
+ - correctly load the plugins toolbar [#81031]
+ - correctly size the DTD toolbar even when just one toolbar is loaded [#81063]
+ - remove the backup files in every case when the document was saved and
+ don't warn about their presence on the next startup
+ - don't hang when parsing (broken) PHP code, like <a href="<? foo ?>"">
+ - don't treat text after a special area start tag as part of the special area, if the
+ starting tag is a single tag (like <style type="text/css" />) [#80491]
+ - don't crash when saving files while the structure tree is visible [#79803]
+ - fix a major memory leak, cause of many crashes and instability
+ - <fieldset> is not a single tag [#79926]
+ - don't be confused by quotation marks inside a script area which is inside a tag value
+ (like <a href="<? echo "foo" ?>">) [#80683]
+ - don't crash when closing a project while the preview is visible in the editor area
+ - show the debug toolbar immediately after a debugger is selected
+ - don't show a debug toolbar without actions on it
+ - really reload the project XML from disc when Reload is selected in the project treeview
+ context menu
+ - unconditionally hide the splash screen after 10 seconds and also hide when the user clicks
+ on it [#80086, #82013]
+ - don't crash when inserting a dot in an empty CSS file [#82143]
+ - make uploading of empty folders possible [#82127]
+ - fix removal of actions containing &
+ - fix toolbar configuration and removal for non-English versions
+ - don't show the file changed dialog when previewing after Save All or Project Upload
+ was called. Fixes also for similar bugs (File Changed dialog appeared when it shouldn't).
+ - don't confuse the user when changing the icon for a remote root directory. Use the icon
+ associated with root and home folders, not the hardcoded files. [#81130]
+ - enable the Configure Toolbars... and Toolbar items in the toolbar context menu [#80643]
+ - don't crash when a part is removed without noticing us (eg. Konsole is removed from RMB->Close Terminal Emulator)
+ - don't report the missing opening tag for special areas as errors
+ - correctly match the directories for exclude strings like FOO, not just for FOO*
+ - don't crash when the parser returns and empty node. For example it happens in case of empty CSS documents [#83130]
+ - use the global doctype setting for new document if there is no project loaded
+ - disable the autocompletion inside comments [#84660]
+ - make image preview work also for images outside of the project
+ - build the node tree correctly when there is no space between the closing tag and the immediately
+ following special area
+ - fix autocompletion for simple special areas like <? a ?>
+ - don't use fixed sized dialogs [#86026]
+ - display correctly the index of the main cell in case of merges in the table editor [#86027]
+ - fix layout of the img tag dialog [#85077]
+ - fix meta keyword generation in the QuickStart dialog [#83872]
+ - make save as dialog work with a remote url
+ - fix autocompletion for tag having ampersand in an attribute value [#85710]
+ - honour the command line arguments for the script executor specified in the .info files
+ - don't crash when invoking the CSS editor in an empty CSS file [#86523]
+ - many other crash fixes
+
+ - behavioral/user interface changes:
+ - enable the configure toolbars item in the toolbar context menu [#80643]
+ - rename Edit Toolbar to Configure Toolbars...
+ - KFileReplace is used for "Find in Files"
+ - Remove From Disc (and Project) renamed to Delete in the Project Tree
+ - you cannot open the same project file in two different Quanta instances anymore
+
+ - enhancements/new features:
+ - VPL:
+ - speedup of VPL
+ - added a icon which represent a comment, and which is used in VPL like the current PHP icon
+ - added tooltips to the scripts (PHP,...) and comments icons indicating their contents
+ - warn about missing runtime dependencies
+ - make the browser part configuration available from the Settings menu
+ - faster switching between documents
+ - reworked abbreviation support: abbreviation templates are grouped and one group can
+ be valid for more than one DTEP
+ - added possibility to mark project files as uploaded [#81546]
+ - generate nicer file names when sending some resource in email
+ - enable tab reordering with middle mouse button [#80026]
+ - added possibility of ignoring the files listed in .cvsignore [#78183]
+ - faster parsing and tree building
+ - per file and per directory upload status (can be changed from the project treeview
+ context menu):
+ - When Modified: the item selected for upload if it was modified
+ - Never: the item is never selected for upload
+ - Confirm: the item is selected for upload if it was modified, but a second confirmation
+ is needed by the user.
+ Implements wish #62721.
+ - introduce the concept of separate project root and document-base folders.
+ Document-base folders hold the documents belonging to the actual project.
+ Outside of the document-base folders are project administrative files, that
+ usually are not uploaded. Files under document-base folders are by default
+ uploaded (if they were modified), while files outside of the document-base
+ folders are not marked to be uploaded, even if they are modified. Exception is
+ the directory which holds the project templates, which is marked to be uploaded.
+ The user can override the default setting both for files/folder inside and outside of
+ a document-base folder. See above.
+ For old projects, the project root is the only document folder. The document-base folder
+ status can be changed from the project treeview context menu.
+ There is a DCOP method to query the root (the document base folder) for a file from
+ inside the project: QString WindowManagerIf::documentFolderForURL(QString url).
+ Implements wish #64742 (in somewhat different way, but the result is the same).
+ The main reasons of document-base folders is to make possible developing for multiple
+ subdomains inside the same project and to make a difference between administrative files
+ and real (user visible) documents.
+ - dragging a tab holding a document puts the document URL in the drag object [#80649]
+ - possibility of as-you-type replacing of accented chars [#23164]
+ - add support for upload profiles [#54366]
+ - create a treeview for each upload profile
+ - move the selection to the current file in the project tree [#62878]
+ - Reload item added to Documentation->Project Documentation context menu
+ - new DCOP interfaces and methods:
+ QString WindowManagerIf::documentFolderForURL(QString url);
+ QString WindowManagerIf::urlWithPreviewPrefix(QString url);
+ - team development support for projects
+ - event action support for projects (email, log, script actions)
+ - support %userarguments (useful for event arguments) and %projectbase for script actions
+ - add possibility to download resources (DTEP, toolbar, script and template packages) from
+ our main server
+ - create a new toolbar for easier project view usage
+ - basic integrated CVS support (Commit and Update)
+ - improved CSS editor
+ - several treeview enhancements (inline renaming; tooltips - configurable from the quantarc,
+ ShowToolTips entry; inline editing of descriptions; save and reload the tree state; improved D&D)
+ - support for tgz site templates. Site templates are tgz files that can be extracted
+ to an user defined directory.
+ - added possibility to configure the preview part (has effect on the whole KHTML, including
+ Konqueror!)
+
+
+Version 3.3 BE 2 (Release date: 07-05-2004; Started 26-01-2004):
+ - bugfixes:
+ - VPL:
+ - show the parent tag in the tag attribute view when editing text
+ - stop inserting &nbsp; everywhere [#72535]
+ - fix some various crashes [#72532]
+ - correctly close tags with namespaces when entering "</"
+ - make autocompletion work correctly with namespaced tags
+ - don't insert boolean attributes with false as value in the tags
+ - fix XML style tag editing (don't make tags look like <foo /="true">)
+ - make the New Project wizard usable on lower resolutions [#75192]
+ - various parsing fixes
+ - report bugs for "quanta" module, not for "quanta_be"
+ - fix restoration of the toolbar visibility setting [#79082]
+ - hide/show the plugin toolbar as well when Show Toolbar is unchecked/checked [#79082]
+ - don't ask for copying a file to the project if it is under the project directory (happened
+ with symlinked files and projects)
+ - color with bold in the Files Tree the opened files, even if they are under a symlinked
+ directory
+ - don't save the shortcuts as localized strings [#80115]
+ - don't crash when canceling a failed upload
+ - don't hang for 3 minutes if a filtering script action cannot be found
+
+ - behavioral/user interface changes:
+ - expand abbreviation is CTRL-SHIFT-J
+ - some menu items were restructured:
+ - File: Close/Close All moved under Window
+ - Edit: Indent/Unindent/Clean Indentation/Comment/Uncomment/Spelling moved under Tools
+ - View: Tree Views/Show Messages/Show Problem Reporter replaced with Tool Views
+ - Project: Project Options renamed to Project Properties
+ - Plugins: Edit moved to Settings->Configure Plugins
+ Validate removed (plugins are automatically validates when you configure them)
+ - Tools: List Opened Files replaced with the Window menu
+ - editor context menu: Close/Close Other Tabs/Reload/Upload/Delete File moved to the
+ tab context menu
+ - new tab context menu containing the above and Close All/Switch To...
+ - some dialogs were restructured:
+ - Configure Quanta: Environment->Show close buttons on tabs moved to User Interface
+ Layout renamed to User Interface
+ Layout->Window Layout replaced with Reset window layout to the default...
+ - new MDI modes: Toplevel / Childframe / Tab Page (like the old one ) and the new default IDEAl mode
+ - preview, documentation and plugins can appear in a new tab or a separate toolview
+ - "View with..." menus moved under an External Preview submenu
+
+ - new features:
+ - Next / Previous Bookmark actions
+ - add a toolbar for CSS
+ - list the opened files as bold in the treeviews
+ - allow closing of opened files from the treeviews
+ - option to control the visibility of hidden files in the treeviews
+ - add description field for project files
+ - Select Current Tag Area action created
+ - option to control loading of last opened files/project on startup
+ - support for PHP debugger (currently Gubed - http://gubed.sf.net is supported)
+ - new DCOP interfaces and methods:
+ - QuantaIf: selectors() and idSelectors()
+ - SettingsIf: dtep(), encoding(), quotationChar()
+ - Create Folder... menu item added to the project tree context menu
+
+ - enhancements:
+ - improve multiline script autocompletion
+ - improve the problem reporter
+ - warn if there is a closing tag without opening tag in the document
+ - show also the column number in the error reporting dialog
+ - multiline, formatted CSS insertion from the CSS editor dialog
+ - possibility to invoke the CSS editor from the tag dialogs and the attribute editor
+ - CSS autocompletion improvements
+ - list the defined CSS selectors in the autocompletion and tag dialogs for class and
+ id attributes
+ - added some useful templates and template examples
+ - added descriptions for all scripts
+ - added installation script for Gubed PHP debugger
+ - choose the default highlighting of new documents based on the default DTD [#68942]
+ - open documents in Konqueror as new tab. Requires KDE 3.3. [#80659]
+
+Version 3.2.2 (Release data: xx-xx-2004; Started 01-03-2004):
+ - bugfixes:
+ - VPL:
+ - don't lose the comment text from inside a comment
+ - make removal of top folders added with "New Top Folder" possible [#76498, #76573]
+ - never crash when invoking the CSS editor on an empty document
+ - don't crash when invoking the CSS editor after a <style> without the closing </style>
+ - 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 <tbody>
+ - 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 &gt; 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 "<meta http-equiv="Content-Type" content="text/html; charset=..."
+ line when using the Quick Start dialog [#61500]
+ - fix message window handling
+ - fix script action error output handling
+ - honour the "Do not load the modified version from disk." setting in the dirty file
+ dialog
+
+
+Version 3.1.3 (Release date: 29-07-2003)
+ - bugfixes:
+ - fix possible crashes when using plugins
+ - use the project base directory as the working directory for script actions [#36415]
+ - quote also the numbers in the attribute values
+ - show the directory on the remote PC when using Save As for remote files,
+ instead trying to switch to the file on the local disc
+ - don't break the doctype line when changing the DTD
+ - insert valid doctype line when using the Quick Start button
+ - don't crash when trying to edit tags without proper .tag file (like <b>)
+ - 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:
+ - <em> and <strong> is inserted instead of <i> and <b> 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 <hausmann@kde.org>]
+ - 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 <george@georgemoody.co.uk>)
+ - 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 "<script" [#47816]
+ - attribute case option is handled correctly
+ - tag case fix in autocompletion box
+ - error message is printed if the "make install" step was not completed
+ - toolbars were not saved and loaded correctly
+ - Save All functionality corrected
+ - save an action's correctly
+ - editor enhancements:
+ - updated "Find in Files" dialog
+ - auto-completion enhancements and fixes:
+ - variable autocompletion for PHP
+ - new features:
+ - Help->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 (<tag/>)
+ - 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 <jphanley@buffalo.edu>.
+ - possibility to save/load/add/remove/customize the toolbars
+ - D&D between Templates Tree View and the editor [Marc Britton <consume@optushome.com.au>]
+ - new pages for the Properties dialog: Quanta directory, Quanta file info. Thanks to <espaceautogere@squat.net>.
+ 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. <foo foo1="foo">
+ 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(<STDIN>) { chomp ; s/\"/\\\"/ ; print "i18n(\"$$_\");\n"; }' >> rc.cpp ;\
+ $(EXTRACTRC) extrafiles >> rc.cpp ;\
+ cat extrafiles | perl -e 'while(<STDIN>) { if (/\<action .* text="(.*)"/) { print "i18n(\"$$1\");\n"; }}' | sed -e 's/\&amp;/\&/g' >> rc.cpp
+ (cd data && $(PREPARETIPS) >> ../tips.cpp)
+ find . -name "*.tag" -print | xargs cat | perl -e 'while(<STDIN>) { if (/\<tag .* comment="(.*)"/) { print "i18n(\"$$1\");\n"; }}' >> 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
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Initial Version 2004-01-21 Eric Laffoon<br />(this is semi obsoleted by being in CVS)<br /><br />Please list the topics and date you add or change like so...<br /><br />Date Who Where What<br />03-12 McC New Features::Script Debug - changed<br />01-21 ELL Plugins::Knowit Planner - added<br />01-21 ELL New Features::KMDI - added<br />01-21 ELL FE::Toolbars::Phase 2 explanation - added</p>
+</body></html>
+
+\NewEntry 0 Feature Enhancements
+
+\NewEntry 1 Actions
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Actions should get new triggers.<br />* File Save<br />* Project open<br />* Project close<br />* cron</p>
+</body></html>
+
+\NewEntry 1 DCOP
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>More things should be exported to DCOP<br />* CSS selectors<br />* DTEP Groups?</p>
+</body></html>
+
+\NewEntry 1 KHTML
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Use XSLT file indicated in (enhanced) project file to preview XML</p>
+</body></html>
+
+\NewEntry 1 Toolbars
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Toolbars need serious attention!<br />Phase 1:<br />1) Clean up for current usage<br />2) Create quick &quot;add this tag to a toolbar&quot; RMB function<br />3) Make toolbars abide by tag relationships like auto complete<br /><br />Phase 2:<br />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<br />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. <br /><br />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.</p>
+</body></html>
+
+\NewEntry 2 Phase 2 explanation
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p><span style="font-style:italic;color:#3300ff">&gt; - Phase 2/2 sounds a little complicated to me and I'm also not sure that I understood it completely.</span></p>
+<p>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.</p>
+<p>In balancing these several concepts seem to offer counterpoints.<br />familiar layout &lt;-&gt; specifically applicable actions<br />pre-made toolbars &lt;-&gt; dynamicly created toolbars<br />feature oriented toolbars &lt;-&gt; task oriented toolbars</p>
+<p>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:</p>
+<p>1) orient correctly to every task<br />2) retain familiarity of layout for variations and segue to next task<br />3) offer only proper tag relationships</p>
+<p>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).</p>
+<p>So we can say this about the ultimate solution:</p>
+<p>1) I don't think anybody is really anal enough to already be doing it.</p>
+<p>2) If it could be accomplished it would be very very cool and get a lot of press.</p>
+<p>3) It cannot be a single solution, thus it's multiple &quot;personalities&quot;</p>
+<p>4) Basic structure and layout will take experimentation, and user feedback. In fact it would take a fair amount of study and refinement.</p>
+<p>5) No single solution is possible so it must allow for easy user extensibility</p>
+<p>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.</p>
+<p>My vision is not just someone saving a toolbar for a task, but saving a whole personality. Imagine these as dowloadable resources. ;-)</p>
+<p></p>
+</body></html>
+
+\NewEntry 1 Templates
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>This was never really finished.<br />1) Linked information needs to be managed so that linked files are uploaded maintaining the links<br />2) tgz groupings need to be added as a new type<br />3) I need to search for the rest of the list I had assembled</p>
+</body></html>
+
+\NewEntry 1 projects
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Projects have several needs besides group abilities.<br />1) Project root can be below display root<br />2) Files can be marked for upload as normal (default), only with specific confirmation and never<br />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!<br />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.<br />5) Additional data will be available and the file will have local and remote entities. This will be covered in new features.</p>
+</body></html>
+
+\NewEntry 1 VPL
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Undoubtably there will be many things we want to do here. I'll start the list... This is not really prioritized.<br /><br />1) Visual Table editor<br />2) Integration of visual CSS using our dialogs and tools<br />3) XSLT translation layer for XML<br />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.</p>
+</body></html>
+
+\NewEntry 0 New Features
+
+\CurrentEntry 1 Script Debug
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p><br />The TODO list is for Gubed integration is now kept and managed at the Gubed SF page,<br />http://sourceforge.net/projects/gubed/ (tracker and tasks)<br /></p>
+</body></html>
+
+
+\NewEntry 1 KMDI
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>We need to bring this feature to Quanta ASAP.</p>
+</body></html>
+
+\NewEntry 1 Form Debug
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>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.<br /><br />1) load and save form data for testing<br />2) flyover info on form fields<br />3) RMB functionality (I wish I coudllremember all getvars did) to view and edit element values<br />4) indicate hidden values<br />5) show variables passed to and from form<br />6) create multi page form dumps to review order systems<br />7) Automated test - Insure no name duplication errors, etc.<br />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</p>
+</body></html>
+
+\NewEntry 1 Cookie Test
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Use the excellent cookie management integrated into Quanta to test cookies - we probably just need to call the cookies dialog from Quanta.</p>
+</body></html>
+
+\NewEntry 1 Annotations
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>Amaya has come up witha way to do annotations. We need to review and create one or use theirs.</p>
+</body></html>
+
+\NewEntry 1 Group Projects
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>This is extensive! Andras and I have exchanged emails on this. In simple terms...<br /><br />1) Complete redesign of project files<br />2) Private and project areas of file<br />3) Local and shared files provide full information<br />4) Permission and authorization systems with owner<br />5) Various methodologies for accomplishing group efforts</p>
+</body></html>
+
+\NewEntry 1 RAD Site
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>This has largely been under wraps except a few teasers. It's going to be my baby.<br /><br />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.<br /><br />1) Based on templates - this allows the user to develop the framework in layers<br />2) User defines abstractions - when you have a modular element in your design you define what the public and private interface is to it<br />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<br />4) New abstract interface - the key to integrate this is an interface that uses &quot;set&quot;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. <br />5) The interface can be viewed panning various levels and perspectives and remembering view arrangements. Perspective would be things such as<br />- physical layout<br />- conceptual group<br />- style grouping<br />- layout grouping<br />Level views would include<br />- overview<br />- concept/style/layout group<br />- page elements/relationships<br />- element definitions<br />- various configuration dialogs<br /><br />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.<br /><br />Some aspects:<br />* moving files automatically manages links<br />* Minimal application speeds development and manages framework<br />* Page component templates function dynamically<br />* Would use comment system and or generated file to manage elements<br />* would be able to offer limited functionaliy directly importing existing sites<br />* 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. ;-)</p>
+</body></html>
+
+\NewEntry 0 Plug Ins
+
+\NewEntry 1 Knowit Planner
+<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:10pt;font-family:sans-serif">
+<p>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.<br /><br />It would also be nice if Knowit self annotated. ;-)</p>
+</body></html>
+
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=<path to kde installation>:$KDEDIRS
+ - export QTDIR=<path to qt3>
+ - 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 <script > or similar thing is
+ added. Now the whole reparse is triggered if the parsed (invalid) area has a
+ special block without end, like <? without ?> or <script> without </script>.
+ 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 (<MyNS:rootElement xmlns:MyNS="http://www.example.com">)
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 <klineedit.h>
+#include <kcombobox.h>
+#include <kcolordialog.h>
+#include <qtooltip.h>
+#include <qiconset.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kaccel.h>
+
+#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 <kdebug.h>
+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 <kpushbutton.h>
+#include <qcolor.h>
+
+#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 <qvbox.h>
+#include <qlabel.h>
+
+#include <klocale.h>
+
+#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("<b>" + l +"</b>",leftBox);
+ QLabel *centerLabel = new QLabel(("<b>" + c +"</b>"),centerBox);
+ QLabel *rightLabel = new QLabel(("<b>" + r +"</b>"),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 <qslider.h>
+
+#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 <qlayout.h>
+#include <qtabwidget.h>
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+#include <qtextedit.h>
+#include <qtextstream.h>
+#include <qfileinfo.h>
+
+#include <kapplication.h>
+#include <klocale.h>
+#include <khtml_part.h>
+#include <khtmlview.h>
+#include <kstandarddirs.h>
+#include <klineedit.h>
+#include <kdebug.h>
+#include <kconfig.h>
+#include <kparts/browserextension.h>
+
+#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<myCheckListItem*>(child)->setOn(false);
+ child = child->nextSibling();
+ }
+ m_checkedChildren = 0;
+ }
+ else {
+ if(parent()){
+ myCheckListItem *p = static_cast<myCheckListItem*>(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<myCheckListItem*>(p->parent());
+ }
+ }
+ else {
+ m_sig->setValue(QVariant(text(0)));
+ m_sig->activate();
+ }
+ }
+ }
+ else {
+ if(parent()) static_cast<myCheckListItem*>(parent())->addCheckedChild();
+ }
+}
+
+void CSSEditor::appendSub(QDomNodeList l, myCheckListItem *cli){
+ unsigned int i;
+ for(i=0;i<l.length();i++) {
+ myCheckListItem *item = new myCheckListItem(cli,l.item(i).toElement().tagName());
+ item->connect(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;i<l.length();i++) {
+ myCheckListItem *item = new myCheckListItem(lv,l.item(i).toElement().tagName());
+ item->connect(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<myCheckListItem*>(lvVisual->findItem( s,0 )) ))
+ m_currentProp->setOn(true);
+ else
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvAll->findItem( s,0 )) ))
+ m_currentProp->setOn(true);
+ else
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvAural->findItem( s,0 )) ))
+ m_currentProp->setOn(true);
+ else
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvInteractive->findItem( s,0 )) ))
+ m_currentProp->setOn(true);
+ else
+ if( (m_currentProp = static_cast<myCheckListItem*>(lvPaged->findItem( s,0 )) ))
+ m_currentProp->setOn(true);
+
+ if( m_currentProp && m_currentProp->depth() ) {
+ myCheckListItem *p = static_cast<myCheckListItem*>(m_currentProp->parent());
+ while(p) {
+ p->setOn(true);
+ p=static_cast<myCheckListItem*>(p->parent());
+ }
+ }
+}
+
+
+ void CSSEditor::addAndSetPropertyOn(const QString& property, const QString& value){
+ addProperty(property,value);
+ setCurrentPropOn(property);
+ }
+
+ void CSSEditor::setSidesOfPropertyBorderOn(const QString& s){
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-top",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-right",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-bottom",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-left",0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-top-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-right-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(lvVisual->findItem( "border-bottom-"+s,0 ))->setOn(true);
+ static_cast<myCheckListItem*>(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<QString,QString> expandedProperties = decompressor.expand(propertyName, propertyValue );
+ QMap<QString,QString>::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<myCheckListItem*>(i);
+ QDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes();
+ unsigned int i;
+ for(i=0; i<valueTypes.length(); i++) {
+ QDomElement curr =valueTypes.item(i).toElement();
+ QString valueTypeName(curr.tagName());
+
+ if(valueTypeName =="list") {
+ m_ps->setComboBox();
+ 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<myCheckListItem*>(m_currentProp->parent());
+ while(p){
+ p->setOn(true);
+ p=static_cast<myCheckListItem*>(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<QString,QString>::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<QString,QString>::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<QString,QString>::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<QString,QString>::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 <style></style> 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 <qwidget.h>
+#include "csseditors.h"
+#include <qdom.h>
+#include <qmap.h>
+#include <qlistview.h>
+#include <qsignal.h>
+
+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<QString,QString> 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 <qlineedit.h>
+#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 <qspinbox.h>
+#include <qregexp.h>
+#include <qstringlist.h>
+
+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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>CSSEditorS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>CSSEditorS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>631</width>
+ <height>490</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CSS Editor</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>280</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="2" column="2">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbOk</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>SHckb</cstring>
+ </property>
+ <property name="text">
+ <string>Use shorthand form</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QSplitter" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>splitter3</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>twMediaGroup</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>33</width>
+ <height>7</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>290</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Visual</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>false</bool>
+ </property>
+ <property name="resizable">
+ <bool>false</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvVisual</cstring>
+ </property>
+ <property name="cursor">
+ <cursor>13</cursor>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Paged</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvPaged</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Interactive</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvInteractive</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Aural</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvAural</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>All</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvAll</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget class="QSplitter">
+ <property name="name">
+ <cstring>splitter3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <widget class="QFrame">
+ <property name="name">
+ <cstring>fEditing</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ </widget>
+ <widget class="QFrame">
+ <property name="name">
+ <cstring>fPreview</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>200</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ </widget>
+ <widget class="QTextEdit">
+ <property name="name">
+ <cstring>display</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32766</width>
+ <height>32766</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ <widget class="KPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>pbHelp</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>CSSEditorS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>CSSEditorS</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
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 <qlineedit.h>
+#include <qcombobox.h>
+#include <qpushbutton.h>
+#include <qtextstream.h>
+#include <qtabwidget.h>
+#include <qobjectlist.h>
+#include <qfileinfo.h>
+#include <qlabel.h>
+#include <qregexp.h>
+#include <qwhatsthis.h>
+
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+#include <kurlrequester.h>
+#include <kfiledialog.h>
+#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<QString, unsigned int> 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<QString, unsigned int> 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<QString, unsigned int> 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<QString, unsigned int> 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<QString, unsigned int> 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<QListView*>(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<QString, QPair<QString,unsigned int> >::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<QString,unsigned int> >::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 <qmap.h>
+#include <qpair.h>
+#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<QString, QPair<QString,unsigned int> > 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>CSSSelectorS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>CSSSelectorS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>621</width>
+ <height>496</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CSS Selector Dialog</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tlApplyToFile</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Apply to file:</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester">
+ <property name="name">
+ <cstring>kurApplyToFile</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer19_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="3" column="2">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>twSelectors</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Tags</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="2">
+ <property name="name">
+ <cstring>layout13</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Remove Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pbRemoveSelectedTag</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>Selected</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbRemoveAllTags</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>DTD Selection</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="0">
+ <property name="name">
+ <cstring>cbDTD</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer7_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>24</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>Add Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="0">
+ <property name="name">
+ <cstring>cbTag</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbAddTag</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer6_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Selector</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvTags</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer15</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Minimum</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>IDs</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Selector</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvIDs</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer18</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" column="2">
+ <property name="name">
+ <cstring>layout14</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox4_2</cstring>
+ </property>
+ <property name="title">
+ <string>Remove Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pbRemoveSelectedID</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>Selected</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbRemoveAllIDs</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer13</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox7_2</cstring>
+ </property>
+ <property name="title">
+ <string>Add Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="0">
+ <property name="name">
+ <cstring>leID</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbAddID</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer14</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Classes</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Selector</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvClasses</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer19</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" column="2">
+ <property name="name">
+ <cstring>layout13</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox4_3</cstring>
+ </property>
+ <property name="title">
+ <string>Remove Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pbRemoveSelectedClass</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>Selected</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbRemoveAllClasses</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox7</cstring>
+ </property>
+ <property name="title">
+ <string>Add Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="0">
+ <property name="name">
+ <cstring>leClass</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbAddClass</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Pseudo</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Selector</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Properties</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>lvPseudo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="showSortIndicator">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" column="2">
+ <property name="name">
+ <cstring>layout17</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer15_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>Remove Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbRemoveAllPseudo</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pbRemoveSelectedPseudo</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>Selected</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox">
+ <property name="name">
+ <cstring>groupBox7_3</cstring>
+ </property>
+ <property name="title">
+ <string>Add Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="0">
+ <property name="name">
+ <cstring>lePseudoSelector</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="0">
+ <property name="name">
+ <cstring>cbPseudo</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>pbAddPseudo</cstring>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer17</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>380</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="3" column="0">
+ <property name="name">
+ <cstring>pbHelp</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>CSSSelectorS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>CSSSelectorS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kurlrequester.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
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 <qregexp.h>
+//#include <kdebug.h>
+
+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<m_propertyToParse.length() ){
+ if( m_propertyToParse[i] == ' ' ){
+ if( ( temp.contains("\"") + temp.contains("\'") )%2 == 0 ) stop = true;
+ else temp += m_propertyToParse[i];
+ }
+ else temp += m_propertyToParse[i];
+ i++;
+ }
+ return temp;
+}
+
+QString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
+ //kdDebug(24000) << "\n\n\nextractURIList()\n\n\n";
+ QRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
+ URIListPattern.search(m_propertyToParse);
+ return URIListPattern.cap(1);
+}
+
+QStringList CSSSHPropertyParser::parse(){
+ QStringList tokenList;
+ bool stop = false;
+ m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse);
+
+ while(!stop){
+ QString temp;
+ for(unsigned int i=0;i<m_propertyToParse.length() ;i++){
+ if(m_propertyToParse[i] == ' ') break;// tokens are delimited by a blank
+ temp+=m_propertyToParse[i];
+ }
+
+ if(temp.contains("url(") !=0 ){
+ QString foundURIList = extractURIList();
+ m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundURIList));
+ tokenList.append(foundURIList);
+ }
+ else
+ if(temp.contains("(")!=0){
+ QString foundFunctionList = extractFunctionList();
+ m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundFunctionList));
+ tokenList.append(foundFunctionList);
+ }
+ else
+ if(temp.contains("'")!=0 || temp.contains("\"")!=0 || temp.contains(",")!=0){
+ QString foundQuotedStringList = extractQuotedStringList();
+ m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundQuotedStringList));
+ tokenList.append(foundQuotedStringList);
+ }
+ else
+ if(temp.contains("/")!=0){ //treat the presence of line-height in font shorthand form
+ m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(temp));
+ tokenList.append(temp.section("/",0,0));
+ tokenList.append("/"+temp.section("/",1,1));
+ }
+ else {
+ tokenList.append(temp);
+ int tempPos = m_propertyToParse.find(temp);
+ m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(tempPos,temp.length()));
+ }
+ if( m_propertyToParse.isEmpty() ) stop = true;
+ }
+ return tokenList;
+}
+
+
+
+
diff --git a/quanta/components/csseditor/cssshpropertyparser.h b/quanta/components/csseditor/cssshpropertyparser.h
new file mode 100644
index 00000000..dd95eb39
--- /dev/null
+++ b/quanta/components/csseditor/cssshpropertyparser.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ * 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 CSSSHPROPERTYPARSER_H
+#define CSSSHPROPERTYPARSER_H
+
+/**
+@author Gulmini Luciano
+*/
+#include <qstringlist.h>
+
+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 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<rules version="2.1">
+ <rule name="charset"/>
+ <rule name="import"/>
+ <rule name="media"/>
+ <rule name="page"/>
+</rules>
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 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<css version="2.1">
+<mediagroup type="aural">
+
+ <azimuth>
+ <list value="leftwards,rightwards,inherit"/>
+ <doubleList>
+ <leftList value="left-side,far-left,left,center-left,center,center-right,right,far-right,right-side"/>
+ <rightList value="behind"/>
+ </doubleList>
+ <angle/>
+ </azimuth>
+
+ <cue hasSub="yes">
+ <cue-after>
+ <uri mode="single" resourceType="audio"/>
+ <list value="none,inherit"/>
+ </cue-after>
+ <cue-before>
+ <uri mode="single" resourceType="audio"/>
+ <list value="none,inherit"/>
+ </cue-before>
+ </cue>
+
+ <elevation>
+ <list value="below,level,above,higher,lower,inherit"/>
+ <angle/>
+ <freeedit/>
+ </elevation>
+
+ <pitch>
+ <list value="inherit,x-low,medium,high,x-high,low"/>
+ <frequency/>
+ <freeedit/>
+ </pitch>
+
+ <pitch-range>
+ <number/>
+ <list value="inherit"/>
+ </pitch-range>
+
+ <play-during>
+ <list value="inherit,none,auto"/>
+ <uri mode="single" resourceType="audio"/>
+ </play-during>
+
+ <pause hasSub="yes">
+ <pause-after>
+ <time/>
+ <percentage/>
+ <list value="inherit"/>
+ <freeedit/>
+ </pause-after>
+ <pause-before>
+ <time/>
+ <percentage/>
+ <list value="inherit"/>
+ <freeedit/>
+ </pause-before>
+ </pause>
+
+ <richness>
+ <number/>
+ <list value="inherit"/>
+ </richness>
+
+ <speach-rate>
+ <list value="inherit,x-slow,medium,slow,fast,x-fast,faster,slower"/>
+ <number/>
+ </speach-rate>
+
+ <speak>
+ <list value="normal,none,spell-out,inherit"/>
+ </speak>
+
+ <speak-punctuation>
+ <list value="code,none,inherit"/>
+ </speak-punctuation>
+
+ <speak-header>
+ <list value="once,always,inherit"/>
+ </speak-header>
+
+ <speak-numeral>
+ <list value="digits,continuous,inherit"/>
+ </speak-numeral>
+
+ <stress>
+ <number/>
+ <list value="inherit"/>
+ </stress>
+
+ <voice-family>
+ <freeedit/>
+ <list value="inherit"/>
+ </voice-family>
+
+ <volume>
+ <list value="silent,x-soft,soft,medium,loud,x-loud,inherit"/>
+ <number/>
+ <percentage/>
+ </volume>
+
+</mediagroup>
+
+<mediagroup type="visual">
+
+ <background hasSub="yes">
+ <background-attachment>
+ <list value="scroll,fixed,inherit"/>
+ </background-attachment>
+ <background-color>
+ <colors/>
+ <list value="transparent,inherit"/>
+ </background-color>
+ <background-image>
+ <uri mode="single" resourceType="image"/>
+ <list value="none,inherit"/>
+ </background-image>
+ <background-position>
+ <doubleList>
+ <leftList value="top,center,bottom"/>
+ <rightList value="left,center,right"/>
+ </doubleList>
+ <freeedit/>
+ <doubleLength/>
+ <doublePercentage/>
+ <list value="inherit" editable="yes"/>
+ </background-position>
+ <background-repeat>
+ <list value="repeat,repeat-x,repeat-y,no-repeat,inherit"/>
+ </background-repeat>
+ </background>
+
+ <border hasSub="yes">
+ <border-collapse>
+ <list value="collapse,separate,inherit"/>
+ </border-collapse>
+ <border-color>
+ <colors/>
+ <list value="transparent,inherit" editable="yes"/>
+ </border-color>
+ <border-spacing>
+ <freeedit/>
+ <doubleLength/>
+ <list value="inherit" editable="yes"/>
+ </border-spacing>
+ <border-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit" editable="yes"/>
+ </border-style>
+ <border-top hasSub="yes">
+ <border-top-color>
+ <colors/>
+ <list value="transparent,inherit"/>
+ </border-top-color>
+ <border-top-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"/>
+ </border-top-style>
+ <border-top-width>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </border-top-width>
+ </border-top>
+
+ <border-left hasSub="yes">
+
+ <border-left-color>
+ <colors/>
+ <list value="transparent,inherit"/>
+ </border-left-color>
+
+ <border-left-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"/>
+ </border-left-style>
+
+ <border-left-width>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </border-left-width>
+
+ </border-left>
+
+ <border-right hasSub="yes">
+
+ <border-right-color>
+ <colors/>
+ <list value="transparent,inherit"/>
+ </border-right-color>
+
+ <border-right-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"/>
+ </border-right-style>
+
+ <border-right-width>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </border-right-width>
+
+ </border-right>
+
+ <border-bottom hasSub="yes">
+
+ <border-bottom-color>
+ <colors/>
+ <list value="transparent,inherit"/>
+ </border-bottom-color>
+
+ <border-bottom-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"/>
+ </border-bottom-style>
+
+ <border-bottom-width>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </border-bottom-width>
+
+ </border-bottom>
+
+ <border-width>
+ <edit/>
+ <list value="inherit" editable="yes"/>
+ </border-width>
+
+ </border>
+
+ <bottom>
+ <length/>
+ <percentage/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </bottom>
+
+ <caption-side>
+ <list value="top,bottom,inherit"/>
+ </caption-side>
+
+ <clear>
+ <list value="none,left,right,both,inherit"/>
+ </clear>
+
+ <clip>
+ <list value="auto,inherit" editable="yes"/>
+ </clip>
+
+ <color>
+ <colors/>
+ <list value="inherit"/>
+ </color>
+
+ <cursor>
+ <list value="inherit,auto,crosshair,default,pointer,move,e-resize,ne-resize,nw-resize,n-resize,se-resize,sw-resize,s-resize,w-resize,text,wait,help,progress"/>
+ <uri mode="multi" resourceType="mousePointer"/>
+ </cursor>
+
+ <direction>
+ <list value="ltr,rtl,inherit"/>
+ </direction>
+
+ <empty-cells>
+ <list value="show,hide,inherit"/>
+ </empty-cells>
+
+ <float>
+ <list value="left,right,none,inherit"/>
+ </float>
+
+ <font>
+ <list value="caption,icon,menu,message-box,small-caption,status-bar"/>
+ </font>
+
+ <font hasSub="yes">
+
+ <font-family>
+ <fontDialog/>
+ </font-family>
+
+ <font-size>
+ <length/>
+ <percentage/>
+ <list value="xx-small,x-small,small,medium,large,x-large,xx-large,larger,smaller,inherit"/>
+ <freeedit/>
+ </font-size>
+
+ <font-style>
+ <list value="normal,italic,oblique,inherit"/>
+ </font-style>
+
+ <font-variant>
+ <list value="normal,small-caps,inherit"/>
+ </font-variant>
+
+ <font-weight>
+ <list value="normal,bold,bolder,lighter,100,200,300,400,500,600,700,800,900,inherit"/>
+ </font-weight>
+
+ </font>
+
+ <height>
+ <length/>
+ <percentage/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </height>
+
+ <left>
+ <length/>
+ <percentage/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </left>
+
+ <letter-spacing>
+ <length/>
+ <list value="normal,inherit"/>
+ <freeedit/>
+ </letter-spacing>
+
+ <line-height>
+ <length/>
+ <percentage/>
+ <number/>
+ <list value="normal,inherit"/>
+ <freeedit/>
+ </line-height>
+
+ <list-style hasSub="yes">
+ <list-style-image>
+ <uri mode="single" resourceType="image"/>
+ <list value="none,inherit"/>
+ </list-style-image>
+ <list-style-position>
+ <list value="inside,outside,inherit"/>
+ </list-style-position>
+ <list-style-type>
+ <list value="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"/>
+ </list-style-type>
+ </list-style>
+
+ <margin hasSub="yes">
+ <margin-left>
+ <length/>
+ <percentage/>
+ <list value="auto"/>
+ <freeedit/>
+ </margin-left>
+ <margin-bottom>
+ <length/>
+ <percentage/>
+ <list value="auto"/>
+ <freeedit/>
+ </margin-bottom>
+ <margin-right>
+ <length/>
+ <percentage/>
+ <list value="auto"/>
+ <freeedit/>
+ </margin-right>
+ <margin-top>
+ <length/>
+ <percentage/>
+ <list value="auto"/>
+ <freeedit/>
+ </margin-top>
+ </margin>
+
+ <max-height>
+ <length/>
+ <percentage/>
+ <list value="none,inherit"/>
+ <freeedit/>
+ </max-height>
+
+ <max-width>
+ <length/>
+ <percentage/>
+ <list value="none,inherit"/>
+ <freeedit/>
+ </max-width>
+
+ <min-height>
+ <length/>
+ <percentage/>
+ <list value="none,inherit"/>
+ <freeedit/>
+ </min-height>
+
+ <min-width>
+ <length/>
+ <percentage/>
+ <list value="none,inherit"/>
+ <freeedit/>
+ </min-width>
+
+ <outline hasSub="yes">
+ <outline-color>
+ <colors/>
+ <list value="invert,inherit"/>
+ </outline-color>
+ <outline-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"/>
+ </outline-style>
+ <outline-width>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </outline-width>
+ </outline>
+
+ <overflow>
+ <list value="visible,hidden,scroll,auto,inherit"/>
+ </overflow>
+
+ <padding hasSub="yes">
+ <padding-top>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </padding-top>
+ <padding-right>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </padding-right>
+ <padding-bottom>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </padding-bottom>
+ <padding-left>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </padding-left>
+ </padding>
+
+ <page>
+ <freeedit/>
+ <list value="auto"/>
+ </page>
+
+ <page-break-after>
+ <list value="auto,always,avoid,left,right,inherit"/>
+ </page-break-after>
+
+ <page-break-before>
+ <list value="auto,always,avoid,left,right,inherit"/>
+ </page-break-before>
+
+ <page-break-inside>
+ <list value="avoid,auto,inherit"/>
+ </page-break-inside>
+
+ <position>
+ <list value="static,relative,absolute,fixed,inherit"/>
+ </position>
+
+ <quotes>
+ <list value="none,inherit" editable="yes"/>
+ </quotes>
+
+ <right>
+ <length/>
+ <percentage/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </right>
+
+ <table-layout>
+ <list value="auto,fixed,inherit"/>
+ </table-layout>
+
+ <text-align>
+ <list value="center,justify,right,left,inherit"/>
+ </text-align>
+
+ <text-decoration>
+ <list value="none,underline,overline,line-through,blink,inherit"/>
+ <doubleList>
+ <leftList value="none,underline,overline,line-through,blink,inherit"/>
+ <rightList value="none,underline,overline,line-through,blink,inherit"/>
+ </doubleList>
+ </text-decoration>
+
+ <text-indent>
+ <length/>
+ <percentage/>
+ <list value="inherit"/>
+ <freeedit/>
+ </text-indent>
+
+ <text-transform>
+ <list value="capitalize,uppercase,lowercase,none,inherit"/>
+ </text-transform>
+
+ <top>
+ <length/>
+ <percentage/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </top>
+
+ <unicode-bidi>
+ <list value="normal,embed,bidi-override,inherit"/>
+ </unicode-bidi>
+
+ <vertical-align>
+ <list value="baseline,inherit,sub,super,top,text-top,middle,bottom,text-bottom"/>
+ <length/>
+ <percentage/>
+ <freeedit/>
+ </vertical-align>
+
+ <visibility>
+ <list value="visible,hidden,collapse,inherit"/>
+ </visibility>
+
+ <white-space>
+ <list value="normal,pre,pre-wrap,pre-line,nowrap,inherit"/>
+ </white-space>
+
+ <width>
+ <length/>
+ <percentage/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </width>
+
+ <word-spacing>
+ <length/>
+ <list value="auto,inherit"/>
+ <freeedit/>
+ </word-spacing>
+
+ <z-index>
+ <integer minValue="-9999"/>
+ <list value="inherit,auto"/>
+ </z-index>
+
+</mediagroup>
+
+<mediagroup type="paged">
+
+ <page>
+ <list value="auto"/>
+ <freeedit/>
+ </page>
+
+ <page-break-after>
+ <list value="auto,always,avoid,left,right,inherit"/>
+ </page-break-after>
+
+ <page-break-before>
+ <list value="auto,always,avoid,left,right,inherit"/>
+ </page-break-before>
+
+ <page-break-inside>
+ <list value=",avoid,auto,inherit"/>
+ </page-break-inside>
+
+</mediagroup>
+
+<mediagroup type="interactive">
+
+ <cursor>
+ <list value="inherit,auto,crosshair,default,pointer,move,e-resize,ne-resize,nw-resize,n-resize,se-resize,sw-resize,s-resize,w-resize,text,wait,help,progress"/>
+ <uri mode="multi" resourceType="mousePointer"/>
+ </cursor>
+
+ <outline hasSub="yes">
+ <outline-color>
+ <colors/>
+ <list value="invert,inherit"/>
+ </outline-color>
+ <outline-style>
+ <list value="none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"/>
+ </outline-style>
+ <outline-width>
+ <length/>
+ <list value="thin,medium,thick,inherit"/>
+ <freeedit/>
+ </outline-width>
+ </outline>
+
+</mediagroup>
+
+<mediagroup type="all">
+
+ <content>
+ <list value="open-quote,close-quote,no-open-quote,no-close-quote,inherit" editable="yes"/>
+ </content>
+
+ <counter-increment>
+ <list value="none,inherit" editable="yes"/>
+ </counter-increment>
+
+ <counter-reset>
+ <list value="none,inherit" editable="yes"/>
+ </counter-reset>
+
+ <display>
+ <list value="inline,inline-block,block,list-item,run-in,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"/>
+ </display>
+
+ </mediagroup>
+</css>
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 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<dtds>
+ <dtd default="yes" name="" nickName="HTML strict">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</dtd>
+ <dtd name="-//w3c//dtd html 4.01 transitional//en" nickName="HTML transitional">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</dtd>
+ <dtd name="-//W3C//DTD MathML 2.0//EN" nickName="MathML">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</dtd>
+</dtds>
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+<pseudo>
+ <element name="after"/>
+ <element name="before"/>
+ <element name="first-child"/>
+ <element name="first-letter"/>
+ <element name="first-line" appliesTo="p"/>
+ <class name="active"/>
+ <class name="focus"/>
+ <class name="hover"/>
+ <class name="lang"/>
+ <class name="link"/>
+ <class name="visited"/>
+</pseudo> \ 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 <qcombobox.h>
+ #include "csseditor_globals.h"
+ #include "propertysetter.h"
+ #include <qregexp.h>
+
+
+
+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 <kglobal.h>
+#include <kcharsets.h>
+#include <qtextcodec.h>
+
+/**
+ *@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 <qcombobox.h>
+
+/**
+ *@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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>encodingSelectorS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>encodingSelectorS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>228</width>
+ <height>109</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Encoding Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Select encoding:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox">
+ <property name="name">
+ <cstring>cbEncoding</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>encodingSelectorS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>encodingSelectorS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <qfontdatabase.h>
+#include <qstringlist.h>
+#include <qlistbox.h>
+#include <qfont.h>
+#include <klocale.h>
+#include <qiconset.h>
+#include <qpixmap.h>
+#include <kiconloader.h>
+#include <kpushbutton.h>
+#include <kglobalsettings.h>
+#include <qregexp.h>
+#include <qlineedit.h>
+#include <qwhatsthis.h>
+
+#include<kdebug.h>
+
+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 <qmap.h>
+class QStringList;
+
+class fontFamilyChooser : public fontFamilyChooserS
+{
+ Q_OBJECT
+ private:
+ enum FontOrigin { available, generic };
+ QString m_currentSelectedFont;
+ FontOrigin m_fontOrigin;
+ int m_currentSelectedFontIndex;
+ QMap<QString,FontOrigin> 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>fontFamilyChooserS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>fontFamilyChooserS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>487</width>
+ <height>399</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Font Family Chooser</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout42</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout40</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout39</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout36</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout20</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Available system font families:</string>
+ </property>
+ </widget>
+ <widget class="QListBox">
+ <property name="name">
+ <cstring>lbAvailable</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout15</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Generic family:</string>
+ </property>
+ </widget>
+ <widget class="QListBox">
+ <item>
+ <property name="text">
+ <string>cursive</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>fantasy</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>monospace</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>sans-serif</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>serif</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>lbGeneric</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout38</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer20</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="radioButtonExclusive">
+ <bool>false</bool>
+ </property>
+ <property name="selectedId" stdset="0">
+ <number>-1</number>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="KPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>pbMoveUp</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>pbAdd</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbRemove</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>pbMoveDown</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer21</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Selected font families:</string>
+ </property>
+ </widget>
+ <widget class="QListBox">
+ <property name="name">
+ <cstring>lbSelected</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>lePreview</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout41</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>313</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>pbOK</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>fontFamilyChooserS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>pbOK</sender>
+ <signal>clicked()</signal>
+ <receiver>fontFamilyChooserS</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
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 <qhbox.h>
+
+/**
+ *@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 <qhbox.h>
+#include <qptrlist.h>
+#include "doubleeditors.h"
+#include <qcombobox.h>
+#include <qslider.h>
+
+#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 <qlineedit.h>
+#include <qcombobox.h>
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+#include <qregexp.h>
+#include <qvbox.h>
+
+#include <kpushbutton.h>
+#include <kdebug.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <klineedit.h>
+
+
+#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 <qhbox.h>
+#include <qptrlist.h>
+#include <qcombobox.h>
+
+
+class miniEditor;
+class KPushButton;
+
+
+/**
+ *@author gulmini luciano
+ */
+
+class propertySetter : public QHBox {
+ Q_OBJECT
+
+ private:
+ unsigned int m_ind;
+ QPtrList<QWidget> 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 <qregexp.h>
+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 <qsyntaxhighlighter.h>
+
+/**
+ *@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 <qstringlist.h>
+#include "cssshpropertyparser.h"
+#include <kdebug.h>
+#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<QString,QString> 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<QString,QString>::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<QString,QString> 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<QString,QString>();//dummy instruction avoiding a pedantic warning; can never be reached
+}
+
+QMap<QString,QString> ShorthandFormer::expandCueProp(const QStringList& l){
+ return expandImplementation("cue",l);
+}
+
+QMap<QString,QString> ShorthandFormer::expandPauseProp(const QStringList& l){
+ return expandImplementation("pause",l);
+}
+
+QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){
+
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){
+ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandPaddingProp(const QStringList& l){
+ return expandImplementation2("padding", l);
+}
+
+ QMap<QString,QString> 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 <qmap.h>
+class QString;
+class QStringList;
+
+class ShorthandFormer{
+public:
+ ShorthandFormer(){}
+ ShorthandFormer( QMap<QString,QString> m );
+ ~ShorthandFormer(){}
+ QString compress();
+ QMap<QString,QString> expand(const QString& propertyName, const QString& propertyValue);
+ static QStringList SHFormList();
+
+private:
+ QMap<QString,QString> 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<QString,QString> expandCueProp(const QStringList& l);
+ QMap<QString,QString> expandPauseProp(const QStringList& l);
+ QMap<QString,QString> expandBackgroundProp(const QStringList& l);
+ QMap<QString,QString> expandFontProp(const QStringList& l);
+ QMap<QString,QString> expandOutlineProp(const QStringList& l);
+ QMap<QString,QString> expandListstyleProp(const QStringList& l);
+ QMap<QString,QString> expandBoxSide(const QString& subPropName, const QStringList& l);
+ QMap<QString,QString> expandBorderProp(const QStringList& l);
+ QMap<QString,QString> expandBox(const QString& subPropName, const QStringList& l);
+ QMap<QString,QString> expandPaddingProp(const QStringList& l);
+ QMap<QString,QString> expandMarginProp(const QStringList& l);
+
+ QMap<QString,QString> expandImplementation(const QString& propertyName, const QStringList& l);
+ QMap<QString,QString> 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 <klineedit.h>
+
+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; i<m_cb->count();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 <qcombobox.h>
+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 <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; version 2 of the License.
+ *
+ ***************************************************************************/
+
+//qt includes
+#include <qlineedit.h>
+#include <qtooltip.h>
+#include <qiconset.h>
+#include <qlabel.h>
+#include <qfileinfo.h>
+
+//kde includes
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <kurl.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+
+//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 <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; 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 <klocale.h>
+#include <kdebug.h>
+
+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<m_styleSheet.length();i++){
+ QString temp;
+ if(m_styleSheet[i] == ' ' || m_styleSheet[i] == '\n' || m_styleSheet[i] == '\t' )
+ ws++;
+ else break;
+ }
+ return ws;
+}
+
+void stylesheetParser::parse(){
+ if(!m_stopProcessing){
+ if(!m_styleSheet.isEmpty()){
+ if(m_styleSheet.startsWith("/*"))
+ parseComment();
+ else if(m_styleSheet.startsWith("@page"))
+ parseAtRules1();
+ else if(m_styleSheet.startsWith("@media"))
+ parseAtRules1();
+ else if(m_styleSheet.startsWith("@import"))
+ parseAtRules2();
+ else if(m_styleSheet.startsWith("@charset"))
+ parseAtRules2();
+ else parseSelector();
+ }
+ else return;
+ }
+}
+
+void stylesheetParser::parseComment(){
+ bool stopProcessingComment=false;
+ unsigned int k;
+ for(k=2;k<m_styleSheet.length()-1;k++){
+ QString temp;
+ temp.append(m_styleSheet[k]).append(m_styleSheet[k+1]);
+ if(temp=="*/") {
+ k+=2;
+ stopProcessingComment=true;
+ break;
+ }
+ }
+
+ if(stopProcessingComment){
+ int ws=whiteSpaces(k);
+ QPair<QString,unsigned int> 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<QString,unsigned int> 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<QString,unsigned int> 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<QString,unsigned int> 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 <qmap.h>
+#include <qpair.h>
+#include <qobject.h>
+
+/**
+ *@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<QString, QPair<QString,unsigned int> > 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<QString, QPair<QString,unsigned int> > 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 <qlineedit.h>
+#include <qcombobox.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+#include <kpushbutton.h>
+#include <kurl.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kfiledialog.h>
+#include <kimagefilepreview.h>
+
+#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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>CVSCommitDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+***************************************************************************/
+</comment>
+<author>(C) 2004 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>CVSCommitDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CVS Commit </string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KListBox" row="1" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>fileList</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Commit the following files:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>messageCombo</cstring>
+ </property>
+ <property name="duplicatesEnabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Older &amp;messages:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>messageCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Log message:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>logEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QTextEdit" row="5" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>logEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="6" column="3">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="6" column="2">
+ <property name="name">
+ <cstring>okButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="6" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>80</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>CVSCommitDlgS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>CVSCommitDlgS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>messageCombo</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>logEdit</receiver>
+ <slot>setText(const QString&amp;)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>fileList</tabstop>
+ <tabstop>messageCombo</tabstop>
+ <tabstop>logEdit</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistbox.h</includehint>
+</includehints>
+</UI>
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 <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
+ *
+ ***************************************************************************/
+
+//qt include
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qradiobutton.h>
+#include <qtextedit.h>
+#include <qtextstream.h>
+#include <qtimer.h>
+
+//kde includes
+#include <kaction.h>
+#include <kapplication.h>
+#include <kcombobox.h>
+#include <kdeversion.h>
+#include <kiconloader.h>
+#include <klineedit.h>
+#include <klistbox.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+
+// CvsService
+#include <repository_stub.h>
+#include <cvsservice_stub.h>
+#include <cvsjob_stub.h>
+
+#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("<qt>Remove the following files from the repository?<br>This will remove your <b>working copy</b> as well.</qt>"), 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("<qt>The CVS command <b>%1</b> has failed. The error code was <i>%2</i>.</qt>").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 <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
+ *
+ ***************************************************************************/
+
+#ifndef CVSSERVICE_H
+#define CVSSERVICE_H
+
+//qt includes
+#include <qobject.h>
+
+//kde includes
+#include <dcopref.h>
+
+//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 <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
+ *
+ ***************************************************************************/
+
+#ifndef CVSSERVICEDCOPIF_H
+#define CVSSERVICEDCOPIF_H
+
+#include <qstring.h>
+#include <dcopobject.h>
+
+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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>CVSUpdateToDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+***************************************************************************/
+</comment>
+<author>(C) 2005 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>CVSUpdateToDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>499</width>
+ <height>213</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>CVS Update</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>dateRadioButton</cstring>
+ </property>
+ <property name="text">
+ <string>Update to &amp;date ('yyyy-mm-dd'):</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>tagRadioButton</cstring>
+ </property>
+ <property name="text">
+ <string>Update to &amp;tag/branch:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>tagCombo</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>dateLineEdit</cstring>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>295</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="0" column="1">
+ <property name="name">
+ <cstring>okButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>CVSUpdateToDlgS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>CVSUpdateToDlgS</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <klocale.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <kdeversion.h>
+#include <klistview.h>
+
+// 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<BacktraceListviewItem*>(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 <klistview.h>
+#include <kpopupmenu.h>
+#include <qptrlist.h>
+
+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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <qlistview.h>
+#include <qlineedit.h>
+#include <qextfileinfo.h>
+#include <qcolor.h>
+#include <kcombobox.h>
+#include <kled.h>
+#include <kiconloader.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+
+#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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ConditionalBreakpointDialogS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ConditionalBreakpointDialogS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>564</width>
+ <height>432</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Add Conditional Breakpoint</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblExpression</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Expression:</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>Break When</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioOnTrue</cstring>
+ </property>
+ <property name="text">
+ <string>When expression is true</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioOnChange</cstring>
+ </property>
+ <property name="text">
+ <string>When expression changes</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>comboExpression</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KLed" row="0" column="2">
+ <property name="name">
+ <cstring>ledWarning</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="state">
+ <enum>Off</enum>
+ </property>
+ <property name="color">
+ <color>
+ <red>255</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Lit when a finding a single equal sign in expression (common error)</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>groupBox10</cstring>
+ </property>
+ <property name="title">
+ <string>Only Break In</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblValue</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>File:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblValue_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Objects of class:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>lblValue_3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Function:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineFile</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>lineFunction</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>buttonClearFile</cstring>
+ </property>
+ <property name="text">
+ <string>x</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="2">
+ <property name="name">
+ <cstring>buttonClearFunction</cstring>
+ </property>
+ <property name="text">
+ <string>x</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>buttonClearClass</cstring>
+ </property>
+ <property name="text">
+ <string>x</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineClass</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>ConditionalBreakpointDialogS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>ConditionalBreakpointDialogS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kled.h</includehint>
+</includehints>
+</UI>
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, <Linus@McCabe.nu>
+ *
+ * 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 <kserversocket.h>
+#include <kstreamsocket.h>
+#include <kdebug.h>
+#include <klocale.h>
+
+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, <Linus@McCabe.nu>
+ *
+ * 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 <kserversocket.h>
+#include <kstreamsocket.h>
+
+#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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <ktextbrowser.h>
+
+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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>DBGpSettingsS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>DBGpSettingsS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>569</width>
+ <height>467</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>DBGp Settings</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Ca&amp;ncel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>tabWidget2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;General</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>Connection Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerListenPort</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Listen port:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineServerListenPort</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblRequest</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Request URL:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineStartSession</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See "What's This?" for available variables</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>%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</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Directory Mapping</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>lineServerBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Server basedir:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineLocalBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>checkLocalProject</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblDebuggerLocalBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Local basedir:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblLocalProject</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Local project:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>groupBox3_2</cstring>
+ </property>
+ <property name="title">
+ <string>Profiling</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineProfilerFilename</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See "What's This?" for available variables</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Path to the profiler output
+%a - Appid as returned from the debugger
+%c - CRC32 of the initial filepath</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblRequest_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Profiler output:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblLocalProject_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Map profiler output:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="1">
+ <property name="name">
+ <cstring>checkProfilerMapFilename</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>If this checkbox is checked, the profiler output filename will be mapped using the basedirs just like the remote script files.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>lblLocalProject_2_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Open automatically:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="1">
+ <property name="name">
+ <cstring>checkProfilerAutoOpen</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>If this checkbox is checked, the profiler output will be opened automatically once the session ends.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Deb&amp;ug Behavior</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>Error Handling</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="4" column="1">
+ <property name="name">
+ <cstring>checkBreakOnUserError</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>User errors</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="5" colspan="1">
+ <property name="name">
+ <cstring>lblBreakOn</cstring>
+ </property>
+ <property name="text">
+ <string>Break on:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignTop</set>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="1">
+ <property name="name">
+ <cstring>checkBreakOnUserWarning</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>User warnings</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="1">
+ <property name="name">
+ <cstring>checkBreakOnUserNotice</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>User notices</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>checkBreakOnNotice</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Notices</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="1">
+ <property name="name">
+ <cstring>checkBreakOnWarning</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>W&amp;arnings</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox5</cstring>
+ </property>
+ <property name="title">
+ <string>Execution</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="3">
+ <item>
+ <property name="text">
+ <string>Pause</string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Run</string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboDefaultExecutionState</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblDefaultExecutionMode</cstring>
+ </property>
+ <property name="text">
+ <string>Default mode:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer4_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;About</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;h4&gt;DBGp Plugin for Quanta +&lt;/h4&gt;</string>
+ </property>
+ </widget>
+ <widget class="KTextBrowser" row="1" column="0">
+ <property name="name">
+ <cstring>textAbout</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head&gt;&lt;meta name="qrichtext" content="1" /&gt;&lt;/head&gt;&lt;body style="font-size:10pt;font-family:Bitstream Vera Sans"&gt;
+&lt;p&gt;&lt;span style="font-weight:600"&gt;About&lt;/span&gt;&lt;/p&gt;
+&lt;p&gt;DBGp is a debugger protocol defined by the developers of Xdebug. This plugin integrates debuggers that supports the DBGp protocol with Quanta. &lt;/p&gt;
+&lt;p&gt;In order to use this plugin for PHP debugging, you need to get a supporting debugger. Currently, only &lt;a href="http://xdebug.org"&gt;Xdebug&lt;/a&gt; is tested.&lt;/p&gt;
+&lt;p&gt;For more info about Xdebug, please visit the Xdebug website at &lt;a href="http://xdebug.org"&gt;http://xdebug.org&lt;/a&gt; &lt;/p&gt;
+&lt;p&gt;&lt;span style="font-weight:600"&gt;Technical Details&lt;/span&gt;&lt;/p&gt;
+&lt;p&gt;This version of the debugger supports version %PROTOCOLVERSION% of the DBGp protocol. &lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="PNG" length="696">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000027f49444154388d7d93df4b53611cc69ff73de7ccb375dcdad46d2e3269036d21c4420a0b898484e82a08a2a02238a41741dd77e14dff4074d521efbae8a61b2f6a892062604e53117165e28f864dd73adb999e3cdb79cfe9c25a9c4dfa5e3e3ccfe7fdfee02538a412830b226075c3b662804d006b9567a5d4b4d2a7d77a494d5002c81370c20075797dc7fd157804139f77445846a14898fe9a67ead38f4aff661d2031b81006a1e3a16053c7ddcb3e5c3cc5c1ebe1000046c5c6a7af3a86c776b1b2bef3c3cdb2373ebcb83a5e052406e725103a9388473a1e5d13d1e8e60f9b0c1566e1655245727a3b2f19cb5d13c3b7bfff71da43a16073c7bd4b024667b56aa0b7cb0b009858fca75deff1622367357d59d58764597e481203332238317be74ad8d7798ca2ffacbf6a4eceaa00e0d0dea554ac6feb50deaabbc15f635d3c806e9728f9fc6e865cc172b49c2b9875633c1bf34033fca00db6a495a33d3c805840a2c8692638426a00953a40a9dc0000a0820842f9180f80941987cd3c0717ef04bc598ac02354f0b80642c8c1f6096cca03d66a51b791ce37d7bd06007a45a80b7304d8370db82c3d4379564a31a350a404a0f45086a3dc0283c83358fbea5e80a5e7e8b4d2a713a60f53238b36afe630c75b54c45b5487d6eed3408d2c04333712e437b608009c93937e2634a5cec79ba3019febbf1dfc2c9631b594cb448cd19b216e2d55ddda0579245a165adf9f89f94e76b649203517b16d1be9cd5dccafa8997065f241982c4f2a8aa2395cbdf75fb5eac289218fe7c8adf6904b3ada7870b242c9c07ab6bc67e8ea48c89c7a1ee2d6161545d1809adf0800b22cbbbe99a7231a17ed21948f11d894587a26c0d273417e630b405e5194f25fff6f6493fb9b9d8e82910000000049454e44ae426082</data>
+ </image>
+ <image name="image1">
+ <data format="PNG" length="229">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000ac49444154388ded94c10dc33008453f5637ea061ec24cd2293289976083ce440f6d2262b012da5b95277188133f7f4560e0e2039dfc4eb39e621f164097894455c30280debbdb539c0180881c25dcd15a73f2509c8588c0cc3b795a4c445b0170bf65e596158f821969f19af4e8b02bf1f7e2b3890bf09eb8f145660223b63eb6a267ad00e209b47d6cfb39143f824be42e825aab5b4f27b6f2993483db2c223a4aa3db6b0633ff14e80f79015c6574466adcb13f0000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>DBGpSettingsS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>DBGpSettingsS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tabWidget2</tabstop>
+ <tabstop>lineLocalBasedir</tabstop>
+ <tabstop>lineServerBasedir</tabstop>
+ <tabstop>lineServerListenPort</tabstop>
+ <tabstop>checkBreakOnNotice</tabstop>
+ <tabstop>checkBreakOnWarning</tabstop>
+ <tabstop>checkBreakOnUserNotice</tabstop>
+ <tabstop>checkBreakOnUserWarning</tabstop>
+ <tabstop>checkBreakOnUserError</tabstop>
+ <tabstop>comboDefaultExecutionState</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<slots>
+ <slot>slotLocalProjectToggled(bool)</slot>
+ <slot>checkLocalProject_toggled(bool)</slot>
+ <slot>slotLocalProjectToggle(bool)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>ktextbrowser.h</includehint>
+</includehints>
+</UI>
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, <Linus@McCabe.nu>
+ *
+ * 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 <qcstring.h>
+#include <kmdcodec.h>
+
+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, <Linus@McCabe.nu>
+ *
+ * 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 <qstring.h>
+#include <qcstring.h>
+
+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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <errno.h>
+#include <kdebug.h>
+#include <kdeversion.h>
+#include <kgenericfactory.h>
+#include <klocale.h>
+#include <kmdcodec.h>
+#include <kmessagebox.h>
+#include <krun.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qfile.h>
+#include <qlineedit.h>
+#include <qmap.h>
+#include <qregexp.h>
+#include <qslider.h>
+#include <qstring.h>
+
+#include <stdarg.h>
+
+#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>("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<QString>::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<QString>::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 )
+{
+ /*
+ <map name="bool" type="bool" xsi:type="xsd:boolean"></map>
+ <map name="int" type="int" xsi:type="xsd:decimal"></map>
+ <map name="float" type="float" xsi:type="xsd:double"></map>
+ <map name="string" type="string" xsi:type="xsd:string"></map>
+ <map name="null" type="null"></map>
+ <map name="array" type="hash"></map>
+ <map name="object" type="object"></map>
+ <map name="resource" type="resource"></map>
+ */
+
+// // 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:
+ <property name="$arrayVar" fullname="$arrayVar" address="-1073754976" type="hash" children="1" numchildren="4">
+ <property name="birthyear" fullname="$arrayVar['birthyear']" address="135522364" type="int">
+ <![CDATA[1949]]>
+ </property>
+ <property name="songs" fullname="$arrayVar['songs']" address="135522236" type="hash" children="1" numchildren="3">
+ <property name="0" fullname="$arrayVar['songs'][0]" address="135522332" type="string" encoding="base64">
+ <![CDATA[SW5ub2NlbnQgV2hlbiBZb3UgRHJlYW0=]]>
+ </property>
+ <property name="1" fullname="$arrayVar['songs'][1]" address="135522300" type="string" encoding="base64">
+ <![CDATA[Q2hyaXN0bWFzIENhcmQgRnJvbSBBIEhvb2tlcg==]]>
+ </property>
+ </property>
+ </property>
+ */
+ 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<DebuggerVariable> 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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <kserversocket.h>
+#include <kstreamsocket.h>
+#include <qptrlist.h>
+#include <kurl.h>
+#include <qdom.h>
+
+#include "debuggerclient.h"
+#include "dbgpnetwork.h"
+
+typedef QValueList<QString> WatchList;
+typedef QMap<QString, QString> 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 <kdebug.h>
+
+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 <qstring.h>
+
+
+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 <qobject.h>
+#include <ktexteditor/markinterfaceextension.h>
+#include <kdebug.h>
+
+#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 <qobject.h>
+#include <qstring.h>
+#include <qvaluelist.h>
+
+class DebuggerBreakpoint;
+ typedef QValueList<DebuggerBreakpoint*> 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 <klocale.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <kdeversion.h>
+#include <kinputdialog.h>
+#include <klistview.h>
+
+// 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<DebuggerBreakpointViewItem*>(firstChild());
+ while(item)
+ {
+ if(item->breakpoint() == bp)
+ break;
+
+ item = dynamic_cast<DebuggerBreakpointViewItem*>(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<DebuggerBreakpointViewItem*>(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<DebuggerBreakpointViewItem*>(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 <klistview.h>
+#include <kpopupmenu.h>
+#include <qptrlist.h>
+#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 <linus@mccabe.nu>
+ 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 <ktexteditor/document.h>
+#include <ktexteditor/markinterfaceextension.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kcombobox.h>
+#include <kparts/componentfactory.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+#include <qextfileinfo.h>
+#include <kinputdialog.h>
+#include <qlineedit.h>
+
+#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<DebuggerClient>(service, this, 0, QStringList(), &errCode);
+ QObject* obj = KParts::ComponentFactory::createInstanceFromService<QObject>(service, this, 0, QStringList(), &errCode);
+ if (obj && obj->inherits("DebuggerClient"))
+ m_client = static_cast<DebuggerClient *>(obj);
+
+ //kdDebug(24002) << service->name() << " (" << m_client << ")" << endl;
+
+ if(!m_client)
+ {
+ emit hideSplash();
+ KMessageBox::error(NULL, i18n("<qt>Unable to load the debugger plugin, error code %1 was returned: <b>%2</b>.</qt>").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<KTextEditor::MarkInterface*>(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 <linus@mccabe.nu>
+ 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 <qobject.h>
+#include <qstring.h>
+
+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 <kiconloader.h>
+#include <kdockwidget.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <qstring.h>
+#include <khtmlview.h>
+#include <kmditoolviewaccessor.h>
+#include <kstatusbar.h>
+
+#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 <qobject.h>
+#include <qptrlist.h>
+#include <kmditoolviewaccessor.h>
+#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 <kdebug.h>
+#include <klocale.h>
+
+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 <qstring.h>
+#include <qptrlist.h>
+#include <klistview.h>
+
+namespace DebuggerVariableTypes
+{
+
+ enum VarType {
+ Object,
+ Resource,
+ Reference,
+ Array,
+ String,
+ Integer,
+ Float,
+ Boolean,
+ Error,
+ Undefined
+ };
+}
+
+class DebuggerVariable;
+typedef QPtrList<DebuggerVariable> 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>DebuggerVariableSetS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>DebuggerVariableSetS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>414</width>
+ <height>129</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Set Value of Variable</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineVariable</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblVariable</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Variable:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblValue</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>New value:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignTop</set>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineValue</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>DebuggerVariableSetS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>DebuggerVariableSetS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>lineVariable</tabstop>
+ <tabstop>lineValue</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <ktextbrowser.h>
+
+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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>GubedSettingsS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>GubedSettingsS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>659</width>
+ <height>527</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Gubed Settings</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Ca&amp;ncel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>tabWidget2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>1</verstretch>
+ </sizepolicy>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;General</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Directory Mapping</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Server basedir:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblDebuggerLocalBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Local basedir:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineServerBasedir</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineLocalBasedir</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>Connection Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>lineServerListenPort</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>lineServerPort</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineServerHost</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>checkUseProxy</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblDebuggerUseProxe</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Use proxy</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerHost</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Proxy host:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerPort</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Proxy port:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerListenPort</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Listen port:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>groupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>Mode</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineStartSession</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See "What's This?" for available variables</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>%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</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>optAddInclude</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Add include</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>optStartSession</cstring>
+ </property>
+ <property name="text">
+ <string>Start session:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Deb&amp;ug Behavior</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>Error Handling</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="4" column="1">
+ <property name="name">
+ <cstring>checkBreakOnUserError</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>User errors</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="5" colspan="1">
+ <property name="name">
+ <cstring>lblBreakOn</cstring>
+ </property>
+ <property name="text">
+ <string>Break on:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignTop</set>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="1">
+ <property name="name">
+ <cstring>checkBreakOnUserWarning</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>User warnings</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="1">
+ <property name="name">
+ <cstring>checkBreakOnUserNotice</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>User notices</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="1">
+ <property name="name">
+ <cstring>checkBreakOnNotice</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Notices</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="1">
+ <property name="name">
+ <cstring>checkBreakOnWarning</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>W&amp;arnings</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer4_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox5</cstring>
+ </property>
+ <property name="title">
+ <string>Execution</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>lblDelayFast</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Fast</string>
+ </property>
+ </widget>
+ <widget class="QSlider" row="1" column="2">
+ <property name="name">
+ <cstring>sliderDisplayDelay</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>27</height>
+ </size>
+ </property>
+ <property name="maxValue">
+ <number>200</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="3">
+ <property name="name">
+ <cstring>lblDelaySlow</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Slow</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1" rowspan="1" colspan="3">
+ <item>
+ <property name="text">
+ <string>Pause</string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image0</pixmap>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Trace</string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image1</pixmap>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Run</string>
+ </property>
+ <property name="pixmap">
+ <pixmap>image2</pixmap>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboDefaultExecutionState</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblDefaultExecutionMode</cstring>
+ </property>
+ <property name="text">
+ <string>Default mode:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblDisplayDelay</cstring>
+ </property>
+ <property name="text">
+ <string>Run speed:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>A&amp;bout</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;h4&gt;Gubed PHP Debugger Plugin for Quanta +&lt;/h4&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>pixmapLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="pixmap">
+ <pixmap>image3</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="KTextBrowser" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textAbout</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head&gt;&lt;meta name="qrichtext" content="1" /&gt;&lt;/head&gt;&lt;body style="font-size:10pt;font-family:Bitstream Vera Sans"&gt;
+&lt;p&gt;&lt;span style="font-weight:600"&gt;About&lt;/span&gt;&lt;/p&gt;
+&lt;p&gt;Gubed is a PHP debugger available for free through GPL. This plugin integrates Gubed with Quanta. &lt;/p&gt;
+&lt;p&gt;In order to use this plugin for PHP debugging, you need to get the Quanta package from the Gubed project page, &lt;a href="http://sourceforge.net/projects/gubed"&gt;http://sourceforge.net/projects/gubed&lt;/a&gt;, at SourceForge &lt;/p&gt;
+&lt;p&gt;For more info about Gubed, please visit the Gubed website at &lt;a href="http://gubed.sf.net"&gt;http://gubed.sf.net&lt;/a&gt; &lt;/p&gt;
+&lt;p&gt;&lt;span style="font-weight:600"&gt;Technical Details&lt;/span&gt;&lt;/p&gt;
+&lt;p&gt;This version of the debugger supports the %PROTOCOLVERSION% version of the Gubed protocol. &lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<images>
+ <image name="image0">
+ <data format="PNG" length="696">89504e470d0a1a0a0000000d49484452000000100000001008060000001ff3ff610000027f49444154388d7d93df4b53611cc69ff73de7ccb375dcdad46d2e3269036d21c4420a0b898484e82a08a2a02238a41741dd77e14dff4074d521efbae8a61b2f6a892062604e53117165e28f864dd73adb999e3cdb79cfe9c25a9c4dfa5e3e3ccfe7fdfee02538a412830b226075c3b662804d006b9567a5d4b4d2a7d77a494d5002c81370c20075797dc7fd157804139f77445846a14898fe9a67ead38f4aff661d2031b81006a1e3a16053c7ddcb3e5c3cc5c1ebe1000046c5c6a7af3a86c776b1b2bef3c3cdb2373ebcb83a5e052406e725103a9388473a1e5d13d1e8e60f9b0c1566e1655245727a3b2f19cb5d13c3b7bfff71da43a16073c7bd4b024667b56aa0b7cb0b009858fca75deff1622367357d59d58764597e481203332238317be74ad8d7798ca2ffacbf6a4eceaa00e0d0dea554ac6feb50deaabbc15f635d3c806e9728f9fc6e865cc172b49c2b9875633c1bf34033fca00db6a495a33d3c805840a2c8692638426a00953a40a9dc0000a0820842f9180f80941987cd3c0717ef04bc598ac02354f0b80642c8c1f6096cca03d66a51b791ce37d7bd06007a45a80b7304d8370db82c3d4379564a31a350a404a0f45086a3dc0283c83358fbea5e80a5e7e8b4d2a713a60f53238b36afe630c75b54c45b5487d6eed3408d2c04333712e437b608009c93937e2634a5cec79ba3019febbf1dfc2c9631b594cb448cd19b216e2d55ddda0579245a165adf9f89f94e76b649203517b16d1be9cd5dccafa8997065f241982c4f2a8aa2395cbdf75fb5eac289218fe7c8adf6904b3ada7870b242c9c07ab6bc67e8ea48c89c7a1ee2d6161545d1809adf0800b22cbbbe99a7231a17ed21948f11d894587a26c0d273417e630b405e5194f25fff6f6493fb9b9d8e82910000000049454e44ae426082</data>
+ </image>
+ <image name="image1">
+ <data format="PNG" length="258">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000c949444154388ded93db0d83300c45af5137ea06190226610a260943d8137426f707a33c0c49a4f6a7ea91f261149f5c2207f873409dfb74d43301c006e8d66856557701408cb1ea9d3c0933b71266ccf35cc95df1284484655932f9b09888ce05a0ba965bf12b045cddf995a824139becc99cd5656211c9928b48fd67a5d4634df631b38610e848af2202ab5df19d7ced9ff736c56c6b3a82aa7a5bf74aadd79acf65b5e13d9416da432a7e8c9e60f35b9c5a7d1b16b7e6d7f8c893f6e84a1c63c4beefdfcaf0ebbc010507b65c1e0ebcf80000000049454e44ae426082</data>
+ </image>
+ <image name="image2">
+ <data format="PNG" length="229">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000ac49444154388ded94c10dc33008453f5637ea061ec24cd2293289976083ce440f6d2262b012da5b95277188133f7f4560e0e2039dfc4eb39e621f164097894455c30280debbdb539c0180881c25dcd15a73f2509c8588c0cc3b795a4c445b0170bf65e596158f821969f19af4e8b02bf1f7e2b3890bf09eb8f145660223b63eb6a267ad00e209b47d6cfb39143f824be42e825aab5b4f27b6f2993483db2c223a4aa3db6b0633ff14e80f79015c6574466adcb13f0000000049454e44ae426082</data>
+ </image>
+ <image name="image3">
+ <data format="PNG" length="1970">89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7af400000779494441545885b5566b6c54c715fe66ee6beededd8df7858dedc5181b87c501b2b20954e0d44a698df3a022a8addaa424229512f58168d52a951a5a4ad2a2d21f55da8aa6ed8f0ab595528ad434a452aa483c6a6a648bc486605b1830c602d65e83d7f6ee7dedde7ba73f1c6ffc0253851ce9fc9973bef9be3973667408e71cf7c39e6f6808d7aa6af2c1254bb6088a12bb383939f4565fdfdb1d0303dd77c389f783bca2a222f06a4dcdcf1f59ba744b2c1cae56348dfa54d53c75e5ca04804f57c02bab567dfe8fcb96fdf4b1d2d2cf4014411c07c8e711571435ca5862313cfd24e46b2391ea164d3bb891b1f5300cc0b2a6dcb6e127040151acf9d404fc301edffc7a34fab746e061d53044aeeb80ae835b16609a7800404010d6eddfbf9fdc7701d5d5d5be0d94ee7b08781886011806609a806d03f93ce03850008464397ce8d0a192fb2ae05b3535f17d9ef7c61724e9739a61487c62023c9b856b1828982690cf83e7f3a08e8387a251616c6c6ccdddf6fbbf9b30e179df7854559f22ba0e18060cd745976de3a4aea32049485a163657566289e761453008d7756b00fce7130b7876dd3aadceb6bffa4224b2376c9ac4721c9cb52cfcc034718173b8d389a914b49e1ebc9048e0f1ba3a445475755d5d9ddcdfdf9fff44021ee47ccbd668f4fb61cf23b02c9c721cbc66db38b7c047a63b0edee8e9c1bbd7afc3f5bcd2542aa50158500099fe09abaaaa986d5981e19191d19909cf3535b1e58ef3d88e48e4cd959406dc4c061de9349ebe7c19939e772fda6f88a2f862a150f8d742c162139aba1e7864d5aaaf555454046626c481af3cb17cf9c195a150804812061c07bf4ca7e7913f110a61776525d6068310c9ac9717f03cafec4eea8a15282b2bf3fd7af7ee5f8418db98ba79f3a8373969fa3cefd1e668f4e912d7257c7c1c855c0e3b4f9dc2dbc3c370a7719284ef9497e3bb555520aa0a5bd3d036398903bdbd18989c0493e561c375bf39323efe8f8504147ba0a5a5c5ba363232fcd4934f3664cbcaeadd4cc6f3150a3e55d70972394092f07e368b77d3e92239003c575e8ee7e371109f0f600c4c55b1251c46653c8ecba689db9c6b6f767545ef5481e2151c3e7cd83bd5dddd233246c2e1b01a0b87359fdf4f88a200aa8aebae8b83bdbd30dda97e9708c1b6a54bf1e3356b100e8741fc7e104d03340dc4e7c3ea8a0a6c5bbb161b57aef42f2929a9bd938059afe06c5fdf602e9f475014c1651928140045015c171f6432e81afdb83fab0301bc944840f0f9004a0159062409600c843178b28cace741515512d4b4ea7b121089c52e5e1a1e2e34545549b06d10d705cfe701cef1a70f3f442a972be67e3b9944d38a150021532e4920b20c5d149d6bba7ee92f1d1dbffd7b4f4f7b694949f5f0f8f81717bd02003872e48895b5ac61c8f2d4891405600c19cfc3e9c1c1625e5855b17df56ac88140b1f444d3005545c7c848fb5bfdfd7bcecbf2efaf8d8e76e735ed9d1b636357366cd8a02c5a81fafa7a7eb9aded82ab2871c1e7030070d7c5b18b1791b5ac2900a5f87a4303969495019cc32c1470cb30703d93c1c9c1c1ecabc78fbf03a01e40a320083200ce394f7677776f6c6a6a3addd6d6e6de51c0d48a3868791e3445013c0fa6aee3fc8d1bc57089cf87c6152bc05515574647f1873367d03b328281b131a47339e6baee5e00f2477b172b5c28148c73e7cef50348dd5580e1ba972c4a2d8d31064a713b9d465fea634c65248235757538d8de8ed7df7b0fb7757d265cfac8e719e7bcd1b6ed658b0ac864b3a39e24198431c601e89e875b1313c5786928047f2884df9d3c3997fcae4608494992746beefa3c01bae35cd33d6f027e7f988822263c0f59db2ec663b118fcb118a8380b5a007013408a103200a0c039df0960fa4fe684902ec7716cccb1790389c3792697cf67c118c0180a82006fc6cf2733063918c48bdbb7a32410e000fa28a5bf92657917636c672814da2d08c23f679003c030a5b40780b6a880f6f6f68c6e59d789aa82f8fd100301104128c65d4a612b0ad624127fddd6dc5cd3d9d959efbaeecbb66d1f374df3523e9f0fb9aefbd2ccea504aff0c20c5390fcde59b7705dddddd7a369b4d83524092e00f87a130568ca7c7c7f1dfdede2bff3e73e66713845c5bbf7efdac81c0308c6739e71b672cdd1404e1382124cf39f7cfe503e77c96b7b6b60a070e1cf89e61189ee7797c6868886fddba9503e000b8200819bfa6eddeb46993388d696969115455ada794be06c09bce05c029a53f8946a31a632c298ae297e6f2cd13c039c78e1d3b969d3871e2835c2ee7e57239be67cf1e3e63538710d24b29dd4b297d4610846728a53f22849c063039939c1072d5eff72febeaea0263ac5610845d73b9161cc98e1e3d3ad4dadadadadcdcfce5cd9b377f361e8fe7013c0ee0010002e73cc139dfbf1076da08211db22cbf9ccd66870080523ace399f3fa22f5481696f6c6c9492c96469229188504a7f03c09879c23b392164485194e6dada5a797aaff2f27246297da5b3b3932c7a050b793c1ef70b82b08b10d20720b700b10ee012a5745f2010a89a8bb76d1bc160b0f2c2850bb3041447b27bb14422215fbd7ab5d1719c759cf346ce790c534f7994527a561084f3b158ecfd63c78e19c964f29ef6fc1f4f14b29abe15e4b80000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>GubedSettingsS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>GubedSettingsS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>checkUseProxy</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GubedSettingsS</receiver>
+ <slot>slotUseProxyToggle(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tabWidget2</tabstop>
+ <tabstop>lineLocalBasedir</tabstop>
+ <tabstop>lineServerBasedir</tabstop>
+ <tabstop>checkUseProxy</tabstop>
+ <tabstop>lineServerHost</tabstop>
+ <tabstop>lineServerPort</tabstop>
+ <tabstop>lineServerListenPort</tabstop>
+ <tabstop>optStartSession</tabstop>
+ <tabstop>lineStartSession</tabstop>
+ <tabstop>optAddInclude</tabstop>
+ <tabstop>checkBreakOnNotice</tabstop>
+ <tabstop>checkBreakOnWarning</tabstop>
+ <tabstop>checkBreakOnUserNotice</tabstop>
+ <tabstop>checkBreakOnUserWarning</tabstop>
+ <tabstop>checkBreakOnUserError</tabstop>
+ <tabstop>comboDefaultExecutionState</tabstop>
+ <tabstop>sliderDisplayDelay</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<slots>
+ <slot specifier="pure virtual">slotUseProxyToggle( bool )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>ktextbrowser.h</includehint>
+</includehints>
+</UI>
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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <kdebug.h>
+#include <kserversocket.h>
+#include <kstreamsocket.h>
+#include <klocale.h>
+#include <kgenericfactory.h>
+#include <qlineedit.h>
+#include <qslider.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <kdeversion.h>
+#include <errno.h>
+#include <qstring.h>
+#include <qmap.h>
+
+#include <stdarg.h>
+
+#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>("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<QString>::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("<Undefined>"), 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<DebuggerVariable> 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<DebuggerVariable> 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("<Undefined>"), DebuggerVariableTypes::Undefined);
+ }
+ else if(type == "!")
+ {
+ debuggervar = debuggerInterface()->newDebuggerVariable(key, i18n("<Error>"), DebuggerVariableTypes::Error);
+ }
+ else
+ {
+ kdDebug(24002) << "VariablesListView::parsePHPVariables: Unknown variable type " << type << ", " << str << endl;
+ debuggervar = debuggerInterface()->newDebuggerVariable(key, i18n("<Unimplemented type>"), 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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <kserversocket.h>
+#include <kstreamsocket.h>
+#include <qptrlist.h>
+#include <kurl.h>
+#include <qdom.h>
+
+#include "debuggerclient.h"
+
+typedef QValueList<QString> WatchList;
+typedef QMap<QString, QString> 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 <linus@mccabe.nu>
+ 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 <kdebug.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+
+// CTor
+DebuggerClient::DebuggerClient(QObject *parent, const char* name)
+ : QObject(parent, name)
+{
+ m_active = false;
+}
+
+
+DebuggerInterface* DebuggerClient::debuggerInterface()
+{
+ return static_cast<DebuggerInterface*>( 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 <linus@mccabe.nu>
+ 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 <qserversocket.h>
+#include <qobject.h>
+#include <kurl.h>
+#include <qdom.h>
+
+#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 <linus@mccabe.nu>
+
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <linus@mccabe.nu>
+
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <qobject.h>
+#include <qstring.h>
+#include <kurl.h>
+
+#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 <kdebug.h>
+#include <klocale.h>
+#include <qstring.h>
+#include <qextfileinfo.h>
+#include <qdom.h>
+
+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 <qobject.h>
+#include <qdom.h>
+#include <qstringlist.h>
+
+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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <qlistview.h>
+#include <qlineedit.h>
+#include <qextfileinfo.h>
+#include <qcolor.h>
+#include <kled.h>
+
+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 <linus@mccabe.nu>
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>PathMapperDialogS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>PathMapperDialogS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>590</width>
+ <height>519</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Directory Mapping</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>groupBox6</cstring>
+ </property>
+ <property name="title">
+ <string>Directory Mapping</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblDebuggerLocalBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Local basedir:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblDebuggerServerBasedir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Server basedir:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineLocalPath</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineServerPath</cstring>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>groupBox7</cstring>
+ </property>
+ <property name="title">
+ <string>Previous Mappings</string>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView">
+ <column>
+ <property name="text">
+ <string>Local Directory</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Server Directory</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>listHistory</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="resizePolicy">
+ <enum>Manual</enum>
+ </property>
+ <property name="allColumnsShowFocus">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This is a list of previously used mappings. Click on one to use it</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox8</cstring>
+ </property>
+ <property name="title">
+ <string>Sample</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>lblTranslates</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Translates to:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblOriginal</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Original path:</string>
+ </property>
+ </widget>
+ <widget class="KLed" row="1" column="2">
+ <property name="name">
+ <cstring>ledTranslationExists</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="state">
+ <enum>On</enum>
+ </property>
+ <property name="shape">
+ <enum>Circular</enum>
+ </property>
+ <property name="look">
+ <enum>Raised</enum>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Indicates whether the translated path exists on disk or not</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This indicator tells you whether the translated path exists on local disk or not.</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineTranslated</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="paletteForegroundColor">
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This field shows what the "original path" above will look like after translation.</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>linePath</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="paletteForegroundColor">
+ <color>
+ <red>0</red>
+ <green>0</green>
+ <blue>0</blue>
+ </color>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>This field shows the path currently needing to be translated.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>PathMapperDialogS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>PathMapperDialogS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>slotHistoryclicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kled.h</includehint>
+</includehints>
+</UI>
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 <linus@mccabe.nu>
+
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <ktexteditor/document.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+
+#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<DebuggerManager*>(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 <linus@mccabe.nu>
+
+ ***************************************************************************/
+
+/****************************************************************************
+ * *
+ * 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 <qobject.h>
+#include <qstring.h>
+#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 <klocale.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <kdeversion.h>
+#include <kinputdialog.h>
+#include <qclipboard.h>
+
+// 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<DebuggerVariable> oldlist = oldvar->values();
+ for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev())
+ {
+ bool found = false;
+ QPtrList<DebuggerVariable> 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<DebuggerVariable> newlist = newvar->values();
+ for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev())
+ {
+ bool found = false;
+ QPtrList<DebuggerVariable> 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 <klistview.h>
+#include <kpopupmenu.h>
+#include <qptrlist.h>
+
+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<DebuggerVariable> 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 <qrect.h>
+#include <qmap.h>
+#include <qobject.h>
+/**this is
+ *@author gulmini luciano
+ */
+
+class areaAttribute : public QObject{
+ Q_OBJECT
+
+ private:
+ QRect m_geometry;
+ QMap<QString,QString> m_attributeMap; //tag specific attributes
+
+ public:
+ areaAttribute();
+ ~areaAttribute(){};
+ void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; }
+ void setAllAttributes(QMap<QString,QString> 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<QString,QString> 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 <qspinbox.h>
+#include <qlineedit.h>
+#include <qbuttongroup.h>
+#include <qregexp.h>
+#include <kurlrequester.h>
+#include <qstringlist.h>
+#include <kfiledialog.h>
+#include <klocale.h>
+//#include <kpreviewwidgetbase.h>
+
+/*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<QString,QString> 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<QString,QString> fmFPeditor::attributeMap(){
+ QMap<QString,QString> 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 <fmfpeditors.h>
+
+/**
+ *@author Gulmini Luciano
+ */
+
+class fmFPeditor : public fmFPeditorS {
+ Q_OBJECT
+
+ public:
+ fmFPeditor();
+ ~fmFPeditor();
+ void setup(QMap<QString,QString>);
+ QMap<QString,QString> 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>fmFPeditorS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>fmFPeditorS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>26</x>
+ <y>5</y>
+ <width>320</width>
+ <height>430</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Frame Properties</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>55</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>tw</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Common</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="4" column="0">
+ <property name="name">
+ <cstring>bgBorder</cstring>
+ </property>
+ <property name="title">
+ <string>Border</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>rbBorderYes</cstring>
+ </property>
+ <property name="text">
+ <string>Yes</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>rbBorderNo</cstring>
+ </property>
+ <property name="text">
+ <string>No</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>gbMargins</cstring>
+ </property>
+ <property name="title">
+ <string>Margins</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout8</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2_3</cstring>
+ </property>
+ <property name="text">
+ <string>From left:</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>sbLeft</cstring>
+ </property>
+ <property name="suffix">
+ <string>px</string>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>From top:</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>sbTop</cstring>
+ </property>
+ <property name="suffix">
+ <string>px</string>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="3" column="0">
+ <property name="name">
+ <cstring>bgScrolling</cstring>
+ </property>
+ <property name="title">
+ <string>Scrolling</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>rbScrollingYes</cstring>
+ </property>
+ <property name="text">
+ <string>Yes</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="2">
+ <property name="name">
+ <cstring>rbScrollingAuto</cstring>
+ </property>
+ <property name="text">
+ <string>Auto</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>rbScrollingNo</cstring>
+ </property>
+ <property name="text">
+ <string>No</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>bgNoresize</cstring>
+ </property>
+ <property name="title">
+ <string>Resize</string>
+ </property>
+ <property name="exclusive">
+ <bool>false</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>rbResizeYes</cstring>
+ </property>
+ <property name="text">
+ <string>Yes</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>rbResizeNo</cstring>
+ </property>
+ <property name="text">
+ <string>No</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout9</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tlFrameSource</cstring>
+ </property>
+ <property name="text">
+ <string>Frame source:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tlFrameName</cstring>
+ </property>
+ <property name="text">
+ <string>Frame name:</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout8</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="KURLRequester">
+ <property name="name">
+ <cstring>fc</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>leName</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Others</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout11</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tlId</cstring>
+ </property>
+ <property name="text">
+ <string>Id:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Class:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Style:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Long description:</string>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>leId</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>leClass</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>leStyle</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>leTitle</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>leLongdesc</cstring>
+ </property>
+ </widget>
+ </vbox>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>fmFPeditorS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>fmFPeditorS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <qspinbox.h>
+#include <qlabel.h>
+
+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 <fmrceditors.h>
+
+/**
+ *@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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>fmRCeditorS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>fmRCeditorS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>300</width>
+ <height>150</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>150</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>300</width>
+ <height>150</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Rows Columns Editor</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tl</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>sb</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>2</number>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>31</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>fmRCeditorS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>fmRCeditorS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <kmessagebox.h>
+//#include <kdebug.h>
+#include <klocale.h>
+#include <qpushbutton.h>
+
+#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 <framewizards.h>
+#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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>FrameWizardS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>FrameWizardS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>640</width>
+ <height>482</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Frame Wizard</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>pbCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout9</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tl</cstring>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Splitting</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbVertical</cstring>
+ </property>
+ <property name="text">
+ <string>Vertical</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pbHorizontal</cstring>
+ </property>
+ <property name="text">
+ <string>Horizontal</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QButtonGroup">
+ <property name="name">
+ <cstring>ButtonGroup5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Editing</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>pbEditFrame</cstring>
+ </property>
+ <property name="text">
+ <string>Edit Frame</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>pbDelete</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Delete</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>pbReset</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Reset</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ </vbox>
+ </widget>
+ <widget class="VisualFrameEditor">
+ <property name="name">
+ <cstring>vfe</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>ClickFocus</enum>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>VisualFrameEditor</class>
+ <header location="global">visualframeeditor.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>pbCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>FrameWizardS</receiver>
+ <slot>close()</slot>
+ </connection>
+ <connection>
+ <sender>pbOk</sender>
+ <signal>clicked()</signal>
+ <receiver>FrameWizardS</receiver>
+ <slot>accept()</slot>
+ </connection>
+</connections>
+<pixmapinproject/>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>visualframeeditor.h</includehint>
+</includehints>
+</UI>
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 <qframe.h>
+//#include <kdebug.h>
+#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 <qwidget.h>
+#include <khtml_part.h>
+#include <khtmlview.h>
+
+/**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<treeNode> 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<treeNode> list = n->childrenList();
+ QPtrListIterator<treeNode> 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 <qptrlist.h>
+#include <qdict.h>
+#include <qstringlist.h>
+
+#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<treeNode> 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<treeNode> 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<treeNode> 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 <qobjectlist.h>
+#include <qsplitter.h>
+//#include <kdebug.h>
+
+#include "qextfileinfo.h"
+#include "project.h"
+
+static int cancelledPixels(int n){
+ return (n-1)*6;
+}
+
+QMap<QString, QValueList< int > > 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<treeNode> list=m_internalTree->findNode(l)->childrenList();
+ QPtrListIterator<treeNode> 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("</frameset>");//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("<frameset")) {
+ if(line.contains("rows")) {
+ split(parent,(line.contains(",")+1),HORIZONTAL);
+
+ QRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
+ pattern.search(line);
+
+ QRect dummy=m_internalTree->findNode(parent)->atts()->geometry();
+ QStringList percentages = convertAsterisks(pattern.cap(1),dummy.height());
+
+ int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1);
+
+ QPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ QPtrListIterator<treeNode> 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<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ QPtrListIterator<treeNode> 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<QString,QString> 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<QString,QString> 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<treeNode> 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<QSplitter *>(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="<frame",
+ tagEnd,
+ tagMiddle;
+
+ if( !Src.isEmpty() ) {
+ KURL base;
+ base.setPath( Project::ref()->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<int,int> 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("<frameset cols=\""+RCvalue(n)+"\">\n");break;
+ case HORIZONTAL: nonFormattedStructure.append("<frameset rows=\""+RCvalue(n)+"\">\n");break;
+ default:break;
+ }
+ n->firstChild();
+ while(n->currentChild()){
+ createStructure(n->currentChild());
+ n->nextChild();
+ }
+ nonFormattedStructure.append("</frameset>\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("<frameset")) tabNum++;
+ else
+ if((*it).contains("</frameset>")) {
+ 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 <qhbox.h>
+
+/**
+ *@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 <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.
+ *
+ ***************************************************************************/
+
+//kde includes
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kparts/componentfactory.h>
+#include <kpopupmenu.h>
+#include <kpushbutton.h>
+#include <ktexteditor/document.h>
+#include <ktexteditor/editinterface.h>
+
+//qt includes
+#include <qcheckbox.h>
+#include <qiconset.h>
+#include <qlineedit.h>
+#include <qobject.h>
+#include <qpoint.h>
+#include <qrect.h>
+#include <qspinbox.h>
+#include <qstring.h>
+#include <qtabwidget.h>
+#include <qvaluevector.h>
+
+//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<QValueList<TableNode> >;
+ m_tableHeaderTags = new QValueList<QValueList<TableNode> >;
+ m_tableFooterTags = new QValueList<QValueList<TableNode> >;
+ m_tableTags = 0L;
+ m_tableDataRows = new QValueList<TableNode>;
+ m_tableHeaderRows = new QValueList<TableNode>;
+ m_tableFooterRows = new QValueList<TableNode>;
+ 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<TableNode> tableRowTags;
+ QValueVector< QValueVector<TableNode> > 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 <thead> 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 <tfoot> 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("<tbody>", 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; i<mergeMatrix.size(); i++)
+ mergeMatrix[i].resize(2 * mergeMatrix[i].size());
+
+ } else
+ {
+ tableNode.node = new Node(0L);
+ newNum++;
+ tableNode.node->tag = new Tag();
+ tableNode.node->tag->setDtd(m_dtd);
+ tableNode.node->tag->parse("<td>", 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("<thead>", m_write);
+ }
+ if (!m_tfoot) {
+ m_tfoot = new Tag();
+ newNum++;
+ m_tfoot->parse("<tfoot>", 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 += "</" + QuantaCommon::tagCase("caption") + ">";
+ }
+ for (QValueList<Tag*>::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) {
+ tableString += indent(2);
+ tableString += (*it)->toString();
+ }
+ if (headerCheckBox->isChecked() && headerTableData->numRows() > 0) {
+ //insert the <thead> 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 += "</" + QuantaCommon::tagCase(m_thead->name) +">";
+ }
+ if (footerCheckBox->isChecked() && footerTableData->numRows() > 0) {
+ //insert the <tfoot> 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 += "</" + QuantaCommon::tagCase(m_tfoot->name) +">";
+ }
+ //insert the <tbody> tag
+ if (!m_tbody)
+ {
+ m_tbody = new Tag();
+ newNum++;
+ m_tbody->parse("<tbody>", 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 <tbody> and <table> tags
+ tableString += indent(2);
+ tableString += "</" + QuantaCommon::tagCase(m_tbody->name) +">";
+ tableString += "\n";
+ tableString += "</" + QuantaCommon::tagCase(m_table->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 += "</" + QuantaCommon::tagCase(node->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("<tr>");
+ 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 += "</" + QuantaCommon::tagCase(tag->name) +">";
+ else
+ tableStr += QuantaCommon::tagCase("</tr>");
+ }
+ 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("<tr>", m_write);
+ QValueList<TableNode>::Iterator rowIt = m_tableRows->at(num);
+ if (rowIt != m_tableRows->end())
+ m_tableRows->insert(rowIt, tableNode);
+ else
+ m_tableRows->append(tableNode);
+ QValueList<TableNode> 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("<th>", m_write);
+ } else {
+ tableNode.node->tag->parse("<td>", m_write);
+ }
+ tableRowTags.append(tableNode);
+ setCellText(m_dataTable, num, i, "");
+ }
+ QValueList<QValueList<TableNode> >::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<QValueList<TableNode> >::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("<th>", m_write);
+ } else {
+ tableNode.node->tag->parse("<td>", 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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ j = 0;
+ for (QValueList<TableNode>::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<TableNode*> updatedMainNodes;
+ QValueList<QValueList<TableNode> >::Iterator it2 = m_tableTags->at(m_row);
+ for (QValueList<TableNode>::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<TableNode>::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ j = 0;
+ for (QValueList<TableNode>::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<TableNode*> updatedMainNodes;
+ for (QValueList<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ QValueList<TableNode>::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("<table>", m_write);
+ m_thead = new Tag();
+ m_thead->setDtd(m_dtd);
+ newNum++;
+ m_thead->parse("<thead>", m_write);
+ m_tfoot = new Tag();
+ m_tfoot->setDtd(m_dtd);
+ newNum++;
+ m_tfoot->parse("<tfoot>", m_write);
+ m_tbody = new Tag();
+ m_tbody->setDtd(m_dtd);
+ newNum++;
+ m_tbody->parse("<tbody>", 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<TableNode> *table )
+{
+ for (QValueList<TableNode>::Iterator it = table->begin(); it != table->end(); ++it) {
+ Node::deleteNode((*it).node);
+ newNum--;
+ }
+ delete table;
+ newNum--;
+}
+
+
+void TableEditor::deleteMatrix( QValueList<QValueList<TableNode> > *matrix )
+{
+ for (QValueList<QValueList<TableNode> >::Iterator it = matrix->begin(); it != matrix->end(); ++it) {
+ for (QValueList<TableNode>::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ j = 0;
+ QValueList<TableNode>::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("<th>", m_write);
+ } else {
+ newTableNode.node->tag->parse("<td>", 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<QValueList<TableNode> >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow);
+ QValueList<TableNode>::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<NestedTable>::Iterator errorIt;
+ Parser *localParser = 0L;
+ Document *w = 0L;
+ Node *savedBaseNode = 0L;
+ NestedTable table;
+
+ for (QValueList<NestedTable>::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; r<table->numRows(); r++) {
+ table->adjustRow(r);
+ for (int c=0; c<table->numCols(); 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 <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 TABLEEDITOR_H
+#define TABLEEDITOR_H
+
+#include <kurl.h>
+#include <qvaluelist.h>
+
+#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<Tag*> m_colTags;
+ int m_unmergeCellsId;
+ int m_mergeSeparatorId;
+ int m_mergeCellsId;
+ bool m_createNodes;
+ QValueList<QValueList<TableNode> > *m_tableTags;
+ QValueList<QValueList<TableNode> > *m_tableFooterTags;
+ QValueList<QValueList<TableNode> > *m_tableHeaderTags;
+ QValueList<TableNode> *m_tableFooterRows;
+ QValueList<TableNode> *m_tableHeaderRows;
+ QValueList<TableNode> *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<QValueList<TableNode> > *m_tableDataTags;
+ QValueList<TableNode> *m_tableDataRows;
+ QTable *m_dataTable;
+ QSpinBox *m_rowSpin;
+ QSpinBox *m_colSpin;
+ int m_bLine, m_bCol, m_eLine, m_eCol;
+ QValueList<NestedTable> 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<TableNode> * table );
+ virtual void deleteMatrix( QValueList<QValueList<TableNode> > * 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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>TableEditorS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>TableEditorS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>692</width>
+ <height>584</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Table Editor</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>Ca&amp;ncel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>Horizontal Spacing2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="accel">
+ <string>F1</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;Main</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="3" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>textLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Ta&amp;ble data:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>tableData</cstring>
+ </property>
+ </widget>
+ <widget class="QTable" row="4" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>tableData</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="vScrollBarMode">
+ <enum>AlwaysOn</enum>
+ </property>
+ <property name="hScrollBarMode">
+ <enum>AlwaysOn</enum>
+ </property>
+ <property name="numRows">
+ <number>0</number>
+ </property>
+ <property name="numCols">
+ <number>0</number>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>276</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>spacer1_2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>276</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>rowSpinBox</cstring>
+ </property>
+ <property name="maxValue">
+ <number>999</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Co&amp;lumns:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>colSpinBox</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>captionText</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>pushButton7_2</cstring>
+ </property>
+ <property name="text">
+ <string>Bod&amp;y Properties</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="0" column="3">
+ <property name="name">
+ <cstring>pushButton7</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Table Properties</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>C&amp;aption:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>captionText</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Rows:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>rowSpinBox</cstring>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>colSpinBox</cstring>
+ </property>
+ <property name="maxValue">
+ <number>999</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Header</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QFrame" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>frame3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTable" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>headerTableData</cstring>
+ </property>
+ <property name="resizePolicy">
+ <enum>AutoOneFit</enum>
+ </property>
+ <property name="vScrollBarMode">
+ <enum>AlwaysOn</enum>
+ </property>
+ <property name="hScrollBarMode">
+ <enum>AlwaysOn</enum>
+ </property>
+ <property name="numRows">
+ <number>0</number>
+ </property>
+ <property name="numCols">
+ <number>0</number>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>340</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>headerRowSpinBox</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel4_2</cstring>
+ </property>
+ <property name="text">
+ <string>Header &amp;rows:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>headerRowSpinBox</cstring>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>headerColSpinBox</cstring>
+ </property>
+ <property name="maxValue">
+ <number>999</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Header co&amp;lumns:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>headerColSpinBox</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>textLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Header &amp;data:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>headerTableData</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>headerCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Insert ta&amp;ble header</string>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>pushButton7_3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Header Properties</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Footer</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QFrame" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>frame3_2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTable" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>footerTableData</cstring>
+ </property>
+ <property name="resizePolicy">
+ <enum>AutoOneFit</enum>
+ </property>
+ <property name="vScrollBarMode">
+ <enum>AlwaysOn</enum>
+ </property>
+ <property name="hScrollBarMode">
+ <enum>AlwaysOn</enum>
+ </property>
+ <property name="numRows">
+ <number>0</number>
+ </property>
+ <property name="numCols">
+ <number>0</number>
+ </property>
+ <property name="selectionMode">
+ <enum>Single</enum>
+ </property>
+ <property name="focusStyle">
+ <enum>FollowStyle</enum>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="0" column="1">
+ <property name="name">
+ <cstring>footerRowSpinBox</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel4_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Footer &amp;rows:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>footerRowSpinBox</cstring>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="1">
+ <property name="name">
+ <cstring>footerColSpinBox</cstring>
+ </property>
+ <property name="maxValue">
+ <number>999</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel4_3</cstring>
+ </property>
+ <property name="text">
+ <string>Footer co&amp;lumns:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>footerColSpinBox</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>textLabel6_2</cstring>
+ </property>
+ <property name="text">
+ <string>Footer &amp;data:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>footerTableData</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>spacer2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>340</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>footerCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Insert ta&amp;ble footer</string>
+ </property>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>pushButton7_4</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Footer Properties</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>headerCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>frame3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>footerCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>frame3_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>TableEditorS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>headerCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pushButton7_3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>footerCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pushButton7_4</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>rowSpinBox</tabstop>
+ <tabstop>colSpinBox</tabstop>
+ <tabstop>pushButton7</tabstop>
+ <tabstop>pushButton7_2</tabstop>
+ <tabstop>captionText</tabstop>
+ <tabstop>tableData</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>buttonHelp</tabstop>
+ <tabstop>headerCheckBox</tabstop>
+ <tabstop>pushButton7_3</tabstop>
+ <tabstop>headerRowSpinBox</tabstop>
+ <tabstop>headerColSpinBox</tabstop>
+ <tabstop>headerTableData</tabstop>
+ <tabstop>footerCheckBox</tabstop>
+ <tabstop>pushButton7_4</tabstop>
+ <tabstop>footerRowSpinBox</tabstop>
+ <tabstop>footerColSpinBox</tabstop>
+ <tabstop>footerTableData</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <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 <qtextedit.h>
+#include <qpainter.h>
+#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 <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 TABLEITEM_H
+#define TABLEITEM_H
+
+#include <qtable.h>
+#include <kdeversion.h>
+
+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 @@
+! (&#033;) Exclamation mark
+" (&quot;) Quotation mark
+# (&#035;) Hash mark
+$ (&#036;) Dollar sign
+% (&#037;) Percent sign
+& (&amp;) Ampersand
+' (&apos;) Apostrophe
+( (&#040;) Left parenthesis
+) (&#041;) Right parenthesis
+* (&#042;) Asterisk
++ (&#043;) Plus sign
+, (&#044;) Comma
+- (&#045;) Hyphen
+. (&#046;) Period
+/ (&#047;) Slash
+: (&#058;) Colon
+; (&#059;) Semicolon
+< (&lt;) Less than
+= (&#061;) Equals sign
+> (&gt;) Greater than
+? (&#063;) Question mark
+@ (&#064;) Commercial at sign
+[ (&#091;) Left square bracket
+\ (&#092;) Backslash
+] (&#093;) Right square bracket
+^ (&#094;) Caret
+_ (&#095;) Underscore
+` (&#096;) Grave accent
+{ (&#123;) Left curly brace
+| (&#124;) Vertical bar
+} (&#125;) Right curly brace
+~ (&#126;) Tilde
+ (&nbsp;) Nonbreaking space
+¡ (&iexcl;) Inverted exclamation mark
+¢ (&cent;) Cent sign
+£ (&pound;) Pound sign
+¤ (&curren;) Currency sign
+Â¥ (&yen;) Yen sign
+¦ (&brvbar;) Broken vertical bar
+§ (&sect;) Section sign
+¨ (&uml;) Diaeresis
+© (&copy;) Copyright
+ª (&ordf;) Feminine ordinal
+« (&laquo;) Left Pointing Guillemet
+¬ (&not;) Not sign
+ (&shy;) Soft hyphen
+® (&reg;) Registered trademark
+¯ (&macr;) Macron
+° (&deg;) Degree sign
+± (&plusmn;) Plus-minus sign
+² (&sup2;) Superscript 2
+³ (&sup3;) Superscript 3
+´ (&acute;) Acute accent
+µ (&micro;) Micro sign
+¶ (&para;) Paragraph sign
+· (&middot;) Middle dot
+¸ (&cedil;) Cedilla
+¹ (&sup1;) Superscript 1
+º (&ordm;) Masculine ordinal
+» (&raquo;) Right Pointing Guillemet
+¼ (&frac14;) Fraction one-fourth
+½ (&frac12;) Fraction one-half
+¾ (&frac34;) Fraction three-fourths
+¿ (&iquest;) Inverted question mark
+À (&Agrave;) Capital A, grave accent
+Ã (&Aacute;) Capital A, acute accent
+Â (&Acirc;) Capital A, circumflex accent
+Ã (&Atilde;) Capital A, tilde
+Ä (&Auml;) Capital A, diaeresis
+Ã… (&Aring;) Capital A, ring
+Æ (&AElig;) Capital AE ligature
+Ç (&Ccedil;) Capital C, cedilla
+È (&Egrave;) Capital E, grave accent
+É (&Eacute;) Capital E, acute accent
+Ê (&Ecirc;) Capital E, circumflex accent
+Ë (&Euml;) Capital E, diaeresis
+Ì (&Igrave;) Capital I, grave accent
+Ã (&Iacute;) Capital I, acute accent
+ÃŽ (&Icirc;) Capital I, circumflex accent
+Ã (&Iuml;) Capital I, diaeresis
+Ã (&ETH;) Capital eth
+Ñ (&Ntilde;) Capital N, tilde
+Ã’ (&Ograve;) Capital O, grave accent
+Ó (&Oacute;) Capital O, acute accent
+Ô (&Ocirc;) Capital O, circumflex accent
+Õ (&Otilde;) Capital O, tilde
+Ö (&Ouml;) Capital O, diaeresis
+× (&times;) Multiplication
+Ø (&Oslash;) Capital O, slash
+Ù (&Ugrave;) Capital U, grave accent
+Ú (&Uacute;) Capital U, acute accent
+Û (&Ucirc;) Capital U, circumflex accent
+Ü (&Uuml;) Capital U, diaeresis
+Ã (&Yacute;) Capital Y, acute accent
+Þ (&THORN;) Capital thorn
+ß (&szlig;) Small Sharp s
+à (&agrave;) Small a, grave accent
+á (&aacute;) Small a, acute accent
+â (&acirc;) Small a, circumflex accent
+ã (&atilde;) Small a, tilde
+ä (&auml;) Small a, diaeresis
+Ã¥ (&aring;) Small a, ring
+æ (&aelig;) Small ae ligature
+ç (&ccedil;) Small c, cedilla
+è (&egrave;) Small e, grave accent
+é (&eacute;) Small e, acute accent
+ê (&circ;) Small e, circumflex accent
+ë (&euml;) Small e, diaeresis
+ì (&igrave;) Small i, grave accent
+í (&iacute;) Small i, acute accent
+î (&icirc;) Small i, circumflex accent
+ï (&iuml;) Small i, diaeresis
+ð (&eth;) Small eth
+ñ (&ntilde;) Small n, tilde
+ò (&ograve;) Small o, grave accent
+ó (&oacute;) Small o, acute accent
+ô (&ocirc;) Small o, circumflex accent
+õ (&otilde;) Small o, tilde
+ö (&ouml;) Small o, diaeresis
+÷ (&divide;) Division
+ø (&oslash;) Small o, slash
+ù (&ugrave;) Small u, grave accent
+ú (&uacute;) Small u, acute accent
+û (&ucirc;) Small u, circumflex accent
+ü (&uuml;) Small u, diaeresis
+ý (&yacute;) Small y, acute accent
+þ (&thorn;) Small thorn
+ÿ (&yuml;) Small y, diaeresis
+Ä‚ (&#258;) Capital A, romanian accent
+ă (&#259;) Small a, romanian accent
+Ä (&#269;) Small c, caron
+Ä (&#271;) Small d, caron
+Ä› (&#283;) Small e, caron
+ň (&#328;) Small n, caron
+Å™ (&#345;) Small r, caron
+Åž (&#350;) Capital S, cedilla accent
+ÅŸ (&#351;) Small s, cedilla accent
+Å¡ (&#353;) Small s, caron
+Å¢ (&#354;) Capital T, cedilla accent
+Å£ (&#355;) Small t, cedilla accent
+Å¥ (&#357;) Small t, caron
+ů (&#367;) Small u, ring above
+ž (&#382;) Small z, caron
+Åž (&#536;) Capital S, comma accent below
+ÅŸ (&#537;) Small s, comma accent below
+Å¢ (&#538;) Capital T, comma accent below
+Å£ (&#539;) Small t, comma accent below
+†(&#8208;) Hyphen
+– (&ndash;) En dash
+— (&mdash;) Em dash
+‘ (&lsquo;) Left Single Quotation mark
+’ (&rsquo;) Right Single Quotation mark
+‚ (&sbquo;) Single Low-9 Quotation mark
+“ (&ldquo;) Left Double Quotation mark
+†(&rdquo;) Right Double Quotation mark
+„ (&bdquo;) Double Low-9 Quotation mark
+† (&dagger;) Dagger
+‡ (&Dagger;) Double Dagger
+• (&bull;) Bullet
+… (&hellip;) Horizontal Ellipsis
+‰ (&permil;) Per Mille sign
+‹ (&lsaquo;) Single Left-Pointing Angle Quotation mark
+› (&rsaquo;) Single Right-Pointing Angle Quotation mark
+â„ (&frasl;) Fraction slash
+â‚£ (&#8355;) French Franc sign
+₧ (&#8359;) Peseta sign
+₪ (&#8362;) New Sheqel sign
+â‚« (&#8363;) Dong sign
+€ (&euro;) Euro currency sign
+â„¢ (&trade;) 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 @@
+<!DOCTYPE actionsconfig>
+<actions>
+<action shortcut="Alt+Ctrl+T" icon="check.png" type="script" tooltip="Syntax checking with HTML Tidy" name="tidy_check" text="HTML &amp;Tidy Syntax Checking" >
+<script output="message" error="message" input="current" >tidy -qe</script>
+</action>
+<action shortcut="" icon="kompare" type="script" tooltip="" name="kompare_script" text="&amp;Kompare" >
+<script output="message" error="message" input="none" >kompare</script>
+</action>
+<action shortcut="ALT+F6" icon="opera" type="script" tooltip="" name="view_with_opera" text="View with &amp;Opera">
+<script output="message" error="message" input="none" >sh %scriptdir/externalpreview.sh %pid opera new-page</script>
+</action>
+<action shortcut="SHIFT+F12" icon="mozilla" type="script" tooltip="" name="view_with_mozilla" text="View with Mo&amp;zilla">
+<script output="message" error="message" input="none" >sh %scriptdir/externalpreview.sh %pid mozilla new-tab</script>
+</action>
+<action shortcut="CTRL+SHIFT+F12" icon="firefox" type="script" tooltip="" name="view_with_firefox" text="View with &amp;Firefox">
+<script output="message" error="message" input="none" >sh %scriptdir/externalpreview.sh %pid firefox new-tab</script>
+</action>
+<action shortcut="SHIFT+F6" icon="netscape" type="script" tooltip="" name="view_with_netscape" text="View with &amp;Netscape">
+<script output="message" error="message" input="none" >sh %scriptdir/externalpreview.sh %pid netscape new-tab</script>
+</action>
+</actions>
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 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui version="32076" name="quanta" >
+ <MenuBar noMerge="1" >
+ <Menu noMerge="1" name="file" >
+ <text>&amp;File</text>
+ <Action name="file_new" />
+ <Action name="file_open" />
+ <Action name="file_open_recent" />
+ <Separator/>
+ <Action name="file_save" />
+ <Action name="file_save_as" />
+ <Menu append="save_merge" name="save_as_template" >
+ <text>Save as Template</text>
+ <Action name="save_local_template" />
+ <Action name="save_project_template" />
+ <Separator/>
+ <Action name="save_selection_local_template" />
+ <Action name="save_selection_project_template" />
+ </Menu>
+ <Action append="save_merge" name="file_save_all" />
+ <Action name="file_reload" />
+ <Action name="file_reload_all" />
+ <Separator/>
+ <DefineGroup name="print_merge" />
+ <Separator/>
+ <Action name="file_quit" />
+ </Menu>
+ <Menu noMerge="1" name="edit" >
+ <text>&amp;Edit</text>
+ <Action name="edit_undo" />
+ <Action name="edit_redo" />
+ <DefineGroup name="edit_undo_merge" />
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+ <DefineGroup name="edit_paste_merge" />
+ <Menu name="paste_special" >
+ <text>Paste Special</text>
+ <Action name="edit_paste_html_quoted" />
+ <Action name="edit_paste_url_encoded" />
+ </Menu>
+ <Separator/>
+ <DefineGroup name="edit_select_merge" />
+ <DefineGroup name="edit_find_merge" />
+ <Action name="find_in_files" />
+ <Separator/>
+ <Action name="expand_abbreviation" />
+ <Separator/>
+ <Action name="apply_source_indentation" />
+ </Menu>
+ <Menu name="view" >
+ <text>&amp;View</text>
+ <Merge/>
+ <Separator/>
+ <Action name="show_quanta_editor" />
+ <Action name="show_kafka_view" />
+ <Action name="show_kafka_and_quanta" />
+ <Action name="show_preview" />
+ <Menu name="external_preview" >
+ <text>E&amp;xternal Preview</text>
+ <Action name="view_with_konqueror" />
+ <Action name="view_with_firefox" />
+ <Action name="view_with_mozilla" />
+ <Action name="view_with_netscape" />
+ <Action name="view_with_opera" />
+ <Action name="view_with_lynx" />
+ </Menu>
+ <Separator/>
+ <Action name="reload" />
+ <Action name="w_back" />
+ <Action name="w_forward" />
+ </Menu>
+ <Action name="bookmarks" />
+ <Menu noMerge="1" name="project" >
+ <text>&amp;Project</text>
+ <Action name="project_new" />
+ <Action name="project_open" />
+ <Action name="project_open_recent" />
+ <Action name="project_close" />
+ <Separator/>
+ <Action name="project_view_open" />
+ <Action name="project_view_save" />
+ <Action name="project_view_save_as" />
+ <Action name="project_view_delete" />
+ <Separator/>
+ <Action name="project_insert_file" />
+ <Action name="project_insert_directory" />
+ <Action name="project_rescan" />
+ <Separator/>
+ <Action name="project_upload" />
+ <Action name="project_options" />
+ </Menu>
+ <Menu noMerge="1" name="toolbars" >
+ <text>Too&amp;lbars</text>
+ <Menu name="toolbars_load" >
+ <text>&amp;Load Toolbars</text>
+ <Action name="toolbars_load_global" />
+ <Action name="toolbars_load_user" />
+ <Action name="toolbars_load_project" />
+ </Menu>
+ <Menu name="toolbars_save" >
+ <text>&amp;Save Toolbars</text>
+ <Action name="toolbars_save_local" />
+ <Action name="toolbars_save_project" />
+ </Menu>
+ <Separator/>
+ <Action name="toolbars_add" />
+ <Action name="toolbars_remove" />
+ <Action name="toolbars_rename" />
+ <Separator/>
+ <Action name="toolbars_send" />
+ <Action name="toolbars_upload" />
+ <Action name="toolbars_download" />
+ </Menu>
+ <Menu name="dtds" >
+ <text>&amp;DTD</text>
+ <Action name="change_dtd" />
+ <Action name="edit_dtd" />
+ <Action name="load_dtd" />
+ <Action name="load_entities" />
+ <Separator/>
+ <Action name="load_dtep" />
+ <Action name="send_dtep" />
+ <Action name="upload_dtep" />
+ <Action name="download_dtep" />
+ </Menu>
+ <Menu name="tags" >
+ <text>&amp;Tags</text>
+ <Action name="edit_current_tag" />
+ <Action name="select_tag_area" />
+ <Action name="smart_tag_insertion" />
+ <Separator/>
+ </Menu>
+ <Menu name="plugins" >
+ <text>Plu&amp;gins</text>
+ </Menu>
+ <Merge/>
+ <Menu name="tools" >
+ <text>T&amp;ools</text>
+ <Merge/>
+ <Separator/>
+ <Action name="tools_document_properties" />
+ <Action name="tools_change_case" />
+ <Action name="tools_code_formatting" />
+ <Separator/>
+ <Action name="tidy_check" />
+ <Action name="kompare_script" />
+ </Menu>
+ <Menu noMerge="1" name="settings" >
+ <text>&amp;Settings</text>
+ <Action name="options_show_menubar" />
+ <Merge name="StandardToolBarMenuHandler" />
+ <Action name="view_dtd_toolbar" />
+ <Action name="options_show_statusbar" />
+ <Separator/>
+ <Action name="preview_options" />
+ <Action name="configure_actions" />
+ <Action name="configure_plugins" />
+ <Merge/>
+ <Separator/>
+ <Action name="options_configure_toolbars" />
+ <Action name="configure_shortcuts" />
+ <Action name="general_options" />
+ </Menu>
+ <Menu noMerge="1" name="help" >
+ <text>&amp;Help</text>
+ <Action name="help_contents" />
+ <Action name="help_whats_this" />
+ <Separator/>
+ <Action name="context_help" />
+ <Separator/>
+ <Action name="help_homepage" />
+ <Action name="help_userlist" />
+ <Action name="help_donation" />
+ <Action name="help_reportbug" />
+ <Action name="help_tip" />
+ <Separator/>
+ <Action name="help_about_app" />
+ <Action name="help_about_kde" />
+ </Menu>
+ </MenuBar>
+ <ToolBar noMerge="1" name="mainToolBar" >
+ <text>Main Toolbar</text>
+ <Action name="file_new" />
+ <Action name="file_open_recent" />
+ <Action name="project_open_recent" />
+ <Separator/>
+ <Action name="file_save" />
+ <Action name="file_save_all" />
+ </ToolBar>
+ <ToolBar noMerge="1" name="mainEditToolBar" >
+ <text>Editor Toolbar</text>
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+ <Action name="edit_undo" />
+ <Action name="edit_redo" />
+ </ToolBar>
+ <ToolBar noMerge="1" name="mainPluginsToolBar" >
+ <text>Plugins Toolbar</text>
+ <Action name="tidy_check" />
+ <Action name="KFileReplace" />
+ <Action name="CVS Management (Cervisia)" />
+ <Action name="XSLT Debugger" />
+ </ToolBar>
+ <ToolBar noMerge="1" name="mainNaviToolBar" >
+ <text>Navigation Toolbar</text>
+ <Action name="show_messages" />
+ <Action name="show_quanta_editor" />
+ <Action name="show_kafka_view" />
+ <Action name="show_kafka_and_quanta" />
+ <Action name="show_preview" />
+ <Action name="reload" />
+ <Separator/>
+ <Action name="w_back" />
+ <Action name="w_forward" />
+ </ToolBar>
+ <Menu name="popup_editor" >
+ <Action name="edit_cut" />
+ <Action name="edit_copy" />
+ <Action name="edit_paste" />
+ <Separator/>
+ <Action name="annotate" />
+ <Action name="edit_current_tag" />
+ <Action name="select_tag_area" />
+ <Action name="context_help" />
+ <Action name="open_file_under_cursor" />
+ </Menu>
+ <Menu noMerge="1" name="debugger_menu" >
+ <text>&amp;Debug</text>
+ <Menu name="debug_session" >
+ <text>Session</text>
+ <Action name="debug_connect" />
+ <Action name="debug_disconnect" />
+ </Menu>
+ <Menu name="debug_execution" >
+ <text>&amp;Execution</text>
+ <Action name="debug_request" />
+ <Separator/>
+ <Action name="debug_pause" />
+ <Action name="debug_trace" />
+ <Action name="debug_run" />
+ <Separator/>
+ <Action name="debug_stepover" />
+ <Action name="debug_stepinto" />
+ <Action name="debug_stepout" />
+ <Action name="debug_skip" />
+ <Separator/>
+ <Action name="debug_kill" />
+ </Menu>
+ <Menu name="debug_breakpoints" >
+ <text>&amp;Breakpoints</text>
+ <Action name="debug_conditional_breakdialog" />
+ <Action name="debug_breakpoints_toggle" />
+ <Action name="debug_breakpoints_clear" />
+ </Menu>
+ <Menu name="debug_variables" >
+ <text>&amp;Variables</text>
+ <Action name="debug_addwatchdialog" />
+ <Action name="debug_variable_setdialog" />
+ </Menu>
+ <Menu name="debug_profiler" >
+ <text>&amp;Profiler</text>
+ <Action name="debug_profiler_open" />
+ </Menu>
+ </Menu>
+ <ToolBar noMerge="1" name="debugger_toolbar" >
+ <text>Debugger Toolbar</text>
+ <Action name="debug_request" />
+ <Separator/>
+ <Action name="debug_pause" />
+ <Action name="debug_trace" />
+ <Action name="debug_run" />
+ <Separator/>
+ <Action name="debug_stepover" />
+ <Action name="debug_stepinto" />
+ <Action name="debug_stepout" />
+ <Action name="debug_skip" />
+ <Separator/>
+ <Action name="debug_kill" />
+ <Separator/>
+ <Action name="debug_breakpoints_toggle" />
+ <Separator/>
+ <Action name="debug_profiler_open" />
+ </ToolBar>
+ <ToolBar noMerge="1" name="project_toolbar" >
+ <text>Project Toolbar</text>
+ <Action name="project_view_open" />
+ <Action name="project_view_save" />
+ <Action name="project_view_save_as" />
+ </ToolBar>
+ <ActionProperties/>
+</kpartgui>
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 <e.bischoff@noos.fr>
diff --git a/quanta/data/doc/aniquanta.gif b/quanta/data/doc/aniquanta.gif
new file mode 100644
index 00000000..783ab254
--- /dev/null
+++ b/quanta/data/doc/aniquanta.gif
Binary files differ
diff --git a/quanta/data/doc/background.png b/quanta/data/doc/background.png
new file mode 100644
index 00000000..20ad83bc
--- /dev/null
+++ b/quanta/data/doc/background.png
Binary files differ
diff --git a/quanta/data/doc/bgtable.png b/quanta/data/doc/bgtable.png
new file mode 100644
index 00000000..97ac7d1f
--- /dev/null
+++ b/quanta/data/doc/bgtable.png
Binary files 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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Konquer the Web with Quanta Plus!</title>
+ <link rel="stylesheet" href="konq.css" type="text/css" />
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ </head>
+ <body>
+ <div style="position:absolute; left: 0px; top: 5px; right: 0px; bottom: 500px;">
+ <a name="top" />
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="170" />
+ <col width="20" />
+ <col width="309" />
+ <col width="*" />
+ </colgroup>
+ <tr>
+ <td align="right" class="bla"><img width="77" height="22" src="aniquanta.gif" alt="Quanta Plus" /></td>
+ <td class="deco" colspan="3">Konquer the Web with Quanta Plus!</td>
+ </tr>
+ <tr>
+ <td colspan="2" rowspan="2"> &nbsp;</td>
+ <td><img width="309" height="77" src="quantahdr.png" alt="Quanta Plus" /></td>
+ <td class="blah"><img src="webdev.png" width="135" height="77" alt="Web Develop Environment" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" class="bla">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="intro.html">Introduction</a> &nbsp;</td><!-- Introduction -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="faq.html">FAQ</a> &nbsp;</td><!-- FAQ -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="tips.html">Tips</a> &nbsp;</td><!-- Tips -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="focus.html">Where we're going</a> &nbsp;</td>
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menuactive">&nbsp; Developer Info &nbsp;</td><!-- Specifications -->
+ <td height="20" class="menu">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" class="shadow1" height="9"></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" height="41"></td>
+ </tr>
+ </table>
+ <!-- end of header -->
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="190"></td>
+ <td class="trans">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="20">&nbsp;</td>
+ <td valign="top">
+ <!-- here comes the content -->
+ <h2>Developer Information</h2>
+ <p><span class="firstchar">Q</span>uanta Plus</p>
+ <p class="minihdr">Developer stuff</p>
+ <br />
+ <img width="16" height="16" src="more.png" alt="&gt;" />
+ <a href="intro.html">Back to start</a>
+ <!-- End of text -->
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="91" colspan="3">&nbsp;</td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="end" width="100%">&nbsp;</td>
+ <td align="right"><a href="http://www.kde.org"><img width="204" height="57" src="kdelogo2.png" alt="KDE" /></a></td>
+ </tr>
+ <tr>
+ <td height="50" colspan="2">&nbsp;</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+ <title></title>
+</head>
+<body bgcolor="white" text="black" link="#0000A0" alink="#008080" vlink="#C06060">
+
+ <table height="98%">
+
+ <tr valign="top">
+ <td align="center">
+ <table bgcolor="#8B92BF" width="100%" align="center" background="head_bg.gif">
+ <tr>
+ <td align="center">
+ <b><font color="white">Quanta Documentation Page</font></b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="center">
+ <table width="80%">
+ <tr>
+ <td>
+
+ <u><b><font color="#008080" size="+1">Documentation</font></b></u>
+
+ <p>
+ <b><font color="#805417">Q</font></b>uanta Plus
+ is an HTML editor for the K Desktop Environment.<BR>
+ This program is designed for <i>quick</i> web development!
+ Quanta is rapidly becoming a mature editor with a number of great features.
+ <i>Our objective is to produce a complete web development environment!</i>
+ </p>
+
+ <br><br>
+
+ </table>
+ </tr>
+
+
+ <tr valign="middle">
+ <td height="100%">
+ <table width="80%" align="center">
+ <tr>
+ <td>
+ <u><b><font color="#008080" size="+1">Avaible packages</font></b></u>
+
+ <p>
+ <table>
+ <tr>
+ <td>
+ <a href="http://sourceforge.net/project/filelist.php?group_id=4113">html.tar.bz2</a>
+ <td>
+ HTML 4.0 reference
+
+ <tr>
+ <td>
+ <a href="http://sourceforge.net/project/filelist.php?group_id=4113">css.tar.bz2</a>
+ <td>
+ Cascading Style Sheets
+
+ <tr>
+ <td>
+ <a href="http://sourceforge.net/project/filelist.php?group_id=4113">php.tar.bz2</a>
+ <td>
+ PHP documentation
+
+ <tr>
+ <td>
+ <a href="http://sourceforge.net/project/filelist.php?group_id=4113">js.tar.bz2</a>
+ <td>
+ Java Script documentation
+
+ </table>
+ </p>
+
+ </table>
+ </td>
+ </tr>
+
+ <tr valign="bottom">
+ <td align="center">
+
+ <table align="center" width="80%">
+ <tr valign="top">
+ <td>
+
+ <u><b><font color="#008080" size="+1">Contacting us</font></b></u>
+
+ <p>
+ <b><font color="#805417">P</font></b>lease use the <A href="http://bugs.kde.org">KDE Bugzilla</A>
+ site for bug reports, wishes. For further information and other discussions about Quanta Plus
+ subscribe to our <a href="https://mail.kde.org/mailman/listinfo/quanta">user mailing</a> list.
+
+ </p>
+
+ <p>
+ <b><font color="#805417">Y</font></b>ou 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 <a href="https://mail.kde.org/mailman/listinfo/quanta-devel">developer list</a> to contact us.&nbsp;
+ </p>
+ <br><br>
+
+ <td>&nbsp;&nbsp;
+ <td>
+
+ <table align="center">
+
+ <tr>
+ <td align="center">
+ <font color="#805417">&nbsp;&nbsp;Designed with&nbsp;&nbsp;</font>
+
+ <tr>
+ <td align="center">
+ <table width="100%">
+ <tr>
+ <td align="center">
+ <td align="center"><img src="minilogo.jpg">
+ <td align="center">
+ </tr>
+ </table>
+ <tr>
+ <td>
+ <a href="http://kdewebdev.org">http://kdewebdev.org</a>
+
+ </table>
+ </table>
+
+ <table bgcolor="#8B92BF" width="100%" align="center" background="head_bg.gif">
+ <tr>
+ <td align="center">
+ <b><font color="white">Quanta Documentation Page</font></b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ </table>
+
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Konquer the Web with Quanta Plus!</title>
+ <link rel="stylesheet" href="konq.css" type="text/css" />
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ </head>
+ <body>
+ <div style="position:absolute; left: 0px; top: 5px; right: 0px; bottom: 500px;">
+ <a name="top" />
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="170" />
+ <col width="20" />
+ <col width="309" />
+ <col width="*" />
+ </colgroup>
+ <tr>
+ <td align="right" class="bla"><img width="77" height="22" src="aniquanta.gif" alt="Quanta Plus" /></td>
+ <td class="deco" colspan="3">Konquer the Web with Quanta Plus!</td>
+ </tr>
+ <tr>
+ <td colspan="2" rowspan="2"> &nbsp;</td>
+ <td><img width="309" height="77" src="quantahdr.png" alt="Quanta Plus" /></td>
+ <td class="blah"><img src="webdev.png" width="135" height="77" alt="Web Develop Environment" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" class="bla">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="intro.html">Introduction</a> &nbsp;</td><!-- Introduction -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menuactive">&nbsp; FAQ &nbsp;</td><!-- FAQ -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="tips.html">Tips</a> &nbsp;</td><!-- Tips -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="focus.html">Where we're going</a> &nbsp;</td>
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="developer.html">Developer Info</a> &nbsp;</td><!-- Specifications -->
+ <td height="20" class="menu">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" class="shadow1" height="9"></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" height="41"></td>
+ </tr>
+ </table>
+ <!-- end of header -->
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="190"></td>
+ <td class="trans">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="20">&nbsp;</td>
+ <td valign="top">
+ <!-- here comes the content -->
+ <h2><span class="firstchar">Q</span>uanta Plus FAQ</h2>
+ <ul>
+ <li><a href="#1" class="olhead">1.&nbsp;&nbsp;What is Quanta Plus?</a></li>
+ <li><a href="#2" class="olhead">2.&nbsp;&nbsp;How do I install Quanta Plus?</a>
+ <ul>
+ <li><a href="#2.1" class="olhead">2.1&nbsp;&nbsp;Quanta Plus binary packages?</a></li>
+ <li><a href="#2.2" class="olhead">2.2&nbsp;&nbsp;Quanta Plus source code.</a></li>
+ <li><a href="#2.3" class="olhead">2.3&nbsp;&nbsp;Compiling Quanta Plus</a></li>
+ <li><a href="#2.4" class="olhead">2.4&nbsp;&nbsp;I get error X when running configure</a></li>
+ <li><a href="#2.5" class="olhead">2.5&nbsp;&nbsp;I get error X when compiling</a></li>
+ </ul>
+ </li>
+ <li><a href="#3" class="olhead">3.&nbsp;&nbsp;How do I do X? or Can Quanta Plus do X?</a>
+ <ul>
+ <li><a href="#3.1" class="olhead">3.1&nbsp;&nbsp;How can I open/edit a file on a remote server?</a></li>
+ <li><a href="#3.2" class="olhead">3.2&nbsp;&nbsp;Can I run program X from Quanta Plus?</a></li>
+ </ul>
+ </li>
+ <li><a href="#4" class="olhead">4.&nbsp;&nbsp;Is there any documentation for Quanta Plus?</a></li>
+ <li><a href="#5" class="olhead">5.&nbsp;&nbsp;How can I help Quanta Plus development?</a></li>
+ <li><a href="#6" class="olhead">6.&nbsp;&nbsp;Where is Quanta Plus going from here?</a></li>
+ </ul>
+ <hr align="left" size="3" width="100%" noshade="noshade" />
+ <a name="1" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <h2><span class="firstchar">1. W</span>hat is Quanta Plus?</h2>
+ <div class="indent">
+ <p>From http://quanta.sourceforge.net/:<br />
+ <i>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.</i></p>
+ <p><i>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!</i></p>
+ </div>
+ <a name="2" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <h2><span class="firstchar">2. H</span>ow do I install Quanta Plus?</h2>
+ <div class="indent">
+ <a name="2.1" />
+ <div class="minihdr">2.1 Quanta Plus binary packages?</div>
+ <div class="indent">
+ <p>Most Linux vendors ship with Quanta Plus packages. Simply use your vendor's installation software to install it. If your vendor does not provide Quanta Plus, then search <a href="http://www.google.com">Goggle.com</a>.</p>
+ </div>
+ <a name="2.2" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <div class="minihdr">2.2 Quanta Plus source code</div>
+ <div class="indent">
+ <p>There are two versions of the Quanta Plus source code:</p>
+ <ol>
+ <li>The 3.x formal releases are available from http://sourceforge.net/projects/quanta/ and</li>
+ <li>The CVS tree, which is available from anoncvs.kde.org.</li>
+ </ol>
+ <p>For formal releases, it is just a download, et cetera. For CVS tree:</p>
+ <ul>
+ <li>cvs -d:pserver:anonymous@anoncvs.kde.org:/home/kde login</li>
+ <li>cvs -d:pserver:anonymous@anoncvs.kde.org:/home/kde co quanta</li>
+ </ul>
+ <p>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.</p>
+ </div>
+ <a name="2.3" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <div class="minihdr">2.3 Compiling Quanta Plus</div>
+ <div class="indent">
+ <p>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.</p>
+ <p>Type the following in a shell and see what you get:</p>
+ <ul>
+ <li>test `echo $KDEDIR` &amp;&amp; echo "yes" || echo "noKDE"</li>
+ <li>test `echo $QTDIR` &amp;&amp; echo "yes" || echo "noQT"</li>
+ </ul>
+ <p>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.</p>
+ <p>Then it is as simple as:</p>
+ <pre>
+ 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.)
+ </pre>
+ </div>
+ <a name="2.4" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <div class="minihdr">2.4 I get error <i>X</i> when running ./configure</div>
+ <div class="indent">
+ <p>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.</p>
+ </div>
+ <a name="2.5" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <div class="minihdr">2.5 I get error <i>X</i> when compiling</div>
+ <div class="indent">
+ <p>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.</p>
+ </div>
+ </div>
+ <a name="3" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <h2><span class="firstchar">3. H</span>ow do I do <i>X</i>? Can Quanta Plus do <i>X</i>?</h2>
+ <a name="3.1" />
+ <div class="minihdr">3.1. How can I open/edit a file on a remote server?</div>
+ <div class="indent">
+ <p>Quanta Plus uses KIO for its file operations. To whit, an e-mail from our benefactor:</p>
+ <p><i>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.</i></p>
+ <p><i>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.</i></p>
+ <p><i>--<br />Eric Laffoon</i></p>
+ <p>That should about cover it.</p>
+ </div>
+ <a name="3.2" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <div class="minihdr">3.2. Can I run program <i>X</i> from Quanta Plus?</div>
+ <div class="indent">
+ <p>Yes! Quanta Plus will run almost anything you want as an action. More from our benefactor:</p>
+ <p><i>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.</i></p>
+ <p><i>To run HTMLtidy do the following:</i></p>
+ <ol>
+ <li><i>On the menu go to Settings>Configure Actions. </i></li>
+ <li><i>In the dialog click New button and give it a name and icon </i> </li>
+ <li><i>Select the script tab and put tidy -i in the script line </i></li>
+ <li><i>Select either selected text or current document for input </i></li>
+ <li><i>Select your output such as "Replace current document"</i> </li>
+ <li><i>On the error tab select "Message window" </i></li>
+ <li><i>Close the dialog and select Settings>Configure Toolbars </i></li>
+ <li><i>Place the new action on the toolbar of your choice </i></li>
+ </ol>
+ <p><i>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. </i></p>
+ <p><i>Enjoy!<br />--<br />Eric Laffoon</i></p>
+ </div>
+ <a name="4" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <h2><span class="firstchar">4. I</span>s there any documentation for Quanta Plus?</h2>
+ <div class="indent">
+ <p>Yes, however most are slightly outdated. They are being worked on currently. Would you like to help?</p>
+ </div>
+ <a name="5" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <h2><span class="firstchar">5. H</span>ow can I help Quanta Plus development?</h2>
+ <div class="indent">
+ <p>I thought you'd never ask! ;-)</p>
+ <p>From Eric:</p>
+ <p><i>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.</i></p>
+ <p><i>We believe in the cause!</i></p>
+ <p>If you would like to help out contact Eric Laffoon (<a href="mailto:sequitur@kde.org">sequitur@kde.org</a>).</p>
+ </div>
+ <a name="6" />
+ <div class="fltop"><a href="#top">Top</a></div>
+ <h2><span class="firstchar">6. W</span>here is Quanta Plus going from here?</h2>
+ <div class="indent">
+ <p><i>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!</i></p>
+ </div>
+ <img width="16" height="16" src="more.png" alt="&gt;" />&nbsp;<a href="tips.html">Continue</a>
+ <!-- End of text -->
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="91" colspan="3">&nbsp;</td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="end" width="100%">&nbsp;</td>
+ <td align="right"><a href="http://www.kde.org"><img width="204" height="57" src="kdelogo2.png" alt="KDE" /></a></td>
+ </tr>
+ <tr>
+ <td height="50" colspan="2">&nbsp;</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Konquer the Web with Quanta Plus!</title>
+ <link rel="stylesheet" href="konq.css" type="text/css" />
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ </head>
+ <body>
+ <div style="position:absolute; left: 0px; top: 5px; right: 0px; bottom: 500px;">
+ <a name="top" />
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="170" />
+ <col width="20" />
+ <col width="309" />
+ <col width="*" />
+ </colgroup>
+ <tr>
+ <td align="right" class="bla"><img width="77" height="22" src="aniquanta.gif" alt="Quanta Plus" /></td>
+ <td class="deco" colspan="3">Konquer the Web with Quanta Plus!</td>
+ </tr>
+ <tr>
+ <td colspan="2" rowspan="2"> &nbsp;</td>
+ <td><img width="309" height="77" src="quantahdr.png" alt="Quanta Plus" /></td>
+ <td class="blah"><img src="webdev.png" width="135" height="77" alt="Web Develop Environment" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" class="bla">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="intro.html">Introduction</a> &nbsp;</td><!-- Introduction -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="faq.html">FAQ</a> &nbsp;</td><!-- FAQ -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="tips.html">Tips</a> &nbsp;</td><!-- Tips -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menuactive">&nbsp; Where we're going &nbsp;</td>
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="developer.html">Developer Info</a> &nbsp;</td><!-- Specifications -->
+ <td height="20" class="menu">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" class="shadow1" height="9"></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" height="41"></td>
+ </tr>
+ </table>
+ <!-- end of header -->
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="190"></td>
+ <td class="trans">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="20">&nbsp;</td>
+ <td valign="top">
+ <!-- here comes the content -->
+ <h2>Our focus in Quanta Plus development</h2>
+ <p><span class="firstchar">Q</span>uanta Plus</p>
+ <p class="minihdr">Quanta Plus objective</p>
+ <img width="16" height="16" src="more.png" alt="&gt;" />&nbsp;<a href="developer.html">Continue</a>
+ <!-- End of text -->
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="91" colspan="3">&nbsp;</td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="end" width="100%">&nbsp;</td>
+ <td align="right"><a href="http://www.kde.org"><img width="204" height="57" src="kdelogo2.png" alt="KDE" /></a></td>
+ </tr>
+ <tr>
+ <td height="50" colspan="2">&nbsp;</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
diff --git a/quanta/data/doc/head_bg.gif b/quanta/data/doc/head_bg.gif
new file mode 100644
index 00000000..201d5850
--- /dev/null
+++ b/quanta/data/doc/head_bg.gif
Binary files 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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Konquer the Web with Quanta Plus!</title>
+ <link rel="stylesheet" href="konq.css" type="text/css" />
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ </head>
+ <body>
+ <div style="position:absolute; left: 0px; top: 5px; right: 0px; bottom: 500px;">
+ <a name="top" />
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="170" />
+ <col width="20" />
+ <col width="309" />
+ <col width="*" />
+ </colgroup>
+ <tr>
+ <td align="right" class="bla"><img width="77" height="22" src="aniquanta.gif" alt="Quanta Plus" /></td>
+ <td class="deco" colspan="3">Konquer the Web with Quanta Plus!</td>
+ </tr>
+ <tr>
+ <td colspan="2" rowspan="2"> &nbsp;</td>
+ <td><img width="309" height="77" src="quantahdr.png" alt="Quanta Plus" /></td>
+ <td class="blah"><img src="webdev.png" width="135" height="77" alt="Web Develop Environment" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" class="bla">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" class="menu">&nbsp; &nbsp;</td>
+ <td height="20" class="menu">&nbsp; &nbsp;</td>
+ <td height="20" class="menu">&nbsp; &nbsp;</td>
+ <td height="20" class="menu">&nbsp; &nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" class="shadow1" height="9"></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" height="41"></td>
+ </tr>
+ </table>
+ <!-- end of header -->
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="190"></td>
+ <td class="trans">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="20">&nbsp;</td>
+ <td valign="top">
+ <!-- here comes the content -->
+ <h2>Welcome to Quanta Plus</h2>
+ <p><span class="firstchar">Q</span>uanta 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.</p>
+ <p><span class="firstchar">W</span>hy 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.</p>
+ <p class="minihdr">Available documentation packages for Quanta Plus:</p>
+ <dl>
+ <dt><a href="http://sourceforge.net/project/showfiles.php?group_id=4113">Documentation</a></dt>
+ <dd>List of all documentation</dd>
+ <dt><a href="http://prdownloads.sourceforge.net/quanta/html.tar.bz2">html.tar.bz2</a></dt>
+ <dd>HTML 4.01 reference</dd>
+ <dt><a href="http://prdownloads.sourceforge.net/quanta/css.tar.bz2">css.tar.bz2</a></dt>
+ <dd>Cascading Style Sheets</dd>
+ <dt><a href="http://prdownloads.sourceforge.net/quanta/php.tar.bz2">php.tar.bz2</a></dt>
+ <dd>PHP documentation</dd>
+ <dt><a href="http://prdownloads.sourceforge.net/quanta/javascript.tar.bz2">javascript.tar.bz2</a></dt>
+ <dd>JavaScript documentation</dd>
+ </dl>
+ <table>
+ <tr valign="top">
+ <td>
+ <p class="minihdr">Contacting us</p>
+ <p><span class="firstchar">P</span>lease use our <a href="http://bugs.kde.org">bug reporting</a> site for bugs, wishes and the <a href="http://kdewebdev.org">project home page</a> for support, further information, and other useful features.</p>
+ <table>
+ <tr>
+ <td><a href="mailto:sequitur@kde.org">Eric Laffoon</a>&nbsp;&nbsp;&nbsp;</td>
+ <td><a href="mailto:amantia@kde.org">Andras Mantia</a>&nbsp;&nbsp;&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;&nbsp;</td>
+ <td valign="middle">
+ <table align="center">
+ <tr>
+ <td align="center"><font color="#805417">&nbsp;&nbsp;Designed with&nbsp;&nbsp;</font></td>
+ </tr>
+ <tr>
+ <td align="center">
+ <table width="100%">
+ <tr>
+ <td align="center"></td>
+ <td align="center"><a href="http://kdewebdev.org"><img src="minilogo.png" alt="Quanta Plus" /></a></td>
+ <td align="center"></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="http://kdewebdev.org">http://kdewebdev.org</a></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <!-- End of text -->
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="91" colspan="3">&nbsp;</td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="end" width="100%">&nbsp;</td>
+ <td align="right"><a href="http://www.kde.org"><img width="204" height="57" src="kdelogo2.png" alt="KDE" /></a></td>
+ </tr>
+ <tr>
+ <td height="50" colspan="2">&nbsp;</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
diff --git a/quanta/data/doc/kdelogo2.png b/quanta/data/doc/kdelogo2.png
new file mode 100644
index 00000000..ee3041b7
--- /dev/null
+++ b/quanta/data/doc/kdelogo2.png
Binary files 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
--- /dev/null
+++ b/quanta/data/doc/lines.png
Binary files differ
diff --git a/quanta/data/doc/lines2.png b/quanta/data/doc/lines2.png
new file mode 100644
index 00000000..02a8c05b
--- /dev/null
+++ b/quanta/data/doc/lines2.png
Binary files 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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- $Id$-->
+<head>
+ <title></title>
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ <style>
+ BODY {background-image: url(qcenter2.png); background-repeat: no-repeat;
+ background-attachment: fixed; background-position: center;}
+ </style>
+</head>
+<body bgcolor="white" text="black">
+
+ <table height="98%" width="100%">
+
+ <tr valign="top">
+ <td align="center">
+ <table bgcolor="#8B92BF" width="100%" align="center" background="head_bg.gif">
+ <tr>
+ <td align="center">
+ <b><font color="white">Quanta Documentation</font></b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="center">
+ <table width="80%">
+ <tr>
+ <td>
+ <!--Content entry section-->
+ <p class="minihdr">Quanta Documentation</p>
+
+ <p>
+ <span class="firstchar">Q</span>uanta 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.
+ </p>
+
+ <p><span class="firstchar">T</span>his documentation is being developed on an
+ ongoing basis to handle several areas.
+ </p>
+ <ul>
+ <li>Areas of Quanta's interface that may be more confusing like the project section. </li>
+ <li>Assistance in understanding some of the more potentially difficult areas
+ like interface customization, scripting and running a PHP debugger. </li>
+ <li>Pointing out the less obvious things like the ability to open projects
+ remotely through kio. </li>
+ <li>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. </li>
+ <li>Introductory instruction on how to be much more productive with Quanta. </li>
+ <li>Reference information on our design objectives and progress. </li>
+ <li>Developer information for those who might wish to join us. </li>
+ </ul>
+ <br>
+ <p class="minihdr">Getting Involved!
+ </p>
+ <p><span class="firstchar">W</span>e 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 <i>cause</i>? 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 <b>the</b> option. We believe in the
+ cause!
+ </p>
+ <p><span class="firstchar">I</span>f you would like to help out contact
+ <a href="mailto:sequitur@kde.org?subject=I want to help with Quanta documentation">Eric Laffoon</a>.
+ </p>
+ <!--end main content section, minor one below-->
+ <br><br>
+ </td>
+ </tr>
+ </table>
+ </tr>
+
+
+ <tr valign="bottom">
+ <td align="center">
+ <table align="center" width="80%">
+ <tr valign="top">
+ <td>
+ <!--Optional close page section at bottom-->
+ <p class="minihdr">Thank you for using Quanta</p>
+
+ <p><span class="firstchar">T</span>his page and all Quanta docs are currently
+ under heavy construction.
+ </p>
+ <!--End optional section-->
+ <br><br>
+ </td>
+ <td>&nbsp;&nbsp;
+ </td>
+ <td align="right" valign="center">
+ <a href="http://kdewebdev.org/"><img src="minilogo.jpg"></a>
+ </table>
+ </table>
+
+ <table bgcolor="#8B92BF" width="100%" align="center" background="head_bg.gif">
+ <tr>
+ <td align="center">
+ <b><font color="white">Quanta Documentation</font></b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ </table>
+
+</body>
+</html>
diff --git a/quanta/data/doc/minilogo.jpg b/quanta/data/doc/minilogo.jpg
new file mode 100644
index 00000000..a457c690
--- /dev/null
+++ b/quanta/data/doc/minilogo.jpg
Binary files differ
diff --git a/quanta/data/doc/minilogo.png b/quanta/data/doc/minilogo.png
new file mode 100644
index 00000000..981284c2
--- /dev/null
+++ b/quanta/data/doc/minilogo.png
Binary files differ
diff --git a/quanta/data/doc/more.png b/quanta/data/doc/more.png
new file mode 100644
index 00000000..f50ca50e
--- /dev/null
+++ b/quanta/data/doc/more.png
Binary files differ
diff --git a/quanta/data/doc/qcenter2.png b/quanta/data/doc/qcenter2.png
new file mode 100644
index 00000000..cea35877
--- /dev/null
+++ b/quanta/data/doc/qcenter2.png
Binary files 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
--- /dev/null
+++ b/quanta/data/doc/quantahdr.png
Binary files differ
diff --git a/quanta/data/doc/shadow1.png b/quanta/data/doc/shadow1.png
new file mode 100644
index 00000000..1118daca
--- /dev/null
+++ b/quanta/data/doc/shadow1.png
Binary files 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 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<!-- $Id$-->
+<head>
+ <title></title>
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ <style>
+ BODY {background-image: url(qcenter2.png); background-repeat: no-repeat;
+ background-attachment: fixed; background-position: center;}
+ </style>
+</head>
+<body bgcolor="white" text="black">
+
+ <table height="98%" width="100%">
+
+ <tr valign="top">
+ <td align="center">
+ <table bgcolor="#8B92BF" width="100%" align="center" background="head_bg.gif">
+ <tr>
+ <td align="center">
+ <b><font color="white">Quanta Documentation</font></b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td align="center">
+ <table width="80%">
+ <tr>
+ <td>
+ <!--Content entry section-->
+ <p class="minihdr">Documentation</p>
+
+ <p><!--Using span firstchar on paragraph openings-->
+ <span class="firstchar">Q</span>uanta Plus
+ </p>
+ <!--end main content section, minor one below-->
+ <br><br>
+ </td>
+ </tr>
+ </table>
+ </tr>
+
+
+ <tr valign="bottom">
+ <td align="center">
+ <table align="center" width="80%">
+ <tr valign="top">
+ <td>
+ <!--Optional close page section at bottom-->
+ <p class="minihdr">Close Page</p>
+
+ <p><span class="firstchar">Q</span>uanta Plus
+ </p>
+ <!--End optional section-->
+ <br><br>
+ </td>
+ <td>&nbsp;&nbsp;
+ </td>
+ <td align="right" valign="center">
+ <a href="http://kdewebdev.org/"><img src="minilogo.jpg"></a>
+ </table>
+ </table>
+
+ <table bgcolor="#8B92BF" width="100%" align="center" background="head_bg.gif">
+ <tr>
+ <td align="center">
+ <b><font color="white">Quanta Documentation</font></b>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+ </table>
+
+</body>
+</html>
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 @@
+<html>
+<head>
+ <title>Konquer the Web with Quanta!</title>
+ <link rel="stylesheet" href="konq.css" type="text/css" />
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+</head>
+<body BGCOLOR=#3679AD LEFTMARGIN=0 TOPMARGIN=5>
+<a name="top"></a>
+<div style="position:absolute; left: 0px; top: 5px; right: 0px; bottom: 500px;">
+<table BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 CELLPADDING=0>
+ <colgroup>
+ <col WIDTH=170>
+ <col WIDTH=20>
+ <col WIDTH=309>
+ <col WIDTH=*>
+ </colgroup>
+ <tr HEIGHT=24>
+ <td BGCOLOR=#505050 ALIGN=RIGHT><img width="77" height="22" src="aniquanta.gif" border="0"></td>
+ <td class="deco" BGCOLOR=#505050 COLSPAN=3>Konquer the Web with Quanta!</td>
+ </tr>
+ <tr>
+ <td WIDTH=190 COLSPAN=2 ROWSPAN=2> &nbsp;</td>
+ <td BGCOLOR=#DDDDDD><img WIDTH=309 HEIGHT=77 SRC="quantahdr.png"></td>
+ <td BGCOLOR=#DDDDDD BACKGROUND="lines.png"><img src="webdev.png" width="135" height="77" border="0"></td>
+ </tr>
+ <tr>
+ <td COLSPAN=2 BGCOLOR=#505050 ALIGN=RIGHT HEIGHT=22>
+ <table BORDER=0 CELLPADDING=0 CELLSPACING=0 CELLPADDING=0>
+ <tr>
+ <td HEIGHT=20 class="menu">&nbsp; <a class="menu" HREF="intro.html">Introduction</a> &nbsp;</td><!-- Introduction -->
+ <td HEIGHT=20 class="menu">|</td>
+ <td HEIGHT=20 class="menu">&nbsp; <a class="menu" HREF="faq.html">FAQ</a> &nbsp;</td><!-- Introduction -->
+ <td HEIGHT=20 class="menu">|</td>
+ <td HEIGHT=20 class="menu">&nbsp; <a class="menu" HREF="tips.html">Tips</a> &nbsp;</td><!-- Tips -->
+ <td HEIGHT=20 class="menu">|</td>
+ <td HEIGHT=20 class="menuactive">&nbsp; Where we're going &nbsp;</td>
+ <td HEIGHT=20 class="menu">|</td>
+ <td HEIGHT=20 class="menu">&nbsp; <a class="menu" HREF="developer.html">Developer Info</a> &nbsp;</td><!-- Specifications -->
+ <td HEIGHT=20 class="menu">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td COLSPAN=2 WIDTH=190></td>
+ <td COLSPAN=2 class="shadow1" HEIGHT=9 COLSPAN=4></td>
+ </tr>
+ <tr>
+ <td COLSPAN=2 WIDTH=190></td>
+ <td COLSPAN=2 HEIGHT=41 COLSPAN=4></td>
+ </tr>
+</table>
+<!-- end of header -->
+
+<TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 CELLPADDING=0>
+<TR>
+ <TD WIDTH=190></TD>
+ <TD class="trans" BGCOLOR=#D0DFEC>
+
+ <TABLE WIDTH= 100% BORDER=0 CELLPADDING=0 CELLSPACING=0 CELLPADDING=0>
+ <TR>
+ <TD HEIGHT=20 WIDTH=20>&nbsp;</TD>
+ <TD>&nbsp;</TD>
+ </TR>
+ <TR>
+ <TD WIDTH=20>&nbsp;</TD>
+ <TD VALIGN=TOP>
+
+<!-- here comes the content -->
+
+<P><H2>Quanta Plus Templates<H2></P>
+<p class="minihdr">Template description
+</p>
+<p>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.
+</p>
+<p>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 <i>pre</i> and <i>post</i> 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.
+</p>
+<p class="minihdr">Template types
+</p>
+<p>Currently templates are limited to being one of the following types of objects:
+<ul>
+ <li>Document </li>
+ <li>Text to insert in a document </li>
+ <li>A file to link to from a document </li>
+</ul>
+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.
+</p>
+<p class="minihdr">Template scope
+</p>
+<p> Templates are scoped into three general categories: Global, Local and Project.
+<ul>
+ <li>Global - Available to all folks all the time. </li>
+ <li>Local - Available to a specific user (maybe others if they can see it where it
+ exists in the file system). </li>
+ <li>Project - Available to the associated project only. </li>
+</ul>
+</p>
+<p class="minihdr">Creating templates
+</p>
+<p>Create a document structure that you love (XML, HTML, DocBook, etc.) and
+ click on File->Save as Template->Save as Local/Project Template.
+</p>
+<p> 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.
+</p>
+<p>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.
+</p>
+<p class="minihdr">Using templates with Projects
+</p>
+<p>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.
+<ul>
+ <li>When creating a project you can opt to copy over all global and user templates. </li>
+ <li>Legacy project get default templating abilities so nothing is lost </li>
+ <li>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 </li>
+ <li>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. </li>
+ <li>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. </li>
+</ul>
+</p>
+<p class="minihdr">Templates conclusion
+</p>
+<p>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.
+</p>
+<br>
+&nbsp;<IMG WIDTH=16 HEIGHT=16 BORDER=0 SRC="more.png">&nbsp;<A HREF="developer.html">Continue</A>
+
+<!-- End of text -->
+
+
+ </TD>
+ <TD WIDTH=20>&nbsp;</TD>
+ </TR>
+ <TR>
+ <TD HEIGHT=20 WIDTH=20>&nbsp;</TD>
+ <TD>&nbsp;</TD>
+ </TR>
+
+</TABLE>
+
+ </TD>
+ <TD WIDTH=20>&nbsp;</TD>
+ </TR>
+ <TR>
+ <TD HEIGHT=91 COLSPAN=3>&nbsp;</TD>
+ </TR>
+</TR>
+</TABLE>
+
+<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=0>
+<TR>
+<TD class="end" WIDTH=*>&nbsp;</TD>
+<TD WIDTH=204><A HREF="http://www.kde.org"> <IMG WIDTH=204 BORDER=0 HEIGHT=57
+SRC="kdelogo2.png"></A></TD>
+</TR>
+<TR>
+ <TD HEIGHT=50 COLSPAN=2>&nbsp;</TD>
+</TR>
+</TABLE>
+</div>
+
+</BODY>
+</HTML>
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 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>Konquer the Web with Quanta Plus!</title>
+ <link rel="stylesheet" href="konq.css" type="text/css" />
+ <link rel="stylesheet" href="quanta.css" type="text/css" />
+ </head>
+ <body>
+ <div style="position:absolute; left: 0px; top: 5px; right: 0px; bottom: 500px;">
+ <a name="top" />
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <colgroup>
+ <col width="170" />
+ <col width="20" />
+ <col width="309" />
+ <col width="*" />
+ </colgroup>
+ <tr>
+ <td align="right" class="bla"><img width="77" height="22" src="aniquanta.gif" alt="Quanta Plus" /></td>
+ <td class="deco" colspan="3">Konquer the Web with Quanta Plus!</td>
+ </tr>
+ <tr>
+ <td colspan="2" rowspan="2"> &nbsp;</td>
+ <td><img width="309" height="77" src="quantahdr.png" alt="Quanta Plus" /></td>
+ <td class="blah"><img src="webdev.png" width="135" height="77" alt="Web Develop Environment" /></td>
+ </tr>
+ <tr>
+ <td colspan="2" align="right" class="bla">
+ <table cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="intro.html">Introduction</a> &nbsp;</td><!-- Introduction -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="faq.html">FAQ</a> &nbsp;</td><!-- FAQ -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menuactive">&nbsp; Tips &nbsp;</td><!-- Tips -->
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="focus.html">Where we're going</a> &nbsp;</td>
+ <td height="20" class="menu">|</td>
+ <td height="20" class="menu">&nbsp; <a class="menu" href="developer.html">Developer Info</a> &nbsp;</td><!-- Specifications -->
+ <td height="20" class="menu">&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" class="shadow1" height="9"></td>
+ </tr>
+ <tr>
+ <td colspan="2" width="190"></td>
+ <td colspan="2" height="41"></td>
+ </tr>
+ </table>
+ <!-- end of header -->
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td width="190"></td>
+ <td class="trans">
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ <tr>
+ <td width="20">&nbsp;</td>
+ <td valign="top">
+ <!-- here comes the content -->
+ <h2>Quanta Plus Tips</h2>
+ <table>
+ <tr><td><a href="#templates">Quanta Plus Templates</a></td></tr>
+ <tr><td><a href="#toolbars">Quanta Plus Toolbars</a></td></tr>
+ </table>
+ <a name="templates" />
+ <h2>Quanta Plus Templates</h2>
+ <p class="minihdr">Template description</p>
+ <p>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. </p>
+ <p>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 <i>pre</i> and <i>post</i> 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.</p>
+ <p class="minihdr">Template types</p>
+ <p>Currently templates are limited to being one of the following types of objects:</p>
+ <ul>
+ <li>Document </li>
+ <li>Text to insert in a document </li>
+ <li>A file to link to from a document </li>
+ </ul>
+ <p>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.</p>
+ <p class="minihdr">Template scope</p>
+ <p>Templates are scoped into three general categories: Global, Local and Project.</p>
+ <ul>
+ <li>Global - Available to all folks all the time. </li>
+ <li>Local - Available to a specific user (maybe others if they can see it where it exists in the file system). </li>
+ <li>Project - Available to the associated project only. </li>
+ </ul>
+ <p class="minihdr">Creating templates</p>
+ <p>Create a document structure that you love (XML, (X)HTML, DocBook, etc.) and click on File->Save as Template->Save as Local/Project Template.</p>
+ <p> 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.</p>
+ <p>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.</p>
+ <p class="minihdr">Using templates with Projects </p>
+ <p>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.</p>
+ <ul>
+ <li>When creating a project you can opt to copy over all global and user templates. </li>
+ <li>Legacy projects get default templating abilities, so nothing is lost. </li>
+ <li>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. </li>
+ <li>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. </li>
+ <li>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!</li>
+ </ul>
+ <p class="minihdr">Templates conclusion</p>
+ <p>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. </p>
+ <a name="toolbars" />
+ <h2>Quanta Plus Toolbars</h2>
+ <p class="minihdr">Toolbar Description</p>
+ <p>Probably the most exciting feature of Quanta Plus is the ability to build and trade custom toolbars for the program.</p>
+ <p>Although this may seem somewhat trivial, toolbars are going to be quite critical to the quality of your experience with Quanta Plus.</p>
+ <p>Toolbars essentially give you the chance to organize any set of tags, commands, or utility functions you can <a href="faq.html#3.2">make as a Quanta Plus action</a> 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.</p>
+ <p class="minihdr">Toolbar Creation</p>
+ <p>To put an action on a toolbar, select Toolbars->Add User Toolbar. Give it a nice descriptive name and then click Ok.</p>
+ <p>You should have it on the top with all the others now.</p>
+ <p>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.</p>
+ <p class="minihdr">Toolbar Sharing</p>
+ <p>If you have a great toolbar and a set of actions, you can share it with the community or your buddies.</p>
+ <p>Just click on Toolbars->Send toolbar in email, follow the prompts and mail it to your buddies or someone on the Development team.</p>
+ <p>If this doesn't work for you, then you can just mail the &lt;toolbar-name>.toolbar.gz file it can be opened via Toolbars->Load Toolbars menu tree.</p>
+ <img width="16" height="16" src="more.png" alt="&gt;" /><a href="focus.html">Continue</a>
+ <!-- End of text -->
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="20" width="20">&nbsp;</td>
+ <td>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td width="20">&nbsp;</td>
+ </tr>
+ <tr>
+ <td height="91" colspan="3">&nbsp;</td>
+ </tr>
+ </table>
+ <table width="100%" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="end" width="100%">&nbsp;</td>
+ <td align="right"><a href="http://www.kde.org"><img width="204" height="57" src="kdelogo2.png" alt="KDE" /></a></td>
+ </tr>
+ <tr>
+ <td height="50" colspan="2">&nbsp;</td>
+ </tr>
+ </table>
+ </div>
+ </body>
+</html>
diff --git a/quanta/data/doc/webdev.png b/quanta/data/doc/webdev.png
new file mode 100644
index 00000000..0b4b0ab4
--- /dev/null
+++ b/quanta/data/doc/webdev.png
Binary files 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="Abs" type="function" returnType="int">
+ <attr name="value" type="number" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="acos" type="function" returnType="int">
+ <attr name="value" type="number" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="acs" type="function" returnType="int">
+ <attr name="string" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="ArrayAppend" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="value" type="string" status="required" />
+ </tag>
+ <tag name="ArrayAvg" type="function" returnType="number">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArrayClear" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArrayDeleteAt" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="position" type="int" status="required" />
+ </tag>
+ <tag name="ArrayInsertAt" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="position" type="int" status="required" />
+ <attr name="value" type="string" status="required" />
+ </tag>
+ <tag name="ArrayIsEmpty" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArrayLen" type="function" returnType="int">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArrayMax" type="function" returnType="number">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArrayMin" type="function" returnType="number">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArrayNew" type="function">
+ <attr name="dimension {1|2|3}" type="int" status="required" />
+ </tag>
+ <tag name="ArrayPrepend" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="value" type="string" status="required" />
+ </tag>
+ <tag name="ArrayResize" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="minimum_size" type="int" status="required" />
+ </tag>
+ <tag name="ArraySet" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="start_pos" type="int" status="required" />
+ <attr name="end_pos" type="int" status="required" />
+ <attr name="value" type="string" status="required" />
+ </tag>
+ <tag name="ArraySort" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="sort_type {numeric|text|textnocase}" status="required" />
+ <attr name="sort_order {asc|desc}" status="optional" />
+ </tag>
+ <tag name="ArraySum" type="function" returnType="number">
+ <attr name="array_name" status="required" />
+ </tag>
+ <tag name="ArraySwap" type="function" returnType="boolean">
+ <attr name="array_name" status="required" />
+ <attr name="position1" type="int" status="required" />
+ <attr name="position2" type="int" status="required" />
+ </tag>
+ <tag name="ArrayToList" type="function" returnType="list">
+ <attr name="array_name" status="required" />
+ <attr name="delimiter" status="optional" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="ASin" type="function" returnType="number">
+ <attr name="number" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="Atn" type="function" returnType="number">
+ <attr name="number" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="AuthenticatedContext" type="function" returnType="string">
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="AuthenticatedUser" type="function" returnType="string">
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitAnd" type="function" returnType="int">
+ <attr name="number1" type="int" status="required" />
+ <attr name="number2" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitMaskClear" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ <attr name="start" type="int" status="required" />
+ <attr name="length" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitMaskRead" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ <attr name="start" type="int" status="required" />
+ <attr name="length" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitMaskSet" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ <attr name="mask" type="int" status="required" />
+ <attr name="start" type="int" status="required" />
+ <attr name="length" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitNot" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitOr" type="function" returnType="number">
+ <attr name="number1" type="int" status="required" />
+ <attr name="number2" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitSHLN" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ <attr name="count" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitSHRN" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ <attr name="count" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="BitXor" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ <attr name="number2" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="Ceiling" type="function" returnType="number">
+ <attr name="number" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="Chr" type="function" returnType="string">
+ <attr name="number" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="CJustify" type="function" returnType="string">
+ <attr name="string" status="required" />
+ <attr name="length" type="int" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="Compare" type="function" returnType="int">
+ <attr name="string1" status="required" />
+ <attr name="string2" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="CompareNoCase" type="function" returnType="int">
+ <attr name="string1" status="required" />
+ <attr name="string2" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="cos" type="function" returnType="number">
+ <attr name="number" status="required" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="CreateObject" type="function" returnType="object">
+ <attr name="type {COM|CORBA|JAVA}" type="int" status="required" />
+ <attr name="class" type="string" status="required" />
+ <attr name="context {COM=InProc|Local|Remote CORBA=IOR|NameService}" type="string" status="optional" />
+ <attr name="serverName {for COM}" type="string" status="optional" />
+ <attr name="locale {for CORBA}" type="string" status="optional" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="CreateUUID" type="function" returnType="string">
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="CreateDate" type="function" returnType="date">
+ <attr name="year" type="int" status="required" />
+ <attr name="month" type="int" status="required" />
+ <attr name="day" type="int" status="required" />
+ </tag>
+ <tag name="CreateDateTime" type="function" returnType="date_time">
+ <attr name="year" type="int" status="required" />
+ <attr name="month" type="int" status="required" />
+ <attr name="day" type="int" status="required" />
+ <attr name="hour" type="int" status="required" />
+ <attr name="minute" type="int" status="required" />
+ <attr name="second" type="int" status="required" />
+ </tag>
+ <tag name="CreateODBCDate" type="function" returnType="string">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="CreateODBCDateTime" type="function" returnType="string">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="CreateODBCTime" type="function" returnType="string">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="CreateTime" type="function" returnType="string">
+ <attr name="hour" type="int" status="required" />
+ <attr name="minute" type="int" status="required" />
+ <attr name="second" type="int" status="required" />
+ </tag>
+ <tag name="CreateTimeSpan" type="function" returnType="string">
+ <attr name="days" type="int" status="required" />
+ <attr name="hour" type="int" status="required" />
+ <attr name="minute" type="int" status="required" />
+ <attr name="second" type="int" status="required" />
+ </tag>
+ <tag name="DateAdd" type="function" returnType="date">
+ <attr name="datepart" type="string" status="required" />
+ <attr name="number" type="int" status="required" />
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="DateCompare" type="function" returnType="int">
+ <attr name="date1" type="object" status="required" />
+ <attr name="date2" type="object" status="required" />
+ <attr name="datepart" type="string" status="optional" />
+ </tag>
+ <tag name="DateConvert" type="function" returnType="int">
+ <attr name="conversion-type {local2UTC|UTC2local}" type="string" status="required" />
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="DateDiff" type="function" returnType="int">
+ <attr name="datepart" type="string" status="required" />
+ <attr name="date1" type="object" status="required" />
+ <attr name="date2" type="object" status="required" />
+ </tag>
+ <tag name="DateFormat" type="function" returnType="date">
+ <attr name="date" type="object" status="required" />
+ <attr name="mask" type="object" status="optional" />
+ </tag>
+ <tag name="DatePart" type="function" returnType="int">
+ <attr name="datepart" type="string" status="required" />
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="Day" type="function" returnType="int">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="DayOfWeek" type="function" returnType="int">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="DayOfWeekAsString" type="function" returnType="string">
+ <attr name="day_of_week" type="int" status="required" />
+ </tag>
+ <tag name="DayOfYear" type="function" returnType="int">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="DaysInMonth" type="function" returnType="int">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="DayInYear" type="function" returnType="int">
+ <attr name="date" type="object" status="required" />
+ </tag>
+ <tag name="FirstDayOfMonth" type="function" returnType="int">
+ <attr name="date" type="string" status="required" />
+ </tag>
+ <tag name="GetTimeZoneInfo" type="function" returnType="string">
+ </tag>
+ <tag name="Hour" type="function" returnType="int">
+ <attr name="date" type="string" status="required" />
+ </tag>
+</TAGS>
+
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="DE" type="function" returnType="string">
+ <attr name="value" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="DecimalFormat" type="function" returnType="number">
+ <attr name="value" type="number" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="DecrementValue" type="function" returnType="int">
+ <attr name="value" type="number" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Decrypt" type="function" returnType="string">
+ <attr name="encrypted_string" type="string" status="required" />
+ <attr name="seed" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="DeleteClientVariable" type="function" returnType="boolean">
+ <attr name="name" type="string" status="required" />
+</tag>
+</TAGS>
+
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 = <cfscript> </cfscript>
+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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="DirectoryExists" type="function" returnType="boolean">
+ <attr name="absolute_path" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="DollarFormat" type="function" returnType="string">
+ <attr name="value" type="number" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Duplicate" type="function" returnType="string">
+ <attr name="variable_name" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Encrypt" type="function" returnType="string">
+ <attr name="value" type="string" status="required" />
+ <attr name="seed" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Evaluate" type="function" returnType="string">
+ <attr name="string_expression1" type="string" status="required" />
+ <attr name="string_expression2, ..." type="string" status="optional" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Exp" type="function" returnType="string">
+ <attr name="value" type="number" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ExpandPath" type="function" returnType="string">
+ <attr name="relative_path" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="FileExists" type="function" returnType="boolean">
+ <attr name="absolute_path" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Find" type="function" returnType="int">
+ <attr name="substring" type="string" status="required" />
+ <attr name="string" type="string" status="required" />
+ <attr name="start" type="int" status="optional" />
+</tag>
+<tag name="FindNoCase" type="function" returnType="int">
+ <attr name="substring" type="string" status="required" />
+ <attr name="string" type="string" status="required" />
+ <attr name="start" type="int" status="optional" />
+</tag>
+<tag name="FindOneOf" type="function" returnType="int">
+ <attr name="set" type="string" status="required" />
+ <attr name="string" type="string" status="required" />
+ <attr name="start" type="int" status="optional" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Fix" type="function" returnType="int">
+ <attr name="value" type="int" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="FormatBaseN" type="function" returnType="int">
+ <attr name="value" type="number" status="required" />
+ <attr name="radix" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetBaseTagData" type="function" returnType="object">
+ <attr name="tagname" type="string" status="required" />
+ <attr name="instancenumber" type="int" status="optional" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetBaseTagList" type="function" returnType="list">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetBaseTemplatePath" type="function" returnType="string">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetClientVariablesList" type="function" returnType="list">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetCurrentTemplatePath" type="function" returnType="string">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetDirectoryFromPath" type="function" returnType="string">
+ <attr name="path" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetException" type="function" returnType="string">
+ <attr name="object" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetFileFromPath" type="function" returnType="string">
+ <attr name="path" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetFunctionList" type="function" returnType="structure">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetHttpRequestData" type="function" returnType="structure">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetHttpTimeString" type="function" returnType="string">
+ <attr name="date_time_object" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetLocale" type="function" returnType="string">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetMetricData" type="function" returnType="string">
+ <attr name="mode" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetProfileString" type="function" returnType="string">
+ <attr name="iniPath" type="string" status="required" />
+ <attr name="section" type="string" status="required" />
+ <attr name="entry" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetTempDirectory" type="function" returnType="string">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetTempFile" type="function" returnType="string">
+ <attr name="dir" type="string" status="required" />
+ <attr name="prefix" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetTemplatePath" type="function" returnType="string">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetTickCount" type="function" returnType="int">
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="GetToken" type="function" returnType="int">
+ <attr name="string" status="required" />
+ <attr name="index" type="int" status="required" />
+ <attr name="delimiters" type="string" status="optional" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="hash" type="function" returnType="string">
+ <attr name="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="HTMLCodeFormat" type="function" returnType="string">
+ <attr name="string" status="required" />
+ <attr name="version" type="string" status="optional" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="HTMLEditFormat" type="function" returnType="string">
+ <attr name="string" status="required" />
+ <attr name="version" type="string" status="optional" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="IIf" type="function" returnType="string">
+ <attr name="condition" type="string" status="required" />
+ <attr name="string_expression1" type="string" status="required" />
+ <attr name="string_expression2" type="string" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="IncrementValue" type="function" returnType="int">
+ <attr name="value" type="number" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="InputBaseN" type="function" returnType="int">
+ <attr name="value" type="number" status="required" />
+ <attr name="radix" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Insert" type="function" returnType="string">
+ <attr name="substring" type="string" status="required" />
+ <attr name="string" status="required" />
+ <attr name="position" type="int" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Int" type="function" returnType="int">
+ <attr name="value" type="number" status="required" />
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="IsArray" type="function" returnType="boolean">
+ <attr name="value" type="string" status="required" />
+ <attr name="number" type="int" status="optional" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="IsAuthenticated" type="function" returnType="boolean">
+ <attr name="security-context-name" type="string" status="optional" />
+ </tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfabort" single="1">
+ <attr name="showerror" type="input">
+ <text>Show Error:</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <tooltip>Error message to display, rather than just ending execution</tooltip>
+ </attr>
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+</tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfapplet" single="1">
+ <attr name="name" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfapplication" single="1">
+ <attr name="name" type="input">
+ <text>Name:</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="clientmanagement" type="list">
+ <text>Client Management</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="setclientcookies" type="list">
+ <text>Session Management</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="setclientcookies" type="list">
+ <text>Set Client Cookies</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="setdomaincookies" type="list">
+ <text>Set Domain Cookies</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="clientstorage" type="list">
+ <text>Client Storage</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ <items>
+ <item>Registry</item>
+ <item>Cookie</item>
+ <item>"datasource_name"</item>
+ </items>
+ </attr>
+ <attr name="applicationtimeout" type="input">
+ <text>Application Timeout</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="sessiontimeout" type="input">
+ <text>Session Timeout</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+</tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfargument" single="1">
+ <attr name="name" />
+ <attr name="type" />
+ <attr name="required" />
+ <attr name="default" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfassociate" single="1">
+ <attr name="basetag" />
+ <attr name="datacollection" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfauthenticate" single="1">
+
+<attr name="securityContext" type="input"></attr>
+<attr name="username" type="input"></attr>
+<attr name="password" type="input"></attr>
+
+<attr name="setCookie" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+</attr>
+
+<attr name="throwOnFailure" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+</attr>
+
+<attr name="authType" type="list">
+ <items>
+ <item>Basic</item>
+ <item>X509</item>
+ </items>
+</attr>
+
+</tag>
+</TAGS>
+
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfbreak" single="1"></tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcache" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>cache</item>
+ <item>flush</item>
+ <item>clientcache</item>
+ <item>servercache</item>
+ <item>optimal</item>
+ </items>
+ </attr>
+ <attr name="directory" />
+ <attr name="timespan" />
+ <attr name="expireURL" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="port" />
+ <attr name="protocol" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcase">
+ <attr name="value" type="input">
+ <text>Value(s)</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="delimiters" type="input">
+ <text>Delimiters</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <tooltip>Delimiters for the values, if more than one.</tooltip>
+ </attr>
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+</tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcatch" single="1">
+ <attr name="type" type="list">
+ <text>Exception Type:</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>application</item>
+ <item>database</item>
+ <item>template</item>
+ <item>security</item>
+ <item>object</item>
+ <item>missinginclude</item>
+ <item>expression</item>
+ <item>lock</item>
+ <item>searchengine</item>
+ <item>any</item>
+ <item>"custom_type"</item>
+ </items>
+ </attr>
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+</tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfchart">
+ <attr name="format" type="list">
+ <items>
+ <item>flash</item>
+ <item>jpg</item>
+ <item>png</item>
+ </items>
+ </attr>
+ <attr name="chartheight" />
+ <attr name="chartwidth" />
+ <attr name="scalefrom" />
+ <attr name="scaleto" />
+ <attr name="showXgridlines" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="showYgridlines" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="gridlines" />
+ <attr name="seriesplacement" type="list">
+ <items>
+ <item>default</item>
+ <item>cluster</item>
+ <item>stacked</item>
+ <item>percent</item>
+ </items>
+ </attr>
+ <attr name="foregroundcolor" />
+ <attr name="databackgroundcolor" />
+ <attr name="borderbackgroundcolor" />
+ <attr name="showborder" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="font" />
+ <attr name="fontsize" />
+ <attr name="fontbold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="fontitalic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="labelformat" type="list">
+ <items>
+ <item>number</item>
+ <item>currency</item>
+ <item>percent</item>
+ <item>date</item>
+ </items>
+ </attr>
+ <attr name="Xaxistitle" />
+ <attr name="Yaxistitle" />
+ <attr name="sortXaxis" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="sortYaxis" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="Xoffset" />
+ <attr name="Yoffset" />
+ <attr name="rotated" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="showlegend" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="tipstyle" type="list">
+ <items>
+ <item>moustdown</item>
+ <item>mouseover</item>
+ <item>off</item>
+ </items>
+ </attr>
+ <attr name="tipstyle" />
+ <attr name="tipbgcolor" />
+ <attr name="showmarkers" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="markerstyle" />
+ <attr name="pieslicestyle" type="list">
+ <items>
+ <item>solid</item>
+ <item>sliced</item>
+ </items>
+ </attr>
+ <attr name="url" />
+ <attr name="name" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfchartdata" single="1">
+ <attr name="item" />
+ <attr name="value" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfchartseries">
+ <attr name="type" type="list">
+ <items>
+ <item>bar</item>
+ <item>line</item>
+ <item>pyramid</item>
+ <item>area</item>
+ <item>cone</item>
+ <item>curve</item>
+ <item>cylinder</item>
+ <item>step</item>
+ <item>scatter</item>
+ <item>pie</item>
+ </items>
+ </attr>
+ <attr name="query" />
+ <attr name="itemcolumn" />
+ <attr name="valuecolumn" />
+ <attr name="serieslabel" />
+ <attr name="seriescolor" />
+ <attr name="paintstyle" type="list">
+ <items>
+ <item>plain</item>
+ <item>raise</item>
+ <item>shade</item>
+ <item>light</item>
+ </items>
+ </attr>
+ <attr name="markerstyle" type="list">
+ <items>
+ <item>rectangle</item>
+ <item>triangle</item>
+ <item>diamond</item>
+ <item>circle</item>
+ <item>letter</item>
+ <item>mcross</item>
+ <item>snow</item>
+ <item>rcross</item>
+ </items>
+ </attr>
+ <attr name="colorlist" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcol" single="1">
+ <attr name="header" />
+ <attr name="width" />
+ <attr name="align" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ </items>
+ </attr>
+ <attr name="text" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcollection" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>create</item>
+ <item>repair</item>
+ <item>delete</item>
+ <item>map</item>
+ <item>optimize</item>
+ <item>list</item>
+ </items>
+ </attr>
+ <attr name="collection" />
+ <attr name="path" />
+ <attr name="language" />
+ <attr name="name" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcomponent" single="1">
+ <attr name="extends" type="input">
+ <text>Extends:</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="output" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcontent" single="1">
+ <attr name="type" />
+ <attr name="deletefile" />
+ <attr name="file" />
+ <attr name="reset" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfcookie" single="1">
+ <attr name="name" />
+ <attr name="value" />
+ <attr name="expires" />
+ <attr name="secure" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="path" />
+ <attr name="domain" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfdirectory" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>list</item>
+ <item>create</item>
+ <item>delete</item>
+ <item>rename</item>
+ </items>
+ </attr>
+ <attr name="directory" />
+ <attr name="name" />
+ <attr name="filter" />
+ <attr name="mode" />
+ <attr name="sort" />
+ <attr name="newdirectory" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfdump" single="1">
+ <attr name="var" />
+ <attr name="expand" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="label" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cferror" single="1">
+ <attr name="type" type="list">
+ <items>
+ <item>application</item>
+ <item>database</item>
+ <item>template</item>
+ <item>security</item>
+ <item>object</item>
+ <item>missinginclude</item>
+ <item>expression</item>
+ <item>lock</item>
+ <item>any</item>
+ <item>"custom_type"</item>
+ </items>
+ </attr>
+ <attr name="template" />
+ <attr name="mailto" />
+ <attr name="exception" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfexecute">
+ <attr name="name" />
+ <attr name="arguments" />
+ <attr name="outputfile" />
+ <attr name="timeout" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfexit" single="1">
+ <attr name="method" type="list">
+ <items>
+ <item>exittag</item>
+ <item>exittemplate</item>
+ <item>loop</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cffile" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>upload</item>
+ <item>move</item>
+ <item>rename</item>
+ <item>copy</item>
+ <item>delete</item>
+ <item>read</item>
+ <item>readbinary</item>
+ <item>write</item>
+ <item>append</item>
+ </items>
+ </attr>
+ <attr name="filefield" />
+ <attr name="source" />
+ <attr name="destination" />
+ <attr name="file" />
+ <attr name="nameconflict" type="list">
+ <items>
+ <item>error</item>
+ <item>skip</item>
+ <item>overwrite</item>
+ <item>makeunique</item>
+ </items>
+ </attr>
+ <attr name="accept" />
+ <attr name="output" />
+ <attr name="mode" />
+ <attr name="addnewline" />
+ <attr name="attributes" />
+ <attr name="variable" />
+ <attr name="charset" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfflush" single="1">
+ <attr name="interval" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfform">
+ <attr name="name" />
+ <attr name="action" />
+ <attr name="scriptsrc" type="list">
+ <items><item>/cfide/scripts/cfform.js</item></items>
+ </attr>
+ <attr name="preservedata" type="list">
+ <items>
+ <item>false</item>
+ <item>true</item>
+ </items>
+ </attr>
+ <attr name="onsubmit" />
+ <attr name="passthrough" />
+ <attr name="codebase" type="list">
+ <items><item>/cfide/classes/cf-j2re-win.cab</item></items>
+ </attr>
+ <attr name="archive" type="list">
+ <items><item>/cfide/classes/CFJava2.jar</item></items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfftp" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>open</item>
+ <item>close</item>
+ <item>changedir</item>
+ <item>createdir</item>
+ <item>listdir</item>
+ <item>removedir</item>
+ <item>getfile</item>
+ <item>putfile</item>
+ <item>rename</item>
+ <item>remove</item>
+ <item>getcurrentdir</item>
+ <item>getcurrentURL</item>
+ <item>existsdir</item>
+ <item>existsfile</item>
+ <item>exists</item>
+ </items>
+ </attr>
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="server" />
+ <attr name="ASCIIextensionlist" />
+ <attr name="transfermode" type="list">
+ <items>
+ <item>auto</item>
+ <item>ASCII</item>
+ <item>binary</item>
+ </items>
+ </attr>
+ <attr name="failifexists" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="directory" />
+ <attr name="localfile" />
+ <attr name="remotefile" />
+ <attr name="item" />
+ <attr name="existing" />
+ <attr name="new" />
+ <attr name="timeout" />
+ <attr name="port" />
+ <attr name="connection" />
+ <attr name="proxyserver" />
+ <attr name="retrycount" />
+ <attr name="stoponerror" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="passive" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cffunction">
+ <attr name="name" />
+ <attr name="returntype" type="list">
+ <items>
+ <item>any</item>
+ <item>array</item>
+ <item>binary</item>
+ <item>boolean</item>
+ <item>date</item>
+ <item>guid</item>
+ <item>numeric</item>
+ <item>query</item>
+ <item>string</item>
+ <item>struct</item>
+ <item>uuid</item>
+ <item>void</item>
+ <item>"a return type"</item>
+ </items>
+ </attr>
+ <attr name="roles" />
+ <attr name="access" type="list">
+ <items>
+ <item>private</item>
+ <item>package</item>
+ <item>public</item>
+ <item>remote</item>
+ </items>
+ </attr>
+ <attr name="output" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfgrid">
+ <attr name="name" />
+ <attr name="height" />
+ <attr name="width" />
+ <attr name="autowidth" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="vspace" />
+ <attr name="hspace" />
+ <attr name="align" type="list">
+ <items>
+ <item>top</item>
+ <item>left</item>
+ <item>bottom</item>
+ <item>baseline</item>
+ <item>texttop</item>
+ <item>absbottom</item>
+ <item>middle</item>
+ <item>absmiddle</item>
+ <item>right</item>
+ </items>
+ </attr>
+ <attr name="query" />
+ <attr name="insert" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="delete" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="sort" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="font" />
+ <attr name="fontsize" />
+ <attr name="italic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="bold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="textcolor" />
+ <attr name="href" />
+ <attr name="hrefkey" />
+ <attr name="target" />
+ <attr name="appendkey" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="highlighthref" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="onvalidate" />
+ <attr name="onerror" />
+ <attr name="griddataalign" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ </items>
+ </attr>
+ <attr name="gridlines" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="rowheight" />
+ <attr name="rowheaders" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="rowheaderalign" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ </items>
+ </attr>
+ <attr name="rowheaderfont" />
+ <attr name="rowheaderfontsize" />
+ <attr name="rowheaderitalic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="rowheaderbold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="rowheadertextcolor" />
+ <attr name="colheaders" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="colheaderalign" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ </items>
+ </attr>
+ <attr name="colheaderfont" />
+ <attr name="colheaderfontsize" />
+ <attr name="colheaderitalic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="colheaderbold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="colheadertextcolor" />
+ <attr name="bgcolor" />
+ <attr name="selectcolor" />
+ <attr name="selectmode" type="list">
+ <items>
+ <item>edit</item>
+ <item>single</item>
+ <item>row</item>
+ <item>column</item>
+ <item>browse</item>
+ </items>
+ </attr>
+ <attr name="maxrows" />
+ <attr name="notsupported" />
+ <attr name="picturebar" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="insertbutton" />
+ <attr name="deletebutton" />
+ <attr name="sortascendingbutton" />
+ <attr name="sortdescrendingbutton" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfgridcolumn" single="1">
+ <attr name="name" />
+ <attr name="header" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="width" />
+ <attr name="font" />
+ <attr name="fontsize" />
+ <attr name="italic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="bold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="textcolor" />
+ <attr name="bgcolor" />
+ <attr name="href" />
+ <attr name="hrefkey" />
+ <attr name="target" />
+ <attr name="select" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="display" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="type" type="list">
+ <items>
+ <item>image</item>
+ <item>numeric</item>
+ <item>boolean</item>
+ <item>string_nocase</item>
+ </items>
+ </attr>
+ <attr name="headerfont" />
+ <attr name="headerfontsize" />
+ <attr name="headeritalic" />
+ <attr name="headerbold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="headeritalic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="headertextcolor" />
+ <attr name="dataalign" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ </items>
+ </attr>
+ <attr name="headeralign" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ </items>
+ </attr>
+ <attr name="numberformat" />
+ <attr name="values" />
+ <attr name="valuesdisplay" />
+ <attr name="valuesdelimiter" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfgridrow" single="1">
+ <attr name="data" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfgridupdate" single="1">
+ <attr name="grid" />
+ <attr name="datasource" />
+ <attr name="tablename" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="tableowner" />
+ <attr name="tablequalifier" />
+ <attr name="keyonly" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfheader" single="1">
+ <attr name="name" />
+ <attr name="value" />
+ <attr name="statuscode" />
+ <attr name="statustext" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfhtmlhead" single="1">
+ <attr name="text" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfhttp">
+ <attr name="url" />
+ <attr name="port" />
+ <attr name="method" type="list">
+ <items>
+ <item>GET</item>
+ <item>POST</item>
+ </items>
+ </attr>
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="name" />
+ <attr name="columns" />
+ <attr name="firstrowasheaders" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="path" />
+ <attr name="file" />
+ <attr name="delimiter" />
+ <attr name="textqualifier" />
+ <attr name="resolveURL" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="proxyserver" />
+ <attr name="proxyport" />
+ <attr name="useragent" />
+ <attr name="throwonerror" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="redirect" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="timeout" />
+ <attr name="charset" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfhttpparam" single="1">
+ <attr name="name" />
+ <attr name="type" type="list">
+ <items>
+ <item>URL</item>
+ <item>formfield</item>
+ <item>cookie</item>
+ <item>cgi</item>
+ <item>file</item>
+ </items>
+ </attr>
+ <attr name="value" />
+ <attr name="file" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfimport" single="1">
+ <attr name="taglib" />
+ <attr name="prefix" />
+ <attr name="webservice" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfinclude" single="1">
+ <attr name="template" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfindex" single="1">
+ <attr name="collection" />
+ <attr name="action" type="list">
+ <items>
+ <item>update</item>
+ <item>delete</item>
+ <item>purge</item>
+ <item>refresh</item>
+ </items>
+ </attr>
+ <attr name="type" type="list">
+ <items>
+ <item>file</item>
+ <item>path</item>
+ <item>custom</item>
+ </items>
+ </attr>
+ <attr name="title" />
+ <attr name="key" />
+ <attr name="body" />
+ <attr name="custom1" />
+ <attr name="custom2" />
+ <attr name="URLpath" />
+ <attr name="extensions" />
+ <attr name="query" />
+ <attr name="recurse" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="language" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfinput" single="1">
+ <attr name="type" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="name" />
+ <attr name="value" />
+ <attr name="required" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="range" />
+ <attr name="validate" type="list">
+ <items>
+ <item>date</item>
+ <item>eurodate</item>
+ <item>time</item>
+ <item>float</item>
+ <item>integer</item>
+ <item>telephone</item>
+ <item>zipcode</item>
+ <item>creditcard</item>
+ <item>social_security_number</item>
+ <item>regular_expression</item>
+ </items>
+ </attr>
+ <attr name="onvalidate" />
+ <attr name="pattern" />
+ <attr name="message" />
+ <attr name="onerror" />
+ <attr name="size" />
+ <attr name="maxlength" />
+ <attr name="checked" />
+ <attr name="passthrough" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfinsert" single="1">
+ <attr name="datasource" />
+ <attr name="tablename" />
+ <attr name="tableowner" />
+ <attr name="tablequalifier" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="formfields" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfinvoke">
+ <attr name="component" />
+ <attr name="method" />
+ <attr name="returnvalue" />
+ <attr name="argumentcollection" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="webservice" />
+ <attr name="&quot;custom_params&quot;" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfinvokeargument" single="1">
+ <attr name="name" />
+ <attr name="value" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfldap" single="1">
+ <attr name="server" />
+ <attr name="port" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="action" type="list">
+ <items>
+ <item>query</item>
+ <item>add</item>
+ <item>modify</item>
+ <item>modifyDN</item>
+ <item>delete</item>
+ </items>
+ </attr>
+ <attr name="name" />
+ <attr name="timeout" />
+ <attr name="maxrows" />
+ <attr name="start" />
+ <attr name="scope" type="list">
+ <items>
+ <item>onelevel</item>
+ <item>base</item>
+ <item>subtree</item>
+ </items>
+ </attr>
+ <attr name="attributes" />
+ <attr name="filter" />
+ <attr name="sort" />
+ <attr name="sortcontrol" type="list">
+ <items>
+ <item>nocase</item>
+ <item>asc</item>
+ <item>desc</item>
+ <item>nocase, asc</item>
+ <item>nocase, desc</item>
+ </items>
+ </attr>
+ <attr name="dn" />
+ <attr name="startrow" />
+ <attr name="modifytype" type="list">
+ <items>
+ <item>add</item>
+ <item>delete</item>
+ <item>replace</item>
+ </items>
+ </attr>
+ <attr name="rebind" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="referral" />
+ <attr name="secure" />
+ <attr name="separator" />
+ <attr name="delimiter" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cflocation" single="1">
+ <attr name="url" />
+ <attr name="addtoken" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cflock">
+ <attr name="timeout" />
+ <attr name="scope" type="list">
+ <items>
+ <item>Application</item>
+ <item>Server</item>
+ <item>Session</item>
+ </items>
+ </attr>
+ <attr name="name" />
+ <attr name="throwontimeout" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="type" type="list">
+ <items>
+ <item>read-only</item>
+ <item>exclusive</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cflog" single="1">
+ <attr name="text" />
+ <attr name="log" type="list">
+ <items>
+ <item>Application</item>
+ <item>Scheduler</item>
+ </items>
+ </attr>
+ <attr name="file" />
+ <attr name="type" type="list">
+ <items>
+ <item>information</item>
+ <item>warning</item>
+ <item>error</item>
+ <item>fatal information</item>
+ </items>
+ </attr>
+ <attr name="application" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cflogin">
+ <attr name="idletimeout" />
+ <attr name="applicationtoken" />
+ <attr name="cookiedomain" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfloginuser" single="1">
+ <attr name="name" />
+ <attr name="password" />
+ <attr name="roles" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfloop">
+ <attr name="index" />
+ <attr name="from" />
+ <attr name="to" />
+ <attr name="step" />
+ <attr name="condition" />
+ <attr name="query" />
+ <attr name="startrow" />
+ <attr name="endrow" />
+ <attr name="list" />
+ <attr name="delimiters" />
+ <attr name="collection" />
+ <attr name="item" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfmail">
+ <attr name="to" />
+ <attr name="from" />
+ <attr name="cc" />
+ <attr name="bcc" />
+ <attr name="subject" />
+ <attr name="type" type="list">
+ <items><item>HTML</item></items>
+ </attr>
+ <attr name="maxrows" />
+ <attr name="MIMEattach" />
+ <attr name="query" />
+ <attr name="group" />
+ <attr name="groupcasesensitive" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="startrow" />
+ <attr name="server" />
+ <attr name="port" />
+ <attr name="mailerID" />
+ <attr name="timeout" />
+ <attr name="spoolenable" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfmailparam" single="1">
+ <attr name="file" />
+ <attr name="name" />
+ <attr name="value" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfmodule">
+ <attr name="template" />
+ <attr name="name" />
+ <attr name="attributecollection" />
+ <attr name="&quot;custom_param&quot;" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfobject" single="1">
+ <attr name="type" type="list">
+ <items>
+ <item>com</item>
+ <item>corba</item>
+ <item>java</item>
+ </items>
+ </attr>
+ <attr name="action" type="list">
+ <items>
+ <item>create</item>
+ <item>connect</item>
+ </items>
+ </attr>
+ <attr name="class" />
+ <attr name="name" />
+ <attr name="context" type="list">
+ <items>
+ <item>inproc</item>
+ <item>local</item>
+ <item>remote</item>
+ </items>
+ </attr>
+ <attr name="server" />
+ <attr name="component" />
+ <attr name="context" type="list">
+ <items>
+ <item>ior</item>
+ <item>nameservice</item>
+ </items>
+ </attr>
+ <attr name="locale" />
+ <attr name="webservice" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfobjectcache" single="1">
+ <attr name="action" type="list">
+ <items><item>clear</item></items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfoutput">
+ <attr name="query" />
+ <attr name="group" />
+ <attr name="groupcasesensitive" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="startrow" />
+ <attr name="maxrows" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfparam" single="1">
+ <attr name="name" />
+ <attr name="type" type="list">
+ <items>
+ <item>array</item>
+ <item>binary</item>
+ <item>boolean</item>
+ <item>date</item>
+ <item>numeric</item>
+ <item>queyr</item>
+ <item>string</item>
+ <item>struct</item>
+ <item>uuid</item>
+ <item>any</item>
+ </items>
+ </attr>
+ <attr name="default" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfpop" single="1">
+ <attr name="server" />
+ <attr name="port" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="action" type="list">
+ <items>
+ <item>getheaderonly</item>
+ <item>getall</item>
+ <item>delete</item>
+ </items>
+ </attr>
+ <attr name="name" />
+ <attr name="uid" />
+ <attr name="attachementpath" />
+ <attr name="timeout" />
+ <attr name="maxrows" />
+ <attr name="startrow" />
+ <attr name="generateuniquefilenames" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfprocessingdirective">
+ <attr name="suppresswhitespace" type="list">
+ <items>
+ <item>in</item>
+ <item>out</item>
+ <item>inout</item>
+ </items>
+ </attr>
+ <attr name="pageencoding" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfprocparam" single="1">
+ <attr name="type" type="list">
+ <items>
+ <item>in</item>
+ <item>out</item>
+ <item>inout</item>
+ </items>
+ </attr>
+ <attr name="variable" />
+ <attr name="dbvarname" />
+ <attr name="value" />
+ <attr name="cfsqltype" type="list">
+ <items>
+ <item>CF_SQL_BIGINT</item>
+ <item>CF_SQL_BIT</item>
+ <item>CF_SQL_BLOB</item>
+ <item>CF_SQL_CHAR</item>
+ <item>CF_SQL_CLOB</item>
+ <item>CF_SQL_DATE</item>
+ <item>CF_SQL_DECIMAL</item>
+ <item>CF_SQL_DOUBLE</item>
+ <item>CF_SQL_FLOAT</item>
+ <item>CF_SQL_IDSTAMP</item>
+ <item>CF_SQL_INTEGER</item>
+ <item>CF_SQL_LONGVARCHAR</item>
+ <item>CF_SQL_MONEY</item>
+ <item>CF_SQL_MONEY4</item>
+ <item>CF_SQL_NUMERIC</item>
+ <item>CF_SQL_REAL</item>
+ <item>CF_SQL_REFCURSOR</item>
+ <item>CF_SQL_SMALLINT</item>
+ <item>CF_SQL_TIME</item>
+ <item>CF_SQL_TIMESTAMP</item>
+ <item>CF_SQL_TINYINT</item>
+ <item>CF_SQL_VARCHAR</item>
+ </items>
+ </attr>
+ <attr name="maxlength" />
+ <attr name="scale" />
+ <attr name="null" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfprocresult" single="1">
+ <attr name="name" />
+ <attr name="resultset" />
+ <attr name="maxrows" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfproperty" single="1">
+ <attr name="name" />
+ <attr name="type" type="list">
+ <items>
+ <item>array</item>
+ <item>binary</item>
+ <item>boolean</item>
+ <item>date</item>
+ <item>numeric</item>
+ <item>queyr</item>
+ <item>string</item>
+ <item>struct</item>
+ <item>uuid</item>
+ <item>any</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfquery">
+ <attr name="name" />
+ <attr name="datasource" />
+ <attr name="dbtype" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="maxrows" />
+ <attr name="blockfactor" />
+ <attr name="timeout" />
+ <attr name="cachedafter" />
+ <attr name="cachedwithin" />
+ <attr name="debug" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfqueryparam" single="1">
+ <attr name="value" />
+ <attr name="cfsqltype" type="list">
+ <items>
+ <item>CF_SQL_BIGINT</item>
+ <item>CF_SQL_BIT</item>
+ <item>CF_SQL_BLOB</item>
+ <item>CF_SQL_CHAR</item>
+ <item>CF_SQL_CLOB</item>
+ <item>CF_SQL_DATE</item>
+ <item>CF_SQL_DECIMAL</item>
+ <item>CF_SQL_DOUBLE</item>
+ <item>CF_SQL_FLOAT</item>
+ <item>CF_SQL_IDSTAMP</item>
+ <item>CF_SQL_INTEGER</item>
+ <item>CF_SQL_LONGVARCHAR</item>
+ <item>CF_SQL_MONEY</item>
+ <item>CF_SQL_MONEY4</item>
+ <item>CF_SQL_NUMERIC</item>
+ <item>CF_SQL_REAL</item>
+ <item>CF_SQL_REFCURSOR</item>
+ <item>CF_SQL_SMALLINT</item>
+ <item>CF_SQL_TIME</item>
+ <item>CF_SQL_TIMESTAMP</item>
+ <item>CF_SQL_TINYINT</item>
+ <item>CF_SQL_VARCHAR</item>
+ </items>
+ </attr>
+ <attr name="maxlength" />
+ <attr name="scale" />
+ <attr name="null" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="list" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="separator" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfregistry" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>getall</item>
+ <item>get</item>
+ <item>set</item>
+ <item>delete</item>
+ </items>
+ </attr>
+ <attr name="branch" />
+ <attr name="entry" />
+ <attr name="variable" />
+ <attr name="type" type="list">
+ <items>
+ <item>string</item>
+ <item>dword</item>
+ <item>key</item>
+ <item>any</item>
+ </items>
+ </attr>
+ <attr name="name" />
+ <attr name="sort" type="list">
+ <items>
+ <item>asc</item>
+ <item>desc</item>
+ </items>
+ </attr>
+ <attr name="value" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfreport">
+ <attr name="report" />
+ <attr name="datasource" />
+ <attr name="type" type="list">
+ <items>
+ <item>standard</item>
+ <item>netscape</item>
+ <item>microsoft</item>
+ </items>
+ </attr>
+ <attr name="timeout" />
+ <attr name="orderby" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="formula" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfsavecontent">
+ <attr name="variable" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfschedule" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>delete</item>
+ <item>update</item>
+ <item>run</item>
+ </items>
+ </attr>
+ <attr name="task" />
+ <attr name="operation" />
+ <attr name="file" />
+ <attr name="path" />
+ <attr name="startdate" />
+ <attr name="starttime" />
+ <attr name="url" />
+ <attr name="publish" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="enddate" />
+ <attr name="endtime" />
+ <attr name="interval" />
+ <attr name="requesttimeout" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="proxyserver" />
+ <attr name="resolveURL" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="port" />
+ <attr name="proxyport" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfsearch" single="1">
+ <attr name="name" />
+ <attr name="collection" />
+ <attr name="type" type="list">
+ <items>
+ <item>simple</item>
+ <item>explicit</item>
+ </items>
+ </attr>
+ <attr name="criteria" />
+ <attr name="maxrows" />
+ <attr name="startrow" />
+ <attr name="language" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfselect">
+ <attr name="name" />
+ <attr name="size" />
+ <attr name="required" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="message" />
+ <attr name="onerror" />
+ <attr name="multiple" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="query" />
+ <attr name="selected" />
+ <attr name="value" />
+ <attr name="display" />
+ <attr name="passthrough" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfsetting" single="1">
+ <attr name="enablecfoutputonly" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="showdebugoutput" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="requesttimeout" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfslider" single="1">
+ <attr name="name" />
+ <attr name="label" />
+ <attr name="refreshlabel" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="scale" />
+ <attr name="value" />
+ <attr name="onvalidate" />
+ <attr name="message" />
+ <attr name="onerror" />
+ <attr name="height" />
+ <attr name="width" />
+ <attr name="vspace" />
+ <attr name="hspace" />
+ <attr name="align" type="list">
+ <items>
+ <item>top</item>
+ <item>left</item>
+ <item>bottom</item>
+ <item>baseline</item>
+ <item>texttop</item>
+ <item>absbottom</item>
+ <item>middle</item>
+ <item>absmiddle</item>
+ <item>right</item>
+ </items>
+ </attr>
+ <attr name="tickmarkmajor" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="tickmarkminor" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="tickmarkimages" />
+ <attr name="tickmarklabels" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ <item>"custom,label,list"</item>
+ </items>
+ </attr>
+ <attr name="lookandfeel" type="list">
+ <items>
+ <item>motif</item>
+ <item>windows</item>
+ <item>metal</item>
+ </items>
+ </attr>
+ <attr name="vertical" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="bgcolor" />
+ <attr name="textcolor" />
+ <attr name="font" />
+ <attr name="fontsize" />
+ <attr name="italic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="bold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="notsupported" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfstoredproc">
+ <attr name="procedure" />
+ <attr name="datasource" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="blockfactor" />
+ <attr name="debug" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="returncode" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfswitch">
+ <attr name="expression" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cftable">
+ <attr name="query" />
+ <attr name="maxrows" />
+ <attr name="colspacing" />
+ <attr name="headerlines" />
+ <attr name="HTMLtable" />
+ <attr name="border" />
+ <attr name="colheaders" />
+ <attr name="startrow" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cftextinput" single="1">
+ <attr name="name" />
+ <attr name="value" />
+ <attr name="required" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="range" />
+ <attr name="validate" type="list">
+ <items>
+ <item>date</item>
+ <item>eurodate</item>
+ <item>time</item>
+ <item>float</item>
+ <item>integer</item>
+ <item>telephone</item>
+ <item>zipcode</item>
+ <item>creditcard</item>
+ <item>social_security_number</item>
+ <item>regular_expression</item>
+ </items>
+ </attr>
+ <attr name="onvalidate" />
+ <attr name="pattern" />
+ <attr name="message" />
+ <attr name="onerror" />
+ <attr name="size" />
+ <attr name="font" />
+ <attr name="fontsize" />
+ <attr name="italic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="bold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="height" />
+ <attr name="width" />
+ <attr name="vspace" />
+ <attr name="hspace" />
+ <attr name="align" type="list">
+ <items>
+ <item>top</item>
+ <item>left</item>
+ <item>bottom</item>
+ <item>baseline</item>
+ <item>texttop</item>
+ <item>absbottom</item>
+ <item>middle</item>
+ <item>absmiddle</item>
+ <item>right</item>
+ </items>
+ </attr>
+ <attr name="bgcolor" />
+ <attr name="textcolor" />
+ <attr name="maxlength" />
+ <attr name="notsupported" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfthrow" single="1">
+ <attr name="type" type="list">
+ <items>
+ <item>application</item>
+ <item>"custom_type"</item>
+ </items>
+ </attr>
+ <attr name="message" />
+ <attr name="detail" />
+ <attr name="errorcode" />
+ <attr name="extendedinfo" />
+ <attr name="object" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cftrace">
+ <attr name="abort" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="category" />
+ <attr name="inline" />
+ <attr name="text" />
+ <attr name="type" type="list">
+ <items>
+ <item>information</item>
+ <item>warning</item>
+ <item>error</item>
+ <item>fatal information</item>
+ </items>
+ </attr>
+ <attr name="var" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cftransaction">
+ <attr name="action" type="list">
+ <items>
+ <item>begin</item>
+ <item>commit</item>
+ <item>rollback</item>
+ </items>
+ </attr>
+ <attr name="isolation" type="list">
+ <items>
+ <item>read_uncommitted</item>
+ <item>read_committed</item>
+ <item>repeatable_read</item>
+ <item>serializable</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cftree">
+ <attr name="name" />
+ <attr name="required" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="delimiter" />
+ <attr name="completepath" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="appendkey" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="highlighthref" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="onvalidate" />
+ <attr name="message" />
+ <attr name="onerror" />
+ <attr name="lookandfeel" type="list">
+ <items>
+ <item>motif</item>
+ <item>windows</item>
+ <item>metal</item>
+ </items>
+ </attr>
+ <attr name="font" />
+ <attr name="fontsize" />
+ <attr name="italic" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="bold" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="height" />
+ <attr name="width" />
+ <attr name="vspace" />
+ <attr name="hspace" />
+ <attr name="align" type="list">
+ <items>
+ <item>top</item>
+ <item>left</item>
+ <item>bottom</item>
+ <item>baseline</item>
+ <item>texttop</item>
+ <item>absbottom</item>
+ <item>middle</item>
+ <item>absmiddle</item>
+ <item>right</item>
+ </items>
+ </attr>
+ <attr name="border" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="hscroll" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="vscroll" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="notsupported" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cftreeitem" single="1">
+ <attr name="value" />
+ <attr name="display" />
+ <attr name="parent" />
+ <attr name="img" type="list">
+ <items>
+ <item>cd</item>
+ <item>computer</item>
+ <item>document</item>
+ <item>element</item>
+ <item>folder</item>
+ <item>floppy</item>
+ <item>fixed</item>
+ <item>remote</item>
+ </items>
+ </attr>
+ <attr name="imgopen" />
+ <attr name="href" />
+ <att rname="target" />
+ <attr name="query" />
+ <attr name="queryasroot" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ <item>"string_for_name"</item>
+ </items>
+ </attr>
+ <attr name="expand" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfupdate" single="1">
+ <attr name="datasource" />
+ <attr name="tablename" />
+ <attr name="tableowner" />
+ <attr name="tablequalifier" />
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="formfields" />
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfbreak" single="1" />
+<tag name="cfdefaultcase" />
+<tag name="cfelse" single="1" />
+<tag name="cfelseif" single="1" />
+<tag name="cfif" />
+<tag name="cflogout" single="1" />
+<tag name="cfrethrow" single="1" />
+<tag name="cfreturn" single="1" />
+<tag name="cfscript" />
+<tag name="cfset" single="1" />
+<tag name="cfsilent" />
+<tag name="cftry" />
+</TAGS>
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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfwddx" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>cfml2wddx</item>
+ <item>wddx2cfml</item>
+ <item>cfml2js</item>
+ <item>wddx2js</item>
+ </items>
+ </attr>
+ <attr name="input" />
+ <attr name="output" />
+ <attr name="toplevelvariable" />
+ <attr name="usetimezoneinfo" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="validate" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cfxml" single="1">
+ <attr name="variable" />
+ <attr name="casesensitive" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS> \ 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 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ftp" single="1">
+ <attr name="action" type="list">
+ <items>
+ <item>open</item>
+ <item>close</item>
+ <item>changedir</item>
+ <item>createdir</item>
+ <item>listdir</item>
+ <item>removedir</item>
+ <item>getfile</item>
+ <item>putfile</item>
+ <item>rename</item>
+ <item>remove</item>
+ <item>getcurrentdir</item>
+ <item>getcurrentURL</item>
+ <item>existsdir</item>
+ <item>existsfile</item>
+ <item>exists</item>
+ </items>
+ </attr>
+ <attr name="username" />
+ <attr name="password" />
+ <attr name="server" />
+ <attr name="ASCIIextensionlist" />
+ <attr name="transfermode" type="list">
+ <items>
+ <item>auto</item>
+ <item>ASCII</item>
+ <item>binary</item>
+ </items>
+ </attr>
+ <attr name="failifexists" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="directory" />
+ <attr name="localfile" />
+ <attr name="remotefile" />
+ <attr name="item" />
+ <attr name="existing" />
+ <attr name="new" />
+ <attr name="timeout" />
+ <attr name="port" />
+ <attr name="connection" />
+ <attr name="proxyserver" />
+ <attr name="retrycount" />
+ <attr name="stoponerror" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+ <attr name="passive" type="list">
+ <items>
+ <item>Yes</item>
+ <item>No</item>
+ </items>
+ </attr>
+</tag>
+</TAGS>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="background-attachment" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>scroll</item>
+ <item>fixed</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="background-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>white</item>
+ <item>transparent</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="background-image" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>url()</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="background-position" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>0%</item>
+ <item>10px</item>
+ <item>top</item>
+ <item>center</item>
+ <item>bottom</item>
+ <item>left</item>
+ <item>right</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="background-repeat" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>repeat</item>
+ <item>repeat-x</item>
+ <item>repeat-y</item>
+ <item>no-repeat</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="background" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-bottom-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>gray</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-bottom-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-bottom-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-bottom-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="border-bottom" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>gray</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-collapse" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>collapse</item>
+ <item>separate</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>transparent</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-left-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>transparent</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-left-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-left-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-left" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-right-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>transparent</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-right-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-right-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-right" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-spacing" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-top-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>transparent</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-top-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-top-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-top" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="border-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="border-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>hidden</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="border" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>gray</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="bottom" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="caption-side" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>top</item>
+ <item>bottom</item>
+ <item>left</item>
+ <item>right</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="clear" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>left</item>
+ <item>right</item>
+ <item>both</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="clip" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>rect</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>yellow</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="content" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>url()</item>
+ <item>string""</item>
+ <item>counter</item>
+ <item>attr(x)</item>
+ <item>open-quote</item>
+ <item>close-quote</item>
+ <item>no-open-quote</item>
+ <item>no-close-quote</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="counter-increment" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>name</item>
+ <item>triples</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="counter-reset" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>name</item>
+ <item>triples</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="cursor" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>url()</item>
+ <item>auto</item>
+ <item>crosshair</item>
+ <item>default</item>
+ <item>pointer</item>
+ <item>double</item>
+ <item>move</item>
+ <item>e-resize</item>
+ <item>ne-resize</item>
+ <item>nw-resize</item>
+ <item>n-resize</item>
+ <item>se-resize</item>
+ <item>sw-resize</item>
+ <item>s-resize</item>
+ <item>w-resize</item>
+ <item>text</item>
+ <item>wait</item>
+ <item>help</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="direction" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>rtl</item>
+ <item>ltr</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="display" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>inline</item>
+ <item>block</item>
+ <item>list-item</item>
+ <item>run-in</item>
+ <item>compact</item>
+ <item>marker</item>
+ <item>table</item>
+ <item>inline-table</item>
+ <item>table-row-group</item>
+ <item>table-header-group</item>
+ <item>table-footer-group</item>
+ <item>table-row</item>
+ <item>table-column-group</item>
+ <item>table-column</item>
+ <item>table-cell</item>
+ <item>table-caption</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="empty-cells" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>show</item>
+ <item>hide</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="float" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="font-size-adjust" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>.5</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="font-stretch" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>normal</item>
+ <item>wider</item>
+ <item>narrower</item>
+ <item>ultra-condensed</item>
+ <item>extra-condensed</item>
+ <item>condensed</item>
+ <item>semi-condensed</item>
+ <item>semi-expanded</item>
+ <item>expanded</item>
+ <item>extra-expanded</item>
+ <item>ultra-expanded</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="font-family" type="property">
+ <attr name="[[family-name | generic-family],]* [family-name | generic-family]" type="list">
+ <items>
+ <item>serif</item>
+ <item>sans-serif</item>
+ <item>cursive</item>
+ <item>fantasy</item>
+ <item>monospace</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="font-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>normal</item>
+ <item>italic</item>
+ <item>oblique</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="font-variant" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>normal</item>
+ <item>small-caps</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="font-weight" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>normal</item>
+ <item>bold</item>
+ <item>bolder</item>
+ <item>lighter</item>
+ <item>100</item>
+ <item>200</item>
+ <item>300</item>
+ <item>400</item>
+ <item>500</item>
+ <item>600</item>
+ <item>700</item>
+ <item>800</item>
+ <item>900</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="font-size" type="property">
+ <attr name="absolute-size | relative-size | length | percentage" type="list">
+ <items>
+ <item>xx-small</item>
+ <item>x-small</item>
+ <item>small</item>
+ <item>medium</item>
+ <item>large</item>
+ <item>x-large</item>
+ <item>xx-large</item>
+ <item>larger</item>
+ <item>smaller</item>
+ <item>12py</item>
+ <item>70%</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="font" type="property">
+ <attr name="value"></attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="height" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="left" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="letter-spacing" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>normal</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="line-height" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1.1</item>
+ <item>1px</item>
+ <item>0%</item>
+ <item>normal</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="list-style-image" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>url()</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="list-style-position" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>inside</item>
+ <item>outside</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="list-style-type" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>disc</item>
+ <item>circle</item>
+ <item>square</item>
+ <item>decimal</item>
+ <item>decimal-leading-zero</item>
+ <item>lower-roman</item>
+ <item>upper-roman</item>
+ <item>lower-greek</item>
+ <item>lower-alpha</item>
+ <item>lower-latin</item>
+ <item>upper-alpha</item>
+ <item>upper-latin</item>
+ <item>hebrew</item>
+ <item>hebrew</item>
+ <item>armenian</item>
+ <item>georgian</item>
+ <item>cjk-ideographic</item>
+ <item>hiragana</item>
+ <item>katakana</item>
+ <item>hiragana-iroha</item>
+ <item>katakana-iroha</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="list-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="margin-bottom" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="margin-left" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="margin-right" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="margin-top" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="margin" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="marker-offset" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="max-height" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="max-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="min-height" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="min-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="outline-color" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>grey</item>
+ <item>invert</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="outline-style" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>dotted</item>
+ <item>dashed</item>
+ <item>solid</item>
+ <item>double</item>
+ <item>groove</item>
+ <item>ridge</item>
+ <item>inset</item>
+ <item>outset</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="outline-width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1px</item>
+ <item>thin</item>
+ <item>medium</item>
+ <item>thick</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+
+ <tag name="outline" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="overflow" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>visible</item>
+ <item>hidden</item>
+ <item>scroll</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="padding-bottom" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="padding-left" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="padding-right" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="padding-top" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="padding" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="position" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>static</item>
+ <item>relative</item>
+ <item>absolute</item>
+ <item>fixed</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="quotes" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>" ' "</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="right" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="table-layout" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>auto</item>
+ <item>fixed</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="text-align" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>center</item>
+ <item>justify</item>
+ <item>" . "</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="text-decoration" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>underline</item>
+ <item>overline</item>
+ <item>line-through</item>
+ <item>blink</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="text-indent" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="text-shadow" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>none</item>
+ <item>grey</item>
+ <item>1em</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="text-transform" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>capitalize</item>
+ <item>uppercase</item>
+ <item>lowercase</item>
+ <item>none</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="top" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="unicode-bidi" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>normal</item>
+ <item>embed</item>
+ <item>bidi-override</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="vertical-align" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>baseline</item>
+ <item>sub</item>
+ <item>super</item>
+ <item>top</item>
+ <item>text-top</item>
+ <item>middle</item>
+ <item>bottom</item>
+ <item>text-bottom</item>
+ <item>0%</item>
+ <item>1px</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="visibility" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>visible</item>
+ <item>hidden</item>
+ <item>collapse</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="white-space" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>normal</item>
+ <item>pre</item>
+ <item>nowrap</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="width" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>0%</item>
+ <item>auto</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="word-spacing" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>1em</item>
+ <item>normal</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="z-index" type="property">
+ <attr name="value" type="list">
+ <items>
+ <item>auto</item>
+ <item>1</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ </tag>
+</tags>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="abbrev" hasCore="1" />
+ <tag name="abstract" hasCore="1" />
+ <tag name="accel" hasCore="1" />
+ <tag name="ackno" hasCore="1" />
+ <tag name="acronym" hasCore="1" />
+ <tag name="action" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <location row="1" col="0"/>
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="address" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0"/>
+ <location row="1" col="1"/>
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="affiliation" hasCore="1" />
+ <tag name="alt" hasCore="1" />
+ <tag name="anchor" hasCore="1" single="1">
+ <attr name="revisionflag" type="list">
+ <text>revisionflag</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>added</item>
+ <item>changed</item>
+ <item>deleted</item>
+ <item>off</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="revision" type="input">
+ <text>revision</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="arch" type="input">
+ <text>arch</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="vendor" type="input">
+ <text>vendor</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="security" type="input">
+ <text>security</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagemnu</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="remap" type="input">
+ <text>remap</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="xreflabel" type="input">
+ <text>xreflabel</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="conformance" type="input">
+ <text>conformance</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="os" type="input">
+ <text>os</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="userlevel" type="input">
+ <text>userlevel</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="id" type="input">
+ <text>id</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ </attr>
+ <attr name="role" type="input">
+ <text>role</text>
+ <textlocation row="12" col="0" />
+ <location row="12" col="1" />
+ </attr>
+ <attr name="condition" type="input">
+ <text>condition</text>
+ <textlocation row="13" col="0" />
+ <location row="13" col="1" />
+ </attr>
+ </tag>
+ <tag name="answer" hasCore="1" />
+ <tag name="appendix" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="appendixinfo" hasCore="1" />
+ <tag name="application" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>hardware</item>
+ <item>software</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="area" hasCore="1" single="1">
+ <attr name="units" type="list">
+ <text>units</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>calspair</item>
+ <item>linecolumn</item>
+ <item>linecolumnpair</item>
+ <item>linerange</item>
+ <item>other</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="otherunits" type="input">
+ <text>otherunits</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="coords" type="input">
+ <text>coords</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ </tag>
+ <tag name="areaset" hasCore="1">
+ <attr name="units" type="list">
+ <text>units</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>calspair</item>
+ <item>linecolumn</item>
+ <item>linecolumnpair</item>
+ <item>linerange</item>
+ <item>other</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="otherunits" type="input">
+ <text>otherunits</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="coords" type="input">
+ <text>coords</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="areaspec" hasCore="1">
+ <attr name="units" type="list">
+ <text>units</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>calspair</item>
+ <item>linecolumn</item>
+ <item>linecolumnpair</item>
+ <item>linerange</item>
+ <item>other</item>
+ </items>
+ </attr>
+ <attr name="otherunits" type="input">
+ <text>otherunits</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="arg" hasCore="1">
+ <attr name="rep" type="list">
+ <text>rep</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>norepeat</item>
+ <item>repeat</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="choice" type="list">
+ <text>choice</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>opt</item>
+ <item>plain</item>
+ <item>req</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="article" hasCore="1">
+ <attr name="parentbook" type="input">
+ <text>parentbook</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="2" col="0" />
+ <items>
+ <item>faq</item>
+ <item>journalarticle</item>
+ <item>productsheet</item>
+ <item>specification</item>
+ <item>techreport</item>
+ <item>whitepaper</item>
+ </items>
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="articleinfo" hasCore="1" />
+ <tag name="artpagenums" hasCore="1" />
+ <tag name="attribution" hasCore="1" />
+ <tag name="audiodata" hasCore="1" single="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="audioobject" hasCore="1" />
+ <tag name="author" hasCore="1" />
+ <tag name="authorblurb" hasCore="1" />
+ <tag name="authorgroup" hasCore="1" />
+ <tag name="authorinitials" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="beginpage" hasCore="1" single="1">
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliocoverage" hasCore="1">
+ <attr name="otherspatial" type="input">
+ <text>otherspatial</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="spatial" type="list">
+ <text>spatial</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>dcmibox</item>
+ <item>dcmipoint</item>
+ <item>iso3166</item>
+ <item>otherspatial</item>
+ <item>tgn</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ <attr name="temporal" type="input">
+ <text>temporal</text>
+ <textlocation row="2" col="0" />
+ <items>
+ <item>dcmiperiod</item>
+ <item>othertemporal</item>
+ <item>w3c-dtf</item>
+ </items>
+ <location row="2" col="1" />
+ </attr>
+ <attr name="othertemporal" type="input">
+ <text>othertemporal</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliodiv" hasCore="1">
+ <attr name="status" type="input">
+ <text>bibliodiv</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="biblioentry" hasCore="1" />
+ <tag name="bibliography" hasCore="1">
+ <attr name="status" type="input">
+ <text>bibliography</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliographyinfo" hasCore="1" />
+ <tag name="biblioid" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliomisc" hasCore="1" />
+ <tag name="bibliomixed" hasCore="1" />
+ <tag name="bibliomset" hasCore="1">
+ <attr name="relation" type="input">
+ <text>bibliomset</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliorelation" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>hasformat</item>
+ <item>haspart</item>
+ <item>hasversion</item>
+ <item>isformatof</item>
+ <item>ispartof</item>
+ <item>isreferencedby</item>
+ <item>isreplacedby</item>
+ <item>isrequiredby</item>
+ <item>isversionof</item>
+ <item>othertype</item>
+ <item>references</item>
+ <item>replaces</item>
+ <item>requires</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="othertype" type="input">
+ <text>othertype</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="biblioset" hasCore="1">
+ <attr name="relation" type="input">
+ <text>relation</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliosource" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="blockinfo" hasCore="1" />
+ <tag name="blockquote" hasCore="1" />
+ <tag name="book" hasCore="1">
+ <attr name="fpi" type="input">
+ <text>fpi</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="bookinfo" hasCore="1">
+ <attr name="contents" type="input">
+ <text>bookinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="bridgehead" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>other</item>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="callout" hasCore="1">
+ <attr name="arearefs" type="input">
+ <text>arearefs</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="calloutlist" hasCore="1" />
+ <tag name="caption" hasCore="1" />
+ <tag name="caution" hasCore="1" />
+ <tag name="chapter" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="chapterinfo" hasCore="1"></tag>
+ <tag name="citation" hasCore="1" />
+ <tag name="citebiblioid" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="citerefentry" hasCore="1" />
+ <tag name="citetitle" hasCore="1">
+ <attr name="pubwork" type="list">
+ <text>pubwork</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>article</item>
+ <item>book</item>
+ <item>chapter</item>
+ <item>journal</item>
+ <item>manuscript</item>
+ <item>part</item>
+ <item>refentry</item>
+ <item>section</item>
+ <item>series</item>
+ <item>set</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="city" hasCore="1" />
+ <tag name="classname" hasCore="1" />
+ <tag name="classsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>class</item>
+ <item>interface</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="classsynopsisinfo" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="cmdsynopsis" hasCore="1">
+ <attr name="sepchar" type="input">
+ <text>sepchar</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="cmdlength" type="input">
+ <text>cmdlength</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="co" hasCore="1" single="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="collab" hasCore="1" />
+ <tag name="collabname" hasCore="1" />
+ <tag name="colophon" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="colspec" hasCore="1">
+ <attr name="colnum" type="input">
+ <text>colnum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="colwidth" type="input">
+ <text>colwidth</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="colname" type="input">
+ <text>colname</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="command" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="computeroutput" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="confdates" hasCore="1" />
+ <tag name="confgroup" hasCore="1" />
+ <tag name="confnum" hasCore="1" />
+ <tag name="confsponsor" hasCore="1" />
+ <tag name="conftitle" hasCore="1" />
+ <tag name="constant" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>limit</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="constraint" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="constraintdef" hasCore="1" />
+ <tag name="constructorsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="contractnum" hasCore="1" />
+ <tag name="contractsponsor" hasCore="1" />
+ <tag name="contrib" hasCore="1" />
+ <tag name="copyright" hasCore="1" />
+ <tag name="coref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="corpauthor" hasCore="1" />
+ <tag name="corpname" hasCore="1" />
+ <tag name="country" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="arch" type="input">
+ </attr>
+ <attr name="condition" type="input">
+ </attr>
+ <attr name="conformance" type="input">
+ </attr>
+ <attr name="id" type="input">
+ </attr>
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="os" type="input">
+ </attr>
+ <attr name="remap" type="input">
+ </attr>
+ <attr name="role" type="input">
+ </attr>
+ <attr name="revision" type="input">
+ </attr>
+ <attr name="revisionflag" type="input">
+ </attr>
+ <attr name="security" type="input">
+ </attr>
+ <attr name="userlevel" type="input">
+ </attr>
+ <attr name="vendor" type="input">
+ </attr>
+ <attr name="xreflabel" type="input">
+ </attr>
+</tag>
+
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="database" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>field</item>
+ <item>key1</item>
+ <item>key2</item>
+ <item>name</item>
+ <item>record</item>
+ <item>table</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="date" hasCore="1" />
+ <tag name="dedication" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="1" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="destructorsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="edition" hasCore="1" />
+ <tag name="editor" hasCore="1" />
+ <tag name="email" hasCore="1" />
+ <tag name="emphasis" hasCore="1" />
+ <tag name="entry" hasCore="1">
+ <attr name="nameend" type="input">
+ <text>entry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="morerows" type="input">
+ <text>morerows</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="spanname" type="input">
+ <text>spanname</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="namest" type="input">
+ <text>namest</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="colname" type="input">
+ <text>colname</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="rotate" type="input">
+ <text>rotate</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="entrytbl" hasCore="1">
+ <attr name="nameend" type="input">
+ <text>entry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="spanname" type="input">
+ <text>spanname</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="namest" type="input">
+ <text>namest</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="tgroupstyle" type="input">
+ <text>tgroupstyle</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="cols" type="input">
+ <text>cols</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="colname" type="input">
+ <text>colname</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="envar" hasCore="1" />
+ <tag name="epigraph" hasCore="1" />
+ <tag name="equation" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="errorcode" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="errorname" hasCore="1" />
+ <tag name="errortext" hasCore="1" />
+ <tag name="errortype" hasCore="1" />
+ <tag name="example" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="exceptionname" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="fax" hasCore="1" />
+ <tag name="fieldsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="figure" hasCore="1">
+ <attr name="float" type="input">
+ <text>float</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="pgwide" type="input">
+ <text>pgwide</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="filename" hasCore="1">
+ <attr name="path" type="input">
+ <text>path</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>devicefile</item>
+ <item>directory</item>
+ <item>extension</item>
+ <item>headerfile</item>
+ <item>libraryfile</item>
+ <item>partition</item>
+ <item>symlink</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="firstname" hasCore="1" />
+ <tag name="firstterm" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="footnote" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="footnoteref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="foreignphrase" hasCore="1" />
+ <tag name="formalpara" hasCore="1" />
+ <tag name="funcdef" hasCore="1" />
+ <tag name="funcparams" hasCore="1" />
+ <tag name="funcprototype" hasCore="1" />
+ <tag name="funcsynopsis" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="funcsynopsisinfo" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="function" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="" col="0" />
+ <location row="" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="glossary" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossaryinfo" hasCore="1" />
+ <tag name="glossdef" hasCore="1">
+ <attr name="subject" type="input">
+ <text>subject</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossdiv" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossentry" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glosslist" hasCore="1" />
+ <tag name="glosssee" hasCore="1">
+ <attr name="otherterm" type="input">
+ <text>otherterm</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossseealso" hasCore="1">
+ <attr name="otherterm" type="input">
+ <text>otherterm</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossterm" hasCore="1">
+ <attr name="baseform" type="input">
+ <text>baseform</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="graphic" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="contentwidth" type="input">
+ <text>contentwidth</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="scalefit" type="input">
+ <text>scalefit</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="depth" type="input">
+ <text>depth</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="scale" type="input">
+ <text>scale</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="contentdepth" type="input">
+ <text>contentdepth</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ <items>
+ <item>center</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="graphicco" hasCore="1" />
+ <tag name="group" hasCore="1">
+ <attr name="rep" type="list">
+ <text></text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>norepeat</item>
+ <item>repeat</item>
+ </items>
+ </attr>
+ <attr name="choice" type="list">
+ <text></text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>opt</item>
+ <item>plain</item>
+ <item>req</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guibutton" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guiicon" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guilabel" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guimenu" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guimenuitem" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guisubmenu" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="hardware" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="highlights" hasCore="1" />
+ <tag name="holder" hasCore="1" />
+ <tag name="honorific" hasCore="1" />
+ <tag name="html:form" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="imagedata" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="contentwidth" type="input">
+ <text>contentwidth</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="scalefit" type="input">
+ <text>scalefit</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="depth" type="input">
+ <text>depth</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="scale" type="input">
+ <text>scale</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="contentdepth" type="input">
+ <text>contentdepth</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ <items>
+ <item>center</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="imageobject" hasCore="1" />
+ <tag name="imageobjectco" hasCore="1" />
+ <tag name="important" hasCore="1" />
+ <tag name="index" hasCore="1" />
+ <tag name="indexdiv" hasCore="1" />
+ <tag name="indexentry" hasCore="1" />
+ <tag name="indexinfo" hasCore="1" />
+ <tag name="indexterm" hasCore="1">
+ <attr name="significance" type="list">
+ <text>significance</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>normal</item>
+ <item>preferred</item>
+ </items>
+ </attr>
+ <attr name="zone" type="input">
+ <text>zone</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>endofrange</item>
+ <item>singular</item>
+ <item>startofrange</item>
+ </items>
+ </attr>
+ <attr name="scope" type="list">
+ <text>scope</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>all</item>
+ <item>global</item>
+ <item>local</item>
+ </items>
+ </attr>
+ <attr name="startref" type="input">
+ <text>startref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ </tag>
+ <tag name="informalequation" hasCore="1" />
+ <tag name="informalexample" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="informalfigure" hasCore="1">
+ <attr name="float" type="input">
+ <text>float</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="pgwide" type="input">
+ <text>pgwide</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="informaltable" hasCore="1">
+ <attr name="tocentry" type="input">
+ <text>tocentry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="shortentry" type="input">
+ <text>shortentry</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="tabstyle" type="input">
+ <text>tabstyle</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="orient" type="list">rowsep
+ <text>orient</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>land</item>
+ <item>port</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="frame" type="list">
+ <text>frame</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ <items>
+ <item>all</item>
+ <item>bottom</item>
+ <item>none</item>
+ <item>sides</item>
+ <item>top</item>
+ <item>topbot</item>
+ </items>
+ </attr>
+ <attr name="pgwide" type="input">
+ <text>pgwide</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ </tag>
+ <tag name="initializer" hasCore="1" />
+ <tag name="inlineequation" hasCore="1" />
+ <tag name="inlinegraphic" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="contentwidth" type="input">
+ <text>contentwidth</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="scalefit" type="input">
+ <text>scalefit</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="depth" type="input">
+ <text>depth</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="scale" type="input">
+ <text>scale</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="contentdepth" type="input">
+ <text>contentdepth</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ <items>
+ <item>center</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="inlinemediaobject" hasCore="1" />
+ <tag name="interface" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="interfacename" hasCore="1" />
+ <tag name="invpartnumber" hasCore="1" />
+ <tag name="isbn" hasCore="1" />
+ <tag name="issn" hasCore="1" />
+ <tag name="issuenum" hasCore="1" />
+ <tag name="itemizedlist" hasCore="1">
+ <attr name="mark" type="input">
+ <text>mark</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="spacing" type="list">
+ <text>spacing</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>compact</item>
+ <item>normal</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="itermset" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="jobtitle" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="keycap" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="" col="0" />
+ <location row="" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="keycode" hasCore="1" />
+ <tag name="keycombo" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="otheraction" type="input">
+ <text>otheraction</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="action" type="list">
+ <text>action</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>click</item>
+ <item>double-click</item>
+ <item>other</item>
+ <item>press</item>
+ <item>seq</item>
+ <item>simul</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="keysym" hasCore="1" />
+ <tag name="keyword" hasCore="1" />
+ <tag name="keywordset" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="label" hasCore="1" />
+ <tag name="legalnotice" hasCore="1" />
+ <tag name="lhs" hasCore="1" />
+ <tag name="lineage" hasCore="1" />
+ <tag name="lineannotation" hasCore="1" />
+ <tag name="link" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="endterm" type="input">
+ <text>endterm</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="type" type="input">
+ <text>type</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="listitem" hasCore="1">
+ <attr name="override" type="input">
+ <text>override</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="literal" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="literallayout" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>monospaced</item>
+ <item>normal</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="lot" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="lotentry" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="manvolnum" hasCore="1" />
+ <tag name="markup" hasCore="1" />
+ <tag name="medialabel" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>cartridge</item>
+ <item>cdrom</item>
+ <item>disk</item>
+ <item>tape</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="mediaobject" hasCore="1" />
+ <tag name="mediaobjectco" hasCore="1" />
+ <tag name="member" hasCore="1" />
+ <tag name="menuchoice" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="methodname" hasCore="1" />
+ <tag name="methodparam" hasCore="1">
+ <attr name="rep" type="list">
+ <text>rep</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>norepeat</item>
+ <item>repeat</item>
+ </items>
+ </attr>
+ <attr name="choice" type="list">
+ <text>choice</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>opt</item>
+ <item>plain</item>
+ <item>req</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="methodsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="mml:math" hasCore="1" />
+ <tag name="modespec" hasCore="1">
+ <text>modespec</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <attr name="application" type="list">
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="modifier" hasCore="1" />
+ <tag name="mousebutton" hasCore="1">
+ <text>mousebutton</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <attr name="moreinfo" type="list">
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="msg" hasCore="1" />
+ <tag name="msgaud" hasCore="1" />
+ <tag name="msgentry" hasCore="1" />
+ <tag name="msgexplan" hasCore="1" />
+ <tag name="msginfo" hasCore="1" />
+ <tag name="msglevel" hasCore="1" />
+ <tag name="msgmain" hasCore="1" />
+ <tag name="msgorig" hasCore="1" />
+ <tag name="msgrel" hasCore="1" />
+ <tag name="msgset" hasCore="1" />
+ <tag name="msgsub" hasCore="1" />
+ <tag name="msgtext" hasCore="1" />
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="nonterminal" hasCore="1">
+ <attr name="def" type="input">
+ <text>def</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="note" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="objectinfo" hasCore="1" />
+ <tag name="olink" hasCore="1">
+ <attr name="localinfo" type="input">
+ <text>localinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="input">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="linkmode" type="input">
+ <text>linkmode</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="targetptr" type="input">
+ <text>targetptr</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="targetdoc" type="input">
+ <text>targe</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="targetdocent" type="input">
+ <text>targetdocent</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ </tag>
+ <tag name="ooclass" hasCore="1" />
+ <tag name="ooexception" hasCore="1" />
+ <tag name="oointerface" hasCore="1" />
+ <tag name="option" hasCore="1" />
+ <tag name="optional" hasCore="1" />
+ <tag name="orderedlist" hasCore="1">
+ <attr name="inheritnum" type="list">
+ <text>inheritnum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>ignore</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ <attr name="spacing" type="list">
+ <text>spacing</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>compact</item>
+ <item>normal</item>
+ </items>
+ </attr>
+ <attr name="continuation" type="list">
+ <text>continuation</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>continues</item>
+ <item>restarts</item>
+ </items>
+ </attr>
+ <attr name="numeration" type="list">
+ <text>numeration</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>arabic</item>
+ <item>loweralpha</item>
+ <item>lowerroman</item>
+ <item>upperalpha</item>
+ <item>upperroman</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="orgdiv" hasCore="1" />
+ <tag name="orgname" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>consortium</item>
+ <item>corporation</item>
+ <item>informal</item>
+ <item>nonprofit</item>
+ <item>other</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="otheraddr" hasCore="1" />
+ <tag name="othercredit" hasCore="1" />
+ <tag name="othername" hasCore="1" />
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="pagenums" hasCore="1" />
+ <tag name="para" hasCore="1" />
+ <tag name="paramdef" hasCore="1" />
+ <tag name="parameter" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>command</item>
+ <item>function</item>
+ <item>option</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="part" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="partinfo" hasCore="1" />
+ <tag name="partintro" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="personblurb" hasCore="1" />
+ <tag name="personname" hasCore="1" />
+ <tag name="phone" hasCore="1" />
+ <tag name="phrase" hasCore="1" />
+ <tag name="pob" hasCore="1" />
+ <tag name="postcode" hasCore="1" />
+ <tag name="preface" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="prefaceinfo" hasCore="1" />
+ <tag name="primary" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="primaryie" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="printhistory" hasCore="1" />
+ <tag name="procedure" hasCore="1" />
+ <tag name="production" hasCore="1" />
+ <tag name="productionrecap" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="productionset" hasCore="1" />
+ <tag name="productname" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>copyright</item>
+ <item>registered</item>
+ <item>service</item>
+ <item>trade</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="productnumber" hasCore="1" />
+ <tag name="programlisting" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="programlistingco" hasCore="1" />
+ <tag name="prompt" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="property" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="pubdate" hasCore="1" />
+ <tag name="publisher" hasCore="1" />
+ <tag name="publishername" hasCore="1" />
+ <tag name="pubsnumber" hasCore="1" />
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="qandadiv" hasCore="1" />
+ <tag name="qandaentry" hasCore="1" />
+ <tag name="qandaset" hasCore="1">
+ <attr name="defaultlabel" type="list">
+ <text>defaultlabel</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>number</item>
+ <item>qanda</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="question" hasCore="1" />
+ <tag name="quote" hasCore="1" />
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="refclass" hasCore="1" />
+ <tag name="refdescriptor" hasCore="1" />
+ <tag name="refentry" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refentryinfo" hasCore="1" />
+ <tag name="refentrytitle" hasCore="1" />
+ <tag name="reference" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="referenceinfo" hasCore="1" />
+ <tag name="refmeta" hasCore="1" />
+ <tag name="refmiscinfo" hasCore="1">
+ <attr name="class" type="input">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refname" hasCore="1" />
+ <tag name="refnamediv" hasCore="1" />
+ <tag name="refpurpose" hasCore="1" />
+ <tag name="refsect1" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsect1info" hasCore="1" />
+ <tag name="refsect2" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsect2info" hasCore="1" />
+ <tag name="refsect3" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsect3info" hasCore="1" />
+ <tag name="refsection" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsectioninfo" hasCore="1" />
+ <tag name="refsynopsisdiv" hasCore="1" />
+ <tag name="refsynopsisdivinfo" hasCore="1" />
+ <tag name="releaseinfo" hasCore="1" />
+ <tag name="remark" hasCore="1" />
+ <tag name="replaceable" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>command</item>
+ <item>function</item>
+ <item>option</item>
+ <item>parameter</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="returnvalue" hasCore="1" />
+ <tag name="revdescription" hasCore="1" />
+ <tag name="revhistory" hasCore="1" />
+ <tag name="revision" hasCore="1" />
+ <tag name="revnumber" hasCore="1" />
+ <tag name="revremark" hasCore="1" />
+ <tag name="rhs" hasCore="1" />
+ <tag name="row" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="sbr" hasCore="1" />
+ <tag name="screen" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="screenco" hasCore="1" />
+ <tag name="screeninfo" hasCore="1" />
+ <tag name="screenshot" hasCore="1" />
+ <tag name="secondary" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="secondaryie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect1" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect1info" hasCore="1" />
+ <tag name="sect2" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect2info" hasCore="1" />
+ <tag name="sect3" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect3info" hasCore="1" />
+ <tag name="sect4" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect4info" hasCore="1" />
+ <tag name="sect5" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect5info" hasCore="1" />
+ <tag name="section" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="sectioninfo" hasCore="1" />
+ <tag name="see" hasCore="1" />
+ <tag name="seealso" hasCore="1" />
+ <tag name="seealsoie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="seeie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="seg" hasCore="1" />
+ <tag name="seglistitem" hasCore="1" />
+ <tag name="segmentedlist" hasCore="1" />
+ <tag name="segtitle" hasCore="1" />
+ <tag name="seriesvolnums" hasCore="1" />
+ <tag name="set" hasCore="1">
+ <attr name="fpi" type="input">
+ <text>fpi</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="setindex" hasCore="1" />
+ <tag name="setindexinfo" hasCore="1" />
+ <tag name="setinfo" hasCore="1">
+ <attr name="contents" type="input">
+ <text>contents</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="sgmltag" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>attribute</item>
+ <item>attvalue</item>
+ <item>element</item>
+ <item>emptytag</item>
+ <item>endtag</item>
+ <item>genentity</item>
+ <item>numcharref</item>
+ <item>paramentity</item>
+ <item>pi</item>
+ <item>sgmlcomment</item>
+ <item>starttag</item>
+ <item>xmlpi</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="shortaffil" hasCore="1" />
+ <tag name="shortcut" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="otheraction" type="input">
+ <text>otheraction</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="action" type="list">
+ <text>action</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>click</item>
+ <item>double-click</item>
+ <item>other</item>
+ <item>press</item>
+ <item>seq</item>
+ <item>simul</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="sidebar" hasCore="1" />
+ <tag name="sidebarinfo" hasCore="1" />
+ <tag name="simpara" hasCore="1" />
+ <tag name="simplelist" hasCore="1">
+ <attr name="columns" type="input">
+ <text>columns</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>horiz</item>
+ <item>inline</item>
+ <item>vert</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="simplemsgentry" hasCore="1">
+ <attr name="origin" type="input">
+ <text>origin</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="audience" type="input">
+ <text>audience</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="level" type="input">
+ <text>level</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="simplesect" hasCore="1" />
+ <tag name="spanspec" hasCore="1">
+ <attr name="nameend" type="input">
+ <text>nameend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="spanname" type="input">
+ <text>spanname</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="namest" type="input">
+ <text>namest</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="align" type="input">
+ <text>align</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="state" hasCore="1" />
+ <tag name="step" hasCore="1">
+ <attr name="performance" type="list">
+ <text>performance</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>optional</item>
+ <item>required</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="street" hasCore="1" />
+ <tag name="structfield" hasCore="1" />
+ <tag name="structname" hasCore="1" />
+ <tag name="subject" hasCore="1">
+ <attr name="weight" type="input">
+ <text>weight</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="subjectset" hasCore="1">
+ <attr name="scheme" type="input">
+ <text>scheme</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="subjectterm" hasCore="1" />
+ <tag name="subscript" hasCore="1" />
+ <tag name="substeps" hasCore="1">
+ <attr name="performance" type="list">
+ <text>performance</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>optional</item>
+ <item>required</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="subtitle" hasCore="1" />
+ <tag name="superscript" hasCore="1" />
+ <tag name="surname" hasCore="1" />
+ <tag name="svg:svg" hasCore="1" />
+ <tag name="symbol" hasCore="1">
+ <text>symbol</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <attr name="class" type="list">
+ <items>
+ <item>limit</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="synopfragment" hasCore="1" />
+ <tag name="synopfragmentref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="synopsis" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="systemitem" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>constant</item>
+ <item>domainname</item>
+ <item>etheraddress</item>
+ <item>event</item>
+ <item>eventhandler</item>
+ <item>filesystem</item>
+ <item>fqdomainname</item>
+ <item>groupname</item>
+ <item>ipaddress</item>
+ <item>library</item>
+ <item>macro</item>
+ <item>netmask</item>
+ <item>newsgroup</item>
+ <item>osname</item>
+ <item>resource</item>
+ <item>systemname</item>
+ <item>username</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="table" hasCore="1">
+ <attr name="tocentry" type="input">
+ <text>tocentry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="shortentry" type="input">
+ <text>shortentry</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="tabstyle" type="input">
+ <text>tabstyle</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="orient" type="list">
+ <text>orient</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>land</item>
+ <item>port</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="frame" type="list">
+ <text>frame</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ <items>
+ <item>all</item>
+ <item>bottom</item>
+ <item>none</item>
+ <item>sides</item>
+ <item>top</item>
+ <item>topbot</item>
+ </items>
+ </attr>
+ <attr name="pgwide" type="input">
+ <text>pgwide</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ </tag>
+ <tag name="tbody" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="term" hasCore="1" />
+ <tag name="tertiary" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="tertiaryie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="textdata" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="encoding" type="input">
+ <text>encoding</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ </tag>
+ <tag name="textobject" hasCore="1" />
+ <tag name="tfoot" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="tgroup" hasCore="1">
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="tgroupstyle" type="input">
+ <text>tgroupstyle</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="cols" type="input">
+ <text>cols</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="thead" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="tip" hasCore="1" />
+ <tag name="title" hasCore="1">
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="titleabbrev" hasCore="1" />
+ <tag name="toc" hasCore="1">
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="tocback" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="tocchap" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="tocentry" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="tocfront" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="toclevel1" hasCore="1" />
+ <tag name="toclevel2" hasCore="1" />
+ <tag name="toclevel3" hasCore="1" />
+ <tag name="toclevel4" hasCore="1" />
+ <tag name="toclevel5" hasCore="1" />
+ <tag name="tocpart" hasCore="1" />
+ <tag name="token" hasCore="1" />
+ <tag name="trademark" hasCore="1">
+ <attr name="class" type="list">
+ <text>trademark</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>copyright</item>
+ <item>registered</item>
+ <item>service</item>
+ <item>trade</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="type" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="ulink" hasCore="1">
+ <attr name="url" type="input">
+ <text>url</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="input">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="userinput" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="varargs" hasCore="1" />
+ <tag name="variablelist" hasCore="1">
+ <attr name="termlength" type="input">
+ <text>termlength</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="varlistentry" hasCore="1" />
+ <tag name="varname" hasCore="1" />
+ <tag name="videodata" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="contentwidth" type="input">
+ <text>contentwidth</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="scalefit" type="input">
+ <text>scalefit</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="depth" type="input">
+ <text>depth</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="scale" type="input">
+ <text>scale</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="contentdepth" type="input">
+ <text>contentdepth</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ </attr>
+ </tag>
+ <tag name="videoobject" hasCore="1" />
+ <tag name="void" hasCore="1" />
+ <tag name="volumenum" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="warning" hasCore="1" />
+ <tag name="wordasword" hasCore="1" />
+</TAGS>
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="xref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="endterm" type="input">
+ <text>endterm</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+</TAGS> \ 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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="year" hasCore="1" />
+</TAGS>
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: <tag booleanAttr>.
+ Example for complex: <tag booleanAttr="1"> or <tag booleanAttr="true">
+Single Tag Style = html or XML.
+ Example for html: <single_tag>
+ Example for XML: <single_tag />
+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 = <?xml ?>, <!-- -->, <! >
+ 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 <style> and <style type="text/css"> are
+ treated the same way and the DTD defined by this tag is named "text/css".
+Comments = comma separated list of area borders for comments. EOL means end-of-line.
+ Eg: // EOL, /* */
+StructKeywords = "," separated list of structure keywords. Structures are treated
+ as new nodes in the structure tree.
+StructBeginStr = a string specifying the beginning of a structure (like {)
+StructEndStr = a string specifying the beginning of a structure (like })
+StructRx = regular expression containing the beginning or the end of the structure
+ area. Eg. \\{ | \\} (structure area border can be { or })
+MayContain = pseudo DTDs can contain other pseudo DTDs
+
+
+B. Tag file structure
+---------------------
+Tag files are described in the Quanta doc tab under Quanta Tag Dialog Definition XML.
diff --git a/quanta/data/dtep/dtd/Makefile.am b/quanta/data/dtep/dtd/Makefile.am
new file mode 100644
index 00000000..654f26d2
--- /dev/null
+++ b/quanta/data/dtep/dtd/Makefile.am
@@ -0,0 +1,3 @@
+quantadir = ${quanta_datadir}/dtep/dtd
+
+quanta_DATA = description.rc
diff --git a/quanta/data/dtep/dtd/description.rc b/quanta/data/dtep/dtd/description.rc
new file mode 100644
index 00000000..4d858e16
--- /dev/null
+++ b/quanta/data/dtep/dtd/description.rc
@@ -0,0 +1,25 @@
+[General]
+Name = DTD
+NickName = DTD
+DefaultExtension = dtd
+MimeTypes = text/dtd
+NumOfPages = 0
+CaseSensitive = true
+Family = 2
+TopLevel = false
+
+[Parsing rules]
+AreaBorders = <! >
+MayContain = dtd
+
+[Extra rules]
+StructGroupsCount = 1
+StructBeginStr = [
+StructEndStr = ]
+StructRx = \\[|\\]
+
+[StructGroup_1]
+Name = Entities
+No_Name = No Entities Found
+DefinitionRx = ENTITY[\\s]+([\\w]+)[\\s]+
+AutoCompleteAfter = \& \ No newline at end of file
diff --git a/quanta/data/dtep/empty/Makefile.am b/quanta/data/dtep/empty/Makefile.am
new file mode 100644
index 00000000..f9a5385c
--- /dev/null
+++ b/quanta/data/dtep/empty/Makefile.am
@@ -0,0 +1,4 @@
+quantadir = ${quanta_datadir}/dtep/empty
+
+quanta_DATA = description.rc
+
diff --git a/quanta/data/dtep/empty/description.rc b/quanta/data/dtep/empty/description.rc
new file mode 100644
index 00000000..ca5a8b16
--- /dev/null
+++ b/quanta/data/dtep/empty/description.rc
@@ -0,0 +1,9 @@
+[General]
+Name = empty
+NickName = Empty DTEP valid for all files
+MimeTypes = all/all
+NumOfPages = 0
+CaseSensitive = false
+Family = 2
+TopLevel = true
+
diff --git a/quanta/data/dtep/html-frameset/Makefile.am b/quanta/data/dtep/html-frameset/Makefile.am
new file mode 100644
index 00000000..019fe281
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/Makefile.am
@@ -0,0 +1,3 @@
+quanta_DATA = basefont.tag description.rc font.tag frame.tag frameset.tag isindex.tag common.tag
+quantadir = ${quanta_datadir}/dtep/html-frameset
+
diff --git a/quanta/data/dtep/html-frameset/basefont.tag b/quanta/data/dtep/html-frameset/basefont.tag
new file mode 100644
index 00000000..2cc59301
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/basefont.tag
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="basefont" single="1">
+
+ <label>
+ <text>This tag is deprecated in HTML 4.0 </text>
+ <location col="0" row="0" colspan="3" />
+ </label>
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Not in Netscape 4x </tooltip>
+ <location col="2" row="2" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="3" />
+ <tooltip>Not in Netscape 4x </tooltip>
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ </attr>
+
+ <attr name="id" type="input" />
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-frameset/common.tag b/quanta/data/dtep/html-frameset/common.tag
new file mode 100644
index 00000000..e5adf8f7
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/common.tag
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/html-frameset/description.rc b/quanta/data/dtep/html-frameset/description.rc
new file mode 100644
index 00000000..2a1488bc
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/description.rc
@@ -0,0 +1,59 @@
+[General]
+Name = -//W3C//DTD HTML 4.01 Frameset//EN
+NickName = HTML 4.01 Frameset
+URL = http://www.w3.org/TR/html4/frameset.dtd
+DoctypeString = HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"
+Inherits = -//W3C//DTD HTML 4.01//EN
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script
+NumOfPages = 2
+CaseSensitive = false
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core && i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Extra rules]
+BooleanAttributes = simple
+Single Tag Style = html
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links (anchor)
+No_Name = No Links (anchor)
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
+
+
+
diff --git a/quanta/data/dtep/html-frameset/font.tag b/quanta/data/dtep/html-frameset/font.tag
new file mode 100644
index 00000000..2e38aa2c
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/font.tag
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="font" hasCore="1" hasI18n="1">
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Font color</tooltip>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4"/>
+ <items>
+ <item>+1</item>
+ <item>-1</item>
+ <item>+2</item>
+ <item>-2</item>
+ <item>+3</item>
+ <item>-3</item>
+ <item>+4</item>
+ <item>-4</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
+
diff --git a/quanta/data/dtep/html-frameset/frame.tag b/quanta/data/dtep/html-frameset/frame.tag
new file mode 100644
index 00000000..0cf37a05
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/frame.tag
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="html" hasI18n="1">
+
+ <attr name="version" type="input">
+ <text>Version</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="frameset" />
+<child name="head" />
+</children>
+
+</tag>
+
+<tag name="frame" hasCore="1" single="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="longdesc" type="url">
+ <text>Long desc</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="frameborder" type="list">
+ <text>Frame border</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ </attr>
+
+ <attr name="marginwidth" type="input">
+ <text>Margin width</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+ <attr name="marginheight" type="input">
+ <text>Margin height</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2"/>
+ </attr>
+
+ <attr name="noresize" type="check">
+ <text>No resize</text>
+ <location col="1" row="7" colspan="2"/>
+ </attr>
+
+ <attr name="scrolling" type="list">
+ <text>Scrolling</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2"/>
+ <items>
+ <item>auto</item>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-frameset/frameset.tag b/quanta/data/dtep/html-frameset/frameset.tag
new file mode 100644
index 00000000..0c830af5
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/frameset.tag
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="frameset" hasCore="1">
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Cols</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="onload" type="input">
+ <text>On load</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>On unload</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ </attr>
+<children>
+<child name="frame" />
+<child name="frameset" />
+<child name="noframes" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-frameset/isindex.tag b/quanta/data/dtep/html-frameset/isindex.tag
new file mode 100644
index 00000000..33e0d2e1
--- /dev/null
+++ b/quanta/data/dtep/html-frameset/isindex.tag
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="isindex" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="prompt" type="input">
+ <text>Prompt</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/Makefile.am b/quanta/data/dtep/html-strict/Makefile.am
new file mode 100644
index 00000000..672d1cc6
--- /dev/null
+++ b/quanta/data/dtep/html-strict/Makefile.am
@@ -0,0 +1,5 @@
+quanta_DATA = a.tag b.tag c.tag d.tag e.tag f.tag h.tag i.tag k.tag l.tag m.tag n.tag o.tag p.tag \
+ q.tag s.tag t.tag u.tag v.tag common.tag description.rc
+
+quantadir = ${quanta_datadir}/dtep/html-strict
+
diff --git a/quanta/data/dtep/html-strict/a.tag b/quanta/data/dtep/html-strict/a.tag
new file mode 100644
index 00000000..a10e1c04
--- /dev/null
+++ b/quanta/data/dtep/html-strict/a.tag
@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="href" type="url" source="selection">
+ <text>HREF</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <attr name="rel" type="list">
+ <text>Rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="rev" type="list">
+ <text>Rev</text>
+ <textlocation col="2" row="2" />
+ <location col="3" row="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="2" row="3" />
+ <location col="3" row="3"/>
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+
+ <attr name="onfocus" type="input">
+ <text>OnFocus</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>OnBlur</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="hreflang"></attr>
+ <attr name="charset"> </attr>
+ <attr name="accesskey"> </attr>
+ <attr name="tabindex"> </attr>
+ <attr name="shape"> </attr>
+ <attr name="coords"> </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="abbr" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="acronym" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="address" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="area" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>HREF</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+ <attr name="nohref" type="check">
+ <text>No HREF</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2"/>
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab Index</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2"/>
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>OnFocus</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2"/>
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>OnBlur</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/b.tag b/quanta/data/dtep/html-strict/b.tag
new file mode 100644
index 00000000..47424fe8
--- /dev/null
+++ b/quanta/data/dtep/html-strict/b.tag
@@ -0,0 +1,365 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="b" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="base" single="1">
+ <attr name="href" type="input">
+ <text>HREF</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+
+</tag>
+
+<tag name="bdo" hasCore="1">
+ <attr name="dir" type="input">
+ <text>Dir</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="lang" type="input">
+ <text>Lang</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="big" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="blockquote" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="dir" type="list">
+ <text>Dir</text>
+ <textlocation col="0" row="1" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>LTR</item>
+ <item>RTL</item>
+ </items>
+ </attr>
+<children>
+<child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="script" />
+ </children>
+
+</tag>
+
+<tag name="body" hasScript="1" hasCore="1" hasI18n="1">
+ <attr name="background" type="url">
+ <text>BG image</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>BG color</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="1" />
+ </attr>
+
+ <attr name="text" type="color">
+ <text>Text color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="2" />
+ </attr>
+
+ <attr name="link" type="color">
+ <text>Link color</text>
+ <textlocation col="0" row="3" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="3" />
+ </attr>
+
+ <attr name="alink" type="color">
+ <text>Active link color</text>
+ <textlocation col="0" row="4" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="4" />
+ </attr>
+
+ <attr name="vlink" type="color">
+ <text>Visited link color</text>
+ <textlocation col="0" row="5" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="5" />
+ </attr>
+
+ <attr name="onload" type="input">
+ <text>On load</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>On unload</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2" />
+ </attr>
+
+ <attr name="topmargin"> </attr>
+ <attr name="leftmargin"> </attr>
+ <attr name="marginwidth"> </attr>
+ <attr name="marginheight"> </attr>
+<children>
+<child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="script" />
+ <child name="ins" />
+ <child name="del" />
+ </children>
+
+</tag>
+<tag name="br" hasCore="1" single="1">
+
+ <attr name="clear" type="list">
+ <text>Clear</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>all</item>
+ <item>right</item>
+ <item>none</item>
+ </items>
+ </attr>
+
+
+</tag>
+
+<tag name="button" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>BUTTON</item>
+ <item>SUBMIT</item>
+ <item>RESET</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="address" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/c.tag b/quanta/data/dtep/html-strict/c.tag
new file mode 100644
index 00000000..e22bc9d3
--- /dev/null
+++ b/quanta/data/dtep/html-strict/c.tag
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="caption" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="cite" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="code" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="col" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="list">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Character</text>
+ <textlocation col="0" row="4" />
+ <tooltip>alignment character for cells</tooltip>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Character offset</text>
+ <textlocation col="0" row="5" />
+ <tooltip>alignment character offset</tooltip>
+ <location col="1" row="5" />
+ </attr>
+
+
+</tag>
+
+<tag name="colgroup" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels
+ You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="list">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Character</text>
+ <textlocation col="0" row="4" />
+ <tooltip>alignment character for cells</tooltip>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Character offset</text>
+ <textlocation col="0" row="5" />
+ <tooltip>alignment character offset</tooltip>
+ <location col="1" row="5" />
+ </attr>
+<children>
+<child name="col" usage="required" />
+</children>
+ <stoppingtags>
+ <stoppingtag name="colgroup" />
+ <stoppingtag name="tbody" />
+ <stoppingtag name="thead" />
+ <stoppingtag name="tfoot" />
+ <stoppingtag name="tr" />
+ </stoppingtags>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/common.tag b/quanta/data/dtep/html-strict/common.tag
new file mode 100644
index 00000000..e5adf8f7
--- /dev/null
+++ b/quanta/data/dtep/html-strict/common.tag
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/html-strict/d.tag b/quanta/data/dtep/html-strict/d.tag
new file mode 100644
index 00000000..bef94ba9
--- /dev/null
+++ b/quanta/data/dtep/html-strict/d.tag
@@ -0,0 +1,288 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dd" hasCore="1" hasI18n="1" hasScript="1" optional="1">
+ <stoppingtags>
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="del" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="datetime" type="input">
+ <text>DateTime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="dfn" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="div" hasScript="1" hasCore="1" hasI18n="1" scope="paragraph">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+
+</tag>
+<tag name="dl" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="compact" type="input">
+ <text>Compact</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+<children>
+<child name="dt" />
+<child name="dd" />
+</children>
+</tag>
+
+<tag name="dt" hasCore="1" hasI18n="1" hasScript="1" optional="1">
+ <stoppingtags>
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/description.rc b/quanta/data/dtep/html-strict/description.rc
new file mode 100644
index 00000000..e1f947d4
--- /dev/null
+++ b/quanta/data/dtep/html-strict/description.rc
@@ -0,0 +1,59 @@
+[General]
+Name = -//W3C//DTD HTML 4.01//EN
+NickName = HTML 4.01 Strict
+URL = http://www.w3.org/TR/html4/strict.dtd
+DoctypeString = HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script
+NumOfPages = 2
+CaseSensitive = false
+Documentation = HTML
+
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core && i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Extra rules]
+BooleanAttributes = simple
+Single Tag Style = html
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links (anchor)
+No_Name = No Links (anchor)
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
+
+
+
+
diff --git a/quanta/data/dtep/html-strict/e.tag b/quanta/data/dtep/html-strict/e.tag
new file mode 100644
index 00000000..275630e7
--- /dev/null
+++ b/quanta/data/dtep/html-strict/e.tag
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="em" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/f.tag b/quanta/data/dtep/html-strict/f.tag
new file mode 100644
index 00000000..67ce4dc9
--- /dev/null
+++ b/quanta/data/dtep/html-strict/f.tag
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<chid name="legend" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="form" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="input">
+ <text>Action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>Method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>GET</item>
+ <item>POST</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>Enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+ <attr name="accept-charset" type="input">
+ <text>Accept charset</text>
+ <textlocation col="2" row="3" />
+ <location col="3" row="3"/>
+ </attr>
+
+ <attr name="name"> </attr>
+ <attr name="onsubmit"> </attr>
+ <attr name="onreset"> </attr>
+
+<children>
+<child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="script" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/h.tag b/quanta/data/dtep/html-strict/h.tag
new file mode 100644
index 00000000..9d48f029
--- /dev/null
+++ b/quanta/data/dtep/html-strict/h.tag
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+
+</tag>
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+
+</tag>
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+
+</tag>
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+
+</tag>
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+
+</tag>
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+
+</tag>
+<tag name="head" hasI18n="1">
+
+ <attr name="profile" type="url">
+ <text>Profile</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="title" usage="required" />
+<child name="isindex" />
+<child name="base" />
+<child name="script" />
+ <child name="style" />
+ <child name="meta" />
+ <child name="link" />
+ <child name="object" />
+</children>
+
+</tag>
+<tag name="hr" hasScript="1" hasCore="1" single="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Line height</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Line width</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+
+
+ <attr name="noshade" type="check" >
+ <text>No shade (solid line)</text>
+ <location col="0" row="3"/>
+ </attr>
+
+
+
+</tag>
+<tag name="html" hasI18n="1">
+
+ <attr name="version" type="input">
+ <text>Version</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="body" />
+<child name="head" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/i.tag b/quanta/data/dtep/html-strict/i.tag
new file mode 100644
index 00000000..cf4f838e
--- /dev/null
+++ b/quanta/data/dtep/html-strict/i.tag
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="i" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="img" single="1">
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="longdesc" type="input">
+ <text>Longdesc</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+ <attr name="usemap" type="input">
+ <text>Usemap</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+ <attr name="ismap" type="input">
+ <text>Ismap</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+ <attr name="hspace" type="input">
+ <text>HSpace</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2" />
+ </attr>
+ <attr name="vspace" type="input">
+ <text>VSpace</text>
+ <textlocation col="0" row="10" />
+ <location col="1" row="10" colspan="2" />
+ </attr>
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" colspan="2" />
+ </attr>
+
+</tag>
+
+<tag name="input" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ <tooltip>What - no kparts?</tooltip>
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>Checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>No of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>Max length</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ <tooltip>Alternate text for image</tooltip>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Img src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ <tooltip>URL for image to use</tooltip>
+ </attr>
+
+ <attr name="usemap" type="url">
+<!-- <text>Use map</text>
+ <textlocation col="0" row="5" colspan="1" />
+ <location col="1" row="5" colspan="3" /> -->
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="5" colspan="1" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>NA in NS4</tooltip>
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="3" row="5" colspan="1" />
+ <tooltip>NA in NS4</tooltip>
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="6" colspan="1" />
+ <items>
+ <item>top</item>
+ <item>middle</item>
+ <item>bottom</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="6" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="2" row="6" colspan="1" />
+ <location col="3" row="6" colspan="1" />
+ <tooltip>Shortcut - NA in NS4</tooltip>
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>On focus</text>
+ <textlocation col="0" row="8" colspan="1" />
+ <location col="1" row="8" colspan="1" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>On select</text>
+ <textlocation col="2" row="8" colspan="1" />
+ <location col="3" row="8" colspan="1" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>On blur</text>
+ <textlocation col="0" row="9" colspan="1" />
+ <location col="1" row="9" colspan="1" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>On change</text>
+ <textlocation col="2" row="9" colspan="1" />
+ <location col="3" row="9" colspan="1" />
+ </attr>
+
+ <attr name="accept"> </attr>
+
+
+</tag>
+
+<tag name="ins" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="datetime" type="input">
+ <text>DateTime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/k.tag b/quanta/data/dtep/html-strict/k.tag
new file mode 100644
index 00000000..fa7f66d9
--- /dev/null
+++ b/quanta/data/dtep/html-strict/k.tag
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="kbd" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/l.tag b/quanta/data/dtep/html-strict/l.tag
new file mode 100644
index 00000000..68718b4f
--- /dev/null
+++ b/quanta/data/dtep/html-strict/l.tag
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="label" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="for" type="input">
+ <text>For</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="legend" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="li" hasCore="1" hasI18n="1" hasScript="1" optional="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="compact" type="check">
+ <text>compact</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+
+</tag>
+<tag name="link" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="list">
+ <text>Rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="rev" type="list">
+ <text>Rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>HREF</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>HREF lang</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/m.tag b/quanta/data/dtep/html-strict/m.tag
new file mode 100644
index 00000000..3b20e3bd
--- /dev/null
+++ b/quanta/data/dtep/html-strict/m.tag
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="map" hasI18n="1" hasScript="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="class" type="input">
+ <text>Class</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="style" type="input">
+ <text>Style</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+<children>
+<child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="area" />
+</children>
+
+</tag>
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>HTTP-Equiv</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>Content</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>Scheme</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/n.tag b/quanta/data/dtep/html-strict/n.tag
new file mode 100644
index 00000000..648cbe2b
--- /dev/null
+++ b/quanta/data/dtep/html-strict/n.tag
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noscript" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/o.tag b/quanta/data/dtep/html-strict/o.tag
new file mode 100644
index 00000000..0caa1fee
--- /dev/null
+++ b/quanta/data/dtep/html-strict/o.tag
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="object" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="data" type="url">
+ <text>Data</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="classid" type="url">
+ <text>ClassId</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="codebase" type="url">
+ <text>Codebase</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+ <attr name="usemap" type="url">
+ <text>Usemap</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+ <attr name="type" type="input">
+ <text>Type</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2" />
+ </attr>
+ <attr name="codetype" type="input">
+ <text>CodeType</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2" />
+ </attr>
+ <attr name="standby" type="input">
+ <text>Standby</text>
+ <textlocation col="0" row="10" />
+ <location col="1" row="10" colspan="2" />
+ </attr>
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" colspan="2" />
+ </attr>
+ <attr name="declare" type="check">
+ <text>Declare</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" colspan="2" />
+ </attr>
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="13" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="13" colspan="2" />
+ </attr>
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="14" />
+ <location col="1" row="14" colspan="2" />
+ </attr>
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="15" />
+ <location col="1" row="15" colspan="2" />
+ </attr>
+ <attr name="vspace" type="input">
+ <text>VSpace</text>
+ <textlocation col="0" row="16" />
+ <location col="1" row="16" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="param" />
+ </children>
+</tag>
+<tag name="ol" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="start" type="input">
+ <text>Start</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+
+<children>
+<child name="li" usage="required" />
+</children>
+</tag>
+
+<tag name="option" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <attr name="disabled" type="list">
+ <text>Disabled</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>disabled</item>
+ </items>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="option" />
+ </stoppingtags>
+
+
+
+</tag>
+
+<tag name="optgroup" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="option" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/p.tag b/quanta/data/dtep/html-strict/p.tag
new file mode 100644
index 00000000..71487b05
--- /dev/null
+++ b/quanta/data/dtep/html-strict/p.tag
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="param" single="1">
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="valuetype" type="input">
+ <text>Value Type</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="type" type="input">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+
+<tag name="pre" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="xml:space" type="input">
+ <text>Xml:Space</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/q.tag b/quanta/data/dtep/html-strict/q.tag
new file mode 100644
index 00000000..3225bf5d
--- /dev/null
+++ b/quanta/data/dtep/html-strict/q.tag
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="q" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/s.tag b/quanta/data/dtep/html-strict/s.tag
new file mode 100644
index 00000000..30f59c9c
--- /dev/null
+++ b/quanta/data/dtep/html-strict/s.tag
@@ -0,0 +1,354 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="script">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>text/css</item>
+ <item>text/php</item>
+ <item>text/javascript</item>
+ <item>application/x-javascript</item>
+ </items>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Source</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>Defer (script execution may wait)</text>
+ <location col="0" row="4" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="samp" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="select" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="multiple" type="check">
+ <text>Multiple</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>On focus</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>On blur</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>On change</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="size"> </attr>
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="optgroup" />
+<child name="option" />
+</children>
+</tag>
+
+<tag name="small" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" /></children>
+</tag>
+
+<tag name="span" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="style" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="sub" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="sup" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/t.tag b/quanta/data/dtep/html-strict/t.tag
new file mode 100644
index 00000000..426dbaaf
--- /dev/null
+++ b/quanta/data/dtep/html-strict/t.tag
@@ -0,0 +1,651 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="cellspacing" type="input">
+ <text>Cell spacing</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="cellpadding" type="input">
+ <text>Cell padding</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Background color</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="frame" type="list">
+ <text>Frame</text>
+ <textlocation col="0" row="5" />
+ <items>
+ <item>above</item>
+ <item>below</item>
+ <item>border</item>
+ <item>box</item>
+ <item>hsides</item>
+ <item>LHS</item>
+ <item>RHS</item>
+ <item>void</item>
+ <item>vsides</item>
+ </items>
+ <location col="1" row="5" colspan="2" />
+ <tooltip>Not supported in Netscape 4x</tooltip>
+ </attr>
+
+
+ <attr name="summary"> </attr>
+ <attr name="fr"> </attr>
+ <attr name="rules"> </attr>
+ <attr name="background"> </attr>
+ <attr name="height"> </attr>
+<children>
+<child name="caption" />
+<child name="col" />
+<child name="colgroup" />
+<child name="thead" />
+<child name="tfoot" />
+<child name="tbody" />
+<child name="tr" usage="required" />
+</children>
+
+</tag>
+<tag name="tbody" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+<tag name="td" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="list">
+ <text>Col span</text>
+ <textlocation col="2" row="0" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Deprecated in HTML 4.0 - not used in IE 5</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rowspan" type="list">
+ <text>Row span</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="0" row="6" colspan="2" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="headers"> </attr>
+ <attr name="abbr"> </attr>
+ <attr name="scope"> </attr>
+ <attr name="axis"> </attr>
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+ <attr name="background"> </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="textarea" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="4" />
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Columns</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="0" row="4" colspan="2" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="0" row="5" colspan="2" />
+ </attr>
+
+ <attr name="accesskey"> </attr>
+ <attr name="tab"> </attr>
+ <attr name="onfocus"> </attr>
+ <attr name="onblur"> </attr>
+ <attr name="onselect"> </attr>
+ <attr name="onchange"> </attr>
+
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="tfoot" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+<children>
+<child name="tr" />
+</children>
+</tag>
+
+<tag name="th" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="list">
+ <text>Col span</text>
+ <textlocation col="2" row="0" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Deprecated in HTML 4.0 - not used in IE 5</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rowspan" type="list">
+ <text>Row span</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="0" row="6" colspan="2" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+
+ <attr name="headers"> </attr>
+ <attr name="abbr"> </attr>
+ <attr name="scope"> </attr>
+ <attr name="axis"> </attr>
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="noscript" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+
+</tag>
+
+<tag name="thead" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+<children>
+<child name="tr" />
+</children>
+</tag>
+
+<tag name="title" hasI18n="1" >
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="tr" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+<children>
+<child name="th" />
+<child name="td" usage="required" />
+</children>
+</tag>
+
+<tag name="tt" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/u.tag b/quanta/data/dtep/html-strict/u.tag
new file mode 100644
index 00000000..305f837c
--- /dev/null
+++ b/quanta/data/dtep/html-strict/u.tag
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ </items>
+ </attr>
+
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+<children>
+<child name="li" usage="required" />
+</children>
+</tag>
+
+<tag name="u" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html-strict/v.tag b/quanta/data/dtep/html-strict/v.tag
new file mode 100644
index 00000000..06fa14bb
--- /dev/null
+++ b/quanta/data/dtep/html-strict/v.tag
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="var" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="object" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/Makefile.am b/quanta/data/dtep/html/Makefile.am
new file mode 100644
index 00000000..e31863d9
--- /dev/null
+++ b/quanta/data/dtep/html/Makefile.am
@@ -0,0 +1,4 @@
+quanta_DATA = a.tag b.tag c.tag d.tag e.tag f.tag h.tag i.tag k.tag l.tag m.tag n.tag o.tag p.tag q.tag s.tag \
+ t.tag u.tag v.tag common.tag description.rc
+quantadir = ${quanta_datadir}/dtep/html-transitional
+
diff --git a/quanta/data/dtep/html/a.tag b/quanta/data/dtep/html/a.tag
new file mode 100644
index 00000000..a4658cb1
--- /dev/null
+++ b/quanta/data/dtep/html/a.tag
@@ -0,0 +1,359 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="href" type="url" source="selection">
+ <text>HREF</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <attr name="rel" type="list">
+ <text>Rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="rev" type="list">
+ <text>Rev</text>
+ <textlocation col="2" row="2" />
+ <location col="3" row="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="2" row="3" />
+ <location col="3" row="3"/>
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+
+ <attr name="onfocus" type="input">
+ <text>OnFocus</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>OnBlur</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="hreflang"></attr>
+ <attr name="charset"> </attr>
+ <attr name="accesskey"> </attr>
+ <attr name="tabindex"> </attr>
+ <attr name="shape"> </attr>
+ <attr name="coords"> </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="abbr" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="acronym" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="address" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+</children>
+</tag>
+
+<tag name="area" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>HREF</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+ <attr name="nohref" type="check">
+ <text>No HREF</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2"/>
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab Index</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2"/>
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>OnFocus</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2"/>
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>OnBlur</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/b.tag b/quanta/data/dtep/html/b.tag
new file mode 100644
index 00000000..35877ad6
--- /dev/null
+++ b/quanta/data/dtep/html/b.tag
@@ -0,0 +1,477 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="b" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="base" single="1">
+ <attr name="href" type="input">
+ <text>HREF</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+</tag>
+
+<tag name="bdo" hasCore="1">
+ <attr name="dir" type="input">
+ <text>Dir</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="lang" type="input">
+ <text>Lang</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="big" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="blockquote" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="dir" type="list">
+ <text>Dir</text>
+ <textlocation col="0" row="1" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>LTR</item>
+ <item>RTL</item>
+ </items>
+ </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+
+</tag>
+<tag name="body" hasScript="1" hasCore="1" hasI18n="1">
+ <attr name="background" type="url">
+ <text>BG image</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>BG color</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="1" />
+ </attr>
+
+ <attr name="text" type="color">
+ <text>Text color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="2" />
+ </attr>
+
+ <attr name="link" type="color">
+ <text>Link color</text>
+ <textlocation col="0" row="3" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="3" />
+ </attr>
+
+ <attr name="alink" type="color">
+ <text>Active link color</text>
+ <textlocation col="0" row="4" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="4" />
+ </attr>
+
+ <attr name="vlink" type="color">
+ <text>Visited link color</text>
+ <textlocation col="0" row="5" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="2" row="5" />
+ </attr>
+
+ <attr name="onload" type="input">
+ <text>On load</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>On unload</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2" />
+ </attr>
+
+ <attr name="topmargin"> </attr>
+ <attr name="leftmargin"> </attr>
+ <attr name="marginwidth"> </attr>
+ <attr name="marginheight"> </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="ins" />
+ <child name="del" />
+ </children>
+</tag>
+
+<tag name="br" hasCore="1" single="1">
+
+ <attr name="clear" type="list">
+ <text>Clear</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>all</item>
+ <item>right</item>
+ <item>none</item>
+ </items>
+ </attr>
+</tag>
+
+<tag name="button" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>BUTTON</item>
+ <item>SUBMIT</item>
+ <item>RESET</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="address" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/c.tag b/quanta/data/dtep/html/c.tag
new file mode 100644
index 00000000..2875b88e
--- /dev/null
+++ b/quanta/data/dtep/html/c.tag
@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="caption" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="center" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+</tag>
+
+<tag name="cite" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="code" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="col" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="list">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Character</text>
+ <textlocation col="0" row="4" />
+ <tooltip>alignment character for cells</tooltip>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Character offset</text>
+ <textlocation col="0" row="5" />
+ <tooltip>alignment character offset</tooltip>
+ <location col="1" row="5" />
+ </attr>
+
+
+</tag>
+
+<tag name="colgroup" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels
+ You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="list">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Character</text>
+ <textlocation col="0" row="4" />
+ <tooltip>alignment character for cells</tooltip>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Character offset</text>
+ <textlocation col="0" row="5" />
+ <tooltip>alignment character offset</tooltip>
+ <location col="1" row="5" />
+ </attr>
+ <stoppingtags>
+ <stoppingtag name="colgroup" />
+ <stoppingtag name="tbody" />
+ <stoppingtag name="thead" />
+ <stoppingtag name="tfoot" />
+ <stoppingtag name="tr" />
+ </stoppingtags>
+
+
+<children>
+<child name="col" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/common.tag b/quanta/data/dtep/html/common.tag
new file mode 100644
index 00000000..e5adf8f7
--- /dev/null
+++ b/quanta/data/dtep/html/common.tag
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/html/d.tag b/quanta/data/dtep/html/d.tag
new file mode 100644
index 00000000..e482727f
--- /dev/null
+++ b/quanta/data/dtep/html/d.tag
@@ -0,0 +1,337 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dd" hasCore="1" hasI18n="1" hasScript="1" optional="1">
+ <stoppingtags>
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="del" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="datetime" type="input">
+ <text>DateTime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="dfn" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="div" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="dl" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="compact" type="input">
+ <text>Compact</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+<children>
+<child name="dt" />
+<child name="dd" />
+</children>
+</tag>
+<tag name="dt" hasCore="1" hasI18n="1" hasScript="1" optional="1">
+ <stoppingtags>
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/description.rc b/quanta/data/dtep/html/description.rc
new file mode 100644
index 00000000..1d678c57
--- /dev/null
+++ b/quanta/data/dtep/html/description.rc
@@ -0,0 +1,58 @@
+[General]
+Name = -//W3C//DTD HTML 4.01 Transitional//EN
+NickName = HTML 4.01 Transitional
+URL = http://www.w3.org/TR/html4/loose.dtd
+DoctypeString = HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script
+NumOfPages = 2
+CaseSensitive = false
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core && i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Extra rules]
+BooleanAttributes = simple
+Single Tag Style = html
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links (anchor)
+No_Name = No Links (anchor)
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
+
+
+
+
diff --git a/quanta/data/dtep/html/e.tag b/quanta/data/dtep/html/e.tag
new file mode 100644
index 00000000..a966799a
--- /dev/null
+++ b/quanta/data/dtep/html/e.tag
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="em" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/f.tag b/quanta/data/dtep/html/f.tag
new file mode 100644
index 00000000..8136efba
--- /dev/null
+++ b/quanta/data/dtep/html/f.tag
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="legend" />
+</children>
+</tag>
+
+<tag name="form" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="input">
+ <text>Action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>Method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>GET</item>
+ <item>POST</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>Enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+ <attr name="accept-charset" type="input">
+ <text>Accept charset</text>
+ <textlocation col="2" row="3" />
+ <location col="3" row="3"/>
+ </attr>
+
+ <attr name="name"> </attr>
+ <attr name="onsubmit"> </attr>
+ <attr name="onreset"> </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+
+</tag>
+
+<tag name="font" hasCore="1" hasI18n="1">
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Font color</tooltip>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4"/>
+ <items>
+ <item>+1</item>
+ <item>-1</item>
+ <item>+2</item>
+ <item>-2</item>
+ <item>+3</item>
+ <item>-3</item>
+ <item>+4</item>
+ <item>-4</item>
+ </items>
+ </attr>
+
+ <spacer orientation="h">
+ <location col="0" row="5" />
+ </spacer>
+
+ <spacer orientation="h">
+ <location col="1" row="8" />
+ </spacer>
+
+ <spacer orientation="h">
+ <location col="2" row="8" />
+ </spacer>
+
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="3" />
+ </spacer>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/h.tag b/quanta/data/dtep/html/h.tag
new file mode 100644
index 00000000..febe25ca
--- /dev/null
+++ b/quanta/data/dtep/html/h.tag
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+
+</tag>
+
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+
+</tag>
+
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+
+</tag>
+
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+
+</tag>
+
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+
+</tag>
+
+<tag name="head" hasI18n="1">
+
+ <attr name="profile" type="url">
+ <text>Profile</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="title" usage="required" />
+<child name="isindex" />
+<child name="base" />
+<child name="script" />
+ <child name="style" />
+ <child name="meta" />
+ <child name="link" />
+ <child name="object" />
+</children>
+
+</tag>
+
+<tag name="hr" hasScript="1" hasCore="1" single="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Depricated in HTML 4.0 </tooltip>
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Line height</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Line width</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+
+
+ <attr name="noshade" type="check" >
+ <text>No shade (solid line)</text>
+ <location col="0" row="3"/>
+ </attr>
+
+
+
+</tag>
+
+<tag name="html" hasI18n="1">
+
+ <attr name="version" type="input">
+ <text>Version</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="body" />
+<child name="head" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/i.tag b/quanta/data/dtep/html/i.tag
new file mode 100644
index 00000000..0dca3a63
--- /dev/null
+++ b/quanta/data/dtep/html/i.tag
@@ -0,0 +1,494 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="i" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+
+<tag name="iframe" hasCore="1" hasI18n="1">
+
+ <attr name="longdesc" type="url">
+ <text>Longdesc</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="scrolling" type="list">
+ <text>Scrolling</text>
+ <textlocation col="0" row="4" />
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ <item>auto</item>
+ </items>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="7" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="marginheight" type="input">
+ <text>Marginheight</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="marginwidth" type="input">
+ <text>Marginwidth</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+ <attr name="frameborder" type="list">
+ <text>Frameborder</text>
+ <textlocation col="0" row="10" />
+ <items>
+ <item>1</item>
+ <item>0</item>
+ </items>
+ <location col="1" row="10" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" />
+ </attr>
+
+ <attr name="longdesc" type="input">
+ <text>Longdesc</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" />
+ </attr>
+
+<children>
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+
+
+<tag name="img" single="1" hasCore="1">
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="longdesc" type="input">
+ <text>Longdesc</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+ <attr name="usemap" type="input">
+ <text>Usemap</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+ <attr name="ismap" type="input">
+ <text>Ismap</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="7" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>middle</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="7" colspan="2" />
+ </attr>
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2" />
+ </attr>
+ <attr name="hspace" type="input">
+ <text>HSpace</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2" />
+ </attr>
+ <attr name="vspace" type="input">
+ <text>VSpace</text>
+ <textlocation col="0" row="10" />
+ <location col="1" row="10" colspan="2" />
+ </attr>
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" colspan="2" />
+ </attr>
+</tag>
+
+<tag name="input" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ <tooltip>What - no kparts?</tooltip>
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>Checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>No of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>Max length</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ <tooltip>Alternate text for image</tooltip>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Img src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ <tooltip>URL for image to use</tooltip>
+ </attr>
+
+ <attr name="usemap" type="url">
+<!-- <text>Use map</text>
+ <textlocation col="0" row="5" colspan="1" />
+ <location col="1" row="5" colspan="3" /> -->
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="5" colspan="1" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>NA in NS4</tooltip>
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="3" row="5" colspan="1" />
+ <tooltip>NA in NS4</tooltip>
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="6" colspan="1" />
+ <items>
+ <item>top</item>
+ <item>middle</item>
+ <item>bottom</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="6" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="2" row="6" colspan="1" />
+ <location col="3" row="6" colspan="1" />
+ <tooltip>Shortcut - NA in NS4</tooltip>
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>On focus</text>
+ <textlocation col="0" row="8" colspan="1" />
+ <location col="1" row="8" colspan="1" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>On select</text>
+ <textlocation col="2" row="8" colspan="1" />
+ <location col="3" row="8" colspan="1" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>On blur</text>
+ <textlocation col="0" row="9" colspan="1" />
+ <location col="1" row="9" colspan="1" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>On change</text>
+ <textlocation col="2" row="9" colspan="1" />
+ <location col="3" row="9" colspan="1" />
+ </attr>
+
+ <attr name="accept"> </attr>
+</tag>
+
+<tag name="ins" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="datetime" type="input">
+ <text>DateTime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/k.tag b/quanta/data/dtep/html/k.tag
new file mode 100644
index 00000000..e0babed5
--- /dev/null
+++ b/quanta/data/dtep/html/k.tag
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="kbd" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/l.tag b/quanta/data/dtep/html/l.tag
new file mode 100644
index 00000000..6e02de9f
--- /dev/null
+++ b/quanta/data/dtep/html/l.tag
@@ -0,0 +1,345 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="label" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="for" type="input">
+ <text>For</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="legend" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ </children>
+</tag>
+
+<tag name="li" hasCore="1" hasI18n="1" hasScript="1" optional="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="compact" type="check">
+ <text>compact</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+<stoppingtags>
+ <stoppingtag name="li" />
+ <stoppingtag name="ul" />
+ <stoppingtag name="ol" />
+</stoppingtags>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ </children>
+</tag>
+
+<tag name="link" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="list">
+ <text>Rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="rev" type="list">
+ <text>Rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>Alternate</item>
+ <item>StyleSheet</item>
+ <item>Start</item>
+ <item>Next</item>
+ <item>Prev</item>
+ <item>Contents</item>
+ <item>Index</item>
+ <item>Glossary</item>
+ <item>Copyright</item>
+ <item>Made</item>
+ <item>Chapter</item>
+ <item>Section</item>
+ <item>Subsection</item>
+ <item>Appendix</item>
+ <item>Help</item>
+ <item>Bookmark</item>
+ </items>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>HREF</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="target" type="list">
+ <text>Target</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>_blank</item>
+ <item>_self</item>
+ <item>_parent</item>
+ <item>_top</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>HREF lang</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/m.tag b/quanta/data/dtep/html/m.tag
new file mode 100644
index 00000000..413df4f8
--- /dev/null
+++ b/quanta/data/dtep/html/m.tag
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="map" hasI18n="1" hasScript="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="class" type="input">
+ <text>Class</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="style" type="input">
+ <text>Style</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+<children>
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="area" />
+</children>
+</tag>
+
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>HTTP-Equiv</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>Content</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>Scheme</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/n.tag b/quanta/data/dtep/html/n.tag
new file mode 100644
index 00000000..f745cf46
--- /dev/null
+++ b/quanta/data/dtep/html/n.tag
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noscript" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/o.tag b/quanta/data/dtep/html/o.tag
new file mode 100644
index 00000000..85767c1a
--- /dev/null
+++ b/quanta/data/dtep/html/o.tag
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="object" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="data" type="url">
+ <text>Data</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="classid" type="url">
+ <text>ClassId</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="codebase" type="url">
+ <text>Codebase</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+ <attr name="usemap" type="url">
+ <text>Usemap</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+ <attr name="type" type="input">
+ <text>Type</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2" />
+ </attr>
+ <attr name="codetype" type="input">
+ <text>CodeType</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2" />
+ </attr>
+ <attr name="standby" type="input">
+ <text>Standby</text>
+ <textlocation col="0" row="10" />
+ <location col="1" row="10" colspan="2" />
+ </attr>
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" colspan="2" />
+ </attr>
+ <attr name="declare" type="check">
+ <text>Declare</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" colspan="2" />
+ </attr>
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="13" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="13" colspan="2" />
+ </attr>
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="14" />
+ <location col="1" row="14" colspan="2" />
+ </attr>
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="15" />
+ <location col="1" row="15" colspan="2" />
+ </attr>
+ <attr name="vspace" type="input">
+ <text>VSpace</text>
+ <textlocation col="0" row="16" />
+ <location col="1" row="16" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+ <child name="param" />
+</children>
+</tag>
+
+<tag name="ol" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="start" type="input">
+ <text>Start</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+
+<children>
+<child name="li" usage="required" />
+</children>
+</tag>
+
+<tag name="option" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <attr name="disabled" type="list">
+ <text>Disabled</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>disabled</item>
+ </items>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="option" />
+ </stoppingtags>
+
+</tag>
+
+<tag name="optgroup" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="option" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/p.tag b/quanta/data/dtep/html/p.tag
new file mode 100644
index 00000000..33017fa0
--- /dev/null
+++ b/quanta/data/dtep/html/p.tag
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="param" single="1">
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+ <attr name="valuetype" type="input">
+ <text>Value Type</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+ <attr name="type" type="input">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+
+<tag name="pre" hasCore="1" hasI18n="1" hasScript="1">
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="xml:space" type="input">
+ <text>Xml:Space</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/q.tag b/quanta/data/dtep/html/q.tag
new file mode 100644
index 00000000..1d5f512c
--- /dev/null
+++ b/quanta/data/dtep/html/q.tag
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="q" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/s.tag b/quanta/data/dtep/html/s.tag
new file mode 100644
index 00000000..6a3cb987
--- /dev/null
+++ b/quanta/data/dtep/html/s.tag
@@ -0,0 +1,408 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="script">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>text/css</item>
+ <item>text/php</item>
+ <item>text/javascript</item>
+ <item>application/x-javascript</item>
+ </items>
+ </attr>
+
+ <attr name="language" type="list">
+ <text>Language</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>PHP</item>
+ <item>JavaScript</item>
+ <item>JavaScript1.2</item>
+ <item>JavaScript1.3</item>
+ <item>VBScript</item>
+ </items>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Source</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>Defer (script execution may wait)</text>
+ <location col="0" row="4" colspan="2" />
+ </attr>
+
+
+
+</tag>
+
+<tag name="samp" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="select" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="multiple" type="check">
+ <text>Multiple</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>On focus</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>On blur</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>On change</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="size"> </attr>
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="optgroup" />
+<child name="option" />
+</children>
+</tag>
+
+<tag name="small" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="span" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+
+<tag name="style" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="sub" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+<tag name="sup" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/strong.tag b/quanta/data/dtep/html/strong.tag
new file mode 100644
index 00000000..2be3da65
--- /dev/null
+++ b/quanta/data/dtep/html/strong.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/t.tag b/quanta/data/dtep/html/t.tag
new file mode 100644
index 00000000..3d1d959f
--- /dev/null
+++ b/quanta/data/dtep/html/t.tag
@@ -0,0 +1,684 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="cellspacing" type="input">
+ <text>Cell spacing</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="cellpadding" type="input">
+ <text>Cell padding</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Background color</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="frame" type="list">
+ <text>Frame</text>
+ <textlocation col="0" row="5" />
+ <items>
+ <item>above</item>
+ <item>below</item>
+ <item>border</item>
+ <item>box</item>
+ <item>hsides</item>
+ <item>LHS</item>
+ <item>RHS</item>
+ <item>void</item>
+ <item>vsides</item>
+ </items>
+ <location col="1" row="5" colspan="2" />
+ <tooltip>Not supported in Netscape 4x</tooltip>
+ </attr>
+
+
+ <attr name="summary"> </attr>
+ <attr name="fr"> </attr>
+ <attr name="rules"> </attr>
+ <attr name="background"> </attr>
+ <attr name="height"> </attr>
+<children>
+<child name="caption" />
+<child name="col" />
+<child name="colgroup" />
+<child name="thead" />
+<child name="tfoot" />
+<child name="tbody" />
+<child name="tr" usage="required" />
+</children>
+
+</tag>
+
+<tag name="tbody" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+
+<tag name="td" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="list">
+ <text>Col span</text>
+ <textlocation col="2" row="0" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Deprecated in HTML 4.0 - not used in IE 5</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rowspan" type="list">
+ <text>Row span</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="0" row="6" colspan="2" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="headers"> </attr>
+ <attr name="abbr"> </attr>
+ <attr name="scope"> </attr>
+ <attr name="axis"> </attr>
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+ <attr name="background"> </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+</tag>
+
+<tag name="textarea" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="4" />
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Columns</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="0" row="4" colspan="2" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="0" row="5" colspan="2" />
+ </attr>
+
+ <attr name="accesskey"> </attr>
+ <attr name="tab"> </attr>
+ <attr name="onfocus"> </attr>
+ <attr name="onblur"> </attr>
+ <attr name="onselect"> </attr>
+ <attr name="onchange"> </attr>
+
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="tfoot" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+<children>
+<child name="tr" />
+</children>
+</tag>
+
+<tag name="th" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="list">
+ <text>Col span</text>
+ <textlocation col="2" row="0" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Deprecated in HTML 4.0 - not used in IE 5</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rowspan" type="list">
+ <text>Row span</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="0" row="6" colspan="2" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+
+ <attr name="headers"> </attr>
+ <attr name="abbr"> </attr>
+ <attr name="scope"> </attr>
+ <attr name="axis"> </attr>
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+<children>
+ <child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+ <child name="p" />
+ <child name="h1" />
+ <child name="h2" />
+ <child name="h3" />
+ <child name="h4" />
+ <child name="h5" />
+ <child name="h6" />
+ <child name="ul" />
+ <child name="ol" />
+ <child name="dir" />
+ <child name="menu" />
+ <child name="pre" />
+ <child name="dl" />
+ <child name="div" />
+ <child name="center" />
+ <child name="noscript" />
+ <child name="noframes" />
+ <child name="blockquote" />
+ <child name="form" />
+ <child name="isindex" />
+ <child name="hr" />
+ <child name="table" />
+ <child name="fieldset" />
+ <child name="address" />
+</children>
+</tag>
+
+<tag name="thead" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+<children>
+<child name="tr" />
+</children>
+</tag>
+
+<tag name="title" hasI18n="1" >
+
+<children>
+<child name="#text" />
+</children>
+</tag>
+
+<tag name="tr" hasScript="1" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>VAlign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>bottom</item>
+ <item>center</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="1" />
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ </attr>
+
+ <attr name="char"> </attr>
+ <attr name="charoff"> </attr>
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+<children>
+<child name="th" />
+<child name="td" usage="required" />
+</children>
+</tag>
+
+<tag name="tt" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/u.tag b/quanta/data/dtep/html/u.tag
new file mode 100644
index 00000000..34778191
--- /dev/null
+++ b/quanta/data/dtep/html/u.tag
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasScript="1" hasCore="1" hasI18n="1" scope="word">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ </items>
+ </attr>
+
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <tooltip>Depricated in HTML 4.0</tooltip>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+<children>
+<child name="li" usage="required" />
+</children>
+</tag>
+
+<tag name="u" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/html/v.tag b/quanta/data/dtep/html/v.tag
new file mode 100644
index 00000000..11ea92a7
--- /dev/null
+++ b/quanta/data/dtep/html/v.tag
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="var" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+ <child name="tt" />
+ <child name="i" />
+ <child name="b" />
+ <child name="u" />
+ <child name="s" />
+ <child name="strike" />
+ <child name="big" />
+ <child name="small" />
+ <child name="em" />
+ <child name="strong" />
+ <child name="dfn" />
+ <child name="code" />
+ <child name="samp" />
+ <child name="kbd" />
+ <child name="var" />
+ <child name="cite" />
+ <child name="abbr" />
+ <child name="acronym" />
+ <child name="a" />
+ <child name="img" />
+ <child name="applet" />
+ <child name="object" />
+ <child name="font" />
+ <child name="basefont" />
+ <child name="br" />
+ <child name="script" />
+ <child name="map" />
+ <child name="q" />
+ <child name="sub" />
+ <child name="sup" />
+ <child name="span" />
+ <child name="bdo" />
+ <child name="iframe" />
+ <child name="input" />
+ <child name="select" />
+ <child name="textarea" />
+ <child name="label" />
+ <child name="button" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/Makefile.am b/quanta/data/dtep/kde-docbook-4.1.2/Makefile.am
new file mode 100644
index 00000000..e9beca64
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.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 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/kde-docbook-4.1.2
+
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/a.tag b/quanta/data/dtep/kde-docbook-4.1.2/a.tag
new file mode 100644
index 00000000..ff358d0a
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/a.tag
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="abbrev" hasCore="1" />
+ <tag name="abstract" hasCore="1" />
+ <tag name="accel" hasCore="1" />
+ <tag name="acronym" hasCore="1" />
+ <tag name="action" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <location row="1" col="0"/>
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="address" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0"/>
+ <location row="1" col="1"/>
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="affiliation" hasCore="1" />
+ <tag name="anchor" hasCore="1" single="1">
+ <attr name="revisionflag" type="list">
+ <text>revisionflag</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>added</item>
+ <item>changed</item>
+ <item>deleted</item>
+ <item>off</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="revision" type="input">
+ <text>revision</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="arch" type="input">
+ <text>arch</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="vendor" type="input">
+ <text>vendor</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="security" type="input">
+ <text>security</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagemnu</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="remap" type="input">
+ <text>remap</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="xreflabel" type="input">
+ <text>xreflabel</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="conformance" type="input">
+ <text>conformance</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="os" type="input">
+ <text>os</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="userlevel" type="input">
+ <text>userlevel</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="id" type="input">
+ <text>id</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ </attr>
+ <attr name="role" type="input">
+ <text>role</text>
+ <textlocation row="12" col="0" />
+ <location row="12" col="1" />
+ </attr>
+ <attr name="condition" type="input">
+ <text>condition</text>
+ <textlocation row="13" col="0" />
+ <location row="13" col="1" />
+ </attr>
+ </tag>
+ <tag name="answer" hasCore="1" />
+ <tag name="appendix" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="application" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>hardware</item>
+ <item>software</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="area" hasCore="1" single="1">
+ <attr name="units" type="list">
+ <text>units</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>calspair</item>
+ <item>linecolumn</item>
+ <item>linecolumnpair</item>
+ <item>linerange</item>
+ <item>other</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="otherunits" type="input">
+ <text>otherunits</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="coords" type="input">
+ <text>coords</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ </tag>
+ <tag name="areaset" hasCore="1">
+ <attr name="units" type="list">
+ <text>units</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>calspair</item>
+ <item>linecolumn</item>
+ <item>linecolumnpair</item>
+ <item>linerange</item>
+ <item>other</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="otherunits" type="input">
+ <text>otherunits</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="coords" type="input">
+ <text>coords</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="areaspec" hasCore="1">
+ <attr name="units" type="list">
+ <text>units</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>calspair</item>
+ <item>linecolumn</item>
+ <item>linecolumnpair</item>
+ <item>linerange</item>
+ <item>other</item>
+ </items>
+ </attr>
+ <attr name="otherunits" type="input">
+ <text>otherunits</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="arg" hasCore="1">
+ <attr name="rep" type="list">
+ <text>rep</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>norepeat</item>
+ <item>repeat</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="choice" type="list">
+ <text>choice</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>opt</item>
+ <item>plain</item>
+ <item>req</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="attribution" hasCore="1" />
+ <tag name="author" hasCore="1" />
+ <tag name="authorgroup" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/b.tag b/quanta/data/dtep/kde-docbook-4.1.2/b.tag
new file mode 100644
index 00000000..33127548
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/b.tag
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="bibliocoverage" hasCore="1">
+ <attr name="otherspatial" type="input">
+ <text>otherspatial</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="spatial" type="list">
+ <text>spatial</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>dcmibox</item>
+ <item>dcmipoint</item>
+ <item>iso3166</item>
+ <item>otherspatial</item>
+ <item>tgn</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ <attr name="temporal" type="input">
+ <text>temporal</text>
+ <textlocation row="2" col="0" />
+ <items>
+ <item>dcmiperiod</item>
+ <item>othertemporal</item>
+ <item>w3c-dtf</item>
+ </items>
+ <location row="2" col="1" />
+ </attr>
+ <attr name="othertemporal" type="input">
+ <text>othertemporal</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="biblioid" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliorelation" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>hasformat</item>
+ <item>haspart</item>
+ <item>hasversion</item>
+ <item>isformatof</item>
+ <item>ispartof</item>
+ <item>isreferencedby</item>
+ <item>isreplacedby</item>
+ <item>isrequiredby</item>
+ <item>isversionof</item>
+ <item>othertype</item>
+ <item>references</item>
+ <item>replaces</item>
+ <item>requires</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="othertype" type="input">
+ <text>othertype</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ </tag>
+ <tag name="bibliosource" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="blockinfo" hasCore="1" />
+ <tag name="blockquote" hasCore="1" />
+ <tag name="book" hasCore="1">
+ <attr name="fpi" type="input">
+ <text>fpi</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="bookinfo" hasCore="1">
+ <attr name="contents" type="input">
+ <text>bookinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/c.tag b/quanta/data/dtep/kde-docbook-4.1.2/c.tag
new file mode 100644
index 00000000..f3c78cf2
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/c.tag
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="callout" hasCore="1">
+ <attr name="arearefs" type="input">
+ <text>arearefs</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="calloutlist" hasCore="1" />
+ <tag name="caption" hasCore="1" />
+ <tag name="caution" hasCore="1" />
+ <tag name="chapter" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="citebiblioid" hasCore="1">
+ <attr name="otherclass" type="input">
+ <text>otherclass</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>doi</item>
+ <item>isbn</item>
+ <item>issn</item>
+ <item>libraryofcongress</item>
+ <item>other</item>
+ <item>pubnumber</item>
+ <item>uri</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="classname" hasCore="1" />
+ <tag name="classsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>class</item>
+ <item>interface</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="classsynopsisinfo" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="cmdsynopsis" hasCore="1">
+ <attr name="sepchar" type="input">
+ <text>sepchar</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="cmdlength" type="input">
+ <text>cmdlength</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="co" hasCore="1" single="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="command" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="computeroutput" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="constant" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>limit</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="constraint" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="constraintdef" hasCore="1" />
+ <tag name="constructorsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="contrib" hasCore="1" />
+ <tag name="copyright" hasCore="1" />
+ <tag name="coref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="corpauthor" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/common.tag b/quanta/data/dtep/kde-docbook-4.1.2/common.tag
new file mode 100644
index 00000000..f99e27b4
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/common.tag
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="arch" type="input">
+ </attr>
+ <attr name="condition" type="input">
+ </attr>
+ <attr name="conformance" type="input">
+ </attr>
+ <attr name="id" type="input">
+ </attr>
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="os" type="input">
+ </attr>
+ <attr name="remap" type="input">
+ </attr>
+ <attr name="role" type="input">
+ </attr>
+ <attr name="revision" type="input">
+ </attr>
+ <attr name="revisionflag" type="input">
+ </attr>
+ <attr name="security" type="input">
+ </attr>
+ <attr name="userlevel" type="input">
+ </attr>
+ <attr name="vendor" type="input">
+ </attr>
+ <attr name="xreflabel" type="input">
+ </attr>
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/d.tag b/quanta/data/dtep/kde-docbook-4.1.2/d.tag
new file mode 100644
index 00000000..9281ef3c
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/d.tag
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="date" hasCore="1" />
+ <tag name="destructorsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/description.rc b/quanta/data/dtep/kde-docbook-4.1.2/description.rc
new file mode 100644
index 00000000..a01139be
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/description.rc
@@ -0,0 +1,23 @@
+[General]
+Name = -//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN
+NickName = KDE Docbook XML 4.1.2
+URL = dtd/kdex.dtd
+DoctypeString = book PUBLIC "-//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN" "dtd/kdex.dtd"
+MimeTypes = text/docbook
+DefaultExtension = docbook
+Groups = Core
+NumOfPages = 1
+CaseSensitive = true
+
+[Toolbars]
+Location = kde-docbook
+Names = kde-docbook-standard, kde-docbook-list, kde-docbook-admonitions, kde-docbook-images, kde-docbook-tables, kde-docbook-uielements, kdexmltools
+
+[Page1]
+Title = Core
+Groups = Core
+
+[Extra rules]
+Single Tag Style = XML
+
+[Parsing rules]
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/e.tag b/quanta/data/dtep/kde-docbook-4.1.2/e.tag
new file mode 100644
index 00000000..571fb779
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/e.tag
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="email" hasCore="1" />
+ <tag name="emphasis" hasCore="1" />
+ <tag name="entry" hasCore="1">
+ <attr name="nameend" type="input">
+ <text>entry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="morerows" type="input">
+ <text>morerows</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="spanname" type="input">
+ <text>spanname</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="namest" type="input">
+ <text>namest</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="colname" type="input">
+ <text>colname</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="rotate" type="input">
+ <text>rotate</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="envar" hasCore="1" />
+ <tag name="epigraph" hasCore="1" />
+ <tag name="equation" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="errorcode" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="errorname" hasCore="1" />
+ <tag name="errortext" hasCore="1" />
+ <tag name="errortype" hasCore="1" />
+ <tag name="example" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="exceptionname" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/f.tag b/quanta/data/dtep/kde-docbook-4.1.2/f.tag
new file mode 100644
index 00000000..b505f317
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/f.tag
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="fieldsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="filename" hasCore="1">
+ <attr name="path" type="input">
+ <text>path</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>devicefile</item>
+ <item>directory</item>
+ <item>extension</item>
+ <item>headerfile</item>
+ <item>libraryfile</item>
+ <item>partition</item>
+ <item>symlink</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="firstname" hasCore="1" />
+ <tag name="firstterm" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="footnote" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="footnoteref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="foreignphrase" hasCore="1" />
+ <tag name="funcdef" hasCore="1" />
+ <tag name="funcparams" hasCore="1" />
+ <tag name="funcprototype" hasCore="1" />
+ <tag name="funcsynopsis" hasCore="1">
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="funcsynopsisinfo" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="function" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="" col="0" />
+ <location row="" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/g.tag b/quanta/data/dtep/kde-docbook-4.1.2/g.tag
new file mode 100644
index 00000000..d295749d
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/g.tag
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="glossary" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossaryinfo" hasCore="1" />
+ <tag name="glossdef" hasCore="1">
+ <attr name="subject" type="input">
+ <text>subject</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossdiv" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossentry" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glosslist" hasCore="1" />
+ <tag name="glosssee" hasCore="1">
+ <attr name="otherterm" type="input">
+ <text>otherterm</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossseealso" hasCore="1">
+ <attr name="otherterm" type="input">
+ <text>otherterm</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="glossterm" hasCore="1">
+ <attr name="baseform" type="input">
+ <text>baseform</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="graphicco" hasCore="1" />
+ <tag name="group" hasCore="1">
+ <attr name="rep" type="list">
+ <text></text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>norepeat</item>
+ <item>repeat</item>
+ </items>
+ </attr>
+ <attr name="choice" type="list">
+ <text></text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>opt</item>
+ <item>plain</item>
+ <item>req</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guibutton" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guiicon" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guilabel" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guimenu" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guimenuitem" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="guisubmenu" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/h.tag b/quanta/data/dtep/kde-docbook-4.1.2/h.tag
new file mode 100644
index 00000000..a68594f2
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/h.tag
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="hardware" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="holder" hasCore="1" />
+ <tag name="html:form" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/i.tag b/quanta/data/dtep/kde-docbook-4.1.2/i.tag
new file mode 100644
index 00000000..1f82c329
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/i.tag
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="imagedata" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="contentwidth" type="input">
+ <text>contentwidth</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ </attr>
+ <attr name="scalefit" type="input">
+ <text>scalefit</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="depth" type="input">
+ <text>depth</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ <attr name="scale" type="input">
+ <text>scale</text>
+ <textlocation row="9" col="0" />
+ <location row="9" col="1" />
+ </attr>
+ <attr name="contentdepth" type="input">
+ <text>contentdepth</text>
+ <textlocation row="10" col="0" />
+ <location row="10" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="11" col="0" />
+ <location row="11" col="1" />
+ <items>
+ <item>center</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="imageobject" hasCore="1" />
+ <tag name="imageobjectco" hasCore="1" />
+ <tag name="important" hasCore="1" />
+ <tag name="index" hasCore="1" />
+ <tag name="indexdiv" hasCore="1" />
+ <tag name="indexentry" hasCore="1" />
+ <tag name="indexterm" hasCore="1">
+ <attr name="significance" type="list">
+ <text>significance</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>normal</item>
+ <item>preferred</item>
+ </items>
+ </attr>
+ <attr name="zone" type="input">
+ <text>zone</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>endofrange</item>
+ <item>singular</item>
+ <item>startofrange</item>
+ </items>
+ </attr>
+ <attr name="scope" type="list">
+ <text>scope</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ <items>
+ <item>all</item>
+ <item>global</item>
+ <item>local</item>
+ </items>
+ </attr>
+ <attr name="startref" type="input">
+ <text>startref</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ </tag>
+ <tag name="informalexample" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="informaltable" hasCore="1">
+ <attr name="tocentry" type="input">
+ <text>tocentry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="shortentry" type="input">
+ <text>shortentry</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="tabstyle" type="input">
+ <text>tabstyle</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="orient" type="list">rowsep
+ <text>orient</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>land</item>
+ <item>port</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="frame" type="list">
+ <text>frame</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ <items>
+ <item>all</item>
+ <item>bottom</item>
+ <item>none</item>
+ <item>sides</item>
+ <item>top</item>
+ <item>topbot</item>
+ </items>
+ </attr>
+ <attr name="pgwide" type="input">
+ <text>pgwide</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ </tag>
+ <tag name="initializer" hasCore="1" />
+ <tag name="inlinemediaobject" hasCore="1" />
+ <tag name="interface" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="itemizedlist" hasCore="1">
+ <attr name="mark" type="input">
+ <text>mark</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="spacing" type="list">
+ <text>spacing</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>compact</item>
+ <item>normal</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/k.tag b/quanta/data/dtep/kde-docbook-4.1.2/k.tag
new file mode 100644
index 00000000..809ee951
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/k.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="keycap" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="" col="0" />
+ <location row="" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="keycode" hasCore="1" />
+ <tag name="keycombo" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="otheraction" type="input">
+ <text>otheraction</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="action" type="list">
+ <text>action</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>click</item>
+ <item>double-click</item>
+ <item>other</item>
+ <item>press</item>
+ <item>seq</item>
+ <item>simul</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="keysym" hasCore="1" />
+ <tag name="keyword" hasCore="1" />
+ <tag name="keywordset" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/l.tag b/quanta/data/dtep/kde-docbook-4.1.2/l.tag
new file mode 100644
index 00000000..b9238e09
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/l.tag
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="label" hasCore="1" />
+ <tag name="legalnotice" hasCore="1" />
+ <tag name="lhs" hasCore="1" />
+ <tag name="lineannotation" hasCore="1" />
+ <tag name="link" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="endterm" type="input">
+ <text>endterm</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="type" type="input">
+ <text>type</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="listitem" hasCore="1">
+ <attr name="override" type="input">
+ <text>override</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="literal" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="literallayout" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>monospaced</item>
+ <item>normal</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/m.tag b/quanta/data/dtep/kde-docbook-4.1.2/m.tag
new file mode 100644
index 00000000..8101a2b2
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/m.tag
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="markup" hasCore="1" />
+ <tag name="mediaobject" hasCore="1" />
+ <tag name="mediaobjectco" hasCore="1" />
+ <tag name="member" hasCore="1" />
+ <tag name="menuchoice" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="methodname" hasCore="1" />
+ <tag name="methodparam" hasCore="1">
+ <attr name="rep" type="list">
+ <text>rep</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>norepeat</item>
+ <item>repeat</item>
+ </items>
+ </attr>
+ <attr name="choice" type="list">
+ <text>choice</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>opt</item>
+ <item>plain</item>
+ <item>req</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="methodsynopsis" hasCore="1">
+ <attr name="language" type="input">
+ <text>language</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="mml:math" hasCore="1" />
+ <tag name="modifier" hasCore="1" />
+ <tag name="mousebutton" hasCore="1">
+ <text>mousebutton</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <attr name="moreinfo" type="list">
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="msgtext" hasCore="1" />
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/n.tag b/quanta/data/dtep/kde-docbook-4.1.2/n.tag
new file mode 100644
index 00000000..aed5b719
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/n.tag
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="nonterminal" hasCore="1">
+ <attr name="def" type="input">
+ <text>def</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="note" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/o.tag b/quanta/data/dtep/kde-docbook-4.1.2/o.tag
new file mode 100644
index 00000000..faca5e8c
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/o.tag
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="ooclass" hasCore="1" />
+ <tag name="ooexception" hasCore="1" />
+ <tag name="oointerface" hasCore="1" />
+ <tag name="option" hasCore="1" />
+ <tag name="optional" hasCore="1" />
+ <tag name="orderedlist" hasCore="1">
+ <attr name="inheritnum" type="list">
+ <text>inheritnum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>ignore</item>
+ <item>inherit</item>
+ </items>
+ </attr>
+ <attr name="spacing" type="list">
+ <text>spacing</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>compact</item>
+ <item>normal</item>
+ </items>
+ </attr>
+ <attr name="continuation" type="list">
+ <text>continuation</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>continues</item>
+ <item>restarts</item>
+ </items>
+ </attr>
+ <attr name="numeration" type="list">
+ <text>numeration</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>arabic</item>
+ <item>loweralpha</item>
+ <item>lowerroman</item>
+ <item>upperalpha</item>
+ <item>upperroman</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="othercredit" hasCore="1" />
+ <tag name="othername" hasCore="1" />
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/p.tag b/quanta/data/dtep/kde-docbook-4.1.2/p.tag
new file mode 100644
index 00000000..8adfba0b
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/p.tag
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="para" hasCore="1" />
+ <tag name="paramdef" hasCore="1" />
+ <tag name="parameter" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>command</item>
+ <item>function</item>
+ <item>option</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="partinfo" hasCore="1" />
+ <tag name="personblurb" hasCore="1" />
+ <tag name="personname" hasCore="1" />
+ <tag name="phrase" hasCore="1" />
+ <tag name="primary" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="primaryie" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="procedure" hasCore="1" />
+ <tag name="production" hasCore="1" />
+ <tag name="productionrecap" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="productionset" hasCore="1" />
+ <tag name="programlisting" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="programlistingco" hasCore="1" />
+ <tag name="prompt" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/q.tag b/quanta/data/dtep/kde-docbook-4.1.2/q.tag
new file mode 100644
index 00000000..7fd5afab
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/q.tag
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="qandaentry" hasCore="1" />
+ <tag name="qandaset" hasCore="1">
+ <attr name="defaultlabel" type="list">
+ <text>defaultlabel</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>number</item>
+ <item>qanda</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="question" hasCore="1" />
+ <tag name="quote" hasCore="1" />
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/r.tag b/quanta/data/dtep/kde-docbook-4.1.2/r.tag
new file mode 100644
index 00000000..5fc2bf51
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/r.tag
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="refclass" hasCore="1" />
+ <tag name="refdescriptor" hasCore="1" />
+ <tag name="refentry" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refentrytitle" hasCore="1" />
+ <tag name="reference" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="refmeta" hasCore="1" />
+ <tag name="refmiscinfo" hasCore="1">
+ <attr name="class" type="input">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refname" hasCore="1" />
+ <tag name="refnamediv" hasCore="1" />
+ <tag name="refpurpose" hasCore="1" />
+ <tag name="refsect1" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsect1info" hasCore="1" />
+ <tag name="refsect2" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsect2info" hasCore="1" />
+ <tag name="refsect3" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsect3info" hasCore="1" />
+ <tag name="refsection" hasCore="1">
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="refsectioninfo" hasCore="1" />
+ <tag name="refsynopsisdiv" hasCore="1" />
+ <tag name="refsynopsisdivinfo" hasCore="1" />
+ <tag name="releaseinfo" hasCore="1" />
+ <tag name="replaceable" hasCore="1">
+ <attr name="class" type="list">
+ <text>class</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>command</item>
+ <item>function</item>
+ <item>option</item>
+ <item>parameter</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="returnvalue" hasCore="1" />
+ <tag name="rhs" hasCore="1" />
+ <tag name="row" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/s.tag b/quanta/data/dtep/kde-docbook-4.1.2/s.tag
new file mode 100644
index 00000000..e24dbc77
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/s.tag
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="sbr" hasCore="1" />
+ <tag name="screen" hasCore="1">
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="screenco" hasCore="1" />
+ <tag name="screeninfo" hasCore="1" />
+ <tag name="screenshot" hasCore="1" />
+ <tag name="secondaryie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect1" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect1info" hasCore="1" />
+ <tag name="sect2" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect2info" hasCore="1" />
+ <tag name="sect3" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect4</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect3info" hasCore="1" />
+ <tag name="sect4" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect5</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect4info" hasCore="1" />
+ <tag name="sect5" hasCore="1">
+ <attr name="renderas" type="list">
+ <text>renderas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>sect1</item>
+ <item>sect2</item>
+ <item>sect3</item>
+ <item>sect4</item>
+ </items>
+ </attr>
+ <attr name="status" type="input">
+ <text>status</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+ <tag name="sect5info" hasCore="1" />
+ <tag name="see" hasCore="1" />
+ <tag name="seealso" hasCore="1" />
+ <tag name="seealsoie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="seeie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="seg" hasCore="1" />
+ <tag name="seglistitem" hasCore="1" />
+ <tag name="segmentedlist" hasCore="1" />
+ <tag name="segtitle" hasCore="1" />
+ <tag name="setindex" hasCore="1" />
+ <tag name="shortcut" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ <attr name="otheraction" type="input">
+ <text>otheraction</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="action" type="list">
+ <text>action</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ <items>
+ <item>click</item>
+ <item>double-click</item>
+ <item>other</item>
+ <item>press</item>
+ <item>seq</item>
+ <item>simul</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="simplelist" hasCore="1">
+ <attr name="columns" type="input">
+ <text>columns</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>horiz</item>
+ <item>inline</item>
+ <item>vert</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="step" hasCore="1">
+ <attr name="performance" type="list">
+ <text>performance</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>optional</item>
+ <item>required</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="structfield" hasCore="1" />
+ <tag name="structname" hasCore="1" />
+ <tag name="subscript" hasCore="1" />
+ <tag name="substeps" hasCore="1">
+ <attr name="performance" type="list">
+ <text>performance</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>optional</item>
+ <item>required</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="superscript" hasCore="1" />
+ <tag name="surname" hasCore="1" />
+ <tag name="svg:svg" hasCore="1" />
+ <tag name="symbol" hasCore="1">
+ <text>symbol</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <attr name="class" type="list">
+ <items>
+ <item>limit</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="synopfragment" hasCore="1" />
+ <tag name="synopfragmentref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="synopsis" hasCore="1">
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>linespecific</item>
+ </items>
+ </attr>
+ <attr name="linenumbering" type="list">
+ <text>linenumbering</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>numbered</item>
+ <item>unnumbered</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/t.tag b/quanta/data/dtep/kde-docbook-4.1.2/t.tag
new file mode 100644
index 00000000..1d3f937d
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/t.tag
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="table" hasCore="1">
+ <attr name="tocentry" type="input">
+ <text>tocentry</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="shortentry" type="input">
+ <text>shortentry</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="tabstyle" type="input">
+ <text>tabstyle</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="orient" type="list">
+ <text>orient</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ <items>
+ <item>land</item>
+ <item>port</item>
+ </items>
+ </attr>
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="frame" type="list">
+ <text>frame</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ <items>
+ <item>all</item>
+ <item>bottom</item>
+ <item>none</item>
+ <item>sides</item>
+ <item>top</item>
+ <item>topbot</item>
+ </items>
+ </attr>
+ <attr name="pgwide" type="input">
+ <text>pgwide</text>
+ <textlocation row="7" col="0" />
+ <location row="7" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="8" col="0" />
+ <location row="8" col="1" />
+ </attr>
+ </tag>
+ <tag name="tbody" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="term" hasCore="1" />
+ <tag name="tertiary" hasCore="1">
+ <attr name="sortas" type="input">
+ <text>sortas</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="tertiaryie" hasCore="1">
+ <attr name="linkends" type="input">
+ <text>linkends</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="textdata" hasCore="1">
+ <attr name="srccredit" type="input">
+ <text>srccredit</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="format" type="list">
+ <text>format</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ <items>
+ <item>BMP</item>
+ <item>CGM-BINARY</item>
+ <item>CGM-CHAR</item>
+ <item>CGM-CLEAR</item>
+ <item>DITROFF</item>
+ <item>DVI</item>
+ <item>EPS</item>
+ <item>EQN</item>
+ <item>FAX</item>
+ <item>GIF</item>
+ <item>GIF87a</item>
+ <item>GIF89a</item>
+ <item>IGES</item>
+ <item>JPEG</item>
+ <item>JPG</item>
+ <item>linespecific</item>
+ <item>PCX</item>
+ <item>PIC</item>
+ <item>PNG</item>
+ <item>PS</item>
+ <item>SGML</item>
+ <item>SVG</item>
+ <item>TBL</item>
+ <item>TEX</item>
+ <item>TIFF</item>
+ <item>WMF</item>
+ <item>WPG</item>
+ </items>
+ </attr>
+ <attr name="entityref" type="input">
+ <text>entityref</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="fileref" type="input">
+ <text>fileref</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="encoding" type="input">
+ <text>encoding</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ </tag>
+ <tag name="textobject" hasCore="1" />
+ <tag name="tfoot" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="tgroup" hasCore="1">
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ <attr name="tgroupstyle" type="input">
+ <text>tgroupstyle</text>
+ <textlocation row="2" col="0" />
+ <location row="2" col="1" />
+ </attr>
+ <attr name="cols" type="input">
+ <text>cols</text>
+ <textlocation row="3" col="0" />
+ <location row="3" col="1" />
+ </attr>
+ <attr name="colsep" type="input">
+ <text>colsep</text>
+ <textlocation row="4" col="0" />
+ <location row="4" col="1" />
+ </attr>
+ <attr name="rowsep" type="input">
+ <text>rowsep</text>
+ <textlocation row="5" col="0" />
+ <location row="5" col="1" />
+ </attr>
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation row="6" col="0" />
+ <location row="6" col="1" />
+ <items>
+ <item>center</item>
+ <item>char</item>
+ <item>justify</item>
+ <item>left</item>
+ <item>right</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="thead" hasCore="1">
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="tip" hasCore="1" />
+ <tag name="title" hasCore="1">
+ <attr name="pagenum" type="input">
+ <text>pagenum</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="token" hasCore="1" />
+ <tag name="trademark" hasCore="1">
+ <attr name="class" type="list">
+ <text>trademark</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>copyright</item>
+ <item>registered</item>
+ <item>service</item>
+ <item>trade</item>
+ </items>
+ </attr>
+ </tag>
+ <tag name="type" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/u.tag b/quanta/data/dtep/kde-docbook-4.1.2/u.tag
new file mode 100644
index 00000000..e377b58a
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/u.tag
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="ulink" hasCore="1">
+ <attr name="url" type="input">
+ <text>url</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="type" type="input">
+ <text>type</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+ <tag name="userinput" hasCore="1">
+ <attr name="moreinfo" type="list">
+ <text>moreinfo</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ <items>
+ <item>none</item>
+ <item>refentry</item>
+ </items>
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/v.tag b/quanta/data/dtep/kde-docbook-4.1.2/v.tag
new file mode 100644
index 00000000..163bbc9a
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/v.tag
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="varargs" hasCore="1" />
+ <tag name="variablelist" hasCore="1">
+ <attr name="termlength" type="input">
+ <text>termlength</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ </tag>
+ <tag name="varlistentry" hasCore="1" />
+ <tag name="varname" hasCore="1" />
+ <tag name="void" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/w.tag b/quanta/data/dtep/kde-docbook-4.1.2/w.tag
new file mode 100644
index 00000000..63384d74
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/w.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="warning" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/x.tag b/quanta/data/dtep/kde-docbook-4.1.2/x.tag
new file mode 100644
index 00000000..3f351e2c
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/x.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="xref" hasCore="1">
+ <attr name="linkend" type="input">
+ <text>linkend</text>
+ <textlocation row="0" col="0" />
+ <location row="0" col="1" />
+ </attr>
+ <attr name="endterm" type="input">
+ <text>endterm</text>
+ <textlocation row="1" col="0" />
+ <location row="1" col="1" />
+ </attr>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.1.2/y.tag b/quanta/data/dtep/kde-docbook-4.1.2/y.tag
new file mode 100644
index 00000000..cf5c47b8
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.1.2/y.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="year" hasCore="1" />
+</TAGS>
diff --git a/quanta/data/dtep/kde-docbook-4.2/Makefile.am b/quanta/data/dtep/kde-docbook-4.2/Makefile.am
new file mode 100644
index 00000000..c33a17f1
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.2/Makefile.am
@@ -0,0 +1,4 @@
+quanta_DATA = common.tag description.rc
+
+quantadir = ${quanta_datadir}/dtep/kde-docbook-4.2
+
diff --git a/quanta/data/dtep/kde-docbook-4.2/common.tag b/quanta/data/dtep/kde-docbook-4.2/common.tag
new file mode 100644
index 00000000..f99e27b4
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.2/common.tag
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="arch" type="input">
+ </attr>
+ <attr name="condition" type="input">
+ </attr>
+ <attr name="conformance" type="input">
+ </attr>
+ <attr name="id" type="input">
+ </attr>
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="os" type="input">
+ </attr>
+ <attr name="remap" type="input">
+ </attr>
+ <attr name="role" type="input">
+ </attr>
+ <attr name="revision" type="input">
+ </attr>
+ <attr name="revisionflag" type="input">
+ </attr>
+ <attr name="security" type="input">
+ </attr>
+ <attr name="userlevel" type="input">
+ </attr>
+ <attr name="vendor" type="input">
+ </attr>
+ <attr name="xreflabel" type="input">
+ </attr>
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/kde-docbook-4.2/description.rc b/quanta/data/dtep/kde-docbook-4.2/description.rc
new file mode 100644
index 00000000..8636b681
--- /dev/null
+++ b/quanta/data/dtep/kde-docbook-4.2/description.rc
@@ -0,0 +1,24 @@
+[General]
+Name = -//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN
+NickName = KDE Docbook XML 4.2
+URL = dtd/kdex.dtd
+DoctypeString = book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd"
+Inherits = -//KDE//DTD DocBook XML V4.1.2-Based Variant V1.0//EN
+MimeTypes = text/docbook
+DefaultExtension = docbook
+Groups = Core
+NumOfPages = 1
+CaseSensitive = true
+
+[Toolbars]
+Location = kde-docbook
+Names = kde-docbook-standard, kde-docbook-list, kde-docbook-admonitions, kde-docbook-images, kde-docbook-tables, kde-docbook-uielements, kdexmltools
+
+[Page1]
+Title = Core
+Groups = Core
+
+[Extra rules]
+Single Tag Style = XML
+
+[Parsing rules]
diff --git a/quanta/data/dtep/php/Makefile.am b/quanta/data/dtep/php/Makefile.am
new file mode 100644
index 00000000..f5115c9e
--- /dev/null
+++ b/quanta/data/dtep/php/Makefile.am
@@ -0,0 +1,144 @@
+dtepphp_DATA = description.rc \
+apache.tag \
+apd.tag \
+array.tag \
+aspell.tag \
+bc.tag \
+bcompiler.tag \
+bzip2.tag \
+calendar.tag \
+ccvs.tag \
+classkit.tag \
+classobj.tag \
+com.tag \
+cpdf.tag \
+crack.tag \
+ctype.tag \
+curl.tag \
+cybercash.tag \
+cybermut.tag \
+cyrus.tag \
+datetime.tag \
+dba.tag \
+dbase.tag \
+dbm.tag \
+dbplus.tag \
+dbx.tag \
+dio.tag \
+dir.tag \
+dom.tag \
+domxml.tag \
+dotnet.tag \
+errorfunc.tag \
+exec.tag \
+exif.tag \
+fam.tag \
+fbsql.tag \
+fdf.tag \
+filepro.tag \
+filesystem.tag \
+fribidi.tag \
+ftp.tag \
+funchand.tag \
+gettext.tag \
+gmp.tag \
+http.tag \
+hw.tag \
+hwapi.tag \
+hyperwave.tag \
+ibase.tag \
+icap.tag \
+iconv.tag \
+id3.tag \
+ifx.tag \
+iisfunc.tag \
+image.tag \
+imap.tag \
+info.tag \
+ingres-ii.tag \
+ircg.tag \
+java.tag \
+ldap.tag \
+lzf.tag \
+mail.tag \
+mailparse.tag \
+math.tag \
+mbstring.tag \
+mcal.tag \
+mcrypt.tag \
+mcve.tag \
+memcache.tag \
+mhash.tag \
+mime_magic.tag \
+ming.tag \
+misc.tag \
+mnogosearch.tag \
+msession.tag \
+msql.tag \
+mssql.tag \
+muscat.tag \
+mysql.tag \
+mysqli.tag \
+ncurses.tag \
+network.tag \
+nis.tag \
+notes.tag \
+nsapi.tag \
+objaggregation.tag \
+oci8.tag \
+odbc.tag \
+openal.tag \
+openssl.tag \
+oracle.tag \
+outcontrol.tag \
+overload.tag \
+ovrimos.tag \
+parsekit.tag \
+pcntl.tag \
+pcre.tag \
+pdf.tag \
+pfpro.tag \
+pgsql.tag \
+posix.tag \
+printer.tag \
+pspell.tag \
+qtdom.tag \
+rar.tag \
+readline.tag \
+recode.tag \
+regex.tag \
+sem.tag \
+sesam.tag \
+session.tag \
+shmop.tag \
+simplexml.tag \
+snmp.tag \
+soap.tag \
+sockets.tag \
+spl.tag \
+sqlite.tag \
+stream.tag \
+strings.tag \
+swf.tag \
+sybase.tag \
+tcpwrap.tag \
+tidy.tag \
+tokenizer.tag \
+uodbc.tag \
+url.tag \
+var.tag \
+vpopmail.tag \
+w32api.tag \
+wddx.tag \
+xattr.tag \
+xdiff.tag \
+xml.tag \
+xmlrpc.tag \
+xsl.tag \
+xslt.tag \
+yaz.tag \
+zip.tag \
+zlib.tag \
+includes.tag
+
+dtepphpdir = ${quanta_datadir}/dtep/php
diff --git a/quanta/data/dtep/php/apache.tag b/quanta/data/dtep/php/apache.tag
new file mode 100644
index 00000000..e14ef3a3
--- /dev/null
+++ b/quanta/data/dtep/php/apache.tag
@@ -0,0 +1,40 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="apache_child_terminate" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ </tag>
+ <tag name="apache_get_modules" type="function" returnType="array" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ </tag>
+ <tag name="apache_get_version" type="function" returnType="string" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ </tag>
+ <tag name="apache_getenv" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="variable" type="string" status="required"></attr>
+ <attr name="walk_to_top" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="apache_lookup_uri" type="function" returnType="object" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="apache_note" type="function" returnType="string" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="note_name" type="string" status="required"></attr>
+ <attr name="note_value" type="string" status="optional"></attr>
+ </tag>
+ <tag name="apache_request_headers" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="apache_response_headers" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="apache_setenv" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="variable" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ <attr name="walk_to_top" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ascii2ebcdic" type="function" returnType="int" version="PHP 3&gt;= 3.0.17">
+ <attr name="ascii_str" type="string" status="required"></attr>
+ </tag>
+ <tag name="ebcdic2ascii" type="function" returnType="int" version="PHP 3&gt;= 3.0.17">
+ <attr name="ebcdic_str" type="string" status="required"></attr>
+ </tag>
+ <tag name="getallheaders" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="virtual" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/apd.tag b/quanta/data/dtep/php/apd.tag
new file mode 100644
index 00000000..d6f997fa
--- /dev/null
+++ b/quanta/data/dtep/php/apd.tag
@@ -0,0 +1,56 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="apd_breakpoint" type="function" returnType="void" version="">
+ <attr name="debug_level" type="int" status="required"></attr>
+ </tag>
+ <tag name="apd_callstack" type="function" returnType="array" version="">
+ </tag>
+ <tag name="apd_clunk" type="function" returnType="void" version="">
+ <attr name="warning" type="string" status="required"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ </tag>
+ <tag name="apd_continue" type="function" returnType="void" version="">
+ <attr name="debug_level" type="int" status="required"></attr>
+ </tag>
+ <tag name="apd_croak" type="function" returnType="void" version="">
+ <attr name="warning" type="string" status="required"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ </tag>
+ <tag name="apd_dump_function_table" type="function" returnType="void" version="">
+ </tag>
+ <tag name="apd_dump_persistent_resources" type="function" returnType="array" version="">
+ </tag>
+ <tag name="apd_dump_regular_resources" type="function" returnType="array" version="">
+ </tag>
+ <tag name="apd_echo" type="function" returnType="void" version="">
+ <attr name="output" type="string" status="required"></attr>
+ </tag>
+ <tag name="apd_get_active_symbols" type="function" returnType="array" version="">
+ <attr name="&lt;/methodparam&gt;" type="" status="required"></attr>
+ </tag>
+ <tag name="apd_set_pprof_trace" type="function" returnType="void" version="">
+ <attr name="dump_directory" type="string" status="optional"></attr>
+ </tag>
+ <tag name="apd_set_session_trace" type="function" returnType="void" version="">
+ <attr name="debug_level" type="int" status="required"></attr>
+ <attr name="dump_directory" type="string" status="optional"></attr>
+ </tag>
+ <tag name="apd_set_session" type="function" returnType="void" version="">
+ <attr name="debug_level" type="int" status="required"></attr>
+ </tag>
+ <tag name="apd_set_socket_session_trace" type="function" returnType="bool" version="">
+ <attr name="(ip_address or unix socket file)" type="string" status="required"></attr>
+ <attr name="socket_type" type="int" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="debug_level" type="int" status="required"></attr>
+ </tag>
+ <tag name="override_function" type="function" returnType="bool" version="">
+ <attr name="function_name" type="string" status="required"></attr>
+ <attr name="function_args" type="string" status="required"></attr>
+ <attr name="function_code" type="string" status="required"></attr>
+ </tag>
+ <tag name="rename_function" type="function" returnType="bool" version="">
+ <attr name="original_name" type="string" status="required"></attr>
+ <attr name="new_name" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/array.tag b/quanta/data/dtep/php/array.tag
new file mode 100644
index 00000000..838ed804
--- /dev/null
+++ b/quanta/data/dtep/php/array.tag
@@ -0,0 +1,319 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="array_change_key_case" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="case" type="int" status="optional"></attr>
+ </tag>
+ <tag name="array_chunk" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="size" type="int" status="required"></attr>
+ <attr name="preserve_keys" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="array_combine" type="function" returnType="array" version="PHP 5">
+ <attr name="keys" type="array" status="required"></attr>
+ <attr name="values" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_count_values" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_diff_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_diff_key" type="function" returnType="array" version="">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_diff_uassoc" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name="..." type="array" status="optional"></attr>
+ <attr name="key_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_diff_ukey" type="function" returnType="array" version="">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="key_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_diff" type="function" returnType="array" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_fill" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="start_index" type="int" status="required"></attr>
+ <attr name="num" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="array_filter" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="callback" type="callback" status="optional"></attr>
+ </tag>
+ <tag name="array_flip" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="trans" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_intersect_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_intersect_key" type="function" returnType="array" version="">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_intersect_uassoc" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="key_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_intersect_ukey" type="function" returnType="array" version="">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name="..." type="array" status="optional"></attr>
+ <attr name="key_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_intersect" type="function" returnType="array" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_key_exists" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="search" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_keys" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="search_value" type="mixed" status="optional"></attr>
+ <attr name="strict" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="array_map" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="callback" type="callback" status="required"></attr>
+ <attr name="arr1" type="array" status="required"></attr>
+ <attr name="..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_merge_recursive" type="function" returnType="array" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name="..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_merge" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="optional"></attr>
+ <attr name="..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_multisort" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="ar1" type="array" status="required"></attr>
+ <attr name="arg" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ <attr name="..." type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_pad" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="pad_size" type="int" status="required"></attr>
+ <attr name="pad_value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="array_pop" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_push" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="array_rand" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="num_req" type="int" status="optional"></attr>
+ </tag>
+ <tag name="array_reduce" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="function" type="callback" status="required"></attr>
+ <attr name="initial" type="int" status="optional"></attr>
+ </tag>
+ <tag name="array_reverse" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="array" type="array" status="required"></attr>
+ <attr name="preserve_keys" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="array_search" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="needle" type="mixed" status="required"></attr>
+ <attr name="haystack" type="array" status="required"></attr>
+ <attr name="strict" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="array_shift" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_slice" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="array" type="array" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="preserve_keys" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="array_splice" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="&amp;input" type="array" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="replacement" type="array" status="optional"></attr>
+ </tag>
+ <tag name="array_sum" type="function" returnType="number" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="array" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_udiff_assoc" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="data_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_udiff_uassoc" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="data_compare_func" type="callback" status="required"></attr>
+ <attr name="key_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_udiff" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="data_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_uintersect_assoc" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="data_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_uintersect_uassoc" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="data_compare_func" type="callback" status="required"></attr>
+ <attr name="key_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_uintersect" type="function" returnType="array" version="PHP 5">
+ <attr name="array1" type="array" status="required"></attr>
+ <attr name="array2" type="array" status="required"></attr>
+ <attr name=" ..." type="array" status="optional"></attr>
+ <attr name="data_compare_func" type="callback" status="required"></attr>
+ </tag>
+ <tag name="array_unique" type="function" returnType="array" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="array" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_unshift" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="array_values" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="input" type="array" status="required"></attr>
+ </tag>
+ <tag name="array_walk_recursive" type="function" returnType="bool" version="PHP 5">
+ <attr name="&amp;input" type="array" status="required"></attr>
+ <attr name="funcname" type="callback" status="required"></attr>
+ <attr name="userdata" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="array_walk" type="function" returnType="bool" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="funcname" type="callback" status="required"></attr>
+ <attr name="userdata" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="array" type="function" returnType="array" version="">
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="arsort" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="sort_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="asort" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="sort_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="compact" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="varname" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="count" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="current" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="each" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="end" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="extract" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="var_array" type="array" status="required"></attr>
+ <attr name="extract_type" type="int" status="optional"></attr>
+ <attr name="prefix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="in_array" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="needle" type="mixed" status="required"></attr>
+ <attr name="haystack" type="array" status="required"></attr>
+ <attr name="strict" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="key" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="krsort" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="sort_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ksort" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="sort_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="list" type="function" returnType="void" version="">
+ <attr name="varname" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="required"></attr>
+ </tag>
+ <tag name="natcasesort" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="natsort" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="next" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="prev" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="range" type="function" returnType="array" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="low" type="number" status="required"></attr>
+ <attr name="high" type="number" status="required"></attr>
+ <attr name="step" type="number" status="optional"></attr>
+ </tag>
+ <tag name="reset" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="rsort" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="sort_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="shuffle" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ </tag>
+ <tag name="sort" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="sort_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="uasort" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="cmp_function" type="callback" status="required"></attr>
+ </tag>
+ <tag name="uksort" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="cmp_function" type="callback" status="required"></attr>
+ </tag>
+ <tag name="usort" type="function" returnType="bool" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="&amp;array" type="array" status="required"></attr>
+ <attr name="cmp_function" type="callback" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/aspell.tag b/quanta/data/dtep/php/aspell.tag
new file mode 100644
index 00000000..dccab588
--- /dev/null
+++ b/quanta/data/dtep/php/aspell.tag
@@ -0,0 +1,19 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="aspell_check_raw" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 &lt;= 4.2.3">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+ <tag name="aspell_check" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 &lt;= 4.2.3">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+ <tag name="aspell_new" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 &lt;= 4.2.3">
+ <attr name="master" type="string" status="required"></attr>
+ <attr name="personal" type="string" status="optional"></attr>
+ </tag>
+ <tag name="aspell_suggest" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 &lt;= 4.2.3">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/bc.tag b/quanta/data/dtep/php/bc.tag
new file mode 100644
index 00000000..2fdb0cd6
--- /dev/null
+++ b/quanta/data/dtep/php/bc.tag
@@ -0,0 +1,50 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="bcadd" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="left_operand" type="string" status="required"></attr>
+ <attr name="right_operand" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bccomp" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="left_operand" type="string" status="required"></attr>
+ <attr name="right_operand" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bcdiv" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="left_operand" type="string" status="required"></attr>
+ <attr name="right_operand" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bcmod" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="left_operand" type="string" status="required"></attr>
+ <attr name="modulus" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcmul" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="left_operand" type="string" status="required"></attr>
+ <attr name="right_operand" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bcpow" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="x" type="string" status="required"></attr>
+ <attr name="y" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bcpowmod" type="function" returnType="string" version="PHP 5">
+ <attr name="x" type="string" status="required"></attr>
+ <attr name="y" type="string" status="required"></attr>
+ <attr name="modulus" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bcscale" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="scale" type="int" status="required"></attr>
+ </tag>
+ <tag name="bcsqrt" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="operand" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bcsub" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="left_operand" type="string" status="required"></attr>
+ <attr name="right_operand" type="string" status="required"></attr>
+ <attr name="scale" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/bcompiler.tag b/quanta/data/dtep/php/bcompiler.tag
new file mode 100644
index 00000000..a0aed7fe
--- /dev/null
+++ b/quanta/data/dtep/php/bcompiler.tag
@@ -0,0 +1,43 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="bcompiler_load_exe" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_load" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_parse_class" type="function" returnType="bool" version="">
+ <attr name="class" type="string" status="required"></attr>
+ <attr name="callback" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_read" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_write_class" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ <attr name="className" type="string" status="required"></attr>
+ <attr name="extends" type="string" status="optional"></attr>
+ </tag>
+ <tag name="bcompiler_write_constant" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ <attr name="constantName" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_write_exe_footer" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ <attr name="startpos" type="int" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_write_footer" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_write_function" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ <attr name="functionName" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_write_functions_from_file" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ <attr name="fileName" type="string" status="required"></attr>
+ </tag>
+ <tag name="bcompiler_write_header" type="function" returnType="bool" version="">
+ <attr name="filehandle" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/bzip2.tag b/quanta/data/dtep/php/bzip2.tag
new file mode 100644
index 00000000..8c00e952
--- /dev/null
+++ b/quanta/data/dtep/php/bzip2.tag
@@ -0,0 +1,40 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="bzclose" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bzcompress" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="source" type="string" status="required"></attr>
+ <attr name="blocksize" type="int" status="optional"></attr>
+ <attr name="workfactor" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bzdecompress" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="source" type="string" status="required"></attr>
+ <attr name="small" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bzerrno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bzerror" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bzerrstr" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bzflush" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ </tag>
+ <tag name="bzopen" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ </tag>
+ <tag name="bzread" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="bzwrite" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="bz" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/calendar.tag b/quanta/data/dtep/php/calendar.tag
new file mode 100644
index 00000000..8953bd5b
--- /dev/null
+++ b/quanta/data/dtep/php/calendar.tag
@@ -0,0 +1,76 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="cal_days_in_month" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="calendar" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="cal_from_jd" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="jd" type="int" status="required"></attr>
+ <attr name="calendar" type="int" status="required"></attr>
+ </tag>
+ <tag name="cal_info" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="calendar" type="int" status="required"></attr>
+ </tag>
+ <tag name="cal_to_jd" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="calendar" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="easter_date" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="year" type="int" status="optional"></attr>
+ </tag>
+ <tag name="easter_days" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="year" type="int" status="optional"></attr>
+ <attr name="method" type="int" status="optional"></attr>
+ </tag>
+ <tag name="frenchtojd" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="gregoriantojd" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="jddayofweek" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="julianday" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="jdmonthname" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="julianday" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="jdtofrench" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="juliandaycount" type="int" status="required"></attr>
+ </tag>
+ <tag name="jdtogregorian" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="julianday" type="int" status="required"></attr>
+ </tag>
+ <tag name="jdtojewish" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="juliandaycount" type="int" status="required"></attr>
+ <attr name="hebrew" type="bool" status="optional"></attr>
+ <attr name="fl" type="int" status="optional"></attr>
+ </tag>
+ <tag name="jdtojulian" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="julianday" type="int" status="required"></attr>
+ </tag>
+ <tag name="jdtounix" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="jday" type="int" status="required"></attr>
+ </tag>
+ <tag name="jewishtojd" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="juliantojd" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="unixtojd" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ccvs.tag b/quanta/data/dtep/php/ccvs.tag
new file mode 100644
index 00000000..6f8e4fb5
--- /dev/null
+++ b/quanta/data/dtep/php/ccvs.tag
@@ -0,0 +1,68 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ccvs_add" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ <attr name="argtype" type="string" status="required"></attr>
+ <attr name="argval" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_auth" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_command" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ <attr name="argval" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_count" type="function" returnType="int" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_delete" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_done" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="sess" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_init" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_lookup" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ <attr name="inum" type="int" status="required"></attr>
+ </tag>
+ <tag name="ccvs_new" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_report" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_return" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_reverse" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_sale" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_status" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_textvalue" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ </tag>
+ <tag name="ccvs_void" type="function" returnType="string" version="4.0.2 - 4.2.3 only">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="invoice" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/classkit.tag b/quanta/data/dtep/php/classkit.tag
new file mode 100644
index 00000000..c326169f
--- /dev/null
+++ b/quanta/data/dtep/php/classkit.tag
@@ -0,0 +1,35 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="classkit_import" type="function" returnType="array" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="classkit_method_add" type="function" returnType="bool" version="">
+ <attr name="classname" type="string" status="required"></attr>
+ <attr name="methodname" type="string" status="required"></attr>
+ <attr name="args" type="string" status="required"></attr>
+ <attr name="code" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="classkit_method_copy" type="function" returnType="bool" version="">
+ <attr name="dClass" type="string" status="required"></attr>
+ <attr name="dMethod" type="string" status="required"></attr>
+ <attr name="sClass" type="string" status="required"></attr>
+ <attr name="sMethod" type="string" status="optional"></attr>
+ </tag>
+ <tag name="classkit_method_redefine" type="function" returnType="bool" version="">
+ <attr name="classname" type="string" status="required"></attr>
+ <attr name="methodname" type="string" status="required"></attr>
+ <attr name="args" type="string" status="required"></attr>
+ <attr name="code" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="classkit_method_remove" type="function" returnType="bool" version="">
+ <attr name="classname" type="string" status="required"></attr>
+ <attr name="methodname" type="string" status="required"></attr>
+ </tag>
+ <tag name="classkit_method_rename" type="function" returnType="bool" version="">
+ <attr name="classname" type="string" status="required"></attr>
+ <attr name="methodname" type="string" status="required"></attr>
+ <attr name="newname" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/classobj.tag b/quanta/data/dtep/php/classobj.tag
new file mode 100644
index 00000000..b7a1de77
--- /dev/null
+++ b/quanta/data/dtep/php/classobj.tag
@@ -0,0 +1,53 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="call_user_method_array" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="method_name" type="string" status="required"></attr>
+ <attr name="&amp;obj" type="object" status="required"></attr>
+ <attr name="paramarr" type="array" status="required"></attr>
+ </tag>
+ <tag name="call_user_method" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="method_name" type="string" status="required"></attr>
+ <attr name="&amp;obj" type="object" status="required"></attr>
+ <attr name="parameter" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="class_exists" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="autoload" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="get_class_methods" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="class_name" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="get_class_vars" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="class_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="get_class" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="obj" type="object" status="required"></attr>
+ </tag>
+ <tag name="get_declared_classes" type="function" returnType="array" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="get_declared_interfaces" type="function" returnType="array" version="PHP 5">
+ </tag>
+ <tag name="get_object_vars" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="obj" type="object" status="required"></attr>
+ </tag>
+ <tag name="get_parent_class" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="obj" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="interface_exists" type="function" returnType="bool" version="">
+ <attr name="interface_name" type="string" status="required"></attr>
+ <attr name="autoload" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="is_a" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_subclass_of" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="method_exists" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="method_name" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/com.tag b/quanta/data/dtep/php/com.tag
new file mode 100644
index 00000000..ba25cc23
--- /dev/null
+++ b/quanta/data/dtep/php/com.tag
@@ -0,0 +1,166 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="COM::COM" type="function" returnType="object" version="">
+ <attr name="module_name" type="string" status="required"></attr>
+ <attr name="server_name" type="mixed" status="optional"></attr>
+ <attr name="codepage" type="int" status="optional"></attr>
+ <attr name="typelib" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DOTNET::DOTNET" type="function" returnType="string" version="">
+ <attr name="assembly name" type="string" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="codepage" type="int" status="optional"></attr>
+ </tag>
+ <tag name="VARIANT::VARIANT" type="function" returnType="object" version="">
+ <attr name="value" type="mixed" status="optional"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ <attr name="codepage" type="int" status="optional"></attr>
+ </tag>
+ <tag name="com_addref" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0">
+ </tag>
+ <tag name="com_create_guid" type="function" returnType="string" version="PHP 5">
+ </tag>
+ <tag name="com_event_sink" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.3, PHP 5">
+ <attr name="comobject" type="object" status="required"></attr>
+ <attr name="sinkobject" type="object" status="required"></attr>
+ <attr name="sinkinterface" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="com_get_active_object" type="function" returnType="object" version="">
+ <attr name="progid" type="string" status="required"></attr>
+ <attr name="code_page" type="int" status="optional"></attr>
+ </tag>
+ <tag name="com_get" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.3, PHP 4 &gt;= 4.0.5">
+ <attr name="com_object" type="resource" status="required"></attr>
+ <attr name="property" type="string" status="required"></attr>
+ </tag>
+ <tag name="com_invoke" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.3">
+ <attr name="com_object" type="resource" status="required"></attr>
+ <attr name="function_name" type="string" status="required"></attr>
+ <attr name="function_parameters" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="com_isenum" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="com_module" type="object" status="required"></attr>
+ </tag>
+ <tag name="com_load_typelib" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="typelib_name" type="string" status="required"></attr>
+ <attr name="case_insensitive" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="com_load" type="function" returnType="resource" version="PHP 3&gt;= 3.0.3">
+ <attr name="module_name" type="string" status="required"></attr>
+ <attr name="server_name" type="string" status="optional"></attr>
+ <attr name="codepage" type="int" status="optional"></attr>
+ </tag>
+ <tag name="com_message_pump" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.3, PHP 5">
+ <attr name="timeoutms" type="int" status="optional"></attr>
+ </tag>
+ <tag name="com_print_typeinfo" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.3, PHP 5">
+ <attr name="comobject" type="object" status="required"></attr>
+ <attr name="dispinterface" type="string" status="optional"></attr>
+ <attr name="wantsink" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="com_release" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0">
+ </tag>
+ <tag name="com_set" type="function" returnType="void" version="PHP 3&gt;= 3.0.3, PHP 4 &gt;= 4.0.5">
+ <attr name="com_object" type="resource" status="required"></attr>
+ <attr name="property" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_abs" type="function" returnType="mixed" version="PHP 5">
+ <attr name="val" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_add" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_and" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_cast" type="function" returnType="object" version="PHP 5">
+ <attr name="variant" type="object" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ </tag>
+ <tag name="variant_cat" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_cmp" type="function" returnType="int" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ <attr name="lcid" type="int" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="variant_date_from_timestamp" type="function" returnType="object" version="PHP 5">
+ <attr name="timestamp" type="int" status="required"></attr>
+ </tag>
+ <tag name="variant_date_to_timestamp" type="function" returnType="int" version="PHP 5">
+ <attr name="variant" type="object" status="required"></attr>
+ </tag>
+ <tag name="variant_div" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_eqv" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_fix" type="function" returnType="mixed" version="PHP 5">
+ <attr name="variant" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_get_type" type="function" returnType="int" version="PHP 5">
+ <attr name="variant" type="object" status="required"></attr>
+ </tag>
+ <tag name="variant_idiv" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_imp" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_int" type="function" returnType="mixed" version="PHP 5">
+ <attr name="variant" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_mod" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_mul" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_neg" type="function" returnType="mixed" version="PHP 5">
+ <attr name="variant" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_not" type="function" returnType="mixed" version="PHP 5">
+ <attr name="variant" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_or" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_pow" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_round" type="function" returnType="mixed" version="PHP 5">
+ <attr name="variant" type="mixed" status="required"></attr>
+ <attr name="decimals" type="int" status="required"></attr>
+ </tag>
+ <tag name="variant_set_type" type="function" returnType="void" version="PHP 5">
+ <attr name="variant" type="object" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ </tag>
+ <tag name="variant_set" type="function" returnType="void" version="PHP 5">
+ <attr name="variant" type="object" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_sub" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="variant_xor" type="function" returnType="mixed" version="PHP 5">
+ <attr name="left" type="mixed" status="required"></attr>
+ <attr name="right" type="mixed" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/cpdf.tag b/quanta/data/dtep/php/cpdf.tag
new file mode 100644
index 00000000..87986076
--- /dev/null
+++ b/quanta/data/dtep/php/cpdf.tag
@@ -0,0 +1,367 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="cpdf_add_annotation" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="llx" type="float" status="required"></attr>
+ <attr name="lly" type="float" status="required"></attr>
+ <attr name="urx" type="float" status="required"></attr>
+ <attr name="ury" type="float" status="required"></attr>
+ <attr name="title" type="string" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_add_outline" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="lastoutline" type="int" status="required"></attr>
+ <attr name="sublevel" type="int" status="required"></attr>
+ <attr name="open" type="int" status="required"></attr>
+ <attr name="pagenr" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_arc" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="radius" type="float" status="required"></attr>
+ <attr name="start" type="float" status="required"></attr>
+ <attr name="end" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_begin_text" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_circle" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="radius" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_clip" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_close" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_closepath_fill_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_closepath_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_closepath" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_continue_text" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_curveto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x1" type="float" status="required"></attr>
+ <attr name="y1" type="float" status="required"></attr>
+ <attr name="x2" type="float" status="required"></attr>
+ <attr name="y2" type="float" status="required"></attr>
+ <attr name="x3" type="float" status="required"></attr>
+ <attr name="y3" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_end_text" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_fill_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_fill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_finalize_page" type="function" returnType="bool" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="page_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_finalize" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_global_set_document_limits" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="maxpages" type="int" status="required"></attr>
+ <attr name="maxfonts" type="int" status="required"></attr>
+ <attr name="maximages" type="int" status="required"></attr>
+ <attr name="maxannotations" type="int" status="required"></attr>
+ <attr name="maxobjects" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_import_jpeg" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="file_name" type="string" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="x-scale" type="float" status="required"></attr>
+ <attr name="y-scale" type="float" status="required"></attr>
+ <attr name="gsave" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_lineto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_moveto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_newpath" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_open" type="function" returnType="int" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="compression" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="doc_limits" type="array" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_output_buffer" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_page_init" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="page_number" type="int" status="required"></attr>
+ <attr name="orientation" type="int" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="unit" type="float" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_place_inline_image" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="image" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="gsave" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_rect" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_restore" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_rlineto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_rmoveto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_rotate_text" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="int" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_rotate" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_save_to_file" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_save" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_scale" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-scale" type="float" status="required"></attr>
+ <attr name="y-scale" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_action_url" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="int" status="required"></attr>
+ <attr name="xll" type="float" status="required"></attr>
+ <attr name="yll" type="float" status="required"></attr>
+ <attr name="xur" type="float" status="required"></attr>
+ <attr name="xur" type="float" status="required"></attr>
+ <attr name="url" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_set_char_spacing" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="space" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_creator" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="creator" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_current_page" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="page_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_font_directories" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="pdfdoc" type="int" status="required"></attr>
+ <attr name="pfmdir" type="string" status="required"></attr>
+ <attr name="pfbdir" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_font_map_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="pdfdoc" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_font" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="font_name" type="string" status="required"></attr>
+ <attr name="size" type="float" status="required"></attr>
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_horiz_scaling" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="scale" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_keywords" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="keywords" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_leading" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="distance" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_page_animation" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="transition" type="int" status="required"></attr>
+ <attr name="duration" type="float" status="required"></attr>
+ <attr name="direction" type="float" status="required"></attr>
+ <attr name="orientation" type="int" status="required"></attr>
+ <attr name="inout" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_subject" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_text_matrix" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="matrix" type="array" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_text_pos" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_set_text_rendering" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="rendermode" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_text_rise" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_title" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="title" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_viewer_preferences" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="int" status="required"></attr>
+ <attr name="preferences" type="array" status="required"></attr>
+ </tag>
+ <tag name="cpdf_set_word_spacing" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="space" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setdash" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="white" type="float" status="required"></attr>
+ <attr name="black" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setflat" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setgray_fill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setgray_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="gray_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setgray" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="gray_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setlinecap" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="value" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setlinejoin" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="value" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setlinewidth" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setmiterlimit" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setrgbcolor_fill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="red_value" type="float" status="required"></attr>
+ <attr name="green_value" type="float" status="required"></attr>
+ <attr name="blue_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setrgbcolor_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="red_value" type="float" status="required"></attr>
+ <attr name="green_value" type="float" status="required"></attr>
+ <attr name="blue_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_setrgbcolor" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="red_value" type="float" status="required"></attr>
+ <attr name="green_value" type="float" status="required"></attr>
+ <attr name="blue_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cpdf_show_xy" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_show" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_stringwidth" type="function" returnType="float" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="cpdf_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="cpdf_text" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="x-coor" type="float" status="optional"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="orientation" type="float" status="optional"></attr>
+ <attr name="alignmode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cpdf_translate" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="pdf_document" type="int" status="required"></attr>
+ <attr name="x-coor" type="float" status="required"></attr>
+ <attr name="y-coor" type="float" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/crack.tag b/quanta/data/dtep/php/crack.tag
new file mode 100644
index 00000000..d4f6fcc3
--- /dev/null
+++ b/quanta/data/dtep/php/crack.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="crack_check" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="dictionary" type="resource" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="crack_closedict" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="dictionary" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="crack_getlastmessage" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="crack_opendict" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5">
+ <attr name="dictionary" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ctype.tag b/quanta/data/dtep/php/ctype.tag
new file mode 100644
index 00000000..596ca173
--- /dev/null
+++ b/quanta/data/dtep/php/ctype.tag
@@ -0,0 +1,36 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ctype_alnum" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_alpha" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_cntrl" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_digit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_graph" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_lower" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_print" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_punct" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_space" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_upper" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ctype_xdigit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/curl.tag b/quanta/data/dtep/php/curl.tag
new file mode 100644
index 00000000..fe02f2b1
--- /dev/null
+++ b/quanta/data/dtep/php/curl.tag
@@ -0,0 +1,60 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="curl_close" type="function" returnType="void" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_copy_handle" type="function" returnType="resource" version="PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_exec" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_getinfo" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ <attr name="opt" type="int" status="optional"></attr>
+ </tag>
+ <tag name="curl_init" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="url" type="string" status="optional"></attr>
+ </tag>
+ <tag name="curl_multi_add_handle" type="function" returnType="int" version="PHP 5">
+ <attr name="mh" type="resource" status="required"></attr>
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_multi_close" type="function" returnType="void" version="PHP 5">
+ <attr name="mh" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_multi_exec" type="function" returnType="int" version="PHP 5">
+ <attr name="mh" type="resource" status="required"></attr>
+ <attr name="&amp;still_running" type="int" status="required"></attr>
+ </tag>
+ <tag name="curl_multi_getcontent" type="function" returnType="string" version="PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_multi_info_read" type="function" returnType="array" version="PHP 5">
+ <attr name="mh" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_multi_init" type="function" returnType="resource" version="PHP 5">
+ </tag>
+ <tag name="curl_multi_remove_handle" type="function" returnType="int" version="PHP 5">
+ <attr name="mh" type="resource" status="required"></attr>
+ <attr name="ch" type="resource" status="required"></attr>
+ </tag>
+ <tag name="curl_multi_select" type="function" returnType="int" version="PHP 5">
+ <attr name="mh" type="resource" status="required"></attr>
+ <attr name="timeout" type="float" status="optional"></attr>
+ </tag>
+ <tag name="curl_setopt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="ch" type="resource" status="required"></attr>
+ <attr name="option" type="integer" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="curl_version" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="version" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/cybercash.tag b/quanta/data/dtep/php/cybercash.tag
new file mode 100644
index 00000000..a8f56b4f
--- /dev/null
+++ b/quanta/data/dtep/php/cybercash.tag
@@ -0,0 +1,19 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="cybercash_base64_decode" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="inbuff" type="string" status="required"></attr>
+ </tag>
+ <tag name="cybercash_base64_encode" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="inbuff" type="string" status="required"></attr>
+ </tag>
+ <tag name="cybercash_decr" type="function" returnType="array" version="PHP 4 &lt;= 4.2.3">
+ <attr name="wmk" type="string" status="required"></attr>
+ <attr name="sk" type="string" status="required"></attr>
+ <attr name="inbuff" type="string" status="required"></attr>
+ </tag>
+ <tag name="cybercash_encr" type="function" returnType="array" version="PHP 4 &lt;= 4.2.3">
+ <attr name="wmk" type="string" status="required"></attr>
+ <attr name="sk" type="string" status="required"></attr>
+ <attr name="inbuff" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/cybermut.tag b/quanta/data/dtep/php/cybermut.tag
new file mode 100644
index 00000000..50678fa4
--- /dev/null
+++ b/quanta/data/dtep/php/cybermut.tag
@@ -0,0 +1,29 @@
+<!DOCTYPE tags>
+<tags> <tag name="cybermut_creerformulairecm" type="function" returnType="string">
+ <attr name="url_CM" type="string" status="optional"></attr>
+ <attr name="version" type="string" status="optional"></attr>
+ <attr name="TPE" type="string" status="optional"></attr>
+ <attr name="montant" type="string" status="optional"></attr>
+ <attr name="ref_commande" type="string" status="optional"></attr>
+ <attr name="texte_libre" type="string" status="optional"></attr>
+ <attr name="url_retour" type="string" status="optional"></attr>
+ <attr name="url_retour_ok" type="string" status="optional"></attr>
+ <attr name="url_retour_err" type="string" status="optional"></attr>
+ <attr name="langue" type="string" status="optional"></attr>
+ <attr name="code_societe" type="string" status="optional"></attr>
+ <attr name="texte_bouton" type="string" status="optional"></attr>
+ </tag>
+ <tag name="cybermut_creerreponsecm" type="function" returnType="string">
+ <attr name="phrase" type="string" status="optional"></attr>
+ </tag>
+ <tag name="cybermut_testmac" type="function" returnType="bool">
+ <attr name="code_MAC" type="string" status="optional"></attr>
+ <attr name="version" type="string" status="optional"></attr>
+ <attr name="TPE" type="string" status="optional"></attr>
+ <attr name="cdate" type="string" status="optional"></attr>
+ <attr name="montant" type="string" status="optional"></attr>
+ <attr name="ref_commande" type="string" status="optional"></attr>
+ <attr name="texte_libre" type="string" status="optional"></attr>
+ <attr name="code-retour" type="string" status="optional"></attr>
+ </tag>
+</tags>
diff --git a/quanta/data/dtep/php/cyrus.tag b/quanta/data/dtep/php/cyrus.tag
new file mode 100644
index 00000000..5ee9d286
--- /dev/null
+++ b/quanta/data/dtep/php/cyrus.tag
@@ -0,0 +1,33 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="cyrus_authenticate" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="mechlist" type="string" status="optional"></attr>
+ <attr name="service" type="string" status="optional"></attr>
+ <attr name="user" type="string" status="optional"></attr>
+ <attr name="minssf" type="int" status="optional"></attr>
+ <attr name="maxssf" type="int" status="optional"></attr>
+ <attr name="authname" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="cyrus_bind" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="callbacks" type="array" status="required"></attr>
+ </tag>
+ <tag name="cyrus_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="cyrus_connect" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0">
+ <attr name="host" type="string" status="optional"></attr>
+ <attr name="port" type="string" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="cyrus_query" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="cyrus_unbind" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="trigger_name" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/datetime.tag b/quanta/data/dtep/php/datetime.tag
new file mode 100644
index 00000000..3638b95a
--- /dev/null
+++ b/quanta/data/dtep/php/datetime.tag
@@ -0,0 +1,84 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="checkdate" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="date_sunrise" type="function" returnType="mixed" version="PHP 5">
+ <attr name="timestamp" type="int" status="required"></attr>
+ <attr name="format" type="int" status="optional"></attr>
+ <attr name="latitude" type="float" status="optional"></attr>
+ <attr name="longitude" type="float" status="optional"></attr>
+ <attr name="zenith" type="float" status="optional"></attr>
+ <attr name="gmt_offset" type="float" status="optional"></attr>
+ </tag>
+ <tag name="date_sunset" type="function" returnType="mixed" version="PHP 5">
+ <attr name="timestamp" type="int" status="required"></attr>
+ <attr name="format" type="int" status="optional"></attr>
+ <attr name="latitude" type="float" status="optional"></attr>
+ <attr name="longitude" type="float" status="optional"></attr>
+ <attr name="zenith" type="float" status="optional"></attr>
+ <attr name="gmt_offset" type="float" status="optional"></attr>
+ </tag>
+ <tag name="date" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+ <tag name="getdate" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gettimeofday" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ </tag>
+ <tag name="gmdate" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmmktime" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hour" type="int" status="optional"></attr>
+ <attr name="minute" type="int" status="optional"></attr>
+ <attr name="second" type="int" status="optional"></attr>
+ <attr name="month" type="int" status="optional"></attr>
+ <attr name="day" type="int" status="optional"></attr>
+ <attr name="year" type="int" status="optional"></attr>
+ <attr name="is_dst" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmstrftime" type="function" returnType="string" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+ <tag name="idate" type="function" returnType="int" version="PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+ <tag name="localtime" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="timestamp" type="int" status="optional"></attr>
+ <attr name="is_associative" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="microtime" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="get_as_float" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="mktime" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hour" type="int" status="optional"></attr>
+ <attr name="minute" type="int" status="optional"></attr>
+ <attr name="second" type="int" status="optional"></attr>
+ <attr name="month" type="int" status="optional"></attr>
+ <attr name="day" type="int" status="optional"></attr>
+ <attr name="year" type="int" status="optional"></attr>
+ <attr name="is_dst" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strftime" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="timestamp" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strptime" type="function" returnType="array" version="">
+ <attr name="timestamp" type="string" status="required"></attr>
+ <attr name="format" type="string" status="required"></attr>
+ </tag>
+ <tag name="strtotime" type="function" returnType="int" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="time" type="string" status="required"></attr>
+ <attr name="now" type="int" status="optional"></attr>
+ </tag>
+ <tag name="time" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dba.tag b/quanta/data/dtep/php/dba.tag
new file mode 100644
index 00000000..04efd953
--- /dev/null
+++ b/quanta/data/dtep/php/dba.tag
@@ -0,0 +1,60 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dba_close" type="function" returnType="void" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_delete" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_exists" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_fetch" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_firstkey" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_handlers" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="full_info" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="dba_insert" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_key_split" type="function" returnType="mixed" version="PHP 5">
+ <attr name="key" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="dba_list" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="dba_nextkey" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_open" type="function" returnType="resource" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="handler" type="string" status="required"></attr>
+ <attr name="..." type="" status="optional"></attr>
+ </tag>
+ <tag name="dba_optimize" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_popen" type="function" returnType="resource" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="handler" type="string" status="required"></attr>
+ <attr name="..." type="" status="optional"></attr>
+ </tag>
+ <tag name="dba_replace" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dba_sync" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dbase.tag b/quanta/data/dtep/php/dbase.tag
new file mode 100644
index 00000000..fc1f43da
--- /dev/null
+++ b/quanta/data/dtep/php/dbase.tag
@@ -0,0 +1,47 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dbase_add_record" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ <attr name="record" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbase_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_create" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="fields" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbase_delete_record" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ <attr name="record" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_get_header_info" type="function" returnType="array" version="PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_get_record_with_names" type="function" returnType="array" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ <attr name="record" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_get_record" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ <attr name="record" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_numfields" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_numrecords" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_open" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_pack" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbase_replace_record" type="function" returnType="bool" version="PHP 3&gt;= 3.0.11, PHP 4 , PHP 5">
+ <attr name="dbase_identifier" type="int" status="required"></attr>
+ <attr name="record" type="array" status="required"></attr>
+ <attr name="dbase_record_number" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dbm.tag b/quanta/data/dtep/php/dbm.tag
new file mode 100644
index 00000000..50c9011e
--- /dev/null
+++ b/quanta/data/dtep/php/dbm.tag
@@ -0,0 +1,41 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dblist" type="function" returnType="string" version="PHP 3, PHP 4 ">
+ </tag>
+ <tag name="dbmclose" type="function" returnType="bool" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbmdelete" type="function" returnType="bool" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbmexists" type="function" returnType="bool" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbmfetch" type="function" returnType="string" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbmfirstkey" type="function" returnType="string" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbminsert" type="function" returnType="int" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbmnextkey" type="function" returnType="string" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbmopen" type="function" returnType="resource" version="PHP 3, PHP 4 ">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="flags" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbmreplace" type="function" returnType="int" version="PHP 3, PHP 4 ">
+ <attr name="dbm_identifier" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dbplus.tag b/quanta/data/dtep/php/dbplus.tag
new file mode 100644
index 00000000..03f3009f
--- /dev/null
+++ b/quanta/data/dtep/php/dbplus.tag
@@ -0,0 +1,181 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dbplus_add" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_aql" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="server" type="string" status="optional"></attr>
+ <attr name="dbpath" type="string" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_chdir" type="function" returnType="string" version="4.1.0 - 4.2.3 only">
+ <attr name="newdir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_close" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_curr" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="&amp;tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_errcode" type="function" returnType="string" version="4.1.0 - 4.2.3 only">
+ <attr name="errno" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_errno" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ </tag>
+ <tag name="dbplus_find" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="constraints" type="array" status="required"></attr>
+ <attr name="tuple" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="dbplus_first" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="&amp;tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_flush" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_freealllocks" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ </tag>
+ <tag name="dbplus_freelock" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="tname" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_freerlocks" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_getlock" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="tname" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_getunique" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="uniqueid" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbplus_info" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="&amp;result" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_last" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="&amp;tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_lockrel" type="function" returnType="int" version="">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_next" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="&amp;tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_open" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_prev" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="&amp;tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_rchperm" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="mask" type="int" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="group" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_rcreate" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="domlist" type="mixed" status="required"></attr>
+ <attr name="overwrite" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_rcrtexact" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="overwrite" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_rcrtlike" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="overwrite" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_resolve" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_restorepos" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="tuple" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_rkeys" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="domlist" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="dbplus_ropen" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_rquery" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="dbpath" type="string" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_rrename" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_rsecindex" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="domlist" type="mixed" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbplus_runlink" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_rzap" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_savepos" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_setindex" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="idx_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_setindexbynumber" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="idx_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="dbplus_sql" type="function" returnType="resource" version="4.1.0 - 4.2.3 only">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="server" type="string" status="optional"></attr>
+ <attr name="dbpath" type="string" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_tcl" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="sid" type="int" status="required"></attr>
+ <attr name="script" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbplus_tremove" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="tuple" type="array" status="required"></attr>
+ <attr name="&amp;current" type="array" status="optional"></attr>
+ </tag>
+ <tag name="dbplus_undo" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_undoprepare" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_unlockrel" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_unselect" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_update" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ <attr name="old" type="array" status="required"></attr>
+ <attr name="new" type="array" status="required"></attr>
+ </tag>
+ <tag name="dbplus_xlockrel" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dbplus_xunlockrel" type="function" returnType="int" version="4.1.0 - 4.2.3 only">
+ <attr name="relation" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dbx.tag b/quanta/data/dtep/php/dbx.tag
new file mode 100644
index 00000000..ecca4ebd
--- /dev/null
+++ b/quanta/data/dtep/php/dbx.tag
@@ -0,0 +1,39 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dbx_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="object" status="required"></attr>
+ </tag>
+ <tag name="dbx_compare" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="row_a" type="array" status="required"></attr>
+ <attr name="row_b" type="array" status="required"></attr>
+ <attr name="column_key" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dbx_connect" type="function" returnType="object" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="module" type="mixed" status="required"></attr>
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="persistent" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dbx_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="object" status="required"></attr>
+ </tag>
+ <tag name="dbx_escape_string" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="object" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="dbx_fetch_row" type="function" returnType="object" version="PHP 5">
+ <attr name="result_identifier" type="object" status="required"></attr>
+ </tag>
+ <tag name="dbx_query" type="function" returnType="object" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="object" status="required"></attr>
+ <attr name="sql_statement" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dbx_sort" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ <attr name="user_compare_function" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/description.rc b/quanta/data/dtep/php/description.rc
new file mode 100644
index 00000000..7fd2b37b
--- /dev/null
+++ b/quanta/data/dtep/php/description.rc
@@ -0,0 +1,78 @@
+[General]
+Name = PHP
+MimeTypes = application/x-php
+DefaultExtension = php
+NumOfPages = 0
+CaseSensitive = true
+Family = 2
+Documentation = PHP
+
+[Extra tags]
+List = apache_lookup_uri
+DefaultAttrType = string
+apache_lookup_uri = filename
+
+[Extra rules]
+StructGroupsCount = 5
+TagAutoCompleteAfter = @
+VariableGroupIndex = 2
+FunctionGroupIndex = 3
+ClassGroupIndex = 4
+ObjectGroupIndex = 5
+MemberAutoCompleteAfter = (?:\.|->)$
+
+[Parsing rules]
+AreaBorders = <? ?>, <* *>, <% %>
+Tags = script(language)
+Comments = // EOL, /* */, # EOL
+StructKeywords = for,foreach,if,else,elseif,while,do,switch,declare,function,class
+LocalScopeKeywords=function,class
+StructBeginStr = {
+StructEndStr = }
+StructRx = \\{|\\}
+MayContain = php
+
+[StructGroup_1]
+Name = Inclusions
+No_Name = No Inclusions
+Icon = attach
+DefinitionRx = ((?:include|require)(?:_once)?(?:\\s+(?:\$\w+\\s*)?|\\s*\((?:\\s+|\\s*\$\w+\\s*)\)\\s*);)
+DefinitionRx_Minimal = true
+HasFileName = true
+ParseFile = true
+New_FileNameRx_Not_Used = (?:include|require)(?:_once)?(\\s+(?:\$\w+\\s*)?|\\s*\((?:\\s+|\\s*\$\w+\\s*)\)\\s*);
+FileNameRx = (?:^include|^require|^include_once|^require_once|\(|\)|\"|\'|;$)
+
+[StructGroup_2]
+Name = Variables
+No_Name = No Variables
+Icon = abs
+DefinitionRx = \$+([a-zA-Z0-9_\x7f-\xff]*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
+UsageRx = \$+([a-zA-Z0-9_\x7f-\xff]*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)
+AutoCompleteAfter = \$+[a-zA-Z0-9_\x7f-\xff]*$
+AppendToTags = true
+ParentGroup = Classes
+
+[StructGroup_3]
+Name = Functions
+No_Name = No Functions
+Icon = mini-modules
+DefinitionRx = \bfunction[\\s]+&?([0-9a-zA-Z_\x7f-\xff]*[\\s]*(?:\(.*\)){0,1})
+AppendToTags = true
+ParentGroup = Classes
+
+[StructGroup_4]
+Name = Classes
+No_Name = No Classes
+Icon = classnew
+DefinitionRx = \\sclass[\\s]+([0-9a-zA-Z_\x7f-\xff]*)[\\s]*
+UsageRx = \B\$+([a-zA-Z0-9_\x7f-\xff]*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)$
+AutoCompleteAfter = \bnew[\\s]+$
+RemoveFromAutoCompleteWord = \bnew[\\s]*
+
+[StructGroup_5]
+Name = Objects
+No_Name = No Objects
+Icon = classnew
+DefinitionRx =\$+([a-zA-Z0-9_\x7f-\xff]*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\\s]*=[\\s]*new[\\s]*[a-zA-Z0-9_\x7f-\xff]*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*[\\s]*[;\(]
+TypeRx = [\\s]*new[\\s]*([a-zA-Z0-9_\x7f-\xff]*[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)[\\s]*
diff --git a/quanta/data/dtep/php/dio.tag b/quanta/data/dtep/php/dio.tag
new file mode 100644
index 00000000..205e2586
--- /dev/null
+++ b/quanta/data/dtep/php/dio.tag
@@ -0,0 +1,41 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dio_close" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dio_fcntl" type="function" returnType="mixed" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ <attr name="cmd" type="int" status="required"></attr>
+ <attr name="args" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="dio_open" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dio_read" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ <attr name="n" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dio_seek" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ <attr name="pos" type="int" status="required"></attr>
+ <attr name="whence" type="int" status="optional"></attr>
+ </tag>
+ <tag name="dio_stat" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ </tag>
+ <tag name="dio_tcsetattr" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ <attr name="options" type="array" status="required"></attr>
+ </tag>
+ <tag name="dio_truncate" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="dio_write" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fd" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="len" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dir.tag b/quanta/data/dtep/php/dir.tag
new file mode 100644
index 00000000..3dc8758f
--- /dev/null
+++ b/quanta/data/dtep/php/dir.tag
@@ -0,0 +1,30 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="chdir" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="chroot" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="read" type="function" returnType="string" version="4.0.2 - 4.0.6 only">
+ </tag>
+ <tag name="closedir" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dir_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="getcwd" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="opendir" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="readdir" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dir_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="rewinddir" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dir_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="scandir" type="function" returnType="array" version="PHP 5">
+ <attr name="directory" type="string" status="required"></attr>
+ <attr name="sorting_order" type="int" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dom.tag b/quanta/data/dtep/php/dom.tag
new file mode 100644
index 00000000..a9cf9dce
--- /dev/null
+++ b/quanta/data/dtep/php/dom.tag
@@ -0,0 +1,245 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="DOMAttr->isId" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DOMCharacterData->appendData" type="function" returnType="void" version="">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMCharacterData->deleteData" type="function" returnType="void" version="">
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="count" type="int" status="required"></attr>
+ </tag>
+ <tag name="DOMCharacterData->insertData" type="function" returnType="void" version="">
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMCharacterData->replaceData" type="function" returnType="void" version="">
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="count" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMCharacterData->substringData" type="function" returnType="string" version="">
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="count" type="int" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createAttribute" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createAttributeNS" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="qualifiedName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createCDATASection" type="function" returnType="object" version="">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createComment" type="function" returnType="object" version="">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createDocumentFragment" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DOMDocument->createElement" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DomDocument->createElementNS" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="qualifiedName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createEntityReference" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->createProcessingInstruction" type="function" returnType="object" version="">
+ <attr name="target" type="string" status="required"></attr>
+ <attr name="data" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DOMDocument->createTextNode" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->getElementById" type="function" returnType="object" version="">
+ <attr name="elementId" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->getElementsByTagName" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->getElementsByTagNameNS" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->importNode" type="function" returnType="object" version="">
+ <attr name="importedNode" type="object" status="required"></attr>
+ <attr name="deep" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="DOMDocument->load" type="function" returnType="mixed" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->loadHTML" type="function" returnType="mixed" version="">
+ <attr name="source" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->loadHTMLFile" type="function" returnType="mixed" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->loadXML" type="function" returnType="mixed" version="">
+ <attr name="source" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->normalize" type="function" returnType="void" version="">
+ </tag>
+ <tag name="DOMDocument->relaxNGValidate" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->relaxNGValidateSource" type="function" returnType="bool" version="">
+ <attr name="source" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->save" type="function" returnType="int" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->saveHTML" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DOMDocument->saveHTMLFile" type="function" returnType="string" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->saveXML" type="function" returnType="string" version="">
+ <attr name="node" type="object" status="optional"></attr>
+ </tag>
+ <tag name="DOMDocument->schemaValidate" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->schemaValidateSource" type="function" returnType="bool" version="">
+ <attr name="source" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMDocument->validate" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DOMDocument->xinclude" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DOMElement->getAttribute" type="function" returnType="string" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->getAttributeNode" type="function" returnType="object" version="">
+ <attr name="name" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->getAttributeNodeNS" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->getAttributeNS" type="function" returnType="string" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->getElementsByTagName" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->getElementsByTagNameNS" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->hasAttribute" type="function" returnType="bool" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->hasAttributeNS" type="function" returnType="bool" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->removeAttribute" type="function" returnType="bool" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->removeAttributeNode" type="function" returnType="bool" version="">
+ <attr name="oldnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->removeAttributeNS" type="function" returnType="bool" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->setAttribute" type="function" returnType="bool" version="">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->setAttributeNode" type="function" returnType="bool" version="">
+ <attr name="attr" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->setAttributeNodeNS" type="function" returnType="bool" version="">
+ <attr name="attr" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMElement->setAttributeNS" type="function" returnType="void" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="qualifiedName" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMImplementation->createDocument" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="optional"></attr>
+ <attr name="qualifiedName" type="string" status="optional"></attr>
+ <attr name="doctype" type="object" status="optional"></attr>
+ </tag>
+ <tag name="DOMImplementation->createDocumentType" type="function" returnType="object" version="">
+ <attr name="qualifiedName" type="string" status="optional"></attr>
+ <attr name="publicId" type="string" status="optional"></attr>
+ <attr name="systemId" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DOMImplementation->hasFeature" type="function" returnType="bool" version="">
+ <attr name="feature" type="string" status="required"></attr>
+ <attr name="version" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMNamedNodeMap->getNamedItem" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMNamedNodeMap->getNamedItemNS" type="function" returnType="object" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ <attr name="localName" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMNamedNodeMap->item" type="function" returnType="object" version="">
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->appendChild" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->cloneNode" type="function" returnType="object" version="">
+ <attr name="deep" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="DOMNode->hasAttributes" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DOMNode->hasChildNodes" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DOMNode->insertBefore" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ <attr name="refnode" type="object" status="optional"></attr>
+ </tag>
+ <tag name="DOMNode->isSameNode" type="function" returnType="bool" version="">
+ <attr name="node" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->isSupported" type="function" returnType="bool" version="">
+ <attr name="feature" type="string" status="required"></attr>
+ <attr name="version" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->lookupNamespaceURI" type="function" returnType="string" version="">
+ <attr name="prefix" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->lookupPrefix" type="function" returnType="string" version="">
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->normalize" type="function" returnType="void" version="">
+ </tag>
+ <tag name="DOMNode->removeChild" type="function" returnType="object" version="">
+ <attr name="oldchild" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMNode->replaceChild" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ <attr name="oldnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DOMNodelist->item" type="function" returnType="object" version="">
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="DOMText->isWhitespaceInElementContent" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DOMText->splitText" type="function" returnType="object" version="">
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="DOMXPath->query" type="function" returnType="object" version="">
+ <attr name="expression" type="string" status="required"></attr>
+ <attr name="contextnode" type="object" status="optional"></attr>
+ </tag>
+ <tag name="DOMXPath->registerNamespace" type="function" returnType="bool" version="">
+ <attr name="prefix" type="string" status="required"></attr>
+ <attr name="namespaceURI" type="string" status="required"></attr>
+ </tag>
+ <tag name="dom_import_simplexml" type="function" returnType="object" version="PHP 5">
+ <attr name="node" type="object" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/domxml.tag b/quanta/data/dtep/php/domxml.tag
new file mode 100644
index 00000000..03c2e310
--- /dev/null
+++ b/quanta/data/dtep/php/domxml.tag
@@ -0,0 +1,230 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="DomAttribute->name" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomAttribute->specified" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomAttribute->value" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="DomDocument->add_root" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_attribute" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_cdata_section" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_comment" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_element_ns" type="function" returnType="object" version="">
+ <attr name="uri" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="prefix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DomDocument->create_element" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_entity_reference" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_processing_instruction" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->create_text_node" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->doctype" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomDocument->document_element" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomDocument->dump_file" type="function" returnType="string" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="compressionmode" type="bool" status="optional"></attr>
+ <attr name="format" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="DomDocument->dump_mem" type="function" returnType="string" version="">
+ <attr name="format" type="bool" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DomDocument->get_element_by_id" type="function" returnType="object" version="">
+ <attr name="id" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->get_elements_by_tagname" type="function" returnType="array" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomDocument->html_dump_mem" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomDocument->xinclude" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DomDocumentType->entities" type="function" returnType="array" version="">
+ </tag>
+ <tag name="DomDocumentType->internal_subset" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomDocumentType->name" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomDocumentType->notations" type="function" returnType="array" version="">
+ </tag>
+ <tag name="DomDocumentType->public_id" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomDocumentType->system_id" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomElement->get_attribute_node" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomElement->get_attribute" type="function" returnType="string" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomElement->get_elements_by_tagname" type="function" returnType="array" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomElement->has_attribute" type="function" returnType="bool" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomElement->remove_attribute" type="function" returnType="bool" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomElement->set_attribute_node" type="function" returnType="bool" version="">
+ <attr name="attr" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomElement->set_attribute" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomElement->tagname" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomNode->add_namespace" type="function" returnType="bool" version="">
+ <attr name="uri" type="string" status="required"></attr>
+ <attr name="prefix" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomNode->append_child" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomNode->append_sibling" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomNode->attributes" type="function" returnType="array" version="">
+ </tag>
+ <tag name="DomNode->child_nodes" type="function" returnType="array" version="">
+ </tag>
+ <tag name="DomNode->clone_node" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->dump_node" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomNode->first_child" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->get_content" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomNode->has_attributes" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomNode->has_child_nodes" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomNode->insert_before" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ <attr name="refnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomNode->is_blank_node" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomNode->last_child" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->next_sibling" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->node_name" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomNode->node_type" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DomNode->node_value" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomNode->owner_document" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->parent_node" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->prefix" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomNode->previous_sibling" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomNode->remove_child" type="function" returnType="object" version="">
+ <attr name="oldchild" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomNode->replace_child" type="function" returnType="object" version="">
+ <attr name="oldnode" type="object" status="required"></attr>
+ <attr name="newnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomNode->replace_node" type="function" returnType="object" version="">
+ <attr name="newnode" type="object" status="required"></attr>
+ </tag>
+ <tag name="DomNode->set_content" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomNode->set_name" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DomNode->set_namespace" type="function" returnType="void" version="">
+ <attr name="uri" type="string" status="required"></attr>
+ <attr name="prefix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="DomNode->unlink_node" type="function" returnType="object" version="">
+ </tag>
+ <tag name="DomProcessingInstruction->data" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomProcessingInstruction->target" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DomXsltStylesheet->process" type="function" returnType="object" version="">
+ <attr name="DomDocument" type="object" status="required"></attr>
+ <attr name="xslt_parameters" type="array" status="optional"></attr>
+ <attr name="param_is_xpath" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="DomXsltStylesheet->result_dump_file" type="function" returnType="string" version="">
+ <attr name="DomDocument" type="object" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="DomXsltStylesheet->result_dump_mem" type="function" returnType="string" version="">
+ <attr name="DomDocument" type="object" status="required"></attr>
+ </tag>
+ <tag name="domxml_new_doc" type="function" returnType="object" version="PHP 4 &gt;= 4.2.1">
+ <attr name="version" type="string" status="required"></attr>
+ </tag>
+ <tag name="domxml_open_file" type="function" returnType="object" version="PHP 4 &gt;= 4.2.1">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="&amp;error" type="array" status="optional"></attr>
+ </tag>
+ <tag name="domxml_open_mem" type="function" returnType="object" version="PHP 4 &gt;= 4.2.1">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="&amp;error" type="array" status="optional"></attr>
+ </tag>
+ <tag name="domxml_version" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0">
+ </tag>
+ <tag name="domxml_xmltree" type="function" returnType="object" version="PHP 4 &gt;= 4.2.1">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="domxml_xslt_stylesheet_doc" type="function" returnType="object" version="PHP 4 &gt;= 4.2.0">
+ <attr name="DocDocument Object" type="object" status="required"></attr>
+ </tag>
+ <tag name="domxml_xslt_stylesheet_file" type="function" returnType="object" version="PHP 4 &gt;= 4.2.0">
+ <attr name="xsl file" type="string" status="required"></attr>
+ </tag>
+ <tag name="domxml_xslt_stylesheet" type="function" returnType="object" version="PHP 4 &gt;= 4.2.0">
+ <attr name="xsl document" type="string" status="required"></attr>
+ </tag>
+ <tag name="xpath_eval_expression" type="function" returnType="object" version="PHP 4 &gt;= 4.0.4">
+ <attr name="xpath_context" type="object" status="required"></attr>
+ <attr name="expression" type="string" status="required"></attr>
+ </tag>
+ <tag name="xpath_eval" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4">
+ <attr name="xpath context" type="object" status="required"></attr>
+ <attr name="xpath expression" type="string" status="required"></attr>
+ <attr name="contextnode" type="object" status="optional"></attr>
+ </tag>
+ <tag name="xpath_new_context" type="function" returnType="object" version="PHP 4 &gt;= 4.0.4">
+ <attr name="dom document" type="object" status="required"></attr>
+ </tag>
+ <tag name="xptr_eval" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4">
+ <attr name="xpath_context" type="object" status="optional"></attr>
+ <attr name="eval_str" type="string" status="required"></attr>
+ </tag>
+ <tag name="xptr_new_context" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4">
+ <attr name="doc_handle" type="object" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/dotnet.tag b/quanta/data/dtep/php/dotnet.tag
new file mode 100644
index 00000000..fab4f75c
--- /dev/null
+++ b/quanta/data/dtep/php/dotnet.tag
@@ -0,0 +1,8 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="dotnet_load" type="function" returnType="int" version="">
+ <attr name="assembly_name" type="string" status="required"></attr>
+ <attr name="datatype_name" type="string" status="optional"></attr>
+ <attr name="codepage" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/errorfunc.tag b/quanta/data/dtep/php/errorfunc.tag
new file mode 100644
index 00000000..890d26ec
--- /dev/null
+++ b/quanta/data/dtep/php/errorfunc.tag
@@ -0,0 +1,31 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="debug_backtrace" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="debug_print_backtrace" type="function" returnType="void" version="PHP 5">
+ </tag>
+ <tag name="error_log" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="message_type" type="int" status="optional"></attr>
+ <attr name="destination" type="string" status="optional"></attr>
+ <attr name="extra_headers" type="string" status="optional"></attr>
+ </tag>
+ <tag name="error_reporting" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="level" type="int" status="optional"></attr>
+ </tag>
+ <tag name="restore_error_handler" type="function" returnType="void" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ </tag>
+ <tag name="restore_exception_handler" type="function" returnType="void" version="PHP 5">
+ </tag>
+ <tag name="set_error_handler" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="error_handler" type="callback" status="required"></attr>
+ <attr name="error_types" type="int" status="optional"></attr>
+ </tag>
+ <tag name="set_exception_handler" type="function" returnType="string" version="PHP 5">
+ <attr name="exception_handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="trigger_error" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="error_msg" type="string" status="required"></attr>
+ <attr name="error_type" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/exec.tag b/quanta/data/dtep/php/exec.tag
new file mode 100644
index 00000000..2cc2a769
--- /dev/null
+++ b/quanta/data/dtep/php/exec.tag
@@ -0,0 +1,46 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="escapeshellarg" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="arg" type="string" status="required"></attr>
+ </tag>
+ <tag name="escapeshellcmd" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="command" type="string" status="required"></attr>
+ </tag>
+ <tag name="exec" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="command" type="string" status="required"></attr>
+ <attr name="&amp;output" type="array" status="optional"></attr>
+ <attr name="&amp;return_var" type="int" status="optional"></attr>
+ </tag>
+ <tag name="passthru" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="command" type="string" status="required"></attr>
+ <attr name="&amp;return_var" type="int" status="optional"></attr>
+ </tag>
+ <tag name="proc_close" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="process" type="resource" status="required"></attr>
+ </tag>
+ <tag name="proc_get_status" type="function" returnType="array" version="PHP 5">
+ <attr name="process" type="resource" status="required"></attr>
+ </tag>
+ <tag name="proc_nice" type="function" returnType="bool" version="PHP 5">
+ <attr name="increment" type="int" status="required"></attr>
+ </tag>
+ <tag name="proc_open" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="cmd" type="string" status="required"></attr>
+ <attr name="descriptorspec" type="array" status="required"></attr>
+ <attr name="&amp;pipes" type="array" status="required"></attr>
+ <attr name="cwd" type="string" status="optional"></attr>
+ <attr name="env" type="array" status="optional"></attr>
+ <attr name="other_options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="proc_terminate" type="function" returnType="int" version="PHP 5">
+ <attr name="process" type="resource" status="required"></attr>
+ <attr name="signal" type="int" status="optional"></attr>
+ </tag>
+ <tag name="shell_exec" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="cmd" type="string" status="required"></attr>
+ </tag>
+ <tag name="system" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="command" type="string" status="required"></attr>
+ <attr name="&amp;return_var" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/exif.tag b/quanta/data/dtep/php/exif.tag
new file mode 100644
index 00000000..feb9f76f
--- /dev/null
+++ b/quanta/data/dtep/php/exif.tag
@@ -0,0 +1,21 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="exif_imagetype" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="exif_read_data" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="sections" type="string" status="optional"></attr>
+ <attr name="arrays" type="bool" status="optional"></attr>
+ <attr name="thumbnail" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="exif_tagname" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="index" type="string" status="required"></attr>
+ </tag>
+ <tag name="exif_thumbnail" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="width" type="int" status="optional"></attr>
+ <attr name="height" type="int" status="optional"></attr>
+ <attr name="imagetype" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/fam.tag b/quanta/data/dtep/php/fam.tag
new file mode 100644
index 00000000..e976c9e5
--- /dev/null
+++ b/quanta/data/dtep/php/fam.tag
@@ -0,0 +1,41 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="fam_cancel_monitor" type="function" returnType="bool" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ <attr name="fam_monitor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fam_close" type="function" returnType="void" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fam_monitor_collection" type="function" returnType="resource" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ <attr name="dirname" type="string" status="required"></attr>
+ <attr name="depth" type="int" status="required"></attr>
+ <attr name="mask" type="string" status="required"></attr>
+ </tag>
+ <tag name="fam_monitor_directory" type="function" returnType="resource" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ <attr name="dirname" type="string" status="required"></attr>
+ </tag>
+ <tag name="fam_monitor_file" type="function" returnType="resource" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fam_next_event" type="function" returnType="array" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fam_open" type="function" returnType="resource" version="PHP 5">
+ <attr name="appname" type="string"></attr>
+ </tag>
+ <tag name="fam_pending" type="function" returnType="bool" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fam_resume_monitor" type="function" returnType="bool" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ <attr name="fam_monitor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fam_suspend_monitor" type="function" returnType="bool" version="PHP 5">
+ <attr name="fam" type="resource" status="required"></attr>
+ <attr name="fam_monitor" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/fbsql.tag b/quanta/data/dtep/php/fbsql.tag
new file mode 100644
index 00000000..b61bd3fb
--- /dev/null
+++ b/quanta/data/dtep/php/fbsql.tag
@@ -0,0 +1,224 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="fbsql_affected_rows" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_autocommit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="OnOff" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_blob_size" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="blob_handle" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_change_user" type="function" returnType="resource" version="">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="database" type="string" status="optional"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_clob_size" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="clob_handle" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_commit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_connect" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="hostname" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_create_blob" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="blob_data" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_create_clob" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="clob_data" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_create_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_data_seek" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="fbsql_database_password" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="database_password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_database" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="database" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_db_query" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_db_status" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_drop_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_fetch_array" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_fetch_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_fetch_field" type="function" returnType="object" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_fetch_lengths" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_fetch_object" type="function" returnType="object" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_fetch_row" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_field_flags" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_field_len" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_field_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_index" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_field_seek" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_field_table" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_field_type" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_free_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_get_autostart_info" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_hostname" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="host_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_insert_id" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_list_dbs" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_list_fields" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_list_tables" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_next_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_num_fields" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_num_rows" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fbsql_password" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_pconnect" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="hostname" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_query" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_read_blob" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="blob_handle" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_read_clob" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="clob_handle" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_result" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="optional"></attr>
+ <attr name="field" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_rollback" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_select_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database_name" type="string" status="optional"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_set_lob_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="database_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="fbsql_set_password" type="function" returnType="bool" version="PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="old_password" type="string" status="required"></attr>
+ </tag>
+ <tag name="fbsql_set_transaction" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="Locking" type="int" status="required"></attr>
+ <attr name="Isolation" type="int" status="required"></attr>
+ </tag>
+ <tag name="fbsql_start_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_stop_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_tablename" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="i" type="int" status="required"></attr>
+ </tag>
+ <tag name="fbsql_username" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fbsql_warnings" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="OnOff" type="bool" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/fdf.tag b/quanta/data/dtep/php/fdf.tag
new file mode 100644
index 00000000..49c56c03
--- /dev/null
+++ b/quanta/data/dtep/php/fdf.tag
@@ -0,0 +1,157 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="fdf_add_doc_javascript" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdfdoc" type="resource" status="required"></attr>
+ <attr name="script_name" type="string" status="required"></attr>
+ <attr name="script_code" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_add_template" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="fdfdoc" type="resource" status="required"></attr>
+ <attr name="newpage" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="template" type="string" status="required"></attr>
+ <attr name="rename" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_close" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fdf_create" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ </tag>
+ <tag name="fdf_enum_values" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdfdoc" type="resource" status="required"></attr>
+ <attr name="function" type="callback" status="required"></attr>
+ <attr name="userdata" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="fdf_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="fdf_error" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="error_code" type="int"></attr>
+ </tag>
+ <tag name="fdf_get_ap" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="field" type="string" status="required"></attr>
+ <attr name="face" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_attachment" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="savepath" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_encoding" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_file" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_flags" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdfdoc" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="whichflags" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_opt" type="function" returnType="mixed" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdfdof" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="element" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_status" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_value" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="which" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_get_version" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource"></attr>
+ </tag>
+ <tag name="fdf_header" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="fdf_next_field_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fdf_open_string" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_data" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_open" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_remove_item" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdfdoc" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="item" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_save_string" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fdf_save" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_ap" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="field_name" type="string" status="required"></attr>
+ <attr name="face" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="page_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_encoding" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_file" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="url" type="string" status="required"></attr>
+ <attr name="target_frame" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_flags" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="whichFlags" type="int" status="required"></attr>
+ <attr name="newFlags" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_javascript_action" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="trigger" type="int" status="required"></attr>
+ <attr name="script" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_on_import_javascript" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdfdoc" type="resource" status="required"></attr>
+ <attr name="script" type="string" status="required"></attr>
+ <attr name="before_data_import" type="bool" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_opt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="element" type="int" status="required"></attr>
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_status" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="status" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_submit_form_action" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="trigger" type="int" status="required"></attr>
+ <attr name="script" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_target_frame" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="frame_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_value" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="fieldname" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ <attr name="isName" type="int" status="required"></attr>
+ </tag>
+ <tag name="fdf_set_version" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="fdf_document" type="resource" status="required"></attr>
+ <attr name="version" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/filepro.tag b/quanta/data/dtep/php/filepro.tag
new file mode 100644
index 00000000..96bf11cc
--- /dev/null
+++ b/quanta/data/dtep/php/filepro.tag
@@ -0,0 +1,23 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="filepro_fieldcount" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="filepro_fieldname" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="filepro_fieldtype" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="filepro_fieldwidth" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="filepro_retrieve" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="row_number" type="int" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="filepro_rowcount" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="filepro" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/filesystem.tag b/quanta/data/dtep/php/filesystem.tag
new file mode 100644
index 00000000..8b75719f
--- /dev/null
+++ b/quanta/data/dtep/php/filesystem.tag
@@ -0,0 +1,272 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="basename" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="suffix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="chgrp" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="group" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="chmod" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="chown" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="user" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="clearstatcache" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="copy" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="source" type="string" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ </tag>
+ <tag name="delete" type="function" returnType="void" version="">
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="dirname" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="disk_free_space" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="disk_total_space" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="fclose" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="feof" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fflush" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fgetc" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fgetcsv" type="function" returnType="array" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ <attr name="enclosure" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fgets" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fgetss" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="allowable_tags" type="string" status="optional"></attr>
+ </tag>
+ <tag name="file_exists" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="file_get_contents" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="file_put_contents" type="function" returnType="int" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="file" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="use_include_path" type="int" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fileatime" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="filectime" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="filegroup" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fileinode" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="filemtime" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fileowner" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="fileperms" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="filesize" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="filetype" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="flock" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="operation" type="int" status="required"></attr>
+ <attr name="&amp;wouldblock" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fnmatch" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fopen" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ <attr name="zcontext" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="fpassthru" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="fputcsv" type="function" returnType="int" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="fields" type="array" status="required"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ <attr name="enclosure" type="string" status="optional"></attr>
+ </tag>
+ <tag name="fread" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ </tag>
+ <tag name="fscanf" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="&amp;..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="fseek" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="whence" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fstat" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ftell" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ftruncate" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="size" type="int" status="required"></attr>
+ </tag>
+ <tag name="fwrite" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="glob" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="is_dir" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_executable" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_file" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_link" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_readable" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_uploaded_file" type="function" returnType="bool" version="PHP 3&gt;= 3.0.17, PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="is_writable" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="link" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="target" type="string" status="required"></attr>
+ <attr name="link" type="string" status="required"></attr>
+ </tag>
+ <tag name="linkinfo" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="lstat" type="function" returnType="array" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="mkdir" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="pathname" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="recursive" type="bool" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="move_uploaded_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="destination" type="string" status="required"></attr>
+ </tag>
+ <tag name="parse_ini_file" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="process_sections" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="pathinfo" type="function" returnType="array" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pclose" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="popen" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="command" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ </tag>
+ <tag name="readfile" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="readlink" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="realpath" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="rename" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="oldname" type="string" status="required"></attr>
+ <attr name="newname" type="string" status="required"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="rewind" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="rmdir" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dirname" type="string" status="required"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="stat" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="symlink" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="target" type="string" status="required"></attr>
+ <attr name="link" type="string" status="required"></attr>
+ </tag>
+ <tag name="tempnam" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dir" type="string" status="required"></attr>
+ <attr name="prefix" type="string" status="required"></attr>
+ </tag>
+ <tag name="tmpfile" type="function" returnType="resource" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ </tag>
+ <tag name="touch" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="time" type="int" status="optional"></attr>
+ <attr name="atime" type="int" status="optional"></attr>
+ </tag>
+ <tag name="umask" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="mask" type="int" status="optional"></attr>
+ </tag>
+ <tag name="unlink" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/fribidi.tag b/quanta/data/dtep/php/fribidi.tag
new file mode 100644
index 00000000..f5cb0e1a
--- /dev/null
+++ b/quanta/data/dtep/php/fribidi.tag
@@ -0,0 +1,8 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="fribidi_log2vis" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="direction" type="string" status="required"></attr>
+ <attr name="charset" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ftp.tag b/quanta/data/dtep/php/ftp.tag
new file mode 100644
index 00000000..f7f3b405
--- /dev/null
+++ b/quanta/data/dtep/php/ftp.tag
@@ -0,0 +1,162 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ftp_alloc" type="function" returnType="bool" version="PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="filesize" type="int" status="required"></attr>
+ <attr name="&amp;result" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ftp_cdup" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ftp_chdir" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_chmod" type="function" returnType="int" version="PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ftp_connect" type="function" returnType="resource" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_delete" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_exec" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="command" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_fget" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="resumepos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_fput" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="startpos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_get_option" type="function" returnType="mixed" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ </tag>
+ <tag name="ftp_get" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="local_file" type="string" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="resumepos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_login" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_mdtm" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_mkdir" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_nb_continue" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ftp_nb_fget" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="resumepos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_nb_fput" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="startpos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_nb_get" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="local_file" type="string" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="resumepos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_nb_put" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="local_file" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="startpos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_nlist" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_pasv" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="pasv" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ftp_put" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ <attr name="local_file" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="startpos" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_pwd" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ftp_raw" type="function" returnType="array" version="PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="command" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_rawlist" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ <attr name="recursive" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ftp_rename" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="from" type="string" status="required"></attr>
+ <attr name="to" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_rmdir" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_set_option" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ftp_site" type="function" returnType="bool" version="PHP 3&gt;= 3.0.15, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="cmd" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_size" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ <attr name="remote_file" type="string" status="required"></attr>
+ </tag>
+ <tag name="ftp_ssl_connect" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ftp_systype" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="ftp_stream" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/funchand.tag b/quanta/data/dtep/php/funchand.tag
new file mode 100644
index 00000000..8fe7fd96
--- /dev/null
+++ b/quanta/data/dtep/php/funchand.tag
@@ -0,0 +1,41 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="call_user_func_array" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="function" type="callback" status="required"></attr>
+ <attr name="param_arr" type="array" status="required"></attr>
+ </tag>
+ <tag name="call_user_func" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="function" type="callback" status="required"></attr>
+ <attr name="parameter" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="create_function" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="args" type="string" status="required"></attr>
+ <attr name="code" type="string" status="required"></attr>
+ </tag>
+ <tag name="func_get_arg" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="arg_num" type="int" status="required"></attr>
+ </tag>
+ <tag name="func_get_args" type="function" returnType="array" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="func_num_args" type="function" returnType="int" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="function_exists" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="function_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="get_defined_functions" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ </tag>
+ <tag name="register_shutdown_function" type="function" returnType="void" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="function" type="callback" status="required"></attr>
+ <attr name="parameter" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="register_tick_function" type="function" returnType="void" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="function" type="callback" status="required"></attr>
+ <attr name="arg" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="unregister_tick_function" type="function" returnType="void" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="function_name" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/gettext.tag b/quanta/data/dtep/php/gettext.tag
new file mode 100644
index 00000000..240a4f12
--- /dev/null
+++ b/quanta/data/dtep/php/gettext.tag
@@ -0,0 +1,44 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="bind_textdomain_codeset" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="codeset" type="string" status="required"></attr>
+ </tag>
+ <tag name="bindtextdomain" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="dcgettext" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="category" type="int" status="required"></attr>
+ </tag>
+ <tag name="dcngettext" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="msgid1" type="string" status="required"></attr>
+ <attr name="msgid2" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ <attr name="category" type="int" status="required"></attr>
+ </tag>
+ <tag name="dgettext" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ </tag>
+ <tag name="dngettext" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="msgid1" type="string" status="required"></attr>
+ <attr name="msgid2" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="gettext" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="message" type="string" status="required"></attr>
+ </tag>
+ <tag name="ngettext" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="msgid1" type="string" status="required"></attr>
+ <attr name="msgid2" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="textdomain" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="text_domain" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/gmp.tag b/quanta/data/dtep/php/gmp.tag
new file mode 100644
index 00000000..49b5b905
--- /dev/null
+++ b/quanta/data/dtep/php/gmp.tag
@@ -0,0 +1,149 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="gmp_abs" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_add" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_and" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_clrbit" type="function" returnType="void" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="&amp;a" type="resource" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="gmp_cmp" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_com" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_div_q" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ <attr name="round" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmp_div_qr" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="n" type="resource" status="required"></attr>
+ <attr name="d" type="resource" status="required"></attr>
+ <attr name="round" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmp_div_r" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="n" type="resource" status="required"></attr>
+ <attr name="d" type="resource" status="required"></attr>
+ <attr name="round" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmp_divexact" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="n" type="resource" status="required"></attr>
+ <attr name="d" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_fact" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="int" status="required"></attr>
+ </tag>
+ <tag name="gmp_gcd" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_gcdext" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_hamdist" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_init" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="number" type="mixed" status="required"></attr>
+ <attr name="base" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmp_intval" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="gmpnumber" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_invert" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_jacobi" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="p" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_legendre" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="p" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_mod" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="n" type="resource" status="required"></attr>
+ <attr name="d" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_mul" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_neg" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_or" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_perfect_square" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_popcount" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_pow" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="base" type="resource" status="required"></attr>
+ <attr name="exp" type="int" status="required"></attr>
+ </tag>
+ <tag name="gmp_powm" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="base" type="resource" status="required"></attr>
+ <attr name="exp" type="resource" status="required"></attr>
+ <attr name="mod" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_prob_prime" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="reps" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmp_random" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="limiter" type="int" status="required"></attr>
+ </tag>
+ <tag name="gmp_scan0" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ </tag>
+ <tag name="gmp_scan1" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ </tag>
+ <tag name="gmp_setbit" type="function" returnType="void" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="&amp;a" type="resource" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="set_clear" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="gmp_sign" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_sqrt" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_sqrtrem" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_strval" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="gmpnumber" type="resource" status="required"></attr>
+ <attr name="base" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gmp_sub" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gmp_xor" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="a" type="resource" status="required"></attr>
+ <attr name="b" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/http.tag b/quanta/data/dtep/php/http.tag
new file mode 100644
index 00000000..ab12f29c
--- /dev/null
+++ b/quanta/data/dtep/php/http.tag
@@ -0,0 +1,30 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="header" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="replace" type="bool" status="optional"></attr>
+ <attr name="http_response_code" type="int" status="optional"></attr>
+ </tag>
+ <tag name="headers_list" type="function" returnType="array" version="PHP 5">
+ </tag>
+ <tag name="headers_sent" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="&amp;file" type="string" status="optional"></attr>
+ <attr name="&amp;line" type="int" status="optional"></attr>
+ </tag>
+ <tag name="setcookie" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="optional"></attr>
+ <attr name="expire" type="int" status="optional"></attr>
+ <attr name="path" type="string" status="optional"></attr>
+ <attr name="domain" type="string" status="optional"></attr>
+ <attr name="secure" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="setrawcookie" type="function" returnType="bool" version="PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="optional"></attr>
+ <attr name="expire" type="int" status="optional"></attr>
+ <attr name="path" type="string" status="optional"></attr>
+ <attr name="domain" type="string" status="optional"></attr>
+ <attr name="secure" type="bool" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/hw.tag b/quanta/data/dtep/php/hw.tag
new file mode 100644
index 00000000..806ed4f6
--- /dev/null
+++ b/quanta/data/dtep/php/hw.tag
@@ -0,0 +1,271 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="hw_array2objrec" type="function" returnType="string" version="PHP 3&gt;= 3.0.4, PHP 4 ">
+ <attr name="object_array" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_changeobject" type="function" returnType="void" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="attributes" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_children" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_childrenobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_close" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_connect" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_connection_info" type="function" returnType="void" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_cp" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_id_array" type="array" status="required"></attr>
+ <attr name="destination_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_deleteobject" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_to_delete" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_docbyanchor" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="anchorID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_docbyanchorobj" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="anchorID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_document_attributes" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_document_bodytag" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ <attr name="prefix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_document_content" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_document_setcontent" type="function" returnType="string" version="PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_document_size" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_dummy" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ <attr name="id" type="int" status="required"></attr>
+ <attr name="msgid" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_edittext" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_error" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_errormsg" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_free_document" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getanchors" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getanchorsobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getandlock" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getchildcoll" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getchildcollobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getchilddoccoll" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getchilddoccollobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getobject" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="mixed" status="required"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_getobjectbyquery" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="max_hits" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getobjectbyquerycoll" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="max_hits" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getobjectbyquerycollobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="max_hits" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getobjectbyqueryobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="max_hits" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getparents" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getparentsobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getrellink" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ <attr name="rootid" type="int" status="required"></attr>
+ <attr name="sourceid" type="int" status="required"></attr>
+ <attr name="destid" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getremote" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_getremotechildren" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_record" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_getsrcbydestobj" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_gettext" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ <attr name="rootID/prefix" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="hw_getusername" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_identify" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_incollections" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_id_array" type="array" status="required"></attr>
+ <attr name="collection_id_array" type="array" status="required"></attr>
+ <attr name="return_collections" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_info" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_inscoll" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ <attr name="object_array" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_insdoc" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="parentID" type="int" status="required"></attr>
+ <attr name="object_record" type="string" status="required"></attr>
+ <attr name="text" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_insertanchors" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4">
+ <attr name="hwdoc" type="int" status="required"></attr>
+ <attr name="anchorecs" type="array" status="required"></attr>
+ <attr name="dest" type="array" status="required"></attr>
+ <attr name="urlprefixes" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_insertdocument" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="parent_id" type="int" status="required"></attr>
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_insertobject" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_rec" type="string" status="required"></attr>
+ <attr name="parameter" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_mapid" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="server_id" type="int" status="required"></attr>
+ <attr name="object_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_modifyobject" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_to_change" type="int" status="required"></attr>
+ <attr name="remove" type="array" status="required"></attr>
+ <attr name="add" type="array" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_mv" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="object_id_array" type="array" status="required"></attr>
+ <attr name="source_id" type="int" status="required"></attr>
+ <attr name="destination_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_new_document" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="object_record" type="string" status="required"></attr>
+ <attr name="document_data" type="string" status="required"></attr>
+ <attr name="document_size" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_objrec2array" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="object_record" type="string" status="required"></attr>
+ <attr name="format" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_output_document" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="hw_document" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_pconnect" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_pipedocument" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ <attr name="url_prefixes" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_root" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="&lt;/methodparam&gt;" type="" status="required"></attr>
+ </tag>
+ <tag name="hw_setlinkroot" type="function" returnType="void" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ <attr name="rootid" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_stat" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="link" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_unlock" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="objectID" type="int" status="required"></attr>
+ </tag>
+ <tag name="hw_who" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 ">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/hwapi.tag b/quanta/data/dtep/php/hwapi.tag
new file mode 100644
index 00000000..09744277
--- /dev/null
+++ b/quanta/data/dtep/php/hwapi.tag
@@ -0,0 +1,158 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="hw_api_attribute->key" type="function" returnType="string" version="">
+ </tag>
+ <tag name="hw_api_attribute->langdepvalue" type="function" returnType="string" version="">
+ <attr name="language" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_api_attribute->value" type="function" returnType="string" version="">
+ </tag>
+ <tag name="hw_api_attribute->values" type="function" returnType="array" version="">
+ </tag>
+ <tag name="hw_api_attribute" type="function" returnType="object" version="">
+ <attr name="name" type="string" status="optional"></attr>
+ <attr name="value" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_api->checkin" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->checkout" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->children" type="function" returnType="array" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_content->mimetype" type="function" returnType="string" version="">
+ </tag>
+ <tag name="hw_api_content->read" type="function" returnType="string" version="">
+ <attr name="buffer" type="string" status="required"></attr>
+ <attr name="len" type="integer" status="required"></attr>
+ </tag>
+ <tag name="hw_api->content" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->copy" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->dbstat" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->dcstat" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->dstanchors" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->dstofsrcanchors" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_error->count" type="function" returnType="int" version="">
+ </tag>
+ <tag name="hw_api_error->reason" type="function" returnType="object" version="">
+ </tag>
+ <tag name="hw_api->find" type="function" returnType="array" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->ftstat" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hwapi_hgcsp" type="function" returnType="object" version="">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_api->hwstat" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->identify" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->info" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->insert" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->insertanchor" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->insertcollection" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->insertdocument" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->link" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->lock" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->move" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_content" type="function" returnType="object" version="">
+ <attr name="content" type="string" status="required"></attr>
+ <attr name="mimetype" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->assign" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->attreditable" type="function" returnType="bool" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->count" type="function" returnType="int" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->insert" type="function" returnType="bool" version="">
+ <attr name="attribute" type="object" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->remove" type="function" returnType="bool" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->title" type="function" returnType="string" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_object->value" type="function" returnType="string" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="hw_api->object" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->objectbyanchor" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->parents" type="function" returnType="array" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api_reason->description" type="function" returnType="string" version="">
+ </tag>
+ <tag name="hw_api_reason->type" type="function" returnType="object" version="">
+ </tag>
+ <tag name="hw_api->remove" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->replace" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->setcommitedversion" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->srcanchors" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->srcsofdst" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->unlock" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->user" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+ <tag name="hw_api->userlist" type="function" returnType="object" version="">
+ <attr name="parameter" type="array" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/hyperwave.tag b/quanta/data/dtep/php/hyperwave.tag
new file mode 100644
index 00000000..af08d010
--- /dev/null
+++ b/quanta/data/dtep/php/hyperwave.tag
@@ -0,0 +1,268 @@
+<!DOCTYPE tags>
+<tags> <tag name="hw_array2objrec" type="function" returnType="strin">
+ <attr name="object_array" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_changeobject" type="function" returnType="void">
+ <attr name="link" type="int" status="optional"></attr>
+ <attr name="objid" type="int" status="optional"></attr>
+ <attr name="attributes" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_children" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_childrenobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_close" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_connect" type="function" returnType="int">
+ <attr name="host" type="string" status="optional"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_connection_info" type="function" returnType="void">
+ <attr name="link" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_cp" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object_id_array" type="array" status="optional"></attr>
+ <attr name="destination id" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_deleteobject" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object_to_delete" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_docbyanchor" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="anchorID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_docbyanchorobj" type="function" returnType="string">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="anchorID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_document_attributes" type="function" returnType="string">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_document_bodytag" type="function" returnType="string">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_document_content" type="function" returnType="string">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_document_setcontent" type="function" returnType="string">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ <attr name="content" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_document_size" type="function" returnType="int">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_dummy" type="function" returnType="string">
+ <attr name="link" type="int" status="optional"></attr>
+ <attr name="id" type="int" status="optional"></attr>
+ <attr name="msgid" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_edittext" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_error" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_errormsg" type="function" returnType="string">
+ <attr name="connection" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_free_document" type="function" returnType="int">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getanchors" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getanchorsobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getandlock" type="function" returnType="string">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getchildcoll" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getchildcollobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getchilddoccoll" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getchilddoccollobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getobject" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int|array" status="optional"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_getobjectbyquery" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ <attr name="max_hits" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getobjectbyquerycoll" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ <attr name="max_hits" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getobjectbyquerycollobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ <attr name="max_hits" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getobjectbyqueryobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ <attr name="max_hits" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getparents" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getparentsobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getrellink" type="function" returnType="string">
+ <attr name="link" type="int" status="optional"></attr>
+ <attr name="rootid" type="int" status="optional"></attr>
+ <attr name="sourceid" type="int" status="optional"></attr>
+ <attr name="destid" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getremote" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_getremotechildren" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object record" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_getsrcbydestobj" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_gettext" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ <attr name="rootID/prefix" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="hw_getusername" type="function" returnType="string">
+ <attr name="connection" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_identify" type="function" returnType="int">
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_incollections" type="function" returnType="array">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object_id_array" type="array" status="optional"></attr>
+ <attr name="collection_id_array" type="array" status="optional"></attr>
+ <attr name="return_collections" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_info" type="function" returnType="string">
+ <attr name="connection" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_inscoll" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ <attr name="object_array" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_insdoc" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="parentID" type="int" status="optional"></attr>
+ <attr name="object_record" type="string" status="optional"></attr>
+ <attr name="text" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_insertanchors" type="function" returnType="string">
+ <attr name="hwdoc" type="int" status="optional"></attr>
+ <attr name="anchorecs" type="array" status="optional"></attr>
+ <attr name="dest" type="array" status="optional"></attr>
+ <attr name="urlprefixes" type="array" status="optional"></attr>
+ </tag>
+ <tag name="hw_insertdocument" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="parent_id" type="int" status="optional"></attr>
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_insertobject" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object rec" type="string" status="optional"></attr>
+ <attr name="parameter" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_mapid" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="server id" type="int" status="optional"></attr>
+ <attr name="object id" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_modifyobject" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object_to_change" type="int" status="optional"></attr>
+ <attr name="remove" type="array" status="optional"></attr>
+ <attr name="add" type="array" status="optional"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_mv" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="object id array" type="array" status="optional"></attr>
+ <attr name="source id" type="int" status="optional"></attr>
+ <attr name="destination id" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_new_document" type="function" returnType="int">
+ <attr name="object_record" type="string" status="optional"></attr>
+ <attr name="document_data" type="string" status="optional"></attr>
+ <attr name="document_size" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_objrec2array" type="function" returnType="array">
+ <attr name="object_record" type="string" status="optional"></attr>
+ <attr name="format
+attributes and the attributes 'Group'" type="array" status="optional"></attr>
+ <attr name="and 'HtmlAttr' as non-prefixed multi-value attributes. By passing an array holding the type for each attribute you can alter this behaviour. The array is an associated array with the attribute name as its key and the value being one of HW_ATTR_LANG or HW_ATTR_NONE" type="'Parent'" status="optional"></attr>
+ </tag>
+ <tag name="hw_output_document" type="function" returnType="int">
+ <attr name="hw_document" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_pconnect" type="function" returnType="int">
+ <attr name="host" type="string" status="optional"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="hw_pipedocument" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_root" type="function" returnType="int">
+ </tag>
+ <tag name="hw_setlinkroot" type="function" returnType="void">
+ <attr name="link" type="int" status="optional"></attr>
+ <attr name="rootid" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_stat" type="function" returnType="string">
+ <attr name="link" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_unlock" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ <attr name="objectID" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hw_who" type="function" returnType="int">
+ <attr name="connection" type="int" status="optional"></attr>
+ </tag>
+</tags>
diff --git a/quanta/data/dtep/php/ibase.tag b/quanta/data/dtep/php/ibase.tag
new file mode 100644
index 00000000..2506af83
--- /dev/null
+++ b/quanta/data/dtep/php/ibase.tag
@@ -0,0 +1,219 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ibase_add_user" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="server" type="string" status="required"></attr>
+ <attr name="dba_user_name" type="string" status="required"></attr>
+ <attr name="dba_user_password" type="string" status="required"></attr>
+ <attr name="user_name" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="first_name" type="string" status="optional"></attr>
+ <attr name="middle_name" type="string" status="optional"></attr>
+ <attr name="last_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ibase_affected_rows" type="function" returnType="int" version="PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_backup" type="function" returnType="mixed" version="PHP 5">
+ <attr name="service_handle" type="resource" status="required"></attr>
+ <attr name="source_db" type="string" status="required"></attr>
+ <attr name="dest_file" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ <attr name="verbose" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ibase_blob_add" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="blob_handle" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_cancel" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="blob_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_close" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="blob_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_create" type="function" returnType="resource" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_blob_echo" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="blob_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_get" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="blob_handle" type="resource" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_import" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="file_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_info" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="blob_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_blob_open" type="function" returnType="resource" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="blob_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_close" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_commit_ret" type="function" returnType="bool" version="PHP 5">
+ <attr name="link_or_trans_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_commit" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_or_trans_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_connect" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ <attr name="buffers" type="int" status="optional"></attr>
+ <attr name="dialect" type="int" status="optional"></attr>
+ <attr name="role" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ibase_db_info" type="function" returnType="string" version="PHP 5">
+ <attr name="service_handle" type="resource" status="required"></attr>
+ <attr name="db" type="string" status="required"></attr>
+ <attr name="action" type="int" status="required"></attr>
+ <attr name="argument" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_delete_user" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="server" type="string" status="required"></attr>
+ <attr name="dba_user_name" type="string" status="required"></attr>
+ <attr name="dba_user_password" type="string" status="required"></attr>
+ <attr name="user_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_drop_db" type="function" returnType="bool" version="PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_errcode" type="function" returnType="int" version="PHP 5">
+ </tag>
+ <tag name="ibase_errmsg" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ </tag>
+ <tag name="ibase_execute" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="query" type="resource" status="required"></attr>
+ <attr name="bind_arg" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="ibase_fetch_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="fetch_flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_fetch_object" type="function" returnType="object" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="fetch_flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_fetch_row" type="function" returnType="array" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ <attr name="fetch_flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_field_info" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="ibase_free_event_handler" type="function" returnType="bool" version="PHP 5">
+ <attr name="event" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_free_query" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="query" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_free_result" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_gen_id" type="function" returnType="int" version="PHP 5">
+ <attr name="generator" type="string" status="required"></attr>
+ <attr name="increment" type="int" status="optional"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_maintain_db" type="function" returnType="bool" version="PHP 5">
+ <attr name="service_handle" type="resource" status="required"></attr>
+ <attr name="db" type="string" status="required"></attr>
+ <attr name="action" type="int" status="required"></attr>
+ <attr name="argument" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_modify_user" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="server" type="string" status="required"></attr>
+ <attr name="dba_user_name" type="string" status="required"></attr>
+ <attr name="dba_user_password" type="string" status="required"></attr>
+ <attr name="user_name" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="first_name" type="string" status="optional"></attr>
+ <attr name="middle_name" type="string" status="optional"></attr>
+ <attr name="last_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ibase_name_result" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_num_fields" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_num_params" type="function" returnType="int" version="PHP 5">
+ <attr name="query" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_param_info" type="function" returnType="array" version="PHP 5">
+ <attr name="query" type="resource" status="required"></attr>
+ <attr name="param_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="ibase_pconnect" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ <attr name="buffers" type="int" status="optional"></attr>
+ <attr name="dialect" type="int" status="optional"></attr>
+ <attr name="role" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ibase_prepare" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_query" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="bind_args" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_restore" type="function" returnType="mixed" version="PHP 5">
+ <attr name="service_handle" type="resource" status="required"></attr>
+ <attr name="source_file" type="string" status="required"></attr>
+ <attr name="dest_db" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ <attr name="verbose" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ibase_rollback_ret" type="function" returnType="bool" version="PHP 5">
+ <attr name="link_or_trans_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_rollback" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="link_or_trans_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_server_info" type="function" returnType="string" version="PHP 5">
+ <attr name="service_handle" type="resource" status="required"></attr>
+ <attr name="action" type="int" status="required"></attr>
+ </tag>
+ <tag name="ibase_service_attach" type="function" returnType="resource" version="PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="dba_username" type="string" status="required"></attr>
+ <attr name="dba_password" type="string" status="required"></attr>
+ </tag>
+ <tag name="ibase_service_detach" type="function" returnType="bool" version="PHP 5">
+ <attr name="service_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ibase_set_event_handler" type="function" returnType="resource" version="PHP 5">
+ <attr name="event_handler" type="callback" status="required"></attr>
+ <attr name="event_name1" type="string" status="required"></attr>
+ <attr name="event_name2" type="string" status="optional"></attr>
+ <attr name="..." type="string" status="optional"></attr>
+ </tag>
+ <tag name="ibase_timefmt" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="columntype" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ibase_trans" type="function" returnType="resource" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="trans_args" type="int" status="optional"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ibase_wait_event" type="function" returnType="string" version="PHP 5">
+ <attr name="event_name1" type="string" status="required"></attr>
+ <attr name="event_name2" type="string" status="optional"></attr>
+ <attr name="..." type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/icap.tag b/quanta/data/dtep/php/icap.tag
new file mode 100644
index 00000000..0feff003
--- /dev/null
+++ b/quanta/data/dtep/php/icap.tag
@@ -0,0 +1,58 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="icap_close" type="function" returnType="int" version="">
+ <attr name="icap_stream" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="icap_create_calendar" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="calendar" type="string" status="required"></attr>
+ </tag>
+ <tag name="icap_delete_calendar" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="calendar" type="string" status="required"></attr>
+ </tag>
+ <tag name="icap_delete_event" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="uid" type="int" status="required"></attr>
+ </tag>
+ <tag name="icap_fetch_event" type="function" returnType="int" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="event_id" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="icap_list_alarms" type="function" returnType="int" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="date" type="array" status="required"></attr>
+ <attr name="time" type="array" status="required"></attr>
+ </tag>
+ <tag name="icap_list_events" type="function" returnType="array" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="begin_date" type="int" status="required"></attr>
+ <attr name="end_date" type="int" status="optional"></attr>
+ </tag>
+ <tag name="icap_open" type="function" returnType="resource" version="PHP 4 &lt;= 4.2.3">
+ <attr name="calendar" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="options" type="string" status="required"></attr>
+ </tag>
+ <tag name="icap_rename_calendar" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="old_name" type="string" status="required"></attr>
+ <attr name="new_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="icap_reopen" type="function" returnType="int" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="calendar" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="icap_snooze" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="uid" type="int" status="required"></attr>
+ </tag>
+ <tag name="icap_store_event" type="function" returnType="string" version="PHP 4 &lt;= 4.2.3">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="event" type="object" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/iconv.tag b/quanta/data/dtep/php/iconv.tag
new file mode 100644
index 00000000..ca4f9671
--- /dev/null
+++ b/quanta/data/dtep/php/iconv.tag
@@ -0,0 +1,55 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="iconv_get_encoding" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="type" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv_mime_decode_headers" type="function" returnType="array" version="PHP 5">
+ <attr name="encoded_headers" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv_mime_decode" type="function" returnType="string" version="PHP 5">
+ <attr name="encoded_header" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv_mime_encode" type="function" returnType="string" version="PHP 5">
+ <attr name="field_name" type="string" status="required"></attr>
+ <attr name="field_value" type="string" status="required"></attr>
+ <attr name="preferences" type="array" status="optional"></attr>
+ </tag>
+ <tag name="iconv_set_encoding" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="type" type="string" status="required"></attr>
+ <attr name="charset" type="string" status="required"></attr>
+ </tag>
+ <tag name="iconv_strlen" type="function" returnType="int" version="PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv_strpos" type="function" returnType="int" version="PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv_strrpos" type="function" returnType="string" version="PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv_substr" type="function" returnType="string" version="PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="iconv" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="in_charset" type="string" status="required"></attr>
+ <attr name="out_charset" type="string" status="required"></attr>
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="ob_iconv_handler" type="function" returnType="array" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="contents" type="string" status="required"></attr>
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/id3.tag b/quanta/data/dtep/php/id3.tag
new file mode 100644
index 00000000..96f9c1af
--- /dev/null
+++ b/quanta/data/dtep/php/id3.tag
@@ -0,0 +1,27 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="id3_get_genre_id" type="function" returnType="int" version="">
+ <attr name="genre" type="string" status="required"></attr>
+ </tag>
+ <tag name="id3_get_genre_list" type="function" returnType="array" version="">
+ </tag>
+ <tag name="id3_get_genre_name" type="function" returnType="string" version="">
+ <attr name="genre_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="id3_get_tag" type="function" returnType="array" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="version" type="int" status="optional"></attr>
+ </tag>
+ <tag name="id3_get_version" type="function" returnType="int" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="id3_remove_tag" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="version" type="int" status="optional"></attr>
+ </tag>
+ <tag name="id3_set_tag" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="tag" type="array" status="required"></attr>
+ <attr name="version" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ifx.tag b/quanta/data/dtep/php/ifx.tag
new file mode 100644
index 00000000..d05c4921
--- /dev/null
+++ b/quanta/data/dtep/php/ifx.tag
@@ -0,0 +1,137 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ifx_affected_rows" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_blobinfile_mode" type="function" returnType="void" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_byteasvarchar" type="function" returnType="void" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_close" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ifx_connect" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="optional"></attr>
+ <attr name="userid" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ifx_copy_blob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_create_blob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="param" type="string" status="required"></attr>
+ </tag>
+ <tag name="ifx_create_char" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="param" type="string" status="required"></attr>
+ </tag>
+ <tag name="ifx_do" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_error" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="ifx_errormsg" type="function" returnType="string" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="errorcode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ifx_fetch_row" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="position" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="ifx_fieldproperties" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_fieldtypes" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_free_blob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_free_char" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_free_result" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_get_blob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_get_char" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_getsqlca" type="function" returnType="array" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_htmltbl_result" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="html_table_options" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ifx_nullformat" type="function" returnType="void" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_num_fields" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_num_rows" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_pconnect" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="optional"></attr>
+ <attr name="userid" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ifx_prepare" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="conn_id" type="int" status="required"></attr>
+ <attr name="cursor_def" type="int" status="optional"></attr>
+ <attr name="blobidarray" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ifx_query" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="int" status="required"></attr>
+ <attr name="cursor_type" type="int" status="optional"></attr>
+ <attr name="blobidarray" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="ifx_textasvarchar" type="function" returnType="void" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifx_update_blob" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="ifx_update_char" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="ifxus_close_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_create_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_free_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_open_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_read_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ <attr name="nbytes" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_seek_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_tell_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ </tag>
+ <tag name="ifxus_write_slob" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="bid" type="int" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/iisfunc.tag b/quanta/data/dtep/php/iisfunc.tag
new file mode 100644
index 00000000..633551d9
--- /dev/null
+++ b/quanta/data/dtep/php/iisfunc.tag
@@ -0,0 +1,71 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="iis_add_server" type="function" returnType="int" version="">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="comment" type="string" status="required"></attr>
+ <attr name="server_ip" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="host_name" type="string" status="required"></attr>
+ <attr name="rights" type="int" status="required"></attr>
+ <attr name="start_server" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_get_dir_security" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_get_script_map" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ <attr name="script_extension" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_get_server_by_comment" type="function" returnType="int" version="">
+ <attr name="comment" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_get_server_by_path" type="function" returnType="int" version="">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_get_server_rights" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_get_service_state" type="function" returnType="int" version="">
+ <attr name="service_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_remove_server" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_set_app_settings" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ <attr name="application_scope" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_set_dir_security" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ <attr name="directory_flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_set_script_map" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ <attr name="script_extension" type="string" status="required"></attr>
+ <attr name="engine_path" type="string" status="required"></attr>
+ <attr name="allow_scripting" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_set_server_rights" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ <attr name="virtual_path" type="string" status="required"></attr>
+ <attr name="directory_flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_start_server" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_start_service" type="function" returnType="int" version="">
+ <attr name="service_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="iis_stop_server" type="function" returnType="int" version="">
+ <attr name="server_instance" type="int" status="required"></attr>
+ </tag>
+ <tag name="iis_stop_service" type="function" returnType="int" version="">
+ <attr name="service_id" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/image.tag b/quanta/data/dtep/php/image.tag
new file mode 100644
index 00000000..017e3855
--- /dev/null
+++ b/quanta/data/dtep/php/image.tag
@@ -0,0 +1,557 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="gd_info" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="getimagesize" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="&amp;imageinfo" type="array" status="optional"></attr>
+ </tag>
+ <tag name="image_type_to_extension" type="function" returnType="string" version="">
+ <attr name="imagetype" type="int" status="required"></attr>
+ <attr name="include_dot" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="image_type_to_mime_type" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="imagetype" type="int" status="required"></attr>
+ </tag>
+ <tag name="image2wbmp" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="threshold" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imagealphablending" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="blendmode" type="bool" status="required"></attr>
+ </tag>
+ <tag name="imageantialias" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ <attr name="im" type="resource" status="required"></attr>
+ <attr name="on" type="bool" status="required"></attr>
+ </tag>
+ <tag name="imagearc" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="cx" type="int" status="required"></attr>
+ <attr name="cy" type="int" status="required"></attr>
+ <attr name="w" type="int" status="required"></attr>
+ <attr name="h" type="int" status="required"></attr>
+ <attr name="s" type="int" status="required"></attr>
+ <attr name="e" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagechar" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="c" type="string" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecharup" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="c" type="string" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorallocate" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorallocatealpha" type="function" returnType="int" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="alpha" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorat" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorclosest" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorclosestalpha" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="alpha" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorclosesthwb" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolordeallocate" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorexact" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorexactalpha" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="alpha" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolormatch" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="image1" type="resource" status="required"></attr>
+ <attr name="image2" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagecolorresolve" type="function" returnType="int" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorresolvealpha" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="alpha" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorset" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorsforindex" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecolorstotal" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagecolortransparent" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="color" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imagecopy" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="dst_im" type="resource" status="required"></attr>
+ <attr name="src_im" type="resource" status="required"></attr>
+ <attr name="dst_x" type="int" status="required"></attr>
+ <attr name="dst_y" type="int" status="required"></attr>
+ <attr name="src_x" type="int" status="required"></attr>
+ <attr name="src_y" type="int" status="required"></attr>
+ <attr name="src_w" type="int" status="required"></attr>
+ <attr name="src_h" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecopymerge" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="dst_im" type="resource" status="required"></attr>
+ <attr name="src_im" type="resource" status="required"></attr>
+ <attr name="dst_x" type="int" status="required"></attr>
+ <attr name="dst_y" type="int" status="required"></attr>
+ <attr name="src_x" type="int" status="required"></attr>
+ <attr name="src_y" type="int" status="required"></attr>
+ <attr name="src_w" type="int" status="required"></attr>
+ <attr name="src_h" type="int" status="required"></attr>
+ <attr name="pct" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecopymergegray" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="dst_im" type="resource" status="required"></attr>
+ <attr name="src_im" type="resource" status="required"></attr>
+ <attr name="dst_x" type="int" status="required"></attr>
+ <attr name="dst_y" type="int" status="required"></attr>
+ <attr name="src_x" type="int" status="required"></attr>
+ <attr name="src_y" type="int" status="required"></attr>
+ <attr name="src_w" type="int" status="required"></attr>
+ <attr name="src_h" type="int" status="required"></attr>
+ <attr name="pct" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecopyresampled" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="dst_image" type="resource" status="required"></attr>
+ <attr name="src_image" type="resource" status="required"></attr>
+ <attr name="dst_x" type="int" status="required"></attr>
+ <attr name="dst_y" type="int" status="required"></attr>
+ <attr name="src_x" type="int" status="required"></attr>
+ <attr name="src_y" type="int" status="required"></attr>
+ <attr name="dst_w" type="int" status="required"></attr>
+ <attr name="dst_h" type="int" status="required"></attr>
+ <attr name="src_w" type="int" status="required"></attr>
+ <attr name="src_h" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecopyresized" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dst_image" type="resource" status="required"></attr>
+ <attr name="src_image" type="resource" status="required"></attr>
+ <attr name="dst_x" type="int" status="required"></attr>
+ <attr name="dst_y" type="int" status="required"></attr>
+ <attr name="src_x" type="int" status="required"></attr>
+ <attr name="src_y" type="int" status="required"></attr>
+ <attr name="dst_w" type="int" status="required"></attr>
+ <attr name="dst_h" type="int" status="required"></attr>
+ <attr name="src_w" type="int" status="required"></attr>
+ <attr name="src_h" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecreate" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="x_size" type="int" status="required"></attr>
+ <attr name="y_size" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromgd" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromgd2" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromgd2part" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="srcX" type="int" status="required"></attr>
+ <attr name="srcY" type="int" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromgif" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromjpeg" type="function" returnType="resource" version="PHP 3&gt;= 3.0.16, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefrompng" type="function" returnType="resource" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromstring" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="image" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromwbmp" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromxbm" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatefromxpm" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagecreatetruecolor" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="x_size" type="int" status="required"></attr>
+ <attr name="y_size" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagedashedline" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x1" type="int" status="required"></attr>
+ <attr name="y1" type="int" status="required"></attr>
+ <attr name="x2" type="int" status="required"></attr>
+ <attr name="y2" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagedestroy" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imageellipse" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="cx" type="int" status="required"></attr>
+ <attr name="cy" type="int" status="required"></attr>
+ <attr name="w" type="int" status="required"></attr>
+ <attr name="h" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefill" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefilledarc" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="cx" type="int" status="required"></attr>
+ <attr name="cy" type="int" status="required"></attr>
+ <attr name="w" type="int" status="required"></attr>
+ <attr name="h" type="int" status="required"></attr>
+ <attr name="s" type="int" status="required"></attr>
+ <attr name="e" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ <attr name="style" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefilledellipse" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="cx" type="int" status="required"></attr>
+ <attr name="cy" type="int" status="required"></attr>
+ <attr name="w" type="int" status="required"></attr>
+ <attr name="h" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefilledpolygon" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="points" type="array" status="required"></attr>
+ <attr name="num_points" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefilledrectangle" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x1" type="int" status="required"></attr>
+ <attr name="y1" type="int" status="required"></attr>
+ <attr name="x2" type="int" status="required"></attr>
+ <attr name="y2" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefilltoborder" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="border" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefilter" type="function" returnType="bool" version="PHP 5">
+ <attr name="src_im" type="resource" status="required"></attr>
+ <attr name="filtertype" type="int" status="required"></attr>
+ <attr name="arg1" type="int" status="optional"></attr>
+ <attr name="arg2" type="int" status="optional"></attr>
+ <attr name="arg3" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imagefontheight" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="font" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagefontwidth" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="font" type="int" status="required"></attr>
+ </tag>
+ <tag name="imageftbbox" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="size" type="float" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="font_file" type="string" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="extrainfo" type="array" status="optional"></attr>
+ </tag>
+ <tag name="imagefttext" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="size" type="float" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ <attr name="font_file" type="string" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="extrainfo" type="array" status="optional"></attr>
+ </tag>
+ <tag name="imagegammacorrect" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="inputgamma" type="float" status="required"></attr>
+ <attr name="outputgamma" type="float" status="required"></attr>
+ </tag>
+ <tag name="imagegd" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imagegd2" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="chunk_size" type="int" status="optional"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imagegif" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imageinterlace" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="interlace" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imageistruecolor" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagejpeg" type="function" returnType="bool" version="PHP 3&gt;= 3.0.16, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="quality" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imagelayereffect" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="effect" type="int" status="required"></attr>
+ </tag>
+ <tag name="imageline" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x1" type="int" status="required"></attr>
+ <attr name="y1" type="int" status="required"></attr>
+ <attr name="x2" type="int" status="required"></attr>
+ <attr name="y2" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imageloadfont" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagepalettecopy" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="destination" type="resource" status="required"></attr>
+ <attr name="source" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagepng" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imagepolygon" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="points" type="array" status="required"></attr>
+ <attr name="num_points" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagepsbbox" type="function" returnType="array" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="size" type="int" status="required"></attr>
+ <attr name="space" type="int" status="optional"></attr>
+ <attr name="tightness" type="int" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ </tag>
+ <tag name="imagepscopyfont" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="fontindex" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagepsencodefont" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="font_index" type="int" status="required"></attr>
+ <attr name="encodingfile" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagepsextendfont" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="font_index" type="int" status="required"></attr>
+ <attr name="extend" type="float" status="required"></attr>
+ </tag>
+ <tag name="imagepsfreefont" type="function" returnType="void" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="fontindex" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagepsloadfont" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagepsslantfont" type="function" returnType="bool" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="font_index" type="int" status="required"></attr>
+ <attr name="slant" type="float" status="required"></attr>
+ </tag>
+ <tag name="imagepstext" type="function" returnType="array" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="size" type="int" status="required"></attr>
+ <attr name="foreground" type="int" status="required"></attr>
+ <attr name="background" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="space" type="int" status="optional"></attr>
+ <attr name="tightness" type="int" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="antialias_steps" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagerectangle" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x1" type="int" status="required"></attr>
+ <attr name="y1" type="int" status="required"></attr>
+ <attr name="x2" type="int" status="required"></attr>
+ <attr name="y2" type="int" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagerotate" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="src_im" type="resource" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="bgd_color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagesavealpha" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="saveflag" type="bool" status="required"></attr>
+ </tag>
+ <tag name="imagesetbrush" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="brush" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagesetpixel" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagesetstyle" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="style" type="array" status="required"></attr>
+ </tag>
+ <tag name="imagesetthickness" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="thickness" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagesettile" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="tile" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagestring" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="s" type="string" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagestringup" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="s" type="string" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagesx" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagesy" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imagetruecolortopalette" type="function" returnType="void" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="dither" type="bool" status="required"></attr>
+ <attr name="ncolors" type="int" status="required"></attr>
+ </tag>
+ <tag name="imagettfbbox" type="function" returnType="array" version="PHP 3&gt;= 3.0.1, PHP 4 , PHP 5">
+ <attr name="size" type="float" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="fontfile" type="string" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagettftext" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="size" type="float" status="required"></attr>
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="color" type="int" status="required"></attr>
+ <attr name="fontfile" type="string" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="imagetypes" type="function" returnType="int" version="PHP 3 CVS only, PHP 4 &gt;= 4.0.2, PHP 5">
+ </tag>
+ <tag name="imagewbmp" type="function" returnType="bool" version="PHP 3&gt;= 3.0.15, PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="foreground" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imagexbm" type="function" returnType="bool" version="PHP 5">
+ <attr name="image" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="foreground" type="int" status="optional"></attr>
+ </tag>
+ <tag name="iptcembed" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="iptcdata" type="string" status="required"></attr>
+ <attr name="jpeg_file_name" type="string" status="required"></attr>
+ <attr name="spool" type="int" status="optional"></attr>
+ </tag>
+ <tag name="iptcparse" type="function" returnType="array" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="iptcblock" type="string" status="required"></attr>
+ </tag>
+ <tag name="jpeg2wbmp" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="jpegname" type="string" status="required"></attr>
+ <attr name="wbmpname" type="string" status="required"></attr>
+ <attr name="d_height" type="int" status="required"></attr>
+ <attr name="d_width" type="int" status="required"></attr>
+ <attr name="threshold" type="int" status="required"></attr>
+ </tag>
+ <tag name="png2wbmp" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pngname" type="string" status="required"></attr>
+ <attr name="wbmpname" type="string" status="required"></attr>
+ <attr name="d_height" type="int" status="required"></attr>
+ <attr name="d_width" type="int" status="required"></attr>
+ <attr name="threshold" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/imap.tag b/quanta/data/dtep/php/imap.tag
new file mode 100644
index 00000000..13210b6c
--- /dev/null
+++ b/quanta/data/dtep/php/imap.tag
@@ -0,0 +1,278 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="imap_8bit" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_alerts" type="function" returnType="array" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ </tag>
+ <tag name="imap_append" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="options" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_base64" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_binary" type="function" returnType="string" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_body" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_bodystruct" type="function" returnType="object" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stream_id" type="resource" status="required"></attr>
+ <attr name="msg_no" type="int" status="required"></attr>
+ <attr name="section" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_check" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_clearflag_full" type="function" returnType="bool" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="sequence" type="string" status="required"></attr>
+ <attr name="flag" type="string" status="required"></attr>
+ <attr name="options" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_createmailbox" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_delete" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="int" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_deletemailbox" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_errors" type="function" returnType="array" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ </tag>
+ <tag name="imap_expunge" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_fetch_overview" type="function" returnType="array" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="sequence" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_fetchbody" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ <attr name="part_number" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_fetchheader" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msgno" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_fetchstructure" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_get_quota" type="function" returnType="array" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="quota_root" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_get_quotaroot" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="quota_root" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_getacl" type="function" returnType="array" version="PHP 5">
+ <attr name="stream_id" type="resource" status="required"></attr>
+ <attr name="mailbox" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_getmailboxes" type="function" returnType="array" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="ref" type="string" status="required"></attr>
+ <attr name="pattern" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_getsubscribed" type="function" returnType="array" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="ref" type="string" status="required"></attr>
+ <attr name="pattern" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_headerinfo" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ <attr name="fromlength" type="int" status="optional"></attr>
+ <attr name="subjectlength" type="int" status="optional"></attr>
+ <attr name="defaulthost" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_headers" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_last_error" type="function" returnType="string" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ </tag>
+ <tag name="imap_list" type="function" returnType="array" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="ref" type="string" status="required"></attr>
+ <attr name="pattern" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_listscan" type="function" returnType="array" version="">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="ref" type="string" status="required"></attr>
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_lsub" type="function" returnType="array" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="ref" type="string" status="required"></attr>
+ <attr name="pattern" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_mail_compose" type="function" returnType="string" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="envelope" type="array" status="required"></attr>
+ <attr name="body" type="array" status="required"></attr>
+ </tag>
+ <tag name="imap_mail_copy" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msglist" type="string" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_mail_move" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msglist" type="string" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_mail" type="function" returnType="bool" version="PHP 3&gt;= 3.0.14, PHP 4 , PHP 5">
+ <attr name="to" type="string" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="additional_headers" type="string" status="optional"></attr>
+ <attr name="cc" type="string" status="optional"></attr>
+ <attr name="bcc" type="string" status="optional"></attr>
+ <attr name="rpath" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_mailboxmsginfo" type="function" returnType="object" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_mime_header_decode" type="function" returnType="array" version="PHP 3&gt;= 3.0.17, PHP 4 , PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_msgno" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="uid" type="int" status="required"></attr>
+ </tag>
+ <tag name="imap_num_msg" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_num_recent" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_open" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_ping" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="imap_qprint" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_renamemailbox" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="old_mbox" type="string" status="required"></attr>
+ <attr name="new_mbox" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_reopen" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="options" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_rfc822_parse_adrlist" type="function" returnType="array" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="address" type="string" status="required"></attr>
+ <attr name="default_host" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_rfc822_parse_headers" type="function" returnType="object" version="PHP 4 , PHP 5">
+ <attr name="headers" type="string" status="required"></attr>
+ <attr name="defaulthost" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_rfc822_write_address" type="function" returnType="string" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="personal" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_search" type="function" returnType="array" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="criteria" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_set_quota" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="quota_root" type="string" status="required"></attr>
+ <attr name="quota_limit" type="int" status="required"></attr>
+ </tag>
+ <tag name="imap_setacl" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="stream_id" type="resource" status="required"></attr>
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="id" type="string" status="required"></attr>
+ <attr name="rights" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_setflag_full" type="function" returnType="bool" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="sequence" type="string" status="required"></attr>
+ <attr name="flag" type="string" status="required"></attr>
+ <attr name="options" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_sort" type="function" returnType="array" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="criteria" type="int" status="required"></attr>
+ <attr name="reverse" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ <attr name="search_criteria" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="imap_status" type="function" returnType="object" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="options" type="int" status="required"></attr>
+ </tag>
+ <tag name="imap_subscribe" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_thread" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="stream_id" type="resource" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_timeout" type="function" returnType="mixed" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="timeout_type" type="int" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_uid" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msgno" type="int" status="required"></attr>
+ </tag>
+ <tag name="imap_undelete" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="resource" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="imap_unsubscribe" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="imap_stream" type="string" status="required"></attr>
+ <attr name="mbox" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_utf7_decode" type="function" returnType="string" version="PHP 3&gt;= 3.0.15, PHP 4 , PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_utf7_encode" type="function" returnType="string" version="PHP 3&gt;= 3.0.15, PHP 4 , PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="imap_utf8" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="mime_encoded_text" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/includes.tag b/quanta/data/dtep/php/includes.tag
new file mode 100644
index 00000000..f2b7eac3
--- /dev/null
+++ b/quanta/data/dtep/php/includes.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="include" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="include_once" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="require" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="require_once" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/info.tag b/quanta/data/dtep/php/info.tag
new file mode 100644
index 00000000..06df9742
--- /dev/null
+++ b/quanta/data/dtep/php/info.tag
@@ -0,0 +1,112 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="assert_options" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="what" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="assert" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="assertion" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="dl" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="library" type="string" status="required"></attr>
+ </tag>
+ <tag name="extension_loaded" type="function" returnType="bool" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="get_cfg_var" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="varname" type="string" status="required"></attr>
+ </tag>
+ <tag name="get_current_user" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="get_defined_constants" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="categorize" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="get_extension_funcs" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="module_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="get_include_path" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="get_included_files" type="function" returnType="array" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="get_loaded_extensions" type="function" returnType="array" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="get_magic_quotes_gpc" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ </tag>
+ <tag name="get_magic_quotes_runtime" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ </tag>
+ <tag name="getenv" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="varname" type="string" status="required"></attr>
+ </tag>
+ <tag name="getlastmod" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="getmygid" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="getmyinode" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="getmypid" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="getmyuid" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="getopt" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="options" type="string" status="required"></attr>
+ <attr name="longopts" type="array" status="optional"></attr>
+ </tag>
+ <tag name="getrusage" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="who" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ini_get_all" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="extension" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ini_get" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="varname" type="string" status="required"></attr>
+ </tag>
+ <tag name="ini_restore" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="varname" type="string" status="required"></attr>
+ </tag>
+ <tag name="ini_set" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="varname" type="string" status="required"></attr>
+ <attr name="newvalue" type="string" status="required"></attr>
+ </tag>
+ <tag name="memory_get_usage" type="function" returnType="int" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ </tag>
+ <tag name="php_ini_scanned_files" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="php_logo_guid" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="php_sapi_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ </tag>
+ <tag name="php_uname" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="mode" type="string" status="optional"></attr>
+ </tag>
+ <tag name="phpcredits" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="phpinfo" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="what" type="int" status="optional"></attr>
+ </tag>
+ <tag name="phpversion" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="putenv" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="setting" type="string" status="required"></attr>
+ </tag>
+ <tag name="restore_include_path" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="set_include_path" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="new_include_path" type="string" status="required"></attr>
+ </tag>
+ <tag name="set_magic_quotes_runtime" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="new_setting" type="int" status="required"></attr>
+ </tag>
+ <tag name="set_time_limit" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="seconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="version_compare" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="version1" type="string" status="required"></attr>
+ <attr name="version2" type="string" status="required"></attr>
+ <attr name="operator" type="string" status="optional"></attr>
+ </tag>
+ <tag name="zend_logo_guid" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="zend_version" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ingres-ii.tag b/quanta/data/dtep/php/ingres-ii.tag
new file mode 100644
index 00000000..52e9b694
--- /dev/null
+++ b/quanta/data/dtep/php/ingres-ii.tag
@@ -0,0 +1,70 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ingres_autocommit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_commit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_connect" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="database" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ingres_fetch_array" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="result_type" type="int" status="optional"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_fetch_object" type="function" returnType="object" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="result_type" type="int" status="optional"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_fetch_row" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_field_length" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_field_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_field_nullable" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_field_precision" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_field_scale" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_field_type" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_num_fields" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_num_rows" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_pconnect" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="database" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ingres_query" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ingres_rollback" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ircg.tag b/quanta/data/dtep/php/ircg.tag
new file mode 100644
index 00000000..a80b31c7
--- /dev/null
+++ b/quanta/data/dtep/php/ircg.tag
@@ -0,0 +1,139 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ircg_channel_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ <attr name="mode_spec" type="string" status="required"></attr>
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_disconnect" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="reason" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_eval_ecmascript_params" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="params" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_fetch_error_msg" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ircg_get_username" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ircg_html_encode" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="html_string" type="string" status="required"></attr>
+ <attr name="auto_links" type="bool" status="optional"></attr>
+ <attr name="conv_br" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ircg_ignore_add" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_ignore_del" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_invite" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ <attr name="nickname" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_is_conn_alive" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ircg_join" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ <attr name="key" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ircg_kick" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ <attr name="nick" type="string" status="required"></attr>
+ <attr name="reason" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_list" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_lookup_format_messages" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_lusers" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ircg_msg" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="recipient" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="suppress" type="boolean" status="optional"></attr>
+ </tag>
+ <tag name="ircg_names" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="connection" type="int" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ <attr name="target" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ircg_nick" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_nickname_escape" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_nickname_unescape" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_notice" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="recipient" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_oper" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_part" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_pconnect" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="server_ip" type="string" status="optional"></attr>
+ <attr name="server_port" type="int" status="optional"></attr>
+ <attr name="msg_format" type="string" status="optional"></attr>
+ <attr name="ctcp_messages" type="array" status="optional"></attr>
+ <attr name="user_settings" type="array" status="optional"></attr>
+ <attr name="bailout_on_trivial" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ircg_register_format_messages" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="messages" type="array" status="required"></attr>
+ </tag>
+ <tag name="ircg_set_current" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ircg_set_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_set_on_die" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_topic" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="channel" type="string" status="required"></attr>
+ <attr name="new_topic" type="string" status="required"></attr>
+ </tag>
+ <tag name="ircg_who" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="mask" type="string" status="required"></attr>
+ <attr name="ops_only" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ircg_whois" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="nick" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/java.tag b/quanta/data/dtep/php/java.tag
new file mode 100644
index 00000000..0c0a528a
--- /dev/null
+++ b/quanta/data/dtep/php/java.tag
@@ -0,0 +1,7 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="java_last_exception_clear" type="function" returnType="void" version="PHP 4 &gt;= 4.0.2">
+ </tag>
+ <tag name="java_last_exception_get" type="function" returnType="object" version="PHP 4 &gt;= 4.0.2">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ldap.tag b/quanta/data/dtep/php/ldap.tag
new file mode 100644
index 00000000..bb652bb8
--- /dev/null
+++ b/quanta/data/dtep/php/ldap.tag
@@ -0,0 +1,205 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ldap_8859_to_t61" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_add" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="entry" type="array" status="required"></attr>
+ </tag>
+ <tag name="ldap_bind" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="bind_rdn" type="string" status="optional"></attr>
+ <attr name="bind_password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ldap_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_compare" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="attribute" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_connect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="optional"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ldap_count_entries" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_delete" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_dn2ufn" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dn" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_err2str" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="errno" type="int" status="required"></attr>
+ </tag>
+ <tag name="ldap_errno" type="function" returnType="int" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_error" type="function" returnType="string" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_explode_dn" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="with_attrib" type="int" status="required"></attr>
+ </tag>
+ <tag name="ldap_first_attribute" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ <attr name="&amp;ber_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="ldap_first_entry" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_first_reference" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_free_result" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_get_attributes" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_get_dn" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_get_entries" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_get_option" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="&amp;retval" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ldap_get_values_len" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ <attr name="attribute" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_get_values" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ <attr name="attribute" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_list" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="base_dn" type="string" status="required"></attr>
+ <attr name="filter" type="string" status="required"></attr>
+ <attr name="attributes" type="array" status="optional"></attr>
+ <attr name="attrsonly" type="int" status="optional"></attr>
+ <attr name="sizelimit" type="int" status="optional"></attr>
+ <attr name="timelimit" type="int" status="optional"></attr>
+ <attr name="deref" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ldap_mod_add" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="entry" type="array" status="required"></attr>
+ </tag>
+ <tag name="ldap_mod_del" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="entry" type="array" status="required"></attr>
+ </tag>
+ <tag name="ldap_mod_replace" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="entry" type="array" status="required"></attr>
+ </tag>
+ <tag name="ldap_modify" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="entry" type="array" status="required"></attr>
+ </tag>
+ <tag name="ldap_next_attribute" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ <attr name="&amp;ber_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_next_entry" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="result_entry_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_next_reference" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="entry" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_parse_reference" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="entry" type="resource" status="required"></attr>
+ <attr name="&amp;referrals" type="array" status="required"></attr>
+ </tag>
+ <tag name="ldap_parse_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="&amp;errcode" type="int" status="required"></attr>
+ <attr name="&amp;matcheddn" type="string" status="optional"></attr>
+ <attr name="&amp;errmsg" type="string" status="optional"></attr>
+ <attr name="&amp;referrals" type="array" status="optional"></attr>
+ </tag>
+ <tag name="ldap_read" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="base_dn" type="string" status="required"></attr>
+ <attr name="filter" type="string" status="required"></attr>
+ <attr name="attributes" type="array" status="optional"></attr>
+ <attr name="attrsonly" type="int" status="optional"></attr>
+ <attr name="sizelimit" type="int" status="optional"></attr>
+ <attr name="timelimit" type="int" status="optional"></attr>
+ <attr name="deref" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ldap_rename" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="dn" type="string" status="required"></attr>
+ <attr name="newrdn" type="string" status="required"></attr>
+ <attr name="newparent" type="string" status="required"></attr>
+ <attr name="deleteoldrdn" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ldap_sasl_bind" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_search" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="base_dn" type="string" status="required"></attr>
+ <attr name="filter" type="string" status="required"></attr>
+ <attr name="attributes" type="array" status="optional"></attr>
+ <attr name="attrsonly" type="int" status="optional"></attr>
+ <attr name="sizelimit" type="int" status="optional"></attr>
+ <attr name="timelimit" type="int" status="optional"></attr>
+ <attr name="deref" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ldap_set_option" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="newval" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ldap_set_rebind_proc" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="callback" type="callback" status="required"></attr>
+ </tag>
+ <tag name="ldap_sort" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="sortfilter" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_start_tls" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ldap_t61_to_8859" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="ldap_unbind" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/lzf.tag b/quanta/data/dtep/php/lzf.tag
new file mode 100644
index 00000000..1e8337fb
--- /dev/null
+++ b/quanta/data/dtep/php/lzf.tag
@@ -0,0 +1,11 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="lzf_compress" type="function" returnType="string" version="">
+ <attr name="arg" type="string" status="required"></attr>
+ </tag>
+ <tag name="lzf_decompress" type="function" returnType="string" version="">
+ <attr name="arg" type="string" status="required"></attr>
+ </tag>
+ <tag name="lzf_optimized_for" type="function" returnType="int" version="">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mail.tag b/quanta/data/dtep/php/mail.tag
new file mode 100644
index 00000000..192c4725
--- /dev/null
+++ b/quanta/data/dtep/php/mail.tag
@@ -0,0 +1,13 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ezmlm_hash" type="function" returnType="int" version="PHP 3&gt;= 3.0.17, PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="addr" type="string" status="required"></attr>
+ </tag>
+ <tag name="mail" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="to" type="string" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="additional_headers" type="string" status="optional"></attr>
+ <attr name="additional_parameters" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mailparse.tag b/quanta/data/dtep/php/mailparse.tag
new file mode 100644
index 00000000..015f7099
--- /dev/null
+++ b/quanta/data/dtep/php/mailparse.tag
@@ -0,0 +1,49 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mailparse_determine_best_xfer_encoding" type="function" returnType="int" version="4.1.0 - 4.1.2 only">
+ <attr name="fp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mailparse_msg_create" type="function" returnType="int" version="4.1.0 - 4.1.2 only">
+ </tag>
+ <tag name="mailparse_msg_extract_part_file" type="function" returnType="string" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="callbackfunc" type="callback" status="optional"></attr>
+ </tag>
+ <tag name="mailparse_msg_extract_part" type="function" returnType="void" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045" type="resource" status="required"></attr>
+ <attr name="msgbody" type="string" status="required"></attr>
+ <attr name="callbackfunc" type="callback" status="optional"></attr>
+ </tag>
+ <tag name="mailparse_msg_free" type="function" returnType="void" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045buf" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mailparse_msg_get_part_data" type="function" returnType="array" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mailparse_msg_get_part" type="function" returnType="int" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045" type="resource" status="required"></attr>
+ <attr name="mimesection" type="string" status="required"></attr>
+ </tag>
+ <tag name="mailparse_msg_get_structure" type="function" returnType="array" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mailparse_msg_parse_file" type="function" returnType="resource" version="4.1.0 - 4.1.2 only">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="mailparse_msg_parse" type="function" returnType="void" version="4.1.0 - 4.1.2 only">
+ <attr name="rfc2045buf" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="mailparse_rfc822_parse_addresses" type="function" returnType="array" version="4.1.0 - 4.1.2 only">
+ <attr name="addresses" type="string" status="required"></attr>
+ </tag>
+ <tag name="mailparse_stream_encode" type="function" returnType="bool" version="4.1.0 - 4.1.2 only">
+ <attr name="sourcefp" type="resource" status="required"></attr>
+ <attr name="destfp" type="resource" status="required"></attr>
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="mailparse_uudecode_all" type="function" returnType="array" version="">
+ <attr name="fp" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/math.tag b/quanta/data/dtep/php/math.tag
new file mode 100644
index 00000000..62433080
--- /dev/null
+++ b/quanta/data/dtep/php/math.tag
@@ -0,0 +1,157 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="abs" type="function" returnType="number" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="number" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="acos" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="acosh" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="asin" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="asinh" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="atan" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="atan2" type="function" returnType="float" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ </tag>
+ <tag name="atanh" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="base_convert" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="number" type="string" status="required"></attr>
+ <attr name="frombase" type="int" status="required"></attr>
+ <attr name="tobase" type="int" status="required"></attr>
+ </tag>
+ <tag name="bindec" type="function" returnType="number" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="binary_string" type="string" status="required"></attr>
+ </tag>
+ <tag name="ceil" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="cos" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="cosh" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="decbin" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="number" type="int" status="required"></attr>
+ </tag>
+ <tag name="dechex" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="number" type="int" status="required"></attr>
+ </tag>
+ <tag name="decoct" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="number" type="int" status="required"></attr>
+ </tag>
+ <tag name="deg2rad" type="function" returnType="float" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="number" type="float" status="required"></attr>
+ </tag>
+ <tag name="exp" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="expm1" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="number" type="float" status="required"></attr>
+ </tag>
+ <tag name="floor" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="fmod" type="function" returnType="float" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="getrandmax" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="hexdec" type="function" returnType="number" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hex_string" type="string" status="required"></attr>
+ </tag>
+ <tag name="hypot" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="is_finite" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="val" type="float" status="required"></attr>
+ </tag>
+ <tag name="is_infinite" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="val" type="float" status="required"></attr>
+ </tag>
+ <tag name="is_nan" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="val" type="float" status="required"></attr>
+ </tag>
+ <tag name="lcg_value" type="function" returnType="float" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="log" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ <attr name="base" type="float" status="optional"></attr>
+ </tag>
+ <tag name="log10" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="log1p" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="number" type="float" status="required"></attr>
+ </tag>
+ <tag name="max" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg1" type="number" status="required"></attr>
+ <attr name="arg2" type="number" status="required"></attr>
+ <attr name="..." type="number" status="optional"></attr>
+ </tag>
+ <tag name="min" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg1" type="number" status="required"></attr>
+ <attr name="arg2" type="number" status="required"></attr>
+ <attr name="..." type="number" status="optional"></attr>
+ </tag>
+ <tag name="mt_getrandmax" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ </tag>
+ <tag name="mt_rand" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="min" type="int" status="optional"></attr>
+ <attr name="max" type="int" status="required"></attr>
+ </tag>
+ <tag name="mt_srand" type="function" returnType="void" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="seed" type="int" status="optional"></attr>
+ </tag>
+ <tag name="octdec" type="function" returnType="number" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="octal_string" type="string" status="required"></attr>
+ </tag>
+ <tag name="pi" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="pow" type="function" returnType="number" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="base" type="number" status="required"></attr>
+ <attr name="exp" type="number" status="required"></attr>
+ </tag>
+ <tag name="rad2deg" type="function" returnType="float" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="number" type="float" status="required"></attr>
+ </tag>
+ <tag name="rand" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="min" type="int" status="optional"></attr>
+ <attr name="max" type="int" status="required"></attr>
+ </tag>
+ <tag name="round" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="val" type="float" status="required"></attr>
+ <attr name="precision" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sin" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="sinh" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="sqrt" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="srand" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="seed" type="int" status="optional"></attr>
+ </tag>
+ <tag name="tan" type="function" returnType="float" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+ <tag name="tanh" type="function" returnType="float" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="arg" type="float" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mbstring.tag b/quanta/data/dtep/php/mbstring.tag
new file mode 100644
index 00000000..64939fc7
--- /dev/null
+++ b/quanta/data/dtep/php/mbstring.tag
@@ -0,0 +1,201 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mb_convert_case" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_convert_encoding" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="to-encoding" type="string" status="required"></attr>
+ <attr name="from-encoding" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mb_convert_kana" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="option" type="string" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_convert_variables" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="to-encoding" type="string" status="required"></attr>
+ <attr name="from-encoding" type="mixed" status="required"></attr>
+ <attr name="&amp;vars" type="mixed" status="required"></attr>
+ <attr name="&amp;..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mb_decode_mimeheader" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="mb_decode_numericentity" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="convmap" type="array" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_detect_encoding" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="encoding_list" type="mixed" status="optional"></attr>
+ <attr name="strict" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="mb_detect_order" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="encoding-list" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mb_encode_mimeheader" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ <attr name="transfer-encoding" type="string" status="optional"></attr>
+ <attr name="linefeed" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_encode_numericentity" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="convmap" type="array" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg_match" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="option" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg_replace" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="replacement" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="option" type="array" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg_search_getpos" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ </tag>
+ <tag name="mb_ereg_search_getregs" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ </tag>
+ <tag name="mb_ereg_search_init" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="pattern" type="string" status="optional"></attr>
+ <attr name="option" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg_search_pos" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="optional"></attr>
+ <attr name="option" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg_search_regs" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="optional"></attr>
+ <attr name="option" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg_search_setpos" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ <attr name="position" type="int" status="required"></attr>
+ </tag>
+ <tag name="mb_ereg_search" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="optional"></attr>
+ <attr name="option" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_ereg" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="regs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="mb_eregi_replace" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="replace" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="mb_eregi" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="regs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="mb_get_info" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="type" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_http_input" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="type" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_http_output" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_internal_encoding" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_language" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="language" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_list_encodings" type="function" returnType="array" version="PHP 5">
+ </tag>
+ <tag name="mb_output_handler" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="contents" type="string" status="required"></attr>
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+ <tag name="mb_parse_str" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="encoded_string" type="string" status="required"></attr>
+ <attr name="&amp;result" type="array" status="optional"></attr>
+ </tag>
+ <tag name="mb_preferred_mime_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="mb_regex_encoding" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0">
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_regex_set_options" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0">
+ <attr name="options" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_send_mail" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="to" type="string" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ <attr name="additional_headers" type="string" status="optional"></attr>
+ <attr name="additional_parameter" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_split" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mb_strcut" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strimwidth" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="trimmarker" type="string" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strlen" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strpos" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strrpos" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strtolower" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strtoupper" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_strwidth" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_substitute_character" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="substrchar" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mb_substr_count" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mb_substr" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mcal.tag b/quanta/data/dtep/php/mcal.tag
new file mode 100644
index 00000000..06724764
--- /dev/null
+++ b/quanta/data/dtep/php/mcal.tag
@@ -0,0 +1,210 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mcal_append_event" type="function" returnType="int" version="PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_close" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_create_calendar" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="calendar" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_date_compare" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="a_year" type="int" status="required"></attr>
+ <attr name="a_month" type="int" status="required"></attr>
+ <attr name="a_day" type="int" status="required"></attr>
+ <attr name="b_year" type="int" status="required"></attr>
+ <attr name="b_month" type="int" status="required"></attr>
+ <attr name="b_day" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_date_valid" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_day_of_week" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_day_of_year" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_days_in_month" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="leap_year" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_delete_calendar" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="calendar" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_delete_event" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ <attr name="event_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_add_attribute" type="function" returnType="void" version="PHP 3&gt;= 3.0.15, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="attribute" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_init" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_alarm" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="alarm" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_category" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="category" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_class" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="class" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_description" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="description" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_end" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="hour" type="int" status="optional"></attr>
+ <attr name="min" type="int" status="optional"></attr>
+ <attr name="sec" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_event_set_recur_daily" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="interval" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_recur_monthly_mday" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="interval" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_recur_monthly_wday" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="interval" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_recur_none" type="function" returnType="int" version="PHP 3&gt;= 3.0.15, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_recur_weekly" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="interval" type="int" status="required"></attr>
+ <attr name="weekdays" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_recur_yearly" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="interval" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_event_set_start" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="hour" type="int" status="optional"></attr>
+ <attr name="min" type="int" status="optional"></attr>
+ <attr name="sec" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_event_set_title" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="title" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_expunge" type="function" returnType="int" version="">
+ <attr name="stream" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_fetch_current_stream_event" type="function" returnType="object" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_fetch_event" type="function" returnType="object" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ <attr name="event_id" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_is_leap_year" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_list_alarms" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ <attr name="begin_year" type="int" status="optional"></attr>
+ <attr name="begin_month" type="int" status="required"></attr>
+ <attr name="begin_day" type="int" status="required"></attr>
+ <attr name="end_year" type="int" status="required"></attr>
+ <attr name="end_month" type="int" status="required"></attr>
+ <attr name="end_day" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_list_events" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ <attr name="begin_year" type="int" status="optional"></attr>
+ <attr name="begin_month" type="int" status="required"></attr>
+ <attr name="begin_day" type="int" status="required"></attr>
+ <attr name="end_year" type="int" status="required"></attr>
+ <attr name="end_month" type="int" status="required"></attr>
+ <attr name="end_day" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_next_recurrence" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="weekstart" type="int" status="required"></attr>
+ <attr name="next" type="array" status="required"></attr>
+ </tag>
+ <tag name="mcal_open" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="calendar" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_popen" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="calendar" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_rename_calendar" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream" type="int" status="required"></attr>
+ <attr name="old_name" type="string" status="required"></attr>
+ <attr name="new_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcal_reopen" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ <attr name="calendar" type="string" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcal_snooze" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="stream_id" type="int" status="required"></attr>
+ <attr name="event_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_store_event" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="mcal_stream" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_time_valid" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 ">
+ <attr name="hour" type="int" status="required"></attr>
+ <attr name="minutes" type="int" status="required"></attr>
+ <attr name="seconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcal_week_of_year" type="function" returnType="int" version="PHP 4 ">
+ <attr name="day" type="int" status="required"></attr>
+ <attr name="month" type="int" status="required"></attr>
+ <attr name="year" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mcrypt.tag b/quanta/data/dtep/php/mcrypt.tag
new file mode 100644
index 00000000..0bef7081
--- /dev/null
+++ b/quanta/data/dtep/php/mcrypt.tag
@@ -0,0 +1,153 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mcrypt_cbc" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="iv" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_cfb" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="iv" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_create_iv" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="size" type="int" status="required"></attr>
+ <attr name="source" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_decrypt" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="cipher" type="string" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="iv" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_ecb" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_get_algorithms_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_get_block_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_get_iv_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_get_key_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_get_modes_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_get_supported_key_sizes" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_is_block_algorithm_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_is_block_algorithm" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_is_block_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_enc_self_test" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_encrypt" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="cipher" type="string" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="iv" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_generic_deinit" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.1, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_generic_end" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_generic_init" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="iv" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_generic" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_get_block_size" type="function" returnType="int" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_get_cipher_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_get_iv_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="cipher" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_get_key_size" type="function" returnType="int" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_list_algorithms" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_list_modes" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_module_get_algo_block_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="algorithm" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_get_algo_key_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="algorithm" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_get_supported_key_sizes" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="algorithm" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_is_block_algorithm_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_is_block_algorithm" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="algorithm" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_is_block_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_module_open" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="algorithm" type="string" status="required"></attr>
+ <attr name="algorithm_directory" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="mode_directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcrypt_module_self_test" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="algorithm" type="string" status="required"></attr>
+ <attr name="lib_dir" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mcrypt_ofb" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="cipher" type="int" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="iv" type="string" status="required"></attr>
+ </tag>
+ <tag name="mdecrypt_generic" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="td" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mcve.tag b/quanta/data/dtep/php/mcve.tag
new file mode 100644
index 00000000..fd6c0076
--- /dev/null
+++ b/quanta/data/dtep/php/mcve.tag
@@ -0,0 +1,404 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mcve_adduser" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ <attr name="usersetup" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_adduserarg" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="usersetup" type="resource" status="required"></attr>
+ <attr name="argtype" type="int" status="required"></attr>
+ <attr name="argval" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_bt" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_checkstatus" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_chkpwd" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_chngpwd" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ <attr name="new_password" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_completeauthorizations" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="&amp;array" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_connect" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_connectionerror" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_deleteresponse" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_deletetrans" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_deleteusersetup" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="usersetup" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_deluser" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_destroyconn" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_destroyengine" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="mcve_disableuser" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_edituser" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ <attr name="usersetup" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_enableuser" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_force" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="trackdata" type="string" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="expdate" type="string" status="required"></attr>
+ <attr name="amount" type="float" status="required"></attr>
+ <attr name="authcode" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_getcell" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ <attr name="column" type="string" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_getcellbynum" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ <attr name="column" type="int" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_getcommadelimited" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_getheader" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ <attr name="column_num" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_getuserarg" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="usersetup" type="resource" status="required"></attr>
+ <attr name="argtype" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_getuserparam" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ <attr name="key" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_gft" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ <attr name="startdate" type="string" status="required"></attr>
+ <attr name="enddate" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_gl" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="int" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="batch" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ <attr name="startdate" type="string" status="required"></attr>
+ <attr name="enddate" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_gut" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ <attr name="startdate" type="string" status="required"></attr>
+ <attr name="enddate" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_initconn" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="mcve_initengine" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="location" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_initusersetup" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="mcve_iscommadelimited" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_liststats" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_listusers" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="admin_password" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_maxconntimeout" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="secs" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_monitor" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_numcolumns" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_numrows" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_override" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="trackdata" type="string" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="expdate" type="string" status="required"></attr>
+ <attr name="amount" type="float" status="required"></attr>
+ <attr name="street" type="string" status="required"></attr>
+ <attr name="zip" type="string" status="required"></attr>
+ <attr name="cv" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_parsecommadelimited" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_ping" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_preauth" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="trackdata" type="string" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="expdate" type="string" status="required"></attr>
+ <attr name="amount" type="float" status="required"></attr>
+ <attr name="street" type="string" status="required"></attr>
+ <attr name="zip" type="string" status="required"></attr>
+ <attr name="cv" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_preauthcompletion" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="finalamount" type="float" status="required"></attr>
+ <attr name="sid" type="int" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_qc" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_responseparam" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_return" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="int" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="trackdata" type="string" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="expdate" type="string" status="required"></attr>
+ <attr name="amount" type="float" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_returncode" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_returnstatus" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_sale" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="trackdata" type="string" status="required"></attr>
+ <attr name="account" type="string" status="required"></attr>
+ <attr name="expdate" type="string" status="required"></attr>
+ <attr name="amount" type="float" status="required"></attr>
+ <attr name="street" type="string" status="required"></attr>
+ <attr name="zip" type="string" status="required"></attr>
+ <attr name="cv" type="string" status="required"></attr>
+ <attr name="comments" type="string" status="required"></attr>
+ <attr name="clerkid" type="string" status="required"></attr>
+ <attr name="stationid" type="string" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_setblocking" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="tf" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_setdropfile" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_setip" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_setssl_files" type="function" returnType="int" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="sslkeyfile" type="string" status="required"></attr>
+ <attr name="sslcertfile" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_setssl" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_settimeout" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="seconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_settle" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="batch" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_text_avs" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="code" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_text_code" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="code" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_text_cv" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="code" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactionauth" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactionavs" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactionbatch" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactioncv" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactionid" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactionitem" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactionssent" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_transactiontext" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transinqueue" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_transnew" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mcve_transparam" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ <attr name="key" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_transsend" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_ub" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="mcve_uwait" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="microsecs" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_verifyconnection" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="tf" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_verifysslcert" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="tf" type="int" status="required"></attr>
+ </tag>
+ <tag name="mcve_void" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="sid" type="int" status="required"></attr>
+ <attr name="ptrannum" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/memcache.tag b/quanta/data/dtep/php/memcache.tag
new file mode 100644
index 00000000..7e93f96d
--- /dev/null
+++ b/quanta/data/dtep/php/memcache.tag
@@ -0,0 +1,57 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="Memcache::add" type="function" returnType="bool" version="">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="flag" type="int" status="optional"></attr>
+ <attr name="expire" type="int" status="optional"></attr>
+ </tag>
+ <tag name="Memcache::close" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="Memcache::connect" type="function" returnType="bool" version="">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="memcache_debug" type="function" returnType="bool" version="">
+ <attr name="on_off" type="int" status="required"></attr>
+ </tag>
+ <tag name="Memcache::decrement" type="function" returnType="int" version="">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="int" status="optional"></attr>
+ </tag>
+ <tag name="Memcache::delete" type="function" returnType="bool" version="">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="Memcache::flush" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="Memcache::get" type="function" returnType="mixed" version="">
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="Memcache::getStats" type="function" returnType="array" version="">
+ </tag>
+ <tag name="Memcache::getVersion" type="function" returnType="string" version="">
+ </tag>
+ <tag name="Memcache::increment" type="function" returnType="int" version="">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="int" status="optional"></attr>
+ </tag>
+ <tag name="Memcache::pconnect" type="function" returnType="bool" version="">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="Memcache::replace" type="function" returnType="bool" version="">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="flag" type="int" status="optional"></attr>
+ <attr name="expire" type="int" status="optional"></attr>
+ </tag>
+ <tag name="Memcache::set" type="function" returnType="bool" version="">
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="flag" type="int" status="optional"></attr>
+ <attr name="expire" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mhash.tag b/quanta/data/dtep/php/mhash.tag
new file mode 100644
index 00000000..84bd4a31
--- /dev/null
+++ b/quanta/data/dtep/php/mhash.tag
@@ -0,0 +1,22 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mhash_count" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ </tag>
+ <tag name="mhash_get_block_size" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="hash" type="int" status="required"></attr>
+ </tag>
+ <tag name="mhash_get_hash_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="hash" type="int" status="required"></attr>
+ </tag>
+ <tag name="mhash_keygen_s2k" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="hash" type="int" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="salt" type="string" status="required"></attr>
+ <attr name="bytes" type="int" status="required"></attr>
+ </tag>
+ <tag name="mhash" type="function" returnType="string" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="hash" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="key" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mime_magic.tag b/quanta/data/dtep/php/mime_magic.tag
new file mode 100644
index 00000000..3971cbfc
--- /dev/null
+++ b/quanta/data/dtep/php/mime_magic.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mime_content_type" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ming.tag b/quanta/data/dtep/php/ming.tag
new file mode 100644
index 00000000..c69ec01a
--- /dev/null
+++ b/quanta/data/dtep/php/ming.tag
@@ -0,0 +1,318 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ming_setcubicthreshold" type="function" returnType="void" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="threshold" type="int" status="required"></attr>
+ </tag>
+ <tag name="ming_setscale" type="function" returnType="void" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="scale" type="int" status="required"></attr>
+ </tag>
+ <tag name="ming_useswfversion" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="version" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfaction" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ <attr name="script" type="string" status="required"></attr>
+ </tag>
+ <tag name="swfbitmap->getheight" type="function" returnType="int" version="">
+ </tag>
+ <tag name="swfbitmap->getwidth" type="function" returnType="int" version="">
+ </tag>
+ <tag name="swfbitmap" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ <attr name="file" type="mixed" status="required"></attr>
+ <attr name="alphafile" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="swfbutton_keypress" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->addaction" type="function" returnType="void" version="">
+ <attr name="action" type="resource" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->addshape" type="function" returnType="void" version="">
+ <attr name="shape" type="resource" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->setaction" type="function" returnType="void" version="">
+ <attr name="action" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->setdown" type="function" returnType="void" version="">
+ <attr name="shape" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->sethit" type="function" returnType="void" version="">
+ <attr name="shape" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->setover" type="function" returnType="void" version="">
+ <attr name="shape" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfbutton->setup" type="function" returnType="void" version="">
+ <attr name="shape" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfbutton" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swfdisplayitem->addcolor" type="function" returnType="void" version="">
+ <attr name="red" type="int" status="optional"></attr>
+ <attr name="green" type="int" status="optional"></attr>
+ <attr name="blue" type="int" status="optional"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfdisplayitem->move" type="function" returnType="void" version="">
+ <attr name="dx" type="int" status="required"></attr>
+ <attr name="dy" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->moveto" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->multcolor" type="function" returnType="void" version="">
+ <attr name="red" type="int" status="optional"></attr>
+ <attr name="green" type="int" status="optional"></attr>
+ <attr name="blue" type="int" status="optional"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfdisplayitem->remove" type="function" returnType="void" version="">
+ </tag>
+ <tag name="swfdisplayitem->rotate" type="function" returnType="void" version="">
+ <attr name="ddegrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->rotateto" type="function" returnType="void" version="">
+ <attr name="degrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->scale" type="function" returnType="void" version="">
+ <attr name="dx" type="int" status="required"></attr>
+ <attr name="dy" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->scaleto" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->setdepth" type="function" returnType="void" version="">
+ <attr name="depth" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->setname" type="function" returnType="void" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->setratio" type="function" returnType="void" version="">
+ <attr name="ratio" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->skewx" type="function" returnType="void" version="">
+ <attr name="ddegrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->skewxto" type="function" returnType="void" version="">
+ <attr name="degrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->skewy" type="function" returnType="void" version="">
+ <attr name="ddegrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem->skewyto" type="function" returnType="void" version="">
+ <attr name="degrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swfdisplayitem" type="function" returnType="object" version="">
+ </tag>
+ <tag name="swffill->moveto" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swffill->rotateto" type="function" returnType="void" version="">
+ <attr name="degrees" type="float" status="required"></attr>
+ </tag>
+ <tag name="swffill->scaleto" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swffill->skewxto" type="function" returnType="void" version="">
+ <attr name="x" type="float" status="required"></attr>
+ </tag>
+ <tag name="swffill->skewyto" type="function" returnType="void" version="">
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="SWFFill" type="function" returnType="object" version="">
+ </tag>
+ <tag name="swffont->getwidth" type="function" returnType="int" version="">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="swffont" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="swfgradient->addentry" type="function" returnType="void" version="">
+ <attr name="ratio" type="float" status="required"></attr>
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfgradient" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swfmorph->getshape1" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="swfmorph->getshape2" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="swfmorph" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swfmovie->add" type="function" returnType="void" version="">
+ <attr name="instance" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfmovie->nextframe" type="function" returnType="void" version="">
+ </tag>
+ <tag name="swfmovie->output" type="function" returnType="int" version="">
+ <attr name="compression" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfmovie->remove" type="function" returnType="void" version="">
+ <attr name="instance" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfmovie->save" type="function" returnType="int" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="compression" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfmovie->setbackground" type="function" returnType="void" version="">
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfmovie->setdimension" type="function" returnType="void" version="">
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfmovie->setframes" type="function" returnType="void" version="">
+ <attr name="numberofframes" type="string" status="required"></attr>
+ </tag>
+ <tag name="swfmovie->setrate" type="function" returnType="void" version="">
+ <attr name="rate" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfmovie->streammp3" type="function" returnType="void" version="">
+ <attr name="mp3File" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="swfmovie" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swfshape->addfill" type="function" returnType="void" version="">
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfshape->drawcurve" type="function" returnType="void" version="">
+ <attr name="controldx" type="int" status="required"></attr>
+ <attr name="controldy" type="int" status="required"></attr>
+ <attr name="anchordx" type="int" status="required"></attr>
+ <attr name="anchordy" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfshape->drawcurveto" type="function" returnType="void" version="">
+ <attr name="controlx" type="int" status="required"></attr>
+ <attr name="controly" type="int" status="required"></attr>
+ <attr name="anchorx" type="int" status="required"></attr>
+ <attr name="anchory" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfshape->drawline" type="function" returnType="void" version="">
+ <attr name="dx" type="int" status="required"></attr>
+ <attr name="dy" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfshape->drawlineto" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfshape->movepen" type="function" returnType="void" version="">
+ <attr name="dx" type="int" status="required"></attr>
+ <attr name="dy" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfshape->movepento" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfshape->setleftfill" type="function" returnType="void" version="">
+ <attr name="fill" type="swfgradient" status="required"></attr>
+ </tag>
+ <tag name="swfshape->setline" type="function" returnType="void" version="">
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="red" type="int" status="optional"></attr>
+ <attr name="green" type="int" status="optional"></attr>
+ <attr name="blue" type="int" status="optional"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swfshape->setrightfill" type="function" returnType="void" version="">
+ <attr name="fill" type="swfgradient" status="required"></attr>
+ </tag>
+ <tag name="swfshape" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swfsprite->add" type="function" returnType="void" version="">
+ <attr name="object" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfsprite->nextframe" type="function" returnType="void" version="">
+ </tag>
+ <tag name="swfsprite->remove" type="function" returnType="void" version="">
+ <attr name="object" type="resource" status="required"></attr>
+ </tag>
+ <tag name="swfsprite->setframes" type="function" returnType="void" version="">
+ <attr name="numberofframes" type="int" status="required"></attr>
+ </tag>
+ <tag name="swfsprite" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swftext->addstring" type="function" returnType="void" version="">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="swftext->getwidth" type="function" returnType="void" version="">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="swftext->moveto" type="function" returnType="void" version="">
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftext->setcolor" type="function" returnType="void" version="">
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swftext->setfont" type="function" returnType="void" version="">
+ <attr name="font" type="string" status="required"></attr>
+ </tag>
+ <tag name="swftext->setheight" type="function" returnType="void" version="">
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftext->setspacing" type="function" returnType="void" version="">
+ <attr name="spacing" type="float" status="required"></attr>
+ </tag>
+ <tag name="swftext" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="swftextfield->addstring" type="function" returnType="void" version="">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->align" type="function" returnType="void" version="">
+ <attr name="alignement" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setbounds" type="function" returnType="void" version="">
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setcolor" type="function" returnType="void" version="">
+ <attr name="red" type="int" status="required"></attr>
+ <attr name="green" type="int" status="required"></attr>
+ <attr name="blue" type="int" status="required"></attr>
+ <attr name="a" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swftextfield->setfont" type="function" returnType="void" version="">
+ <attr name="font" type="string" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setheight" type="function" returnType="void" version="">
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setindentation" type="function" returnType="void" version="">
+ <attr name="width" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setleftmargin" type="function" returnType="void" version="">
+ <attr name="width" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setlinespacing" type="function" returnType="void" version="">
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setmargins" type="function" returnType="void" version="">
+ <attr name="left" type="int" status="required"></attr>
+ <attr name="right" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setname" type="function" returnType="void" version="">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="swftextfield->setrightmargin" type="function" returnType="void" version="">
+ <attr name="width" type="int" status="required"></attr>
+ </tag>
+ <tag name="swftextfield" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/misc.tag b/quanta/data/dtep/php/misc.tag
new file mode 100644
index 00000000..dc92d448
--- /dev/null
+++ b/quanta/data/dtep/php/misc.tag
@@ -0,0 +1,71 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="connection_aborted" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ </tag>
+ <tag name="connection_status" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ </tag>
+ <tag name="connection_timeout" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 &lt;= 4.0.4">
+ </tag>
+ <tag name="constant" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="define" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ <attr name="case_insensitive" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="defined" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="eval" type="function" returnType="mixed" version="">
+ <attr name="code_str" type="string" status="required"></attr>
+ </tag>
+ <tag name="exit" type="function" returnType="void" version="">
+ <attr name="status" type="string" status="optional"></attr>
+ </tag>
+ <tag name="get_browser" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="user_agent" type="string" status="optional"></attr>
+ <attr name="return_array" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="highlight_file" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="return" type="bool" status="required"></attr>
+ </tag>
+ <tag name="highlight_string" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="return" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ignore_user_abort" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="setting" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="pack" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="php_check_syntax" type="function" returnType="bool" version="PHP 5">
+ <attr name="file_name" type="string" status="required"></attr>
+ <attr name="&amp;error_message" type="string" status="optional"></attr>
+ </tag>
+ <tag name="php_strip_whitespace" type="function" returnType="string" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="sleep" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="seconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="time_nanosleep" type="function" returnType="mixed" version="PHP 5">
+ <attr name="seconds" type="int" status="required"></attr>
+ <attr name="nanoseconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="uniqid" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="prefix" type="string" status="optional"></attr>
+ <attr name="more_entropy" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="unpack" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="usleep" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="micro_seconds" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mnogosearch.tag b/quanta/data/dtep/php/mnogosearch.tag
new file mode 100644
index 00000000..3485cdec
--- /dev/null
+++ b/quanta/data/dtep/php/mnogosearch.tag
@@ -0,0 +1,96 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="udm_add_search_limit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="var" type="int" status="required"></attr>
+ <attr name="val" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_alloc_agent_array" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="databases" type="array" status="required"></attr>
+ </tag>
+ <tag name="udm_alloc_agent" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="dbaddr" type="string" status="required"></attr>
+ <attr name="dbmode" type="string" status="optional"></attr>
+ </tag>
+ <tag name="udm_api_version" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ </tag>
+ <tag name="udm_cat_list" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="category" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_cat_path" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="category" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_check_charset" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="charset" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_check_stored" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="link" type="int" status="required"></attr>
+ <attr name="doc_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_clear_search_limits" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ </tag>
+ <tag name="udm_close_stored" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="link" type="int" status="required"></attr>
+ </tag>
+ <tag name="udm_crc32" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ </tag>
+ <tag name="udm_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ </tag>
+ <tag name="udm_find" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_free_agent" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ </tag>
+ <tag name="udm_free_ispell_data" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="int" status="required"></attr>
+ </tag>
+ <tag name="udm_free_res" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="res" type="resource" status="required"></attr>
+ </tag>
+ <tag name="udm_get_doc_count" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ </tag>
+ <tag name="udm_get_res_field" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="res" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="udm_get_res_param" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="res" type="resource" status="required"></attr>
+ <attr name="param" type="int" status="required"></attr>
+ </tag>
+ <tag name="udm_hash32" type="function" returnType="int" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_load_ispell_data" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="var" type="int" status="required"></attr>
+ <attr name="val1" type="string" status="required"></attr>
+ <attr name="val2" type="string" status="required"></attr>
+ <attr name="flag" type="int" status="required"></attr>
+ </tag>
+ <tag name="udm_open_stored" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="storedaddr" type="string" status="required"></attr>
+ </tag>
+ <tag name="udm_set_agent_param" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="agent" type="resource" status="required"></attr>
+ <attr name="var" type="int" status="required"></attr>
+ <attr name="val" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/msession.tag b/quanta/data/dtep/php/msession.tag
new file mode 100644
index 00000000..91495875
--- /dev/null
+++ b/quanta/data/dtep/php/msession.tag
@@ -0,0 +1,76 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="msession_connect" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="port" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_count" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="msession_create" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_destroy" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_disconnect" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="msession_find" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_get_array" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_get_data" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_get" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_inc" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_list" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="msession_listvar" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_lock" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_plugin" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="val" type="string" status="required"></attr>
+ <attr name="param" type="string" status="optional"></attr>
+ </tag>
+ <tag name="msession_randstr" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="param" type="int" status="required"></attr>
+ </tag>
+ <tag name="msession_set_array" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="tuples" type="array" status="required"></attr>
+ </tag>
+ <tag name="msession_set_data" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_set" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="msession_timeout" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="param" type="int" status="optional"></attr>
+ </tag>
+ <tag name="msession_uniq" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="param" type="int" status="required"></attr>
+ </tag>
+ <tag name="msession_unlock" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="session" type="string" status="required"></attr>
+ <attr name="key" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/msql.tag b/quanta/data/dtep/php/msql.tag
new file mode 100644
index 00000000..5ac9cba4
--- /dev/null
+++ b/quanta/data/dtep/php/msql.tag
@@ -0,0 +1,111 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="msql_affected_rows" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="msql_close" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_connect" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="msql_create_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_data_seek" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_db_query" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_drop_db" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_error" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_fetch_array" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="int" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="msql_fetch_field" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="msql_fetch_object" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_fetch_row" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="msql_field_flags" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_field_len" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_field_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_field_seek" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="int" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_field_table" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="int" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_field_type" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="msql_free_result" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="msql_list_dbs" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_list_fields" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="tablename" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_list_tables" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_num_fields" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="msql_num_rows" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="msql_pconnect" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="server" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="msql_query" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="msql_result" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query_identifier" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="msql_select_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mssql.tag b/quanta/data/dtep/php/mssql.tag
new file mode 100644
index 00000000..d1acecf6
--- /dev/null
+++ b/quanta/data/dtep/php/mssql.tag
@@ -0,0 +1,117 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mssql_bind" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="param_name" type="string" status="required"></attr>
+ <attr name="&amp;var" type="mixed" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="is_output" type="int" status="optional"></attr>
+ <attr name="is_null" type="int" status="optional"></attr>
+ <attr name="maxlen" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mssql_connect" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="servername" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mssql_data_seek" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="mssql_execute" type="function" returnType="mixed" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="skip_results" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="mssql_fetch_array" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_fetch_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_fetch_batch" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="result_index" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_fetch_field" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_fetch_object" type="function" returnType="object" version="PHP 3, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_fetch_row" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_field_length" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_field_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_field_seek" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mssql_field_type" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_free_result" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_free_statement" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_get_last_message" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="mssql_guid_string" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="binary" type="string" status="required"></attr>
+ <attr name="short_format" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_init" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="sp_name" type="string" status="required"></attr>
+ <attr name="conn_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mssql_min_error_severity" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="severity" type="int" status="required"></attr>
+ </tag>
+ <tag name="mssql_min_message_severity" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="severity" type="int" status="required"></attr>
+ </tag>
+ <tag name="mssql_next_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_num_fields" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_num_rows" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_pconnect" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="servername" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mssql_query" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ <attr name="batch_size" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mssql_result" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="mssql_rows_affected" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="conn_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mssql_select_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/muscat.tag b/quanta/data/dtep/php/muscat.tag
new file mode 100644
index 00000000..e1267580
--- /dev/null
+++ b/quanta/data/dtep/php/muscat.tag
@@ -0,0 +1,20 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="muscat_close" type="function" returnType="int" version="4.0.5 - 4.2.3 only">
+ <attr name="muscat_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="muscat_get" type="function" returnType="string" version="4.0.5 - 4.2.3 only">
+ <attr name="muscat_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="muscat_give" type="function" returnType="int" version="4.0.5 - 4.2.3 only">
+ <attr name="muscat_handle" type="resource" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="muscat_setup_net" type="function" returnType="resource" version="4.0.5 - 4.2.3 only">
+ <attr name="muscat_host" type="string" status="required"></attr>
+ </tag>
+ <tag name="muscat_setup" type="function" returnType="resource" version="4.0.5 - 4.2.3 only">
+ <attr name="size" type="int" status="required"></attr>
+ <attr name="muscat_dir" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mysql.tag b/quanta/data/dtep/php/mysql.tag
new file mode 100644
index 00000000..c6d34121
--- /dev/null
+++ b/quanta/data/dtep/php/mysql.tag
@@ -0,0 +1,181 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mysql_affected_rows" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_change_user" type="function" returnType="int" version="PHP 3&gt;= 3.0.13">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="database" type="string" status="optional"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_client_encoding" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_connect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="server" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="new_link" type="bool" status="optional"></attr>
+ <attr name="client_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mysql_create_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_data_seek" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_db_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mysql_db_query" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_drop_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_errno" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_error" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_escape_string" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="unescaped_string" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysql_fetch_array" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mysql_fetch_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_fetch_field" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mysql_fetch_lengths" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_fetch_object" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_fetch_row" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_field_flags" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_field_len" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_field_name" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_index" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_field_seek" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_field_table" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_field_type" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_free_result" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_get_client_info" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ </tag>
+ <tag name="mysql_get_host_info" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_get_proto_info" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_get_server_info" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_info" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_insert_id" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_list_dbs" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_list_fields" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_list_processes" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_list_tables" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_num_fields" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_num_rows" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysql_pconnect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="server" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="client_flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="mysql_ping" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_query" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_real_escape_string" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="unescaped_string" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_result" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mysql_select_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_stat" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_tablename" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="i" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysql_thread_id" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="mysql_unbuffered_query" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/mysqli.tag b/quanta/data/dtep/php/mysqli.tag
new file mode 100644
index 00000000..6c363fbe
--- /dev/null
+++ b/quanta/data/dtep/php/mysqli.tag
@@ -0,0 +1,313 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="mysqli_affected_rows" type="function" returnType="mixed" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_autocommit" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="mode" type="bool" status="required"></attr>
+ </tag>
+ <tag name="mysqli_change_user" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="database" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_character_set_name" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_close" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_commit" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_connect_errno" type="function" returnType="int" version="PHP 5">
+ </tag>
+ <tag name="mysqli_connect_error" type="function" returnType="string" version="PHP 5">
+ </tag>
+ <tag name="mysqli_connect" type="function" returnType="object" version="PHP 5">
+ <attr name="host" type="string"></attr>
+ <attr name="username" type="string"></attr>
+ <attr name="passwd" type="string"></attr>
+ <attr name="dbname" type="string"></attr>
+ <attr name="port" type="int"></attr>
+ <attr name="socket" type="string"></attr>
+ </tag>
+ <tag name="mysqli_data_seek" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_debug" type="function" returnType="void" version="PHP 5">
+ <attr name="debug" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_disable_reads_from_master" type="function" returnType="void" version="PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ </tag>
+ <tag name="mysqli_disable_rpl_parse" type="function" returnType="void" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_dump_debug_info" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_embedded_connect" type="function" returnType="object" version="PHP 5">
+ <attr name="dbname" type="string" status="optional"></attr>
+ </tag>
+ <tag name="mysqli_enable_reads_from_master" type="function" returnType="void" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_enable_rpl_parse" type="function" returnType="void" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_errno" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_error" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_array" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ <attr name="resulttype" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_assoc" type="function" returnType="array" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_field_direct" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ <attr name="fieldnr" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_field" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_fields" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_lengths" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_object" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_fetch_row" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_field_count" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_field_seek" type="function" returnType="int" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ <attr name="fieldnr" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_field_tell" type="function" returnType="int" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_free_result" type="function" returnType="void" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_get_client_info" type="function" returnType="string" version="PHP 5">
+ </tag>
+ <tag name="mysqli_get_client_version" type="function" returnType="int" version="PHP 5">
+ </tag>
+ <tag name="mysqli_get_host_info" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_get_proto_info" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_get_server_info" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_get_server_version" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_info" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_init" type="function" returnType="object" version="PHP 5">
+ </tag>
+ <tag name="mysqli_insert_id" type="function" returnType="mixed" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_kill" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="processid" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_master_query" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_more_results" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_multi_query" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_next_result" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_num_fields" type="function" returnType="int" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_num_rows" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_options" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="mysqli_ping" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_prepare" type="function" returnType="mixed" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_query" type="function" returnType="mixed" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="resultmode" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_real_connect" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="passwd" type="string" status="required"></attr>
+ <attr name="dbname" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="socket" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_real_escape_string" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="escapestr" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_real_query" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_report" type="function" returnType="bool" version="PHP 5">
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_rollback" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_rpl_parse_enabled" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_rpl_probe" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_rpl_query_type" type="function" returnType="int" version="PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_select_db" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="dbname" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_send_query" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_server_end" type="function" returnType="void" version="PHP 5">
+ </tag>
+ <tag name="mysqli_server_init" type="function" returnType="bool" version="PHP 5">
+ <attr name="server" type="array" status="optional"></attr>
+ <attr name="groups" type="array" status="optional"></attr>
+ </tag>
+ <tag name="mysqli_sqlstate" type="function" returnType="string" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_ssl_set" type="function" returnType="bool" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="cert" type="string" status="required"></attr>
+ <attr name="ca" type="string" status="required"></attr>
+ <attr name="capath" type="string" status="required"></attr>
+ <attr name="cipher" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stat" type="function" returnType="mixed" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_affected_rows" type="function" returnType="mixed" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_bind_param" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ <attr name="types" type="string" status="required"></attr>
+ <attr name="&amp;var1" type="mixed" status="required"></attr>
+ <attr name="&amp;..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mysqli_stmt_bind_result" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ <attr name="&amp;var1" type="mixed" status="required"></attr>
+ <attr name="&amp;..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="mysqli_stmt_close" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_data_seek" type="function" returnType="bool" version="PHP 5">
+ <attr name="statement" type="object" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_errno" type="function" returnType="int" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_error" type="function" returnType="string" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_execute" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_fetch" type="function" returnType="mixed" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_free_result" type="function" returnType="void" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_init" type="function" returnType="object" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_num_rows" type="function" returnType="mixed" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_param_count" type="function" returnType="int" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_prepare" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_reset" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_result_metadata" type="function" returnType="mixed" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_send_long_data" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ <attr name="param_nr" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_sqlstate" type="function" returnType="string" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_stmt_store_result" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_store_result" type="function" returnType="object" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_thread_id" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_thread_safe" type="function" returnType="bool" version="PHP 5">
+ </tag>
+ <tag name="mysqli_use_result" type="function" returnType="mixed" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+ <tag name="mysqli_warning_count" type="function" returnType="int" version="PHP 5">
+ <attr name="link" type="object" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ncurses.tag b/quanta/data/dtep/php/ncurses.tag
new file mode 100644
index 00000000..5daae115
--- /dev/null
+++ b/quanta/data/dtep/php/ncurses.tag
@@ -0,0 +1,535 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ncurses_addch" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="ch" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_addchnstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="s" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_addchstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="s" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_addnstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="s" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_addstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_assume_default_colors" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="fg" type="int" status="required"></attr>
+ <attr name="bg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_attroff" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="attributes" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_attron" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="attributes" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_attrset" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="attributes" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_baudrate" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_beep" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_bkgd" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="attrchar" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_bkgdset" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="attrchar" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_border" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="left" type="int" status="required"></attr>
+ <attr name="right" type="int" status="required"></attr>
+ <attr name="top" type="int" status="required"></attr>
+ <attr name="bottom" type="int" status="required"></attr>
+ <attr name="tl_corner" type="int" status="required"></attr>
+ <attr name="tr_corner" type="int" status="required"></attr>
+ <attr name="bl_corner" type="int" status="required"></attr>
+ <attr name="br_corner" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_bottom_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_can_change_color" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_cbreak" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_clear" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_clrtobot" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_clrtoeol" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_color_content" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="color" type="int" status="required"></attr>
+ <attr name="&amp;r" type="int" status="required"></attr>
+ <attr name="&amp;g" type="int" status="required"></attr>
+ <attr name="&amp;b" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_color_set" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="pair" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_curs_set" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="visibility" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_def_prog_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_def_shell_mode" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_define_key" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="definition" type="string" status="required"></attr>
+ <attr name="keycode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_del_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_delay_output" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="milliseconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_delch" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_deleteln" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_delwin" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_doupdate" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_echo" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_echochar" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="character" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_end" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_erase" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_erasechar" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_filter" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_flash" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_flushinp" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_getch" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_getmaxyx" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="&amp;y" type="int" status="required"></attr>
+ <attr name="&amp;x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_getmouse" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="&amp;mevent" type="array" status="required"></attr>
+ </tag>
+ <tag name="ncurses_getyx" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="&amp;y" type="int" status="required"></attr>
+ <attr name="&amp;x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_halfdelay" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="tenth" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_has_colors" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_has_ic" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_has_il" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_has_key" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="keycode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_hide_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_hline" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="charattr" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_inch" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_init_color" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="color" type="int" status="required"></attr>
+ <attr name="r" type="int" status="required"></attr>
+ <attr name="g" type="int" status="required"></attr>
+ <attr name="b" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_init_pair" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="pair" type="int" status="required"></attr>
+ <attr name="fg" type="int" status="required"></attr>
+ <attr name="bg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_init" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_insch" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="character" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_insdelln" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="count" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_insertln" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_insstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_instr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="&amp;buffer" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_isendwin" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_keyok" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="keycode" type="int" status="required"></attr>
+ <attr name="enable" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_keypad" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="bf" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_killchar" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_longname" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="ncurses_meta" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="8bit" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mouse_trafo" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="&amp;y" type="int" status="required"></attr>
+ <attr name="&amp;x" type="int" status="required"></attr>
+ <attr name="toscreen" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mouseinterval" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="milliseconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mousemask" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="newmask" type="int" status="required"></attr>
+ <attr name="&amp;oldmask" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_move_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ <attr name="startx" type="int" status="required"></attr>
+ <attr name="starty" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_move" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvaddch" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="c" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvaddchnstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="s" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvaddchstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="s" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvaddnstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="s" type="string" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvaddstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="s" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvcur" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="old_y" type="int" status="required"></attr>
+ <attr name="old_x" type="int" status="required"></attr>
+ <attr name="new_y" type="int" status="required"></attr>
+ <attr name="new_x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvdelch" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvgetch" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvhline" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="attrchar" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvinch" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvvline" type="function" returnType="int" version="">
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="attrchar" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_mvwaddstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_napms" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="milliseconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_new_panel" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_newpad" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="rows" type="int" status="required"></attr>
+ <attr name="cols" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_newwin" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="rows" type="int" status="required"></attr>
+ <attr name="cols" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_nl" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_nocbreak" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_noecho" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_nonl" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_noqiflush" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_noraw" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_pair_content" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="pair" type="int" status="required"></attr>
+ <attr name="&amp;f" type="int" status="required"></attr>
+ <attr name="&amp;b" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_panel_above" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_panel_below" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_panel_window" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_pnoutrefresh" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="pad" type="resource" status="required"></attr>
+ <attr name="pminrow" type="int" status="required"></attr>
+ <attr name="pmincol" type="int" status="required"></attr>
+ <attr name="sminrow" type="int" status="required"></attr>
+ <attr name="smincol" type="int" status="required"></attr>
+ <attr name="smaxrow" type="int" status="required"></attr>
+ <attr name="smaxcol" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_prefresh" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="pad" type="resource" status="required"></attr>
+ <attr name="pminrow" type="int" status="required"></attr>
+ <attr name="pmincol" type="int" status="required"></attr>
+ <attr name="sminrow" type="int" status="required"></attr>
+ <attr name="smincol" type="int" status="required"></attr>
+ <attr name="smaxrow" type="int" status="required"></attr>
+ <attr name="smaxcol" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_putp" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_qiflush" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_raw" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_refresh" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="ch" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_replace_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_reset_prog_mode" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="ncurses_reset_shell_mode" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="ncurses_resetty" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_savetty" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_scr_dump" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_scr_init" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_scr_restore" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_scr_set" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="ncurses_scrl" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="count" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_show_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_attr" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_slk_attroff" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="intarg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_attron" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="intarg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_attrset" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="intarg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_clear" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_slk_color" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="intarg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_init" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="format" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_noutrefresh" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_slk_refresh" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_slk_restore" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_slk_set" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="labelnr" type="int" status="required"></attr>
+ <attr name="label" type="string" status="required"></attr>
+ <attr name="format" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_slk_touch" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_standend" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_standout" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_start_color" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_termattrs" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_termname" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="ncurses_timeout" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="millisec" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_top_panel" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="panel" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_typeahead" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="fd" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_ungetch" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="keycode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_ungetmouse" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="mevent" type="array" status="required"></attr>
+ </tag>
+ <tag name="ncurses_update_panels" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="ncurses_use_default_colors" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ncurses_use_env" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="flag" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_use_extended_names" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="flag" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_vidattr" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="intarg" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_vline" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="charattr" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_waddch" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="ch" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_waddstr" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="n" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ncurses_wattroff" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="attrs" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wattron" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="attrs" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wattrset" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="attrs" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wborder" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="left" type="int" status="required"></attr>
+ <attr name="right" type="int" status="required"></attr>
+ <attr name="top" type="int" status="required"></attr>
+ <attr name="bottom" type="int" status="required"></attr>
+ <attr name="tl_corner" type="int" status="required"></attr>
+ <attr name="tr_corner" type="int" status="required"></attr>
+ <attr name="bl_corner" type="int" status="required"></attr>
+ <attr name="br_corner" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wclear" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wcolor_set" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="color_pair" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_werase" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wgetch" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_whline" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="charattr" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wmouse_trafo" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="&amp;y" type="int" status="required"></attr>
+ <attr name="&amp;x" type="int" status="required"></attr>
+ <attr name="toscreen" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wmove" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wnoutrefresh" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wrefresh" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wstandend" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wstandout" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ncurses_wvline" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="window" type="resource" status="required"></attr>
+ <attr name="charattr" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/network.tag b/quanta/data/dtep/php/network.tag
new file mode 100644
index 00000000..cd44ce2e
--- /dev/null
+++ b/quanta/data/dtep/php/network.tag
@@ -0,0 +1,94 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="checkdnsrr" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="type" type="string" status="optional"></attr>
+ </tag>
+ <tag name="closelog" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="debugger_off" type="function" returnType="int" version="PHP 3">
+ </tag>
+ <tag name="debugger_on" type="function" returnType="int" version="PHP 3">
+ <attr name="address" type="string" status="required"></attr>
+ </tag>
+ <tag name="define_syslog_variables" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="dns_check_record" type="function" returnType="int" version="PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="type" type="string" status="optional"></attr>
+ </tag>
+ <tag name="dns_get_mx" type="function" returnType="int" version="PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="&amp;mxhosts" type="array" status="required"></attr>
+ <attr name="&amp;weight" type="array" status="optional"></attr>
+ </tag>
+ <tag name="dns_get_record" type="function" returnType="array" version="PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ <attr name="&amp;authns" type="array" status="optional"></attr>
+ <attr name="&amp;addtl" type="array" status="required"></attr>
+ </tag>
+ <tag name="fsockopen" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="target" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="&amp;errno" type="int" status="optional"></attr>
+ <attr name="&amp;errstr" type="string" status="optional"></attr>
+ <attr name="timeout" type="float" status="optional"></attr>
+ </tag>
+ <tag name="gethostbyaddr" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="ip_address" type="string" status="required"></attr>
+ </tag>
+ <tag name="gethostbyname" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ </tag>
+ <tag name="gethostbynamel" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ </tag>
+ <tag name="getmxrr" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="&amp;mxhosts" type="array" status="required"></attr>
+ <attr name="&amp;weight" type="array" status="optional"></attr>
+ </tag>
+ <tag name="getprotobyname" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="getprotobynumber" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="number" type="int" status="required"></attr>
+ </tag>
+ <tag name="getservbyname" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="service" type="string" status="required"></attr>
+ <attr name="protocol" type="string" status="required"></attr>
+ </tag>
+ <tag name="getservbyport" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="protocol" type="string" status="required"></attr>
+ </tag>
+ <tag name="inet_ntop" type="function" returnType="string" version="">
+ <attr name="in_addr" type="string" status="required"></attr>
+ </tag>
+ <tag name="inet_pton" type="function" returnType="string" version="">
+ <attr name="address" type="string" status="required"></attr>
+ </tag>
+ <tag name="ip2long" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="ip_address" type="string" status="required"></attr>
+ </tag>
+ <tag name="long2ip" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="proper_address" type="int" status="required"></attr>
+ </tag>
+ <tag name="openlog" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="ident" type="string" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="facility" type="int" status="required"></attr>
+ </tag>
+ <tag name="pfsockopen" type="function" returnType="resource" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="&amp;errno" type="int" status="optional"></attr>
+ <attr name="&amp;errstr" type="string" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ </tag>
+ <tag name="syslog" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="priority" type="int" status="required"></attr>
+ <attr name="message" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/nis.tag b/quanta/data/dtep/php/nis.tag
new file mode 100644
index 00000000..c5d99c8a
--- /dev/null
+++ b/quanta/data/dtep/php/nis.tag
@@ -0,0 +1,41 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="yp_all" type="function" returnType="void" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ <attr name="callback" type="string" status="required"></attr>
+ </tag>
+ <tag name="yp_cat" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ </tag>
+ <tag name="yp_err_string" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="errorcode" type="int" status="required"></attr>
+ </tag>
+ <tag name="yp_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ </tag>
+ <tag name="yp_first" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ </tag>
+ <tag name="yp_get_default_domain" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ </tag>
+ <tag name="yp_master" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ </tag>
+ <tag name="yp_match" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="yp_next" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ </tag>
+ <tag name="yp_order" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="map" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/notes.tag b/quanta/data/dtep/php/notes.tag
new file mode 100644
index 00000000..892a2644
--- /dev/null
+++ b/quanta/data/dtep/php/notes.tag
@@ -0,0 +1,60 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="notes_body" type="function" returnType="array" version="PHP 4 &gt;= 4.0.5">
+ <attr name="server" type="string" status="required"></attr>
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="notes_copy_db" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="from_database_name" type="string" status="required"></attr>
+ <attr name="to_database_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_create_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_create_note" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="form_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_drop_db" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_find_note" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="type" type="string" status="optional"></attr>
+ </tag>
+ <tag name="notes_header_info" type="function" returnType="object" version="PHP 4 &gt;= 4.0.5">
+ <attr name="server" type="string" status="required"></attr>
+ <attr name="mailbox" type="string" status="required"></attr>
+ <attr name="msg_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="notes_list_msgs" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="db" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_mark_read" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="user_name" type="string" status="required"></attr>
+ <attr name="note_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_mark_unread" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="user_name" type="string" status="required"></attr>
+ <attr name="note_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_nav_create" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_search" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="keywords" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_unread" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="user_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="notes_version" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ <attr name="database_name" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/nsapi.tag b/quanta/data/dtep/php/nsapi.tag
new file mode 100644
index 00000000..ff5c0940
--- /dev/null
+++ b/quanta/data/dtep/php/nsapi.tag
@@ -0,0 +1,10 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="nsapi_request_headers" type="function" returnType="array" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ </tag>
+ <tag name="nsapi_response_headers" type="function" returnType="array" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ </tag>
+ <tag name="nsapi_virtual" type="function" returnType="int" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="uri" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/objaggregation.tag b/quanta/data/dtep/php/objaggregation.tag
new file mode 100644
index 00000000..68efd595
--- /dev/null
+++ b/quanta/data/dtep/php/objaggregation.tag
@@ -0,0 +1,46 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="aggregate_info" type="function" returnType="array" version="">
+ <attr name="object" type="object" status="required"></attr>
+ </tag>
+ <tag name="aggregate_methods_by_list" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="methods_list" type="array" status="required"></attr>
+ <attr name="exclude" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="aggregate_methods_by_regexp" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="regexp" type="string" status="required"></attr>
+ <attr name="exclude" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="aggregate_methods" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="aggregate_properties_by_list" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="properties_list" type="array" status="required"></attr>
+ <attr name="exclude" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="aggregate_properties_by_regexp" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="regexp" type="string" status="required"></attr>
+ <attr name="exclude" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="aggregate_properties" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="aggregate" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="deaggregate" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="object" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/oci8.tag b/quanta/data/dtep/php/oci8.tag
new file mode 100644
index 00000000..c0e469ce
--- /dev/null
+++ b/quanta/data/dtep/php/oci8.tag
@@ -0,0 +1,421 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="oci_bind_by_name" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="ph_name" type="string" status="required"></attr>
+ <attr name="&amp;variable" type="mixed" status="required"></attr>
+ <attr name="maxlength" type="int" status="optional"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_cancel" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_close" type="function" returnType="bool" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="collection->append" type="function" returnType="bool" version="">
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="collection->assign" type="function" returnType="bool" version="">
+ <attr name="from" type="object" status="required"></attr>
+ </tag>
+ <tag name="collection->assignElem" type="function" returnType="bool" version="">
+ <attr name="index" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="collection->getElem" type="function" returnType="mixed" version="">
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="collection->max" type="function" returnType="int" version="">
+ </tag>
+ <tag name="collection->size" type="function" returnType="int" version="">
+ </tag>
+ <tag name="collection->trim" type="function" returnType="bool" version="">
+ <attr name="num" type="int" status="required"></attr>
+ </tag>
+ <tag name="oci_commit" type="function" returnType="bool" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_connect" type="function" returnType="resource" version="PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="db" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="oci_define_by_name" type="function" returnType="bool" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="column_name" type="string" status="required"></attr>
+ <attr name="&amp;variable" type="mixed" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_error" type="function" returnType="array" version="PHP 5">
+ <attr name="source" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="oci_execute" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_fetch_all" type="function" returnType="int" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="&amp;output" type="array" status="required"></attr>
+ <attr name="skip" type="int" status="optional"></attr>
+ <attr name="maxrows" type="int" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_fetch_array" type="function" returnType="array" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_fetch_assoc" type="function" returnType="array" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_fetch_object" type="function" returnType="object" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_fetch_row" type="function" returnType="array" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_fetch" type="function" returnType="bool" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_field_is_null" type="function" returnType="bool" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="oci_field_name" type="function" returnType="string" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="oci_field_precision" type="function" returnType="int" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="oci_field_scale" type="function" returnType="int" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="oci_field_size" type="function" returnType="int" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="oci_field_type_raw" type="function" returnType="int" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="oci_field_type" type="function" returnType="mixed" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="field" type="int" status="required"></attr>
+ </tag>
+ <tag name="collection->free" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="descriptor->free" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="oci_free_statement" type="function" returnType="bool" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_internal_debug" type="function" returnType="void" version="PHP 5">
+ <attr name="onoff" type="int" status="required"></attr>
+ </tag>
+ <tag name="lob->append" type="function" returnType="bool" version="">
+ <attr name="lob_from" type="object" status="required"></attr>
+ </tag>
+ <tag name="lob->close" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="oci_lob_copy" type="function" returnType="bool" version="PHP 5">
+ <attr name="lob_to" type="object" status="required"></attr>
+ <attr name="lob_from" type="object" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->eof" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="lob->erase" type="function" returnType="int" version="">
+ <attr name="offset" type="int" status="optional"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->export" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="start" type="int" status="optional"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->flush" type="function" returnType="bool" version="">
+ <attr name="flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->import" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="oci_lob_is_equal" type="function" returnType="bool" version="PHP 5">
+ <attr name="lob1" type="object" status="required"></attr>
+ <attr name="lob2" type="object" status="required"></attr>
+ </tag>
+ <tag name="lob->load" type="function" returnType="string" version="">
+ </tag>
+ <tag name="lob->read" type="function" returnType="string" version="">
+ <attr name="length" type="int" status="required"></attr>
+ </tag>
+ <tag name="lob->rewind" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="lob->save" type="function" returnType="bool" version="">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->seek" type="function" returnType="bool" version="">
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="whence" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->size" type="function" returnType="int" version="">
+ </tag>
+ <tag name="lob->tell" type="function" returnType="int" version="">
+ </tag>
+ <tag name="lob->truncate" type="function" returnType="bool" version="">
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->writeTemporary" type="function" returnType="bool" version="">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="lob_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="lob->write" type="function" returnType="int" version="">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_new_collection" type="function" returnType="object" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="tdo" type="string" status="required"></attr>
+ <attr name="schema" type="string" status="optional"></attr>
+ </tag>
+ <tag name="oci_new_connect" type="function" returnType="resource" version="PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="db" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="oci_new_cursor" type="function" returnType="resource" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_new_descriptor" type="function" returnType="object" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_num_fields" type="function" returnType="int" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_num_rows" type="function" returnType="int" version="PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_parse" type="function" returnType="resource" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="oci_password_change" type="function" returnType="bool" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="old_password" type="string" status="required"></attr>
+ <attr name="new_password" type="string" status="required"></attr>
+ </tag>
+ <tag name="oci_pconnect" type="function" returnType="resource" version="PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="db" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="oci_result" type="function" returnType="mixed" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="oci_rollback" type="function" returnType="bool" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_server_version" type="function" returnType="string" version="PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="oci_set_prefetch" type="function" returnType="bool" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="rows" type="int" status="optional"></attr>
+ </tag>
+ <tag name="oci_statement_type" type="function" returnType="string" version="PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocibindbyname" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="ph_name" type="string" status="required"></attr>
+ <attr name="&amp;variable" type="mixed" status="required"></attr>
+ <attr name="maxlength" type="int" status="optional"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ocicancel" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocicloselob" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="ocicollappend" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="ocicollassign" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6">
+ <attr name="from" type="object" status="required"></attr>
+ </tag>
+ <tag name="ocicollassignelem" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="ndx" type="int" status="required"></attr>
+ <attr name="val" type="string" status="required"></attr>
+ </tag>
+ <tag name="ocicollgetelem" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="ndx" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicollmax" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ </tag>
+ <tag name="ocicollsize" type="function" returnType="int" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ </tag>
+ <tag name="ocicolltrim" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="num" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicolumnisnull" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="col" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ocicolumnname" type="function" returnType="string" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicolumnprecision" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicolumnscale" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicolumnsize" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="column" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ocicolumntype" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicolumntyperaw" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="col" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocicommit" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocidefinebyname" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="column_name" type="string" status="required"></attr>
+ <attr name="&amp;variable" type="mixed" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ocierror" type="function" returnType="array" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="stmt|conn|global" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ociexecute" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ocifetch" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocifetchinto" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="&amp;result" type="array" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ocifetchstatement" type="function" returnType="int" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="&amp;output" type="array" status="required"></attr>
+ <attr name="skip" type="int" status="optional"></attr>
+ <attr name="maxrows" type="int" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ocifreecollection" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="ocifreecursor" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocifreedesc" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ocifreestatement" type="function" returnType="bool" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="lob->getBuffering" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="ociinternaldebug" type="function" returnType="void" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="onoff" type="int" status="required"></attr>
+ </tag>
+ <tag name="ociloadlob" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ocilogoff" type="function" returnType="bool" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocilogon" type="function" returnType="resource" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="db" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ocinewcollection" type="function" returnType="object" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="tdo" type="string" status="required"></attr>
+ <attr name="schema" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ocinewcursor" type="function" returnType="resource" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocinewdescriptor" type="function" returnType="object" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ocinlogon" type="function" returnType="resource" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="db" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ocinumcols" type="function" returnType="int" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ociparse" type="function" returnType="resource" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="ociplogon" type="function" returnType="resource" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="db" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ociresult" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="statement" type="resource" status="required"></attr>
+ <attr name="col" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ocirollback" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocirowcount" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ocisavelob" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ocisavelobfile" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ociserverversion" type="function" returnType="string" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="lob->setBuffering" type="function" returnType="bool" version="">
+ <attr name="on_off" type="bool" status="required"></attr>
+ </tag>
+ <tag name="ocisetprefetch" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ <attr name="rows" type="int" status="required"></attr>
+ </tag>
+ <tag name="ocistatementtype" type="function" returnType="string" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="stmt" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ociwritelobtofile" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="start" type="int" status="optional"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ociwritetemporarylob" type="function" returnType="bool" version="">
+ <attr name="var" type="string" status="required"></attr>
+ <attr name="lob_type" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/odbc.tag b/quanta/data/dtep/php/odbc.tag
new file mode 100644
index 00000000..1b105765
--- /dev/null
+++ b/quanta/data/dtep/php/odbc.tag
@@ -0,0 +1,209 @@
+<!DOCTYPE tags>
+<tags> <tag name="odbc_autocommit" type="function" returnType="bool">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="OnOff" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="odbc_binmode" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_close_all" type="function" returnType="void">
+ </tag>
+ <tag name="odbc_close" type="function" returnType="void">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_columnprivileges" type="function" returnType="int">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="table_name" type="string" status="optional"></attr>
+ <attr name="column_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_columns" type="function" returnType="int">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="schema" type="string" status="optional"></attr>
+ <attr name="table_name" type="string" status="optional"></attr>
+ <attr name="column_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_commit" type="function" returnType="bool">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_connect" type="function" returnType="resource">
+ <attr name="dsn" type="string" status="optional"></attr>
+ <attr name="user" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="cursor_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_cursor" type="function" returnType="string">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_data_source" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="fetch_type" type="constant" status="optional"></attr>
+ </tag>
+ <tag name="odbc_do" type="function" returnType="resource">
+ <attr name="conn_id" type="resource" status="optional"></attr>
+ <attr name="query" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_error" type="function" returnType="string">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_errormsg" type="function" returnType="string">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_exec" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="query_string" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_execute" type="function" returnType="resource">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="parameters_array" type="array" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_array" type="function" returnType="array">
+ <attr name="result" type="resource" status="optional"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_into" type="function" returnType="bool">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ <attr name="result_array" type="array" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_object" type="function" returnType="object">
+ <attr name="result" type="resource" status="optional"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_row" type="function" returnType="bool">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="row_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_len" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_name" type="function" returnType="string">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_num" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_precision" type="function" returnType="string">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_scale" type="function" returnType="string">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_type" type="function" returnType="string">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_foreignkeys" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="pk_qualifier" type="string" status="optional"></attr>
+ <attr name="pk_owner" type="string" status="optional"></attr>
+ <attr name="pk_table" type="string" status="optional"></attr>
+ <attr name="fk_qualifier" type="string" status="optional"></attr>
+ <attr name="fk_owner" type="string" status="optional"></attr>
+ <attr name="fk_table" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_free_result" type="function" returnType="bool">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_gettypeinfo" type="function" returnType="int">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="data_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_longreadlen" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_next_result" type="function" returnType="bool">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_num_fields" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_num_rows" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_pconnect" type="function" returnType="int">
+ <attr name="dsn" type="string" status="optional"></attr>
+ <attr name="user" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="cursor_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_prepare" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="query_string" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_primarykeys" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="table" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_procedurecolumns" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="proc" type="string" status="optional"></attr>
+ <attr name="column" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_procedures" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_result_all" type="function" returnType="int">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="format" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_result" type="function" returnType="string">
+ <attr name="result_id" type="resource" status="optional"></attr>
+ <attr name="field" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="odbc_rollback" type="function" returnType="int">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_setoption" type="function" returnType="int">
+ <attr name="id" type="resource" status="optional"></attr>
+ <attr name="function" type="int" status="optional"></attr>
+ <attr name="option" type="int" status="optional"></attr>
+ <attr name="param" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_specialcolumns" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="table" type="string" status="optional"></attr>
+ <attr name="scope" type="int" status="optional"></attr>
+ <attr name="nullable" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_statistics" type="function" returnType="resource">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="table_name" type="string" status="optional"></attr>
+ <attr name="unique" type="int" status="optional"></attr>
+ <attr name="accuracy" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_tableprivileges" type="function" returnType="int">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_tables" type="function" returnType="int">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="name" type="string" status="optional"></attr>
+ <attr name="types" type="string" status="optional"></attr>
+ </tag>
+</tags>
diff --git a/quanta/data/dtep/php/openal.tag b/quanta/data/dtep/php/openal.tag
new file mode 100644
index 00000000..759a685d
--- /dev/null
+++ b/quanta/data/dtep/php/openal.tag
@@ -0,0 +1,81 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="openal_buffer_create" type="function" returnType="resource" version="">
+ </tag>
+ <tag name="openal_buffer_data" type="function" returnType="bool" version="">
+ <attr name="buffer" type="resource" status="required"></attr>
+ <attr name="format" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="freq" type="int" status="required"></attr>
+ </tag>
+ <tag name="openal_buffer_destroy" type="function" returnType="bool" version="">
+ <attr name="buffer" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_buffer_get" type="function" returnType="int" version="">
+ <attr name="buffer" type="resource" status="required"></attr>
+ <attr name="property" type="int" status="required"></attr>
+ </tag>
+ <tag name="openal_buffer_loadwav" type="function" returnType="bool" version="">
+ <attr name="buffer" type="resource" status="required"></attr>
+ <attr name="wavfile" type="string" status="required"></attr>
+ </tag>
+ <tag name="openal_context_create" type="function" returnType="resource" version="">
+ <attr name="device" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_context_current" type="function" returnType="bool" version="">
+ <attr name="context" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_context_destroy" type="function" returnType="bool" version="">
+ <attr name="context" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_context_process" type="function" returnType="bool" version="">
+ <attr name="context" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_context_suspend" type="function" returnType="bool" version="">
+ <attr name="context" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_device_close" type="function" returnType="bool" version="">
+ <attr name="device" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_device_open" type="function" returnType="resource" version="">
+ <attr name="device_desc" type="string" status="optional"></attr>
+ </tag>
+ <tag name="openal_listener_get" type="function" returnType="mixed" version="">
+ <attr name="property" type="int" status="required"></attr>
+ </tag>
+ <tag name="openal_listener_set" type="function" returnType="bool" version="">
+ <attr name="property" type="int" status="required"></attr>
+ <attr name="setting" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openal_source_create" type="function" returnType="resource" version="">
+ </tag>
+ <tag name="openal_source_destroy" type="function" returnType="resource" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_source_get" type="function" returnType="mixed" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ <attr name="property" type="int" status="required"></attr>
+ </tag>
+ <tag name="openal_source_pause" type="function" returnType="bool" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_source_play" type="function" returnType="bool" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_source_rewind" type="function" returnType="bool" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_source_set" type="function" returnType="bool" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ <attr name="property" type="int" status="required"></attr>
+ <attr name="setting" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openal_source_stop" type="function" returnType="bool" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openal_stream" type="function" returnType="resource" version="">
+ <attr name="source" type="resource" status="required"></attr>
+ <attr name="format" type="int" status="required"></attr>
+ <attr name="rate" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/openssl.tag b/quanta/data/dtep/php/openssl.tag
new file mode 100644
index 00000000..19c6ed11
--- /dev/null
+++ b/quanta/data/dtep/php/openssl.tag
@@ -0,0 +1,168 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="openssl_csr_export_to_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="csr" type="resource" status="required"></attr>
+ <attr name="outfilename" type="string" status="required"></attr>
+ <attr name="notext" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="openssl_csr_export" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="csr" type="resource" status="required"></attr>
+ <attr name="&amp;out" type="string" status="required"></attr>
+ <attr name="notext" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="openssl_csr_new" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="dn" type="array" status="required"></attr>
+ <attr name="&amp;privkey" type="resource" status="required"></attr>
+ <attr name="configargs" type="array" status="optional"></attr>
+ <attr name="extraattribs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="openssl_csr_sign" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="csr" type="mixed" status="required"></attr>
+ <attr name="cacert" type="mixed" status="required"></attr>
+ <attr name="priv_key" type="mixed" status="required"></attr>
+ <attr name="days" type="int" status="required"></attr>
+ <attr name="configargs" type="array" status="optional"></attr>
+ <attr name="serial" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_error_string" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ </tag>
+ <tag name="openssl_free_key" type="function" returnType="void" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="key_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openssl_get_privatekey" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="passphrase" type="string" status="optional"></attr>
+ </tag>
+ <tag name="openssl_get_publickey" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="certificate" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openssl_open" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="sealed_data" type="string" status="required"></attr>
+ <attr name="&amp;open_data" type="string" status="required"></attr>
+ <attr name="env_key" type="string" status="required"></attr>
+ <attr name="priv_key_id" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openssl_pkcs7_decrypt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="infilename" type="string" status="required"></attr>
+ <attr name="outfilename" type="string" status="required"></attr>
+ <attr name="recipcert" type="mixed" status="required"></attr>
+ <attr name="recipkey" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkcs7_encrypt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="infile" type="string" status="required"></attr>
+ <attr name="outfile" type="string" status="required"></attr>
+ <attr name="recipcerts" type="mixed" status="required"></attr>
+ <attr name="headers" type="array" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="cipherid" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkcs7_sign" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="infilename" type="string" status="required"></attr>
+ <attr name="outfilename" type="string" status="required"></attr>
+ <attr name="signcert" type="mixed" status="required"></attr>
+ <attr name="privkey" type="mixed" status="required"></attr>
+ <attr name="headers" type="array" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="extracerts" type="string" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkcs7_verify" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ <attr name="outfilename" type="string" status="optional"></attr>
+ <attr name="cainfo" type="array" status="optional"></attr>
+ <attr name="extracerts" type="string" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkey_export_to_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="outfilename" type="string" status="required"></attr>
+ <attr name="passphrase" type="string" status="optional"></attr>
+ <attr name="configargs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkey_export" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="&amp;out" type="string" status="required"></attr>
+ <attr name="passphrase" type="string" status="optional"></attr>
+ <attr name="configargs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkey_get_private" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="passphrase" type="string" status="optional"></attr>
+ </tag>
+ <tag name="openssl_pkey_get_public" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="certificate" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openssl_pkey_new" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="configargs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="openssl_private_decrypt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;decrypted" type="string" status="required"></attr>
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="padding" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_private_encrypt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;crypted" type="string" status="required"></attr>
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="padding" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_public_decrypt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;decrypted" type="string" status="required"></attr>
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="padding" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_public_encrypt" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;crypted" type="string" status="required"></attr>
+ <attr name="key" type="mixed" status="required"></attr>
+ <attr name="padding" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_seal" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;sealed_data" type="string" status="required"></attr>
+ <attr name="&amp;env_keys" type="array" status="required"></attr>
+ <attr name="pub_key_ids" type="array" status="required"></attr>
+ </tag>
+ <tag name="openssl_sign" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;signature" type="string" status="required"></attr>
+ <attr name="priv_key_id" type="mixed" status="required"></attr>
+ <attr name="signature_alg" type="int" status="optional"></attr>
+ </tag>
+ <tag name="openssl_verify" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="signature" type="string" status="required"></attr>
+ <attr name="pub_key_id" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openssl_x509_check_private_key" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="cert" type="mixed" status="required"></attr>
+ <attr name="key" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="openssl_x509_checkpurpose" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="x509cert" type="mixed" status="required"></attr>
+ <attr name="purpose" type="int" status="required"></attr>
+ <attr name="cainfo" type="array" status="optional"></attr>
+ <attr name="untrustedfile" type="string" status="optional"></attr>
+ </tag>
+ <tag name="openssl_x509_export_to_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="x509" type="mixed" status="required"></attr>
+ <attr name="outfilename" type="string" status="required"></attr>
+ <attr name="notext" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="openssl_x509_export" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="x509" type="mixed" status="required"></attr>
+ <attr name="&amp;output" type="string" status="required"></attr>
+ <attr name="notext" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="openssl_x509_free" type="function" returnType="void" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="x509cert" type="resource" status="required"></attr>
+ </tag>
+ <tag name="openssl_x509_parse" type="function" returnType="array" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="x509cert" type="mixed" status="required"></attr>
+ <attr name="shortnames" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="openssl_x509_read" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="x509certdata" type="mixed" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/oracle.tag b/quanta/data/dtep/php/oracle.tag
new file mode 100644
index 00000000..50099802
--- /dev/null
+++ b/quanta/data/dtep/php/oracle.tag
@@ -0,0 +1,87 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ora_bind" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="PHP_variable_name" type="string" status="required"></attr>
+ <attr name="SQL_parameter_name" type="string" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ora_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_columnname" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="column" type="int" status="required"></attr>
+ </tag>
+ <tag name="ora_columnsize" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="column" type="int" status="required"></attr>
+ </tag>
+ <tag name="ora_columntype" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="column" type="int" status="required"></attr>
+ </tag>
+ <tag name="ora_commit" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_commitoff" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_commiton" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_do" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="conn" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="ora_error" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor_or_connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ora_errorcode" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor_or_connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="ora_exec" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_fetch_into" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="&amp;result" type="array" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ora_fetch" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_getcolumn" type="function" returnType="mixed" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="column" type="int" status="required"></attr>
+ </tag>
+ <tag name="ora_logoff" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_logon" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="ora_numcols" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_numrows" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_open" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="ora_parse" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="cursor" type="resource" status="required"></attr>
+ <attr name="sql_statement" type="string" status="required"></attr>
+ <attr name="defer" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ora_plogon" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="ora_rollback" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/outcontrol.tag b/quanta/data/dtep/php/outcontrol.tag
new file mode 100644
index 00000000..4377e7c0
--- /dev/null
+++ b/quanta/data/dtep/php/outcontrol.tag
@@ -0,0 +1,46 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="flush" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="ob_clean" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="ob_end_clean" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ob_end_flush" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ob_flush" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="ob_get_clean" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="ob_get_contents" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="ob_get_flush" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="ob_get_length" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ </tag>
+ <tag name="ob_get_level" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="ob_get_status" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="full_status" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="ob_gzhandler" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="buffer" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="ob_implicit_flush" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="flag" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ob_list_handlers" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+ <tag name="ob_start" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="output_callback" type="callback" status="optional"></attr>
+ <attr name="chunk_size" type="int" status="optional"></attr>
+ <attr name="erase" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="output_add_rewrite_var" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="output_reset_rewrite_vars" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/overload.tag b/quanta/data/dtep/php/overload.tag
new file mode 100644
index 00000000..c5b76eda
--- /dev/null
+++ b/quanta/data/dtep/php/overload.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="overload" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0">
+ <attr name="class_name" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/ovrimos.tag b/quanta/data/dtep/php/ovrimos.tag
new file mode 100644
index 00000000..3df97215
--- /dev/null
+++ b/quanta/data/dtep/php/ovrimos.tag
@@ -0,0 +1,81 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ovrimos_close" type="function" returnType="void" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_commit" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_connect" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="db" type="string" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_cursor" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_exec" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection_id" type="int" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_execute" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="parameters_array" type="array" status="optional"></attr>
+ </tag>
+ <tag name="ovrimos_fetch_into" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="&amp;result_array" type="array" status="required"></attr>
+ <attr name="how" type="string" status="optional"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ovrimos_fetch_row" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="how" type="int" status="optional"></attr>
+ <attr name="row_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="ovrimos_field_len" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_field_name" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_field_num" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="field_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_field_type" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_free_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_longreadlen" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_num_fields" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_num_rows" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_prepare" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection_id" type="int" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_result_all" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="format" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ovrimos_result" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="result_id" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ovrimos_rollback" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection_id" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/parsekit.tag b/quanta/data/dtep/php/parsekit.tag
new file mode 100644
index 00000000..5fe3cf7d
--- /dev/null
+++ b/quanta/data/dtep/php/parsekit.tag
@@ -0,0 +1,16 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="parsekit_compile_file" type="function" returnType="array" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="&amp;errors" type="array" status="optional"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="parsekit_compile_string" type="function" returnType="array" version="">
+ <attr name="phpcode" type="string" status="required"></attr>
+ <attr name="&amp;errors" type="array" status="optional"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="parsekit_func_arginfo" type="function" returnType="array" version="">
+ <attr name="function" type="mixed" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/pcntl.tag b/quanta/data/dtep/php/pcntl.tag
new file mode 100644
index 00000000..a46115d4
--- /dev/null
+++ b/quanta/data/dtep/php/pcntl.tag
@@ -0,0 +1,54 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="pcntl_alarm" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="seconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="pcntl_exec" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="args" type="array" status="optional"></attr>
+ <attr name="envs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="pcntl_fork" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="pcntl_getpriority" type="function" returnType="int" version="PHP 5">
+ <attr name="pid" type="int" status="optional"></attr>
+ <attr name="process_identifier" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pcntl_setpriority" type="function" returnType="bool" version="PHP 5">
+ <attr name="priority" type="int" status="required"></attr>
+ <attr name="pid" type="int" status="optional"></attr>
+ <attr name="process_identifier" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pcntl_signal" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="signo" type="int" status="required"></attr>
+ <attr name="handle" type="callback" status="required"></attr>
+ <attr name="restart_syscalls" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="pcntl_wait" type="function" returnType="int" version="PHP 5">
+ <attr name="&amp;status" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pcntl_waitpid" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="pid" type="int" status="required"></attr>
+ <attr name="&amp;status" type="int" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pcntl_wexitstatus" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+ <tag name="pcntl_wifexited" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+ <tag name="pcntl_wifsignaled" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+ <tag name="pcntl_wifstopped" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+ <tag name="pcntl_wstopsig" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+ <tag name="pcntl_wtermsig" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="status" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/pcre.tag b/quanta/data/dtep/php/pcre.tag
new file mode 100644
index 00000000..15dcf520
--- /dev/null
+++ b/quanta/data/dtep/php/pcre.tag
@@ -0,0 +1,44 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="preg_grep" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="input" type="array" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="preg_match_all" type="function" returnType="int" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ <attr name="&amp;matches" type="array" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="preg_match" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ <attr name="&amp;matches" type="array" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="preg_quote" type="function" returnType="string" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ </tag>
+ <tag name="preg_replace_callback" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pattern" type="mixed" status="required"></attr>
+ <attr name="callback" type="callback" status="required"></attr>
+ <attr name="subject" type="mixed" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ </tag>
+ <tag name="preg_replace" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pattern" type="mixed" status="required"></attr>
+ <attr name="replacement" type="mixed" status="required"></attr>
+ <attr name="subject" type="mixed" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ </tag>
+ <tag name="preg_split" type="function" returnType="array" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="subject" type="string" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/pdf.tag b/quanta/data/dtep/php/pdf.tag
new file mode 100644
index 00000000..a9b1b61a
--- /dev/null
+++ b/quanta/data/dtep/php/pdf.tag
@@ -0,0 +1,473 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="pdf_add_bookmark" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="parent" type="int" status="required"></attr>
+ <attr name="open" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_add_launchlink" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="llx" type="float" status="required"></attr>
+ <attr name="lly" type="float" status="required"></attr>
+ <attr name="urx" type="float" status="required"></attr>
+ <attr name="ury" type="float" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_add_locallink" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="lowerleftx" type="float" status="required"></attr>
+ <attr name="lowerlefty" type="float" status="required"></attr>
+ <attr name="upperrightx" type="float" status="required"></attr>
+ <attr name="upperrighty" type="float" status="required"></attr>
+ <attr name="page" type="int" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_add_note" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="llx" type="float" status="required"></attr>
+ <attr name="lly" type="float" status="required"></attr>
+ <attr name="urx" type="float" status="required"></attr>
+ <attr name="ury" type="float" status="required"></attr>
+ <attr name="contents" type="string" status="required"></attr>
+ <attr name="title" type="string" status="required"></attr>
+ <attr name="icon" type="string" status="required"></attr>
+ <attr name="open" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_add_pdflink" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="bottom_left_x" type="float" status="required"></attr>
+ <attr name="bottom_left_y" type="float" status="required"></attr>
+ <attr name="up_right_x" type="float" status="required"></attr>
+ <attr name="up_right_y" type="float" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="page" type="int" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_add_thumbnail" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="image" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_add_weblink" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="lowerleftx" type="float" status="required"></attr>
+ <attr name="lowerlefty" type="float" status="required"></attr>
+ <attr name="upperrightx" type="float" status="required"></attr>
+ <attr name="upperrighty" type="float" status="required"></attr>
+ <attr name="url" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_arc" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="alpha" type="float" status="required"></attr>
+ <attr name="beta" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_arcn" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="alpha" type="float" status="required"></attr>
+ <attr name="beta" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_attach_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="llx" type="float" status="required"></attr>
+ <attr name="lly" type="float" status="required"></attr>
+ <attr name="urx" type="float" status="required"></attr>
+ <attr name="ury" type="float" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="description" type="string" status="required"></attr>
+ <attr name="author" type="string" status="required"></attr>
+ <attr name="mimetype" type="string" status="required"></attr>
+ <attr name="icon" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_begin_page" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_begin_pattern" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="xstep" type="float" status="required"></attr>
+ <attr name="ystep" type="float" status="required"></attr>
+ <attr name="painttype" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_begin_template" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_circle" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="r" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_clip" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_close_image" type="function" returnType="void" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="image" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_close_pdi_page" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="pagehandle" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_close_pdi" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="dochandle" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_close" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_closepath_fill_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_closepath_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_closepath" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_concat" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="a" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="c" type="float" status="required"></attr>
+ <attr name="d" type="float" status="required"></attr>
+ <attr name="e" type="float" status="required"></attr>
+ <attr name="f" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_continue_text" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_curveto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x1" type="float" status="required"></attr>
+ <attr name="y1" type="float" status="required"></attr>
+ <attr name="x2" type="float" status="required"></attr>
+ <attr name="y2" type="float" status="required"></attr>
+ <attr name="x3" type="float" status="required"></attr>
+ <attr name="y3" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_delete" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_end_page" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_end_pattern" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_end_template" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_fill_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_fill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_findfont" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="fontname" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="required"></attr>
+ <attr name="embed" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_get_buffer" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_get_majorversion" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="pdf_get_minorversion" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="pdf_get_parameter" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="modifier" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_get_pdi_parameter" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="document" type="int" status="required"></attr>
+ <attr name="page" type="int" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_get_pdi_value" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="doc" type="int" status="required"></attr>
+ <attr name="page" type="int" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_get_value" type="function" returnType="float" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="modifier" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_initgraphics" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_lineto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_makespotcolor" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="spotname" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_moveto" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_new" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="&lt;/methodparam&gt;" type="" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_ccitt" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ <attr name="BitReverse" type="int" status="required"></attr>
+ <attr name="k" type="int" status="required"></attr>
+ <attr name="Blackls1" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_file" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_image_file" type="function" returnType="int" version="PHP 3 CVS only, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="imagetype" type="string" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="stringparam" type="string" status="required"></attr>
+ <attr name="intparam" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_image" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="PDF-document" type="resource" status="required"></attr>
+ <attr name="imagetype" type="string" status="required"></attr>
+ <attr name="source" type="string" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ <attr name="components" type="int" status="required"></attr>
+ <attr name="bpc" type="int" status="required"></attr>
+ <attr name="params" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_memory_image" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="image" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_pdi_page" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="dochandle" type="int" status="required"></attr>
+ <attr name="pagenumber" type="int" status="required"></attr>
+ <attr name="pagelabel" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_open_pdi" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="stringparam" type="string" status="required"></attr>
+ <attr name="intparam" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_place_image" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="image" type="int" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="scale" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_place_pdi_page" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="page" type="int" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="sx" type="float" status="required"></attr>
+ <attr name="sy" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_rect" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_restore" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_rotate" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="phi" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_save" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_scale" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x-scale" type="float" status="required"></attr>
+ <attr name="y-scale" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_border_color" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="red" type="float" status="required"></attr>
+ <attr name="green" type="float" status="required"></attr>
+ <attr name="blue" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_border_dash" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="black" type="float" status="required"></attr>
+ <attr name="white" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_border_style" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="style" type="string" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_info" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_parameter" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_text_pos" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_set_value" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="key" type="string" status="required"></attr>
+ <attr name="value" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setcolor" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ <attr name="colorspace" type="string" status="required"></attr>
+ <attr name="c1" type="float" status="required"></attr>
+ <attr name="c2" type="float" status="required"></attr>
+ <attr name="c3" type="float" status="required"></attr>
+ <attr name="c4" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setdash" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="w" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setflat" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="flatness" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setfont" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="size" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setgray_fill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="gray" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setgray_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="gray" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setgray" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="gray" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setlinecap" type="function" returnType="void" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="linecap" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_setlinejoin" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="value" type="int" status="required"></attr>
+ </tag>
+ <tag name="pdf_setlinewidth" type="function" returnType="void" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setmatrix" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="a" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="c" type="float" status="required"></attr>
+ <attr name="d" type="float" status="required"></attr>
+ <attr name="e" type="float" status="required"></attr>
+ <attr name="f" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setmiterlimit" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="miter" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setrgbcolor_fill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="red_value" type="float" status="required"></attr>
+ <attr name="green_value" type="float" status="required"></attr>
+ <attr name="blue_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setrgbcolor_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="red_value" type="float" status="required"></attr>
+ <attr name="green_value" type="float" status="required"></attr>
+ <attr name="blue_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_setrgbcolor" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="red_value" type="float" status="required"></attr>
+ <attr name="green_value" type="float" status="required"></attr>
+ <attr name="blue_value" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_show_boxed" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="left" type="float" status="required"></attr>
+ <attr name="top" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="feature" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_show_xy" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_show" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ </tag>
+ <tag name="pdf_skew" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="alpha" type="float" status="required"></attr>
+ <attr name="beta" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_stringwidth" type="function" returnType="float" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="font" type="int" status="required"></attr>
+ <attr name="size" type="float" status="required"></attr>
+ </tag>
+ <tag name="pdf_stroke" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pdf_translate" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="pdfdoc" type="resource" status="required"></attr>
+ <attr name="tx" type="float" status="required"></attr>
+ <attr name="ty" type="float" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/pfpro.tag b/quanta/data/dtep/php/pfpro.tag
new file mode 100644
index 00000000..a6c19443
--- /dev/null
+++ b/quanta/data/dtep/php/pfpro.tag
@@ -0,0 +1,29 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="pfpro_cleanup" type="function" returnType="void" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ </tag>
+ <tag name="pfpro_init" type="function" returnType="void" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ </tag>
+ <tag name="pfpro_process_raw" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="parameters" type="string" status="required"></attr>
+ <attr name="address" type="string" status="optional"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="proxy_address" type="string" status="optional"></attr>
+ <attr name="proxy_port" type="int" status="optional"></attr>
+ <attr name="proxy_logon" type="string" status="optional"></attr>
+ <attr name="proxy_password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="pfpro_process" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="parameters" type="array" status="required"></attr>
+ <attr name="address" type="string" status="optional"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="proxy_address" type="string" status="optional"></attr>
+ <attr name="proxy_port" type="int" status="optional"></attr>
+ <attr name="proxy_logon" type="string" status="optional"></attr>
+ <attr name="proxy_password" type="string" status="optional"></attr>
+ </tag>
+ <tag name="pfpro_version" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/pgsql.tag b/quanta/data/dtep/php/pgsql.tag
new file mode 100644
index 00000000..b6ec4684
--- /dev/null
+++ b/quanta/data/dtep/php/pgsql.tag
@@ -0,0 +1,272 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="pg_affected_rows" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_cancel_query" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_client_encoding" type="function" returnType="string" version="PHP 3 CVS only, PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_connect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection_string" type="string" status="required"></attr>
+ <attr name="connect_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_connection_busy" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_connection_reset" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_connection_status" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_convert" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="assoc_array" type="array" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_copy_from" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="rows" type="array" status="required"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ <attr name="null_as" type="string" status="optional"></attr>
+ </tag>
+ <tag name="pg_copy_to" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="delimiter" type="string" status="optional"></attr>
+ <attr name="null_as" type="string" status="optional"></attr>
+ </tag>
+ <tag name="pg_dbname" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_delete" type="function" returnType="mixed" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="assoc_array" type="array" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_end_copy" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_escape_bytea" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_escape_string" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_fetch_all" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_fetch_array" type="function" returnType="array" version="PHP 3&gt;= 3.0.1, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="optional"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_fetch_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_fetch_object" type="function" returnType="object" version="PHP 3&gt;= 3.0.1, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="optional"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_fetch_result" type="function" returnType="mixed" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="pg_fetch_row" type="function" returnType="array" version="PHP 3&gt;= 3.0.1, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ </tag>
+ <tag name="pg_field_is_null" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="pg_field_name" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="pg_field_num" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_field_prtlen" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="optional"></attr>
+ <attr name="field_name_or_number" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="pg_field_size" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="pg_field_type" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="pg_free_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_get_notify" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_get_pid" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_get_result" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_host" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_insert" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="assoc_array" type="array" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_last_error" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_last_notice" type="function" returnType="string" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_last_oid" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="large_object" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_create" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_lo_export" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ <attr name="oid" type="int" status="required"></attr>
+ <attr name="pathname" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_import" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ <attr name="pathname" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_open" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="oid" type="int" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_read_all" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="large_object" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_read" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="large_object" type="resource" status="required"></attr>
+ <attr name="len" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_lo_seek" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="large_object" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="whence" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_lo_tell" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="large_object" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_unlink" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="oid" type="int" status="required"></attr>
+ </tag>
+ <tag name="pg_lo_write" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="large_object" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="len" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_meta_data" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_num_fields" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_num_rows" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_options" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_parameter_status" type="function" returnType="string" version="PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ <attr name="param_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_pconnect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection_string" type="string" status="required"></attr>
+ <attr name="connect_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_ping" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_port" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_put_line" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_query" type="function" returnType="resource" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_result_error" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_result_seek" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="pg_result_status" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_select" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="assoc_array" type="array" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_send_query" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_set_client_encoding" type="function" returnType="int" version="PHP 3 CVS only, PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_trace" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pathname" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="optional"></attr>
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_tty" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ </tag>
+ <tag name="pg_unescape_bytea" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="pg_untrace" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="pg_update" type="function" returnType="mixed" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection" type="resource" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="data" type="array" status="required"></attr>
+ <attr name="condition" type="array" status="required"></attr>
+ <attr name="options" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pg_version" type="function" returnType="array" version="PHP 5">
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/posix.tag b/quanta/data/dtep/php/posix.tag
new file mode 100644
index 00000000..5ef4a1ac
--- /dev/null
+++ b/quanta/data/dtep/php/posix.tag
@@ -0,0 +1,86 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="posix_ctermid" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_get_last_error" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ </tag>
+ <tag name="posix_getcwd" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getegid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_geteuid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getgid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getgrgid" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="gid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_getgrnam" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="posix_getgroups" type="function" returnType="array" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getlogin" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getpgid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ <attr name="pid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_getpgrp" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getpid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getppid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getpwnam" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="username" type="string" status="required"></attr>
+ </tag>
+ <tag name="posix_getpwuid" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="uid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_getrlimit" type="function" returnType="array" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_getsid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ <attr name="pid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_getuid" type="function" returnType="int" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_isatty" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="fd" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_kill" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="pid" type="int" status="required"></attr>
+ <attr name="sig" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_mkfifo" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="pathname" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_setegid" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="gid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_seteuid" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="uid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_setgid" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="gid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_setpgid" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="pid" type="int" status="required"></attr>
+ <attr name="pgid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_setsid" type="function" returnType="int" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_setuid" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="uid" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_strerror" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="errno" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_times" type="function" returnType="array" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ </tag>
+ <tag name="posix_ttyname" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="fd" type="int" status="required"></attr>
+ </tag>
+ <tag name="posix_uname" type="function" returnType="array" version="PHP 3&gt;= 3.0.10, PHP 4 , PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/printer.tag b/quanta/data/dtep/php/printer.tag
new file mode 100644
index 00000000..4446ca5e
--- /dev/null
+++ b/quanta/data/dtep/php/printer.tag
@@ -0,0 +1,159 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="printer_abort" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_close" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_create_brush" type="function" returnType="mixed" version="">
+ <attr name="style" type="int" status="required"></attr>
+ <attr name="color" type="string" status="required"></attr>
+ </tag>
+ <tag name="printer_create_dc" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_create_font" type="function" returnType="mixed" version="">
+ <attr name="face" type="string" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="font_weight" type="int" status="required"></attr>
+ <attr name="italic" type="bool" status="required"></attr>
+ <attr name="underline" type="bool" status="required"></attr>
+ <attr name="strikeout" type="bool" status="required"></attr>
+ <attr name="orientation" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_create_pen" type="function" returnType="mixed" version="">
+ <attr name="style" type="int" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="color" type="string" status="required"></attr>
+ </tag>
+ <tag name="printer_delete_brush" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_delete_dc" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_delete_font" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_delete_pen" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_bmp" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ <attr name="width" type="int" status="optional"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_chord" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="rec_x" type="int" status="required"></attr>
+ <attr name="rec_y" type="int" status="required"></attr>
+ <attr name="rec_x1" type="int" status="required"></attr>
+ <attr name="rec_y1" type="int" status="required"></attr>
+ <attr name="rad_x" type="int" status="required"></attr>
+ <attr name="rad_y" type="int" status="required"></attr>
+ <attr name="rad_x1" type="int" status="required"></attr>
+ <attr name="rad_y1" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_elipse" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="ul_x" type="int" status="required"></attr>
+ <attr name="ul_y" type="int" status="required"></attr>
+ <attr name="lr_x" type="int" status="required"></attr>
+ <attr name="lr_y" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_line" type="function" returnType="void" version="">
+ <attr name="printer_handle" type="resource" status="required"></attr>
+ <attr name="from_x" type="int" status="required"></attr>
+ <attr name="from_y" type="int" status="required"></attr>
+ <attr name="to_x" type="int" status="required"></attr>
+ <attr name="to_y" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_pie" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="rec_x" type="int" status="required"></attr>
+ <attr name="rec_y" type="int" status="required"></attr>
+ <attr name="rec_x1" type="int" status="required"></attr>
+ <attr name="rec_y1" type="int" status="required"></attr>
+ <attr name="rad1_x" type="int" status="required"></attr>
+ <attr name="rad1_y" type="int" status="required"></attr>
+ <attr name="rad2_x" type="int" status="required"></attr>
+ <attr name="rad2_y" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_rectangle" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="ul_x" type="int" status="required"></attr>
+ <attr name="ul_y" type="int" status="required"></attr>
+ <attr name="lr_x" type="int" status="required"></attr>
+ <attr name="lr_y" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_roundrect" type="function" returnType="void" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="ul_x" type="int" status="required"></attr>
+ <attr name="ul_y" type="int" status="required"></attr>
+ <attr name="lr_x" type="int" status="required"></attr>
+ <attr name="lr_y" type="int" status="required"></attr>
+ <attr name="width" type="int" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_draw_text" type="function" returnType="void" version="">
+ <attr name="printer_handle" type="resource" status="required"></attr>
+ <attr name="text" type="string" status="required"></attr>
+ <attr name="x" type="int" status="required"></attr>
+ <attr name="y" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_end_doc" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_end_page" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_get_option" type="function" returnType="mixed" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="option" type="string" status="required"></attr>
+ </tag>
+ <tag name="printer_list" type="function" returnType="array" version="">
+ <attr name="enumtype" type="int" status="required"></attr>
+ <attr name="name" type="string" status="optional"></attr>
+ <attr name="level" type="int" status="optional"></attr>
+ </tag>
+ <tag name="printer_logical_fontheight" type="function" returnType="int" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="height" type="int" status="required"></attr>
+ </tag>
+ <tag name="printer_open" type="function" returnType="mixed" version="">
+ <attr name="devicename" type="string" status="optional"></attr>
+ </tag>
+ <tag name="printer_select_brush" type="function" returnType="void" version="">
+ <attr name="printer_handle" type="resource" status="required"></attr>
+ <attr name="brush_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_select_font" type="function" returnType="void" version="">
+ <attr name="printer_handle" type="resource" status="required"></attr>
+ <attr name="font_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_select_pen" type="function" returnType="void" version="">
+ <attr name="printer_handle" type="resource" status="required"></attr>
+ <attr name="pen_handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_set_option" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="printer_start_doc" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="document" type="string" status="optional"></attr>
+ </tag>
+ <tag name="printer_start_page" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="printer_write" type="function" returnType="bool" version="">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="content" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/pspell.tag b/quanta/data/dtep/php/pspell.tag
new file mode 100644
index 00000000..2c3367e4
--- /dev/null
+++ b/quanta/data/dtep/php/pspell.tag
@@ -0,0 +1,86 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="pspell_add_to_personal" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_add_to_session" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_check" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_clear_session" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_create" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="language" type="string" status="required"></attr>
+ <attr name="spelling" type="string" status="optional"></attr>
+ <attr name="jargon" type="string" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="pspell_config_data_dir" type="function" returnType="bool" version="PHP 5">
+ <attr name="conf" type="int" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_dict_dir" type="function" returnType="bool" version="PHP 5">
+ <attr name="conf" type="int" status="required"></attr>
+ <attr name="directory" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_ignore" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="n" type="int" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_mode" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_personal" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_repl" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="file" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_runtogether" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="flag" type="bool" status="required"></attr>
+ </tag>
+ <tag name="pspell_config_save_repl" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="flag" type="bool" status="required"></attr>
+ </tag>
+ <tag name="pspell_new_config" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="config" type="int" status="required"></attr>
+ </tag>
+ <tag name="pspell_new_personal" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="personal" type="string" status="required"></attr>
+ <attr name="language" type="string" status="required"></attr>
+ <attr name="spelling" type="string" status="optional"></attr>
+ <attr name="jargon" type="string" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pspell_new" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="language" type="string" status="required"></attr>
+ <attr name="spelling" type="string" status="optional"></attr>
+ <attr name="jargon" type="string" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="pspell_save_wordlist" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ </tag>
+ <tag name="pspell_store_replacement" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="misspelled" type="string" status="required"></attr>
+ <attr name="correct" type="string" status="required"></attr>
+ </tag>
+ <tag name="pspell_suggest" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="dictionary_link" type="int" status="required"></attr>
+ <attr name="word" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/qtdom.tag b/quanta/data/dtep/php/qtdom.tag
new file mode 100644
index 00000000..df7534fe
--- /dev/null
+++ b/quanta/data/dtep/php/qtdom.tag
@@ -0,0 +1,8 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="qdom_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5">
+ </tag>
+ <tag name="qdom_tree" type="function" returnType="object" version="PHP 4 &gt;= 4.0.4">
+ <attr name="doc" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/rar.tag b/quanta/data/dtep/php/rar.tag
new file mode 100644
index 00000000..f5eee1f4
--- /dev/null
+++ b/quanta/data/dtep/php/rar.tag
@@ -0,0 +1,38 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="rar_close" type="function" returnType="bool" version="">
+ <attr name="rar_file" type="resource" status="required"></attr>
+ </tag>
+ <tag name="rar_entry_get" type="function" returnType="object" version="">
+ <attr name="rar_file" type="resource" status="required"></attr>
+ <attr name="entry_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="Rar::extract" type="function" returnType="bool" version="">
+ <attr name="dir" type="string" status="required"></attr>
+ <attr name="filepath" type="string" status="optional"></attr>
+ </tag>
+ <tag name="Rar::getAttr" type="function" returnType="int" version="">
+ </tag>
+ <tag name="Rar::getCrc" type="function" returnType="int" version="">
+ </tag>
+ <tag name="Rar::getFileTime" type="function" returnType="string" version="">
+ </tag>
+ <tag name="Rar::getHostOs" type="function" returnType="int" version="">
+ </tag>
+ <tag name="Rar::getMethod" type="function" returnType="int" version="">
+ </tag>
+ <tag name="Rar::getName" type="function" returnType="string" version="">
+ </tag>
+ <tag name="Rar::getPackedSize" type="function" returnType="int" version="">
+ </tag>
+ <tag name="Rar::getUnpackedSize" type="function" returnType="int" version="">
+ </tag>
+ <tag name="Rar::getVersion" type="function" returnType="int" version="">
+ </tag>
+ <tag name="rar_list" type="function" returnType="array" version="">
+ <attr name="rar_file" type="resource" status="required"></attr>
+ </tag>
+ <tag name="rar_open" type="function" returnType="resource" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/readline.tag b/quanta/data/dtep/php/readline.tag
new file mode 100644
index 00000000..ab19ab36
--- /dev/null
+++ b/quanta/data/dtep/php/readline.tag
@@ -0,0 +1,38 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="readline_add_history" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="line" type="string" status="required"></attr>
+ </tag>
+ <tag name="readline_callback_handler_install" type="function" returnType="bool" version="">
+ <attr name="prompt" type="string" status="required"></attr>
+ <attr name="callback" type="callback" status="required"></attr>
+ </tag>
+ <tag name="readline_callback_handler_remove" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="readline_callback_read_char" type="function" returnType="void" version="">
+ </tag>
+ <tag name="readline_clear_history" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="readline_completion_function" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="line" type="string" status="optional"></attr>
+ </tag>
+ <tag name="readline_info" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="varname" type="string" status="optional"></attr>
+ <attr name="newvalue" type="string" status="optional"></attr>
+ </tag>
+ <tag name="readline_list_history" type="function" returnType="array" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="readline_on_new_line" type="function" returnType="void" version="">
+ </tag>
+ <tag name="readline_read_history" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="optional"></attr>
+ </tag>
+ <tag name="readline_redisplay" type="function" returnType="void" version="">
+ </tag>
+ <tag name="readline_write_history" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="optional"></attr>
+ </tag>
+ <tag name="readline" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="prompt" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/recode.tag b/quanta/data/dtep/php/recode.tag
new file mode 100644
index 00000000..a4358635
--- /dev/null
+++ b/quanta/data/dtep/php/recode.tag
@@ -0,0 +1,12 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="recode_file" type="function" returnType="bool" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="request" type="string" status="required"></attr>
+ <attr name="input" type="resource" status="required"></attr>
+ <attr name="output" type="resource" status="required"></attr>
+ </tag>
+ <tag name="recode_string" type="function" returnType="string" version="PHP 3&gt;= 3.0.13, PHP 4 , PHP 5">
+ <attr name="request" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/regex.tag b/quanta/data/dtep/php/regex.tag
new file mode 100644
index 00000000..5b0752bf
--- /dev/null
+++ b/quanta/data/dtep/php/regex.tag
@@ -0,0 +1,36 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ereg_replace" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="replacement" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="ereg" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="&amp;regs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="eregi_replace" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="replacement" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="eregi" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="&amp;regs" type="array" status="optional"></attr>
+ </tag>
+ <tag name="split" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ </tag>
+ <tag name="spliti" type="function" returnType="array" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="pattern" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sql_regcase" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/sem.tag b/quanta/data/dtep/php/sem.tag
new file mode 100644
index 00000000..481af054
--- /dev/null
+++ b/quanta/data/dtep/php/sem.tag
@@ -0,0 +1,78 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ftok" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="pathname" type="string" status="required"></attr>
+ <attr name="proj" type="string" status="required"></attr>
+ </tag>
+ <tag name="msg_get_queue" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="key" type="int" status="required"></attr>
+ <attr name="perms" type="int" status="optional"></attr>
+ </tag>
+ <tag name="msg_receive" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="queue" type="resource" status="required"></attr>
+ <attr name="desiredmsgtype" type="int" status="required"></attr>
+ <attr name="&amp;msgtype" type="int" status="required"></attr>
+ <attr name="maxsize" type="int" status="required"></attr>
+ <attr name="&amp;message" type="mixed" status="required"></attr>
+ <attr name="unserialize" type="bool" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="&amp;errorcode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="msg_remove_queue" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="queue" type="resource" status="required"></attr>
+ </tag>
+ <tag name="msg_send" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="queue" type="resource" status="required"></attr>
+ <attr name="msgtype" type="int" status="required"></attr>
+ <attr name="message" type="mixed" status="required"></attr>
+ <attr name="serialize" type="bool" status="optional"></attr>
+ <attr name="blocking" type="bool" status="optional"></attr>
+ <attr name="&amp;errorcode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="msg_set_queue" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="queue" type="resource" status="required"></attr>
+ <attr name="data" type="array" status="required"></attr>
+ </tag>
+ <tag name="msg_stat_queue" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="queue" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sem_acquire" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="sem_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sem_get" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="key" type="int" status="required"></attr>
+ <attr name="max_acquire" type="int" status="optional"></attr>
+ <attr name="perm" type="int" status="optional"></attr>
+ <attr name="auto_release" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sem_release" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="sem_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sem_remove" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="sem_identifier" type="resource" status="required"></attr>
+ </tag>
+ <tag name="shm_attach" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="key" type="int" status="required"></attr>
+ <attr name="memsize" type="int" status="optional"></attr>
+ <attr name="perm" type="int" status="optional"></attr>
+ </tag>
+ <tag name="shm_detach" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="shm_identifier" type="int" status="required"></attr>
+ </tag>
+ <tag name="shm_get_var" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="shm_identifier" type="int" status="required"></attr>
+ <attr name="variable_key" type="int" status="required"></attr>
+ </tag>
+ <tag name="shm_put_var" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="shm_identifier" type="int" status="required"></attr>
+ <attr name="variable_key" type="int" status="required"></attr>
+ <attr name="variable" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="shm_remove_var" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="shm_identifier" type="int" status="required"></attr>
+ <attr name="variable_key" type="int" status="required"></attr>
+ </tag>
+ <tag name="shm_remove" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="shm_identifier" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/sesam.tag b/quanta/data/dtep/php/sesam.tag
new file mode 100644
index 00000000..acd62430
--- /dev/null
+++ b/quanta/data/dtep/php/sesam.tag
@@ -0,0 +1,64 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="sesam_affected_rows" type="function" returnType="int" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="sesam_commit" type="function" returnType="bool" version="PHP 3 CVS only">
+ </tag>
+ <tag name="sesam_connect" type="function" returnType="bool" version="PHP 3 CVS only">
+ <attr name="catalog" type="string" status="required"></attr>
+ <attr name="schema" type="string" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ </tag>
+ <tag name="sesam_diagnostic" type="function" returnType="array" version="PHP 3 CVS only">
+ </tag>
+ <tag name="sesam_disconnect" type="function" returnType="bool" version="PHP 3 CVS only">
+ </tag>
+ <tag name="sesam_errormsg" type="function" returnType="string" version="PHP 3 CVS only">
+ </tag>
+ <tag name="sesam_execimm" type="function" returnType="string" version="PHP 3 CVS only">
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="sesam_fetch_array" type="function" returnType="array" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ <attr name="whence" type="int" status="optional"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sesam_fetch_result" type="function" returnType="mixed" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ <attr name="max_rows" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sesam_fetch_row" type="function" returnType="array" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ <attr name="whence" type="int" status="optional"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sesam_field_array" type="function" returnType="array" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="sesam_field_name" type="function" returnType="int" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ <attr name="index" type="int" status="required"></attr>
+ </tag>
+ <tag name="sesam_free_result" type="function" returnType="int" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="sesam_num_fields" type="function" returnType="int" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ </tag>
+ <tag name="sesam_query" type="function" returnType="string" version="PHP 3 CVS only">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="scrollable" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sesam_rollback" type="function" returnType="bool" version="PHP 3 CVS only">
+ </tag>
+ <tag name="sesam_seek_row" type="function" returnType="bool" version="PHP 3 CVS only">
+ <attr name="result_id" type="string" status="required"></attr>
+ <attr name="whence" type="int" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sesam_settransaction" type="function" returnType="bool" version="PHP 3 CVS only">
+ <attr name="isolation_level" type="int" status="required"></attr>
+ <attr name="read_only" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/session.tag b/quanta/data/dtep/php/session.tag
new file mode 100644
index 00000000..8721eff2
--- /dev/null
+++ b/quanta/data/dtep/php/session.tag
@@ -0,0 +1,62 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="session_cache_expire" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="new_cache_expire" type="int" status="optional"></attr>
+ </tag>
+ <tag name="session_cache_limiter" type="function" returnType="string" version="PHP 4 &gt;= 4.0.3, PHP 5">
+ <attr name="cache_limiter" type="string" status="optional"></attr>
+ </tag>
+ <tag name="session_decode" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="session_destroy" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="session_encode" type="function" returnType="string" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="session_get_cookie_params" type="function" returnType="array" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="session_id" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="id" type="string" status="optional"></attr>
+ </tag>
+ <tag name="session_is_registered" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="session_module_name" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="module" type="string" status="optional"></attr>
+ </tag>
+ <tag name="session_name" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="session_regenerate_id" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ </tag>
+ <tag name="session_register" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="name" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="session_save_path" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="path" type="string" status="optional"></attr>
+ </tag>
+ <tag name="session_set_cookie_params" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="lifetime" type="int" status="required"></attr>
+ <attr name="path" type="string" status="optional"></attr>
+ <attr name="domain" type="string" status="optional"></attr>
+ <attr name="secure" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="session_set_save_handler" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="open" type="string" status="required"></attr>
+ <attr name="close" type="string" status="required"></attr>
+ <attr name="read" type="string" status="required"></attr>
+ <attr name="write" type="string" status="required"></attr>
+ <attr name="destroy" type="string" status="required"></attr>
+ <attr name="gc" type="string" status="required"></attr>
+ </tag>
+ <tag name="session_start" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="session_unregister" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="session_unset" type="function" returnType="void" version="PHP 4 , PHP 5">
+ </tag>
+ <tag name="session_write_close" type="function" returnType="void" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/shmop.tag b/quanta/data/dtep/php/shmop.tag
new file mode 100644
index 00000000..10256599
--- /dev/null
+++ b/quanta/data/dtep/php/shmop.tag
@@ -0,0 +1,28 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="shmop_close" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="shmid" type="int" status="required"></attr>
+ </tag>
+ <tag name="shmop_delete" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="shmid" type="int" status="required"></attr>
+ </tag>
+ <tag name="shmop_open" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="key" type="int" status="required"></attr>
+ <attr name="flags" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ <attr name="size" type="int" status="required"></attr>
+ </tag>
+ <tag name="shmop_read" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="shmid" type="int" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="count" type="int" status="required"></attr>
+ </tag>
+ <tag name="shmop_size" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="shmid" type="int" status="required"></attr>
+ </tag>
+ <tag name="shmop_write" type="function" returnType="int" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="shmid" type="int" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/simplexml.tag b/quanta/data/dtep/php/simplexml.tag
new file mode 100644
index 00000000..e2797756
--- /dev/null
+++ b/quanta/data/dtep/php/simplexml.tag
@@ -0,0 +1,25 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="SimpleXMLElement->asXML" type="function" returnType="string" version="">
+ </tag>
+ <tag name="simplexml_element->attributes" type="function" returnType="object SimpleXMLElement" version="">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="simplexml_element->children" type="function" returnType="object SimpleXMLElement" version="">
+ </tag>
+ <tag name="SimpleXMLElement->xpath" type="function" returnType="array" version="">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="simplexml_import_dom" type="function" returnType="object" version="PHP 5">
+ <attr name="node" type="object" status="required"></attr>
+ <attr name="class_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="simplexml_load_file" type="function" returnType="object" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="class_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="simplexml_load_string" type="function" returnType="object" version="PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="class_name" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/snmp.tag b/quanta/data/dtep/php/snmp.tag
new file mode 100644
index 00000000..c5ee2515
--- /dev/null
+++ b/quanta/data/dtep/php/snmp.tag
@@ -0,0 +1,66 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="snmp_get_quick_print" type="function" returnType="bool" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ </tag>
+ <tag name="snmp_get_valueretrieval" type="function" returnType="int" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ </tag>
+ <tag name="snmp_read_mib" type="function" returnType="int" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="snmp_set_enum_print" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="enum_print" type="int" status="required"></attr>
+ </tag>
+ <tag name="snmp_set_oid_numeric_print" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="oid_numeric_print" type="int" status="required"></attr>
+ </tag>
+ <tag name="snmp_set_quick_print" type="function" returnType="void" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="quick_print" type="bool" status="required"></attr>
+ </tag>
+ <tag name="snmp_set_valueretrieval" type="function" returnType="int" version="PHP 4 &gt;= 4.3.3, PHP 5">
+ <attr name="method" type="int" status="required"></attr>
+ </tag>
+ <tag name="snmpget" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="community" type="string" status="required"></attr>
+ <attr name="object_id" type="string" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="retries" type="int" status="optional"></attr>
+ </tag>
+ <tag name="snmpgetnext" type="function" returnType="string" version="PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="community" type="string" status="required"></attr>
+ <attr name="object_id" type="string" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="retries" type="int" status="optional"></attr>
+ </tag>
+ <tag name="snmprealwalk" type="function" returnType="array" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="host" type="string" status="required"></attr>
+ <attr name="community" type="string" status="required"></attr>
+ <attr name="object_id" type="string" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="retries" type="int" status="optional"></attr>
+ </tag>
+ <tag name="snmpset" type="function" returnType="bool" version="PHP 3&gt;= 3.0.12, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="community" type="string" status="required"></attr>
+ <attr name="object_id" type="string" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="retries" type="int" status="optional"></attr>
+ </tag>
+ <tag name="snmpwalk" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="community" type="string" status="required"></attr>
+ <attr name="object_id" type="string" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="retries" type="int" status="optional"></attr>
+ </tag>
+ <tag name="snmpwalkoid" type="function" returnType="array" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="hostname" type="string" status="required"></attr>
+ <attr name="community" type="string" status="required"></attr>
+ <attr name="object_id" type="string" status="required"></attr>
+ <attr name="timeout" type="int" status="optional"></attr>
+ <attr name="retries" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/soap.tag b/quanta/data/dtep/php/soap.tag
new file mode 100644
index 00000000..7bc57c71
--- /dev/null
+++ b/quanta/data/dtep/php/soap.tag
@@ -0,0 +1,71 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="SoapClient::SoapClient" type="function" returnType="object" version="">
+ <attr name="wsdl" type="mixed" status="required"></attr>
+ <attr name="options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="SoapClient::__call" type="function" returnType="mixed" version="">
+ <attr name="function_name" type="string" status="required"></attr>
+ <attr name="arguments" type="array" status="optional"></attr>
+ <attr name="options" type="array" status="optional"></attr>
+ <attr name="input_headers" type="array" status="optional"></attr>
+ <attr name="output_headers" type="array" status="optional"></attr>
+ </tag>
+ <tag name="SoapClient::__getFunctions" type="function" returnType="array" version="">
+ </tag>
+ <tag name="SoapClient::__getLastRequest" type="function" returnType="string" version="">
+ </tag>
+ <tag name="SoapClient::__getLastResponse" type="function" returnType="object" version="">
+ </tag>
+ <tag name="SoapClient::__getTypes" type="function" returnType="array" version="">
+ </tag>
+ <tag name="SoapFault::SoapFault" type="function" returnType="object" version="">
+ <attr name="faultcode" type="string" status="required"></attr>
+ <attr name="faultstring" type="string" status="required"></attr>
+ <attr name="faultactor" type="string" status="optional"></attr>
+ <attr name="detail" type="mixed" status="optional"></attr>
+ <attr name="faultname" type="string" status="optional"></attr>
+ <attr name="headerfault" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="SoapHeader::SoapHeader" type="function" returnType="object" version="">
+ <attr name="namespace" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="data" type="mixed" status="optional"></attr>
+ <attr name="mustUnderstand" type="bool" status="optional"></attr>
+ <attr name="actor" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="SoapParam::SoapParam" type="function" returnType="object" version="">
+ <attr name="data" type="mixed" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="SoapServer::SoapServer" type="function" returnType="object" version="">
+ <attr name="wsdl" type="mixed" status="required"></attr>
+ <attr name="options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="SoapServer::addFunction" type="function" returnType="void" version="">
+ <attr name="functions" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="SoapServer::getFunctions" type="function" returnType="array" version="">
+ </tag>
+ <tag name="SoapServer::handle" type="function" returnType="void" version="">
+ <attr name="soap_request" type="string" status="optional"></attr>
+ </tag>
+ <tag name="SoapServer::setClass" type="function" returnType="void" version="">
+ <attr name="class_name" type="string" status="required"></attr>
+ <attr name="args" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="SoapServer::setPersistence" type="function" returnType="void" version="">
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="SoapVar::SoapVar" type="function" returnType="object" version="">
+ <attr name="data" type="mixed" status="required"></attr>
+ <attr name="encoding" type="int" status="required"></attr>
+ <attr name="type_name" type="string" status="optional"></attr>
+ <attr name="type_namespace" type="string" status="optional"></attr>
+ <attr name="node_name" type="string" status="optional"></attr>
+ <attr name="node_namespace" type="string" status="optional"></attr>
+ </tag>
+ <tag name="is_soap_fault" type="function" returnType="bool" version="PHP 5">
+ <attr name="obj" type="mixed" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/sockets.tag b/quanta/data/dtep/php/sockets.tag
new file mode 100644
index 00000000..f29459f1
--- /dev/null
+++ b/quanta/data/dtep/php/sockets.tag
@@ -0,0 +1,123 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="socket_accept" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ </tag>
+ <tag name="socket_bind" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="address" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_clear_error" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="socket" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="socket_close" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ </tag>
+ <tag name="socket_connect" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="address" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_create_listen" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="port" type="int" status="required"></attr>
+ <attr name="backlog" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_create_pair" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="domain" type="int" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="protocol" type="int" status="required"></attr>
+ <attr name="&amp;fd" type="array" status="required"></attr>
+ </tag>
+ <tag name="socket_create" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="domain" type="int" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="protocol" type="int" status="required"></attr>
+ </tag>
+ <tag name="socket_get_option" type="function" returnType="mixed" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="level" type="int" status="required"></attr>
+ <attr name="optname" type="int" status="required"></attr>
+ </tag>
+ <tag name="socket_getpeername" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="&amp;addr" type="string" status="required"></attr>
+ <attr name="&amp;port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_getsockname" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="&amp;addr" type="string" status="required"></attr>
+ <attr name="&amp;port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_last_error" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="socket_listen" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="backlog" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_read" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ <attr name="type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_recv" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="&amp;buf" type="string" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="socket_recvfrom" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="&amp;buf" type="string" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ <attr name="&amp;name" type="string" status="required"></attr>
+ <attr name="&amp;port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_select" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="&amp;read" type="array" status="required"></attr>
+ <attr name="&amp;write" type="array" status="required"></attr>
+ <attr name="&amp;except" type="array" status="required"></attr>
+ <attr name="tv_sec" type="int" status="required"></attr>
+ <attr name="tv_usec" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_send" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="buf" type="string" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ </tag>
+ <tag name="socket_sendto" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="buf" type="string" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="required"></attr>
+ <attr name="addr" type="string" status="required"></attr>
+ <attr name="port" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_set_block" type="function" returnType="bool" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ </tag>
+ <tag name="socket_set_nonblock" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ </tag>
+ <tag name="socket_set_option" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="level" type="int" status="required"></attr>
+ <attr name="optname" type="int" status="required"></attr>
+ <attr name="optval" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="socket_shutdown" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="how" type="int" status="optional"></attr>
+ </tag>
+ <tag name="socket_strerror" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="errno" type="int" status="required"></attr>
+ </tag>
+ <tag name="socket_write" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="buffer" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/spl.tag b/quanta/data/dtep/php/spl.tag
new file mode 100644
index 00000000..e8653071
--- /dev/null
+++ b/quanta/data/dtep/php/spl.tag
@@ -0,0 +1,190 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ArrayIterator::current" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="ArrayIterator::key" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="ArrayIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="ArrayIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="ArrayIterator::seek" type="function" returnType="void" version="">
+ <attr name="position" type="int" status="required"></attr>
+ </tag>
+ <tag name="ArrayIterator::valid" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="ArrayObject::append" type="function" returnType="void" version="">
+ <attr name="newval" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ArrayObject::__construct" type="function" returnType="void" version="">
+ <attr name="input" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ArrayObject::count" type="function" returnType="int" version="">
+ </tag>
+ <tag name="ArrayObject::getIterator" type="function" returnType="ArrayIterator" version="">
+ </tag>
+ <tag name="ArrayObject::offsetExists" type="function" returnType="bool" version="">
+ <attr name="index" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ArrayObject::offsetGet" type="function" returnType="bool" version="">
+ <attr name="index" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ArrayObject::offsetSet" type="function" returnType="void" version="">
+ <attr name="index" type="mixed" status="required"></attr>
+ <attr name="newval" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="ArrayObject::offsetUnset" type="function" returnType="void" version="">
+ <attr name="index" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="CachingIterator::hasNext" type="function" returnType="boolean" version="">
+ </tag>
+ <tag name="CachingIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="CachingIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="CachingIterator::__toString" type="function" returnType="string" version="">
+ </tag>
+ <tag name="CachingIterator::valid" type="function" returnType="boolean" version="">
+ </tag>
+ <tag name="CachingRecursiveIterator::getChildren" type="function" returnType="CachingRecursiveIterator" version="">
+ </tag>
+ <tag name="CachingRecursiveIterator::hasChildren" type="function" returnType="bolean" version="">
+ </tag>
+ <tag name="DirectoryIterator::__construct" type="function" returnType="void" version="">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+ <tag name="DirectoryIterator::current" type="function" returnType="DirectoryIterator" version="">
+ </tag>
+ <tag name="DirectoryIterator::getATime" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getCTime" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getChildren" type="function" returnType="RecursiveDirectoryIterator" version="">
+ </tag>
+ <tag name="DirectoryIterator::getFilename" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DirectoryIterator::getGroup" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getInode" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getMTime" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getOwner" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getPath" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DirectoryIterator::getPathname" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DirectoryIterator::getPerms" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getSize" type="function" returnType="int" version="">
+ </tag>
+ <tag name="DirectoryIterator::getType" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DirectoryIterator::isDir" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::isDot" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::isExecutable" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::isFile" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::isLink" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::isReadable" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::isWritable" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="DirectoryIterator::key" type="function" returnType="string" version="">
+ </tag>
+ <tag name="DirectoryIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="DirectoryIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="DirectoryIterator::valid" type="function" returnType="string" version="">
+ </tag>
+ <tag name="FilterIterator::current" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="FilterIterator::getInnerIterator" type="function" returnType="Iterator" version="">
+ </tag>
+ <tag name="FilterIterator::key" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="FilterIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="FilterIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="FilterIterator::valid" type="function" returnType="boolean" version="">
+ </tag>
+ <tag name="LimitIterator::getPosition" type="function" returnType="int" version="">
+ </tag>
+ <tag name="LimitIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="LimitIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="LimitIterator::seek" type="function" returnType="void" version="">
+ <attr name="position" type="int" status="required"></attr>
+ </tag>
+ <tag name="LimitIterator::valid" type="function" returnType="boolean" version="">
+ </tag>
+ <tag name="ParentIterator::getChildren" type="function" returnType="ParentIterator" version="">
+ </tag>
+ <tag name="ParentIterator::hasChildren" type="function" returnType="boolean" version="">
+ </tag>
+ <tag name="ParentIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="ParentIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="RecursiveDirectoryIterator::getChildren" type="function" returnType="object" version="">
+ </tag>
+ <tag name="RecursiveDirectoryIterator::hasChildren" type="function" returnType="bool" version="">
+ <attr name="allow_links" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="RecursiveDirectoryIterator::key" type="function" returnType="string" version="">
+ </tag>
+ <tag name="RecursiveDirectoryIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="RecursiveDirectoryIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::current" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::getDepth" type="function" returnType="int" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::getSubIterator" type="function" returnType="RecursiveIterator" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::key" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="RecursiveIteratorIterator::valid" type="function" returnType="bolean" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::current" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::getChildren" type="function" returnType="object" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::hasChildren" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::key" type="function" returnType="mixed" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::next" type="function" returnType="void" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::rewind" type="function" returnType="void" version="">
+ </tag>
+ <tag name="SimpleXMLIterator::valid" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="class_implements" type="function" returnType="array" version="PHP 5">
+ <attr name="class" type="object" status="required"></attr>
+ </tag>
+ <tag name="class_parents" type="function" returnType="array" version="PHP 5">
+ <attr name="class" type="object" status="required"></attr>
+ </tag>
+ <tag name="iterator_count" type="function" returnType="int" version="">
+ <attr name="iterator" type="IteratorAggregate" status="required"></attr>
+ </tag>
+ <tag name="iterator_to_array" type="function" returnType="array" version="">
+ <attr name="iterator" type="IteratorAggregate" status="required"></attr>
+ </tag>
+ <tag name="spl_classes" type="function" returnType="array" version="PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/sqlite.tag b/quanta/data/dtep/php/sqlite.tag
new file mode 100644
index 00000000..4e33a53c
--- /dev/null
+++ b/quanta/data/dtep/php/sqlite.tag
@@ -0,0 +1,150 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="sqlite_array_query" type="function" returnType="array" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_busy_timeout" type="function" returnType="void" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="milliseconds" type="int" status="required"></attr>
+ </tag>
+ <tag name="sqlite_changes" type="function" returnType="int" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_close" type="function" returnType="void" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_column" type="function" returnType="mixed" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="index_or_name" type="mixed" status="required"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_create_aggregate" type="function" returnType="bool" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="function_name" type="string" status="required"></attr>
+ <attr name="step_func" type="callback" status="required"></attr>
+ <attr name="finalize_func" type="callback" status="required"></attr>
+ <attr name="num_args" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_create_function" type="function" returnType="bool" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="function_name" type="string" status="required"></attr>
+ <attr name="callback" type="callback" status="required"></attr>
+ <attr name="num_args" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_current" type="function" returnType="array" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_error_string" type="function" returnType="string" version="PHP 5">
+ <attr name="error_code" type="int" status="required"></attr>
+ </tag>
+ <tag name="sqlite_escape_string" type="function" returnType="string" version="PHP 5">
+ <attr name="item" type="string" status="required"></attr>
+ </tag>
+ <tag name="sqlite_exec" type="function" returnType="bool" version="">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="sqlite_factory" type="function" returnType="object" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="&amp;error_message" type="string" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_fetch_all" type="function" returnType="array" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_fetch_array" type="function" returnType="array" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="result_type" type="int" status="optional"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_fetch_column_types" type="function" returnType="resource" version="PHP 5">
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="db" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_fetch_object" type="function" returnType="object" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="class_name" type="string" status="optional"></attr>
+ <attr name="ctor_params" type="array" status="optional"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_fetch_single" type="function" returnType="string" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_field_name" type="function" returnType="string" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_index" type="int" status="required"></attr>
+ </tag>
+ <tag name="sqlite_has_more" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_has_prev" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_last_error" type="function" returnType="int" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_last_insert_rowid" type="function" returnType="int" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_libencoding" type="function" returnType="string" version="PHP 5">
+ </tag>
+ <tag name="sqlite_libversion" type="function" returnType="string" version="PHP 5">
+ </tag>
+ <tag name="sqlite_next" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_num_fields" type="function" returnType="int" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_num_rows" type="function" returnType="int" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_open" type="function" returnType="resource" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="&amp;error_message" type="string" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_popen" type="function" returnType="resource" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ <attr name="&amp;error_message" type="string" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_prev" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_query" type="function" returnType="resource" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="sqlite_rewind" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sqlite_seek" type="function" returnType="bool" version="PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="rownum" type="int" status="required"></attr>
+ </tag>
+ <tag name="sqlite_single_query" type="function" returnType="mixed" version="PHP 5">
+ <attr name="db" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="first_row_only" type="bool" status="optional"></attr>
+ <attr name="decode_binary" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="sqlite_udf_decode_binary" type="function" returnType="string" version="PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="sqlite_udf_encode_binary" type="function" returnType="string" version="PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="sqlite_unbuffered_query" type="function" returnType="resource" version="PHP 5">
+ <attr name="dbhandle" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/stream.tag b/quanta/data/dtep/php/stream.tag
new file mode 100644
index 00000000..562f91e5
--- /dev/null
+++ b/quanta/data/dtep/php/stream.tag
@@ -0,0 +1,136 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="stream_context_create" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="stream_context_get_default" type="function" returnType="resource" version="">
+ <attr name="options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="stream_context_get_options" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream|context" type="resource" status="required"></attr>
+ </tag>
+ <tag name="stream_context_set_option" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="context|stream" type="resource" status="required"></attr>
+ <attr name="wrapper" type="string" status="required"></attr>
+ <attr name="option" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="stream_context_set_params" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream|context" type="resource" status="required"></attr>
+ <attr name="params" type="array" status="required"></attr>
+ </tag>
+ <tag name="stream_copy_to_stream" type="function" returnType="int" version="PHP 5">
+ <attr name="source" type="resource" status="required"></attr>
+ <attr name="dest" type="resource" status="required"></attr>
+ <attr name="maxlength" type="int" status="optional"></attr>
+ </tag>
+ <tag name="stream_filter_append" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="filtername" type="string" status="required"></attr>
+ <attr name="read_write" type="int" status="optional"></attr>
+ <attr name="params" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="stream_filter_prepend" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="filtername" type="string" status="required"></attr>
+ <attr name="read_write" type="int" status="optional"></attr>
+ <attr name="params" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="stream_filter_register" type="function" returnType="bool" version="PHP 5">
+ <attr name="filtername" type="string" status="required"></attr>
+ <attr name="classname" type="string" status="required"></attr>
+ </tag>
+ <tag name="stream_filter_append" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream_filter" type="resource" status="required"></attr>
+ </tag>
+ <tag name="stream_get_contents" type="function" returnType="string" version="PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="maxlength" type="int" status="optional"></attr>
+ </tag>
+ <tag name="stream_get_filters" type="function" returnType="array" version="PHP 5">
+ </tag>
+ <tag name="stream_get_line" type="function" returnType="string" version="PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ <attr name="ending" type="string" status="required"></attr>
+ </tag>
+ <tag name="stream_get_meta_data" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ </tag>
+ <tag name="stream_get_transports" type="function" returnType="array" version="PHP 5">
+ </tag>
+ <tag name="stream_get_wrappers" type="function" returnType="array" version="PHP 5">
+ </tag>
+ <tag name="stream_select" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="&amp;read" type="array" status="required"></attr>
+ <attr name="&amp;write" type="array" status="required"></attr>
+ <attr name="&amp;except" type="array" status="required"></attr>
+ <attr name="tv_sec" type="int" status="required"></attr>
+ <attr name="tv_usec" type="int" status="optional"></attr>
+ </tag>
+ <tag name="stream_set_blocking" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="stream_set_timeout" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="seconds" type="int" status="required"></attr>
+ <attr name="microseconds" type="int" status="optional"></attr>
+ </tag>
+ <tag name="stream_set_write_buffer" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="buffer" type="int" status="required"></attr>
+ </tag>
+ <tag name="stream_socket_accept" type="function" returnType="resource" version="PHP 5">
+ <attr name="server_socket" type="resource" status="required"></attr>
+ <attr name="timeout" type="float" status="optional"></attr>
+ <attr name="&amp;peername" type="string" status="optional"></attr>
+ </tag>
+ <tag name="stream_socket_client" type="function" returnType="resource" version="PHP 5">
+ <attr name="remote_socket" type="string" status="required"></attr>
+ <attr name="&amp;errno" type="int" status="optional"></attr>
+ <attr name="&amp;errstr" type="string" status="optional"></attr>
+ <attr name="timeout" type="float" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="stream_socket_enable_crypto" type="function" returnType="resource" version="">
+ <attr name="stream" type="resource" status="required"></attr>
+ <attr name="enable" type="bool" status="required"></attr>
+ <attr name="crypto_type" type="int" status="optional"></attr>
+ <attr name="session_stream" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="stream_socket_get_name" type="function" returnType="string" version="PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="want_peer" type="bool" status="required"></attr>
+ </tag>
+ <tag name="stream_socket_recvfrom" type="function" returnType="string" version="PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="&amp;address" type="string" status="optional"></attr>
+ </tag>
+ <tag name="stream_socket_sendto" type="function" returnType="int" version="PHP 5">
+ <attr name="socket" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="address" type="string" status="optional"></attr>
+ </tag>
+ <tag name="stream_socket_server" type="function" returnType="resource" version="PHP 5">
+ <attr name="local_socket" type="string" status="required"></attr>
+ <attr name="&amp;errno" type="int" status="optional"></attr>
+ <attr name="&amp;errstr" type="string" status="optional"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="context" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="stream_wrapper_register" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ <attr name="protocol" type="string" status="required"></attr>
+ <attr name="classname" type="string" status="required"></attr>
+ </tag>
+ <tag name="stream_wrapper_restore" type="function" returnType="bool" version="">
+ <attr name="protocol" type="string" status="required"></attr>
+ </tag>
+ <tag name="stream_wrapper_unregister" type="function" returnType="bool" version="">
+ <attr name="protocol" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/strings.tag b/quanta/data/dtep/php/strings.tag
new file mode 100644
index 00000000..474c10a4
--- /dev/null
+++ b/quanta/data/dtep/php/strings.tag
@@ -0,0 +1,382 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="addcslashes" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="charlist" type="string" status="required"></attr>
+ </tag>
+ <tag name="addslashes" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="bin2hex" type="function" returnType="string" version="PHP 3&gt;= 3.0.9, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="chr" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="ascii" type="int" status="required"></attr>
+ </tag>
+ <tag name="chunk_split" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="body" type="string" status="required"></attr>
+ <attr name="chunklen" type="int" status="optional"></attr>
+ <attr name="end" type="string" status="optional"></attr>
+ </tag>
+ <tag name="convert_cyr_string" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="from" type="string" status="required"></attr>
+ <attr name="to" type="string" status="required"></attr>
+ </tag>
+ <tag name="convert_uudecode" type="function" returnType="string" version="PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="convert_uuencode" type="function" returnType="string" version="PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="count_chars" type="function" returnType="mixed" version="PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="crc32" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="crypt" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="salt" type="string" status="optional"></attr>
+ </tag>
+ <tag name="echo" type="function" returnType="void" version="">
+ <attr name="arg1" type="string" status="required"></attr>
+ <attr name="argn..." type="string" status="optional"></attr>
+ </tag>
+ <tag name="explode" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="separator" type="string" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="limit" type="int" status="optional"></attr>
+ </tag>
+ <tag name="fprintf" type="function" returnType="int" version="PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="get_html_translation_table" type="function" returnType="array" version="PHP 4 , PHP 5">
+ <attr name="table" type="int" status="optional"></attr>
+ <attr name="quote_style" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hebrev" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hebrew_text" type="string" status="required"></attr>
+ <attr name="max_chars_per_line" type="int" status="optional"></attr>
+ </tag>
+ <tag name="hebrevc" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="hebrew_text" type="string" status="required"></attr>
+ <attr name="max_chars_per_line" type="int" status="optional"></attr>
+ </tag>
+ <tag name="html_entity_decode" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="quote_style" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="htmlentities" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="quote_style" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="htmlspecialchars" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="quote_style" type="int" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ </tag>
+ <tag name="implode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="glue" type="string" status="required"></attr>
+ <attr name="pieces" type="array" status="required"></attr>
+ </tag>
+ <tag name="levenshtein" type="function" returnType="int" version="PHP 3&gt;= 3.0.17, PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="cost_ins" type="int" status="optional"></attr>
+ <attr name="cost_rep" type="int" status="optional"></attr>
+ <attr name="cost_del" type="int" status="required"></attr>
+ </tag>
+ <tag name="localeconv" type="function" returnType="array" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ </tag>
+ <tag name="ltrim" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="charlist" type="string" status="optional"></attr>
+ </tag>
+ <tag name="md5_file" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="raw_output" type="bool" status="required"></attr>
+ </tag>
+ <tag name="md5" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="raw_output" type="bool" status="required"></attr>
+ </tag>
+ <tag name="metaphone" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="phones" type="int" status="optional"></attr>
+ </tag>
+ <tag name="money_format" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="number" type="float" status="required"></attr>
+ </tag>
+ <tag name="nl_langinfo" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="item" type="int" status="required"></attr>
+ </tag>
+ <tag name="nl2br" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="number_format" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="number" type="float" status="required"></attr>
+ <attr name="decimals" type="int" status="optional"></attr>
+ <attr name="dec_point" type="string" status="optional"></attr>
+ <attr name="thousands_sep" type="string" status="required"></attr>
+ </tag>
+ <tag name="ord" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="parse_str" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="&amp;arr" type="array" status="optional"></attr>
+ </tag>
+ <tag name="print" type="function" returnType="int" version="">
+ <attr name="arg" type="string" status="required"></attr>
+ </tag>
+ <tag name="printf" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="quoted_printable_decode" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="quotemeta" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="rtrim" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="charlist" type="string" status="optional"></attr>
+ </tag>
+ <tag name="setlocale" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="category" type="mixed" status="required"></attr>
+ <attr name="locale" type="string" status="required"></attr>
+ <attr name="..." type="string" status="optional"></attr>
+ </tag>
+ <tag name="sha1_file" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="raw_output" type="bool" status="required"></attr>
+ </tag>
+ <tag name="sha1" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="raw_output" type="bool" status="required"></attr>
+ </tag>
+ <tag name="similar_text" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="first" type="string" status="required"></attr>
+ <attr name="second" type="string" status="required"></attr>
+ <attr name="&amp;percent" type="float" status="optional"></attr>
+ </tag>
+ <tag name="soundex" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="sprintf" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="sscanf" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="&amp;..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="str_ireplace" type="function" returnType="mixed" version="PHP 5">
+ <attr name="search" type="mixed" status="required"></attr>
+ <attr name="replace" type="mixed" status="required"></attr>
+ <attr name="subject" type="mixed" status="required"></attr>
+ <attr name="&amp;count" type="int" status="optional"></attr>
+ </tag>
+ <tag name="str_pad" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="input" type="string" status="required"></attr>
+ <attr name="pad_length" type="int" status="required"></attr>
+ <attr name="pad_string" type="string" status="optional"></attr>
+ <attr name="pad_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="str_repeat" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="input" type="string" status="required"></attr>
+ <attr name="multiplier" type="int" status="required"></attr>
+ </tag>
+ <tag name="str_replace" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="search" type="mixed" status="required"></attr>
+ <attr name="replace" type="mixed" status="required"></attr>
+ <attr name="subject" type="mixed" status="required"></attr>
+ <attr name="&amp;count" type="int" status="optional"></attr>
+ </tag>
+ <tag name="str_rot13" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="str_shuffle" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="str_split" type="function" returnType="array" version="PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="split_length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="str_word_count" type="function" returnType="mixed" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="format" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strcasecmp" type="function" returnType="int" version="PHP 3&gt;= 3.0.2, PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="strcmp" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="strcoll" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="strcspn" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="start" type="int" status="optional"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strip_tags" type="function" returnType="string" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="allowable_tags" type="string" status="optional"></attr>
+ </tag>
+ <tag name="stripcslashes" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="stripos" type="function" returnType="int" version="PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="stripslashes" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="stristr" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ </tag>
+ <tag name="strlen" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="strnatcasecmp" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="strnatcmp" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="strncasecmp" type="function" returnType="int" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ </tag>
+ <tag name="strncmp" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="len" type="int" status="required"></attr>
+ </tag>
+ <tag name="strpbrk" type="function" returnType="string" version="PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="char_list" type="string" status="required"></attr>
+ </tag>
+ <tag name="strpos" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strrchr" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ </tag>
+ <tag name="strrev" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="strripos" type="function" returnType="int" version="PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strrpos" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strspn" type="function" returnType="int" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="start" type="int" status="optional"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="strstr" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ </tag>
+ <tag name="strtok" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="token" type="string" status="required"></attr>
+ </tag>
+ <tag name="strtolower" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="strtoupper" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ </tag>
+ <tag name="strtr" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="from" type="string" status="required"></attr>
+ <attr name="to" type="string" status="required"></attr>
+ </tag>
+ <tag name="substr_compare" type="function" returnType="int" version="PHP 5">
+ <attr name="main_str" type="string" status="required"></attr>
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ <attr name="case_insensitivity" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="substr_count" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="haystack" type="string" status="required"></attr>
+ <attr name="needle" type="string" status="required"></attr>
+ </tag>
+ <tag name="substr_replace" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="replacement" type="string" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="substr" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="trim" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="charlist" type="string" status="optional"></attr>
+ </tag>
+ <tag name="ucfirst" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="ucwords" type="function" returnType="string" version="PHP 3&gt;= 3.0.3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="vfprintf" type="function" returnType="int" version="PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="array" status="required"></attr>
+ </tag>
+ <tag name="vprintf" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="array" status="required"></attr>
+ </tag>
+ <tag name="vsprintf" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="format" type="string" status="required"></attr>
+ <attr name="args" type="array" status="required"></attr>
+ </tag>
+ <tag name="wordwrap" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="width" type="int" status="optional"></attr>
+ <attr name="break" type="string" status="optional"></attr>
+ <attr name="cut" type="bool" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/swf.tag b/quanta/data/dtep/php/swf.tag
new file mode 100644
index 00000000..444f80c0
--- /dev/null
+++ b/quanta/data/dtep/php/swf.tag
@@ -0,0 +1,272 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="swf_actiongeturl" type="function" returnType="void" version="PHP 4 ">
+ <attr name="url" type="string" status="required"></attr>
+ <attr name="target" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_actiongotoframe" type="function" returnType="void" version="PHP 4 ">
+ <attr name="framenumber" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_actiongotolabel" type="function" returnType="void" version="PHP 4 ">
+ <attr name="label" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_actionnextframe" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_actionplay" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_actionprevframe" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_actionsettarget" type="function" returnType="void" version="PHP 4 ">
+ <attr name="target" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_actionstop" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_actiontogglequality" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_actionwaitforframe" type="function" returnType="void" version="PHP 4 ">
+ <attr name="framenumber" type="int" status="required"></attr>
+ <attr name="skipcount" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_addbuttonrecord" type="function" returnType="void" version="PHP 4 ">
+ <attr name="states" type="int" status="required"></attr>
+ <attr name="shapeid" type="int" status="required"></attr>
+ <attr name="depth" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_addcolor" type="function" returnType="void" version="PHP 4 ">
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="g" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="a" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_closefile" type="function" returnType="void" version="PHP 4 ">
+ <attr name="return_file" type="int" status="optional"></attr>
+ </tag>
+ <tag name="swf_definebitmap" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="image_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_definefont" type="function" returnType="void" version="PHP 4 ">
+ <attr name="fontid" type="int" status="required"></attr>
+ <attr name="fontname" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_defineline" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="x1" type="float" status="required"></attr>
+ <attr name="y1" type="float" status="required"></attr>
+ <attr name="x2" type="float" status="required"></attr>
+ <attr name="y2" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_definepoly" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="coords" type="array" status="required"></attr>
+ <attr name="npoints" type="int" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_definerect" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="x1" type="float" status="required"></attr>
+ <attr name="y1" type="float" status="required"></attr>
+ <attr name="x2" type="float" status="required"></attr>
+ <attr name="y2" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_definetext" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="docenter" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_endbutton" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_enddoaction" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_endshape" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_endsymbol" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_fontsize" type="function" returnType="void" version="PHP 4 ">
+ <attr name="size" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_fontslant" type="function" returnType="void" version="PHP 4 ">
+ <attr name="slant" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_fonttracking" type="function" returnType="void" version="PHP 4 ">
+ <attr name="tracking" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_getbitmapinfo" type="function" returnType="array" version="PHP 4 ">
+ <attr name="bitmapid" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_getfontinfo" type="function" returnType="array" version="PHP 4 ">
+ </tag>
+ <tag name="swf_getframe" type="function" returnType="int" version="PHP 4 ">
+ </tag>
+ <tag name="swf_labelframe" type="function" returnType="void" version="PHP 4 ">
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_lookat" type="function" returnType="void" version="PHP 4 ">
+ <attr name="view_x" type="float" status="required"></attr>
+ <attr name="view_y" type="float" status="required"></attr>
+ <attr name="view_z" type="float" status="required"></attr>
+ <attr name="reference_x" type="float" status="required"></attr>
+ <attr name="reference_y" type="float" status="required"></attr>
+ <attr name="reference_z" type="float" status="required"></attr>
+ <attr name="twist" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_modifyobject" type="function" returnType="void" version="PHP 4 ">
+ <attr name="depth" type="int" status="required"></attr>
+ <attr name="how" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_mulcolor" type="function" returnType="void" version="PHP 4 ">
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="g" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="a" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_nextid" type="function" returnType="int" version="PHP 4 ">
+ </tag>
+ <tag name="swf_oncondition" type="function" returnType="void" version="PHP 4 ">
+ <attr name="transition" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_openfile" type="function" returnType="void" version="PHP 4 ">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ <attr name="height" type="float" status="required"></attr>
+ <attr name="framerate" type="float" status="required"></attr>
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="g" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_ortho" type="function" returnType="void" version="PHP 4 &gt;= 4.0.1">
+ <attr name="xmin" type="float" status="required"></attr>
+ <attr name="xmax" type="float" status="required"></attr>
+ <attr name="ymin" type="float" status="required"></attr>
+ <attr name="ymax" type="float" status="required"></attr>
+ <attr name="zmin" type="float" status="required"></attr>
+ <attr name="zmax" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_ortho2" type="function" returnType="void" version="PHP 4 ">
+ <attr name="xmin" type="float" status="required"></attr>
+ <attr name="xmax" type="float" status="required"></attr>
+ <attr name="ymin" type="float" status="required"></attr>
+ <attr name="ymax" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_perspective" type="function" returnType="void" version="PHP 4 ">
+ <attr name="fovy" type="float" status="required"></attr>
+ <attr name="aspect" type="float" status="required"></attr>
+ <attr name="near" type="float" status="required"></attr>
+ <attr name="far" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_placeobject" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="depth" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_polarview" type="function" returnType="void" version="PHP 4 ">
+ <attr name="dist" type="float" status="required"></attr>
+ <attr name="azimuth" type="float" status="required"></attr>
+ <attr name="incidence" type="float" status="required"></attr>
+ <attr name="twist" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_popmatrix" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_posround" type="function" returnType="void" version="PHP 4 ">
+ <attr name="round" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_pushmatrix" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_removeobject" type="function" returnType="void" version="PHP 4 ">
+ <attr name="depth" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_rotate" type="function" returnType="void" version="PHP 4 ">
+ <attr name="angle" type="float" status="required"></attr>
+ <attr name="axis" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_scale" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="z" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_setfont" type="function" returnType="void" version="PHP 4 ">
+ <attr name="fontid" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_setframe" type="function" returnType="void" version="PHP 4 ">
+ <attr name="framenumber" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_shapearc" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="ang1" type="float" status="required"></attr>
+ <attr name="ang2" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_shapecurveto" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x1" type="float" status="required"></attr>
+ <attr name="y1" type="float" status="required"></attr>
+ <attr name="x2" type="float" status="required"></attr>
+ <attr name="y2" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_shapecurveto3" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x1" type="float" status="required"></attr>
+ <attr name="y1" type="float" status="required"></attr>
+ <attr name="x2" type="float" status="required"></attr>
+ <attr name="y2" type="float" status="required"></attr>
+ <attr name="x3" type="float" status="required"></attr>
+ <attr name="y3" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_shapefillbitmapclip" type="function" returnType="void" version="PHP 4 ">
+ <attr name="bitmapid" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_shapefillbitmaptile" type="function" returnType="void" version="PHP 4 ">
+ <attr name="bitmapid" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_shapefilloff" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_shapefillsolid" type="function" returnType="void" version="PHP 4 ">
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="g" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="a" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_shapelinesolid" type="function" returnType="void" version="PHP 4 ">
+ <attr name="r" type="float" status="required"></attr>
+ <attr name="g" type="float" status="required"></attr>
+ <attr name="b" type="float" status="required"></attr>
+ <attr name="a" type="float" status="required"></attr>
+ <attr name="width" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_shapelineto" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_shapemoveto" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_showframe" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_startbutton" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_startdoaction" type="function" returnType="void" version="PHP 4 ">
+ </tag>
+ <tag name="swf_startshape" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_startsymbol" type="function" returnType="void" version="PHP 4 ">
+ <attr name="objid" type="int" status="required"></attr>
+ </tag>
+ <tag name="swf_textwidth" type="function" returnType="float" version="PHP 4 ">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="swf_translate" type="function" returnType="void" version="PHP 4 ">
+ <attr name="x" type="float" status="required"></attr>
+ <attr name="y" type="float" status="required"></attr>
+ <attr name="z" type="float" status="required"></attr>
+ </tag>
+ <tag name="swf_viewport" type="function" returnType="void" version="PHP 4 ">
+ <attr name="xmin" type="float" status="required"></attr>
+ <attr name="xmax" type="float" status="required"></attr>
+ <attr name="ymin" type="float" status="required"></attr>
+ <attr name="ymax" type="float" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/sybase.tag b/quanta/data/dtep/php/sybase.tag
new file mode 100644
index 00000000..4d505e40
--- /dev/null
+++ b/quanta/data/dtep/php/sybase.tag
@@ -0,0 +1,96 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="sybase_affected_rows" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="sybase_close" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="sybase_connect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="servername" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ <attr name="appname" type="string" status="optional"></attr>
+ </tag>
+ <tag name="sybase_data_seek" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result_identifier" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_deadlock_retry_count" type="function" returnType="void" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="retry_count" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_fetch_array" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sybase_fetch_assoc" type="function" returnType="array" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sybase_fetch_field" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="optional"></attr>
+ </tag>
+ <tag name="sybase_fetch_object" type="function" returnType="object" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="object" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="sybase_fetch_row" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sybase_field_seek" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="field_offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_free_result" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sybase_get_last_message" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ </tag>
+ <tag name="sybase_min_client_severity" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="severity" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_min_error_severity" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="severity" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_min_message_severity" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="severity" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_min_server_severity" type="function" returnType="void" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="severity" type="int" status="required"></attr>
+ </tag>
+ <tag name="sybase_num_fields" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sybase_num_rows" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ </tag>
+ <tag name="sybase_pconnect" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="servername" type="string" status="optional"></attr>
+ <attr name="username" type="string" status="optional"></attr>
+ <attr name="password" type="string" status="optional"></attr>
+ <attr name="charset" type="string" status="optional"></attr>
+ <attr name="appname" type="string" status="optional"></attr>
+ </tag>
+ <tag name="sybase_query" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="sybase_result" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="row" type="int" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="sybase_select_db" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="database_name" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="sybase_set_message_handler" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="handler" type="callback" status="required"></attr>
+ <attr name="connection" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="sybase_unbuffered_query" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="link_identifier" type="resource" status="required"></attr>
+ <attr name="store_result" type="bool" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/tcpwrap.tag b/quanta/data/dtep/php/tcpwrap.tag
new file mode 100644
index 00000000..a54b42bb
--- /dev/null
+++ b/quanta/data/dtep/php/tcpwrap.tag
@@ -0,0 +1,9 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="tcpwrap_check" type="function" returnType="bool" version="">
+ <attr name="daemon" type="string" status="required"></attr>
+ <attr name="address" type="string" status="required"></attr>
+ <attr name="user" type="string" status="optional"></attr>
+ <attr name="nodns" type="bool" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/tidy.tag b/quanta/data/dtep/php/tidy.tag
new file mode 100644
index 00000000..b87ccada
--- /dev/null
+++ b/quanta/data/dtep/php/tidy.tag
@@ -0,0 +1,144 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="ob_tidyhandler" type="function" returnType="string" version="PHP 5">
+ <attr name="input" type="string" status="required"></attr>
+ <attr name="mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="tidy_access_count" type="function" returnType="int" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_clean_repair" type="function" returnType="bool" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_config_count" type="function" returnType="int" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy::__construct" type="function" returnType="object" version="">
+ <attr name="filename" type="string" status="optional"></attr>
+ <attr name="config" type="mixed" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="tidy_diagnose" type="function" returnType="bool" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_error_count" type="function" returnType="int" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_body" type="function" returnType="object" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_config" type="function" returnType="array" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_error_buffer" type="function" returnType="string" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_head" type="function" returnType="object" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_html_ver" type="function" returnType="int" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_html" type="function" returnType="object" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_output" type="function" returnType="string" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_release" type="function" returnType="string" version="PHP 5">
+ </tag>
+ <tag name="tidy_get_root" type="function" returnType="object" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_get_status" type="function" returnType="int" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_getopt" type="function" returnType="mixed" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ <attr name="option" type="string" status="required"></attr>
+ </tag>
+ <tag name="tidy_is_xhtml" type="function" returnType="bool" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_is_xml" type="function" returnType="bool" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+ <tag name="tidy_load_config" type="function" returnType="void" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="tidy_node->attributes" type="function" returnType="array" version="">
+ </tag>
+ <tag name="tidy_node->children" type="function" returnType="array" version="">
+ </tag>
+ <tag name="tidy_node->get_attr" type="function" returnType="tidy_attr" version="">
+ <attr name="attrib_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="tidy_node->get_nodes" type="function" returnType="array" version="">
+ <attr name="node_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="tidy_node->hasChildren" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->hasSiblings" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isAsp" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isComment" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isHtml" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isJste" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isPhp" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isText" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isXhtml" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->isXml" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_node->next" type="function" returnType="tidy_node" version="">
+ </tag>
+ <tag name="tidy_node->prev" type="function" returnType="tidy_node" version="">
+ </tag>
+ <tag name="tidy_node->tidy_node" type="function" returnType="void" version="">
+ </tag>
+ <tag name="tidy_parse_file" type="function" returnType="resource" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="config" type="mixed" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="tidy_parse_string" type="function" returnType="resource" version="PHP 5">
+ <attr name="input" type="string" status="required"></attr>
+ <attr name="config" type="mixed" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="tidy_repair_file" type="function" returnType="string" version="PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="config" type="mixed" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="tidy_repair_string" type="function" returnType="string" version="PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="config" type="mixed" status="optional"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="tidy_reset_config" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="tidy_save_config" type="function" returnType="bool" version="">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="tidy_set_encoding" type="function" returnType="bool" version="">
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="tidy_setopt" type="function" returnType="bool" version="">
+ <attr name="option" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="tidy_warning_count" type="function" returnType="int" version="PHP 5">
+ <attr name="tidy" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/tokenizer.tag b/quanta/data/dtep/php/tokenizer.tag
new file mode 100644
index 00000000..22e009d7
--- /dev/null
+++ b/quanta/data/dtep/php/tokenizer.tag
@@ -0,0 +1,9 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="token_get_all" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="source" type="string" status="required"></attr>
+ </tag>
+ <tag name="token_name" type="function" returnType="string" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="token" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/uodbc.tag b/quanta/data/dtep/php/uodbc.tag
new file mode 100644
index 00000000..51356e99
--- /dev/null
+++ b/quanta/data/dtep/php/uodbc.tag
@@ -0,0 +1,211 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="odbc_autocommit" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="OnOff" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="odbc_binmode" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="mode" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_close_all" type="function" returnType="void" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ </tag>
+ <tag name="odbc_close" type="function" returnType="void" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_columnprivileges" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="required"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="column_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_columns" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="schema" type="string" status="optional"></attr>
+ <attr name="table_name" type="string" status="optional"></attr>
+ <attr name="column_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_commit" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_connect" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="dsn" type="string" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="cursor_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_cursor" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_data_source" type="function" returnType="resource" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="fetch_type" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_do" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="conn_id" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_errormsg" type="function" returnType="string" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="connection_id" type="resource" status="optional"></attr>
+ </tag>
+ <tag name="odbc_exec" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="query_string" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_execute" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="parameters_array" type="array" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_array" type="function" returnType="array" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_into" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="&amp;result_array" type="array" status="required"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_object" type="function" returnType="object" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="result" type="resource" status="required"></attr>
+ <attr name="rownumber" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_fetch_row" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="row_number" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_field_len" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_field_name" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_field_num" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field_name" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_field_precision" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_field_scale" type="function" returnType="string" version="PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_field_type" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field_number" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_foreignkeys" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="pk_qualifier" type="string" status="required"></attr>
+ <attr name="pk_owner" type="string" status="required"></attr>
+ <attr name="pk_table" type="string" status="required"></attr>
+ <attr name="fk_qualifier" type="string" status="required"></attr>
+ <attr name="fk_owner" type="string" status="required"></attr>
+ <attr name="fk_table" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_free_result" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_gettypeinfo" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="data_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_longreadlen" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_next_result" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_num_fields" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_num_rows" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_pconnect" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="dsn" type="string" status="required"></attr>
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="cursor_type" type="int" status="optional"></attr>
+ </tag>
+ <tag name="odbc_prepare" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="query_string" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_primarykeys" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="required"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="table" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_procedurecolumns" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="proc" type="string" status="required"></attr>
+ <attr name="column" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_procedures" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_result_all" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="format" type="string" status="optional"></attr>
+ </tag>
+ <tag name="odbc_result" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="result_id" type="resource" status="required"></attr>
+ <attr name="field" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="odbc_rollback" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="odbc_setoption" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="function" type="int" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="param" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_specialcolumns" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="type" type="int" status="required"></attr>
+ <attr name="qualifier" type="string" status="required"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="table" type="string" status="required"></attr>
+ <attr name="scope" type="int" status="required"></attr>
+ <attr name="nullable" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_statistics" type="function" returnType="resource" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="required"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="table_name" type="string" status="required"></attr>
+ <attr name="unique" type="int" status="required"></attr>
+ <attr name="accuracy" type="int" status="required"></attr>
+ </tag>
+ <tag name="odbc_tableprivileges" type="function" returnType="int" version="PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="required"></attr>
+ <attr name="owner" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="odbc_tables" type="function" returnType="int" version="PHP 3&gt;= 3.0.17, PHP 4 , PHP 5">
+ <attr name="connection_id" type="resource" status="required"></attr>
+ <attr name="qualifier" type="string" status="optional"></attr>
+ <attr name="owner" type="string" status="optional"></attr>
+ <attr name="name" type="string" status="optional"></attr>
+ <attr name="types" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/url.tag b/quanta/data/dtep/php/url.tag
new file mode 100644
index 00000000..82cbb48a
--- /dev/null
+++ b/quanta/data/dtep/php/url.tag
@@ -0,0 +1,36 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="base64_decode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="encoded_data" type="string" status="required"></attr>
+ </tag>
+ <tag name="base64_encode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="get_headers" type="function" returnType="array" version="PHP 5">
+ <attr name="url" type="string" status="required"></attr>
+ <attr name="format" type="int" status="optional"></attr>
+ </tag>
+ <tag name="get_meta_tags" type="function" returnType="array" version="PHP 3&gt;= 3.0.4, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="use_include_path" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="http_build_query" type="function" returnType="string" version="PHP 5">
+ <attr name="formdata" type="array" status="required"></attr>
+ <attr name="numeric_prefix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="parse_url" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="url" type="string" status="required"></attr>
+ </tag>
+ <tag name="rawurldecode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="rawurlencode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="urldecode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="urlencode" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/var.tag b/quanta/data/dtep/php/var.tag
new file mode 100644
index 00000000..25872c31
--- /dev/null
+++ b/quanta/data/dtep/php/var.tag
@@ -0,0 +1,99 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="debug_zval_dump" type="function" returnType="void" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="variable" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="empty" type="function" returnType="bool" version="">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="floatval" type="function" returnType="float" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="get_defined_vars" type="function" returnType="array" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ </tag>
+ <tag name="get_resource_type" type="function" returnType="string" version="PHP 4 &gt;= 4.0.2, PHP 5">
+ <attr name="handle" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gettype" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="import_request_variables" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="types" type="string" status="required"></attr>
+ <attr name="prefix" type="string" status="optional"></attr>
+ </tag>
+ <tag name="intval" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="base" type="int" status="optional"></attr>
+ </tag>
+ <tag name="is_array" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_bool" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_callable" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="syntax_only" type="bool" status="optional"></attr>
+ <attr name="&amp;callable_name" type="string" status="optional"></attr>
+ </tag>
+ <tag name="is_float" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_int" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_null" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_numeric" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_object" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_resource" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_scalar" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="is_string" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="isset" type="function" returnType="bool" version="">
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="var" type="mixed" status="optional"></attr>
+ <attr name="..." type="" status="optional"></attr>
+ </tag>
+ <tag name="print_r" type="function" returnType="bool" version="PHP 4 , PHP 5">
+ <attr name="expression" type="mixed" status="required"></attr>
+ <attr name="return" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="serialize" type="function" returnType="string" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="settype" type="function" returnType="bool" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="&amp;var" type="mixed" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ </tag>
+ <tag name="strval" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="unserialize" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="str" type="string" status="required"></attr>
+ </tag>
+ <tag name="unset" type="function" returnType="void" version="">
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="var" type="mixed" status="optional"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="var_dump" type="function" returnType="void" version="PHP 3&gt;= 3.0.5, PHP 4 , PHP 5">
+ <attr name="expression" type="mixed" status="required"></attr>
+ <attr name="expression" type="mixed" status="optional"></attr>
+ <attr name="..." type="" status="optional"></attr>
+ </tag>
+ <tag name="var_export" type="function" returnType="mixed" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="expression" type="mixed" status="required"></attr>
+ <attr name="return" type="bool" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/vpopmail.tag b/quanta/data/dtep/php/vpopmail.tag
new file mode 100644
index 00000000..26d05b25
--- /dev/null
+++ b/quanta/data/dtep/php/vpopmail.tag
@@ -0,0 +1,79 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="vpopmail_add_alias_domain_ex" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="olddomain" type="string" status="required"></attr>
+ <attr name="newdomain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_add_alias_domain" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="aliasdomain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_add_domain_ex" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="passwd" type="string" status="required"></attr>
+ <attr name="quota" type="string" status="optional"></attr>
+ <attr name="bounce" type="string" status="optional"></attr>
+ <attr name="apop" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="vpopmail_add_domain" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="dir" type="string" status="required"></attr>
+ <attr name="uid" type="int" status="required"></attr>
+ <attr name="gid" type="int" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_add_user" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="gecos" type="string" status="optional"></attr>
+ <attr name="apop" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="vpopmail_alias_add" type="function" returnType="bool" version="4.1.0 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="alias" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_alias_del_domain" type="function" returnType="bool" version="4.1.0 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_alias_del" type="function" returnType="bool" version="4.1.0 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_alias_get_all" type="function" returnType="array" version="4.1.0 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_alias_get" type="function" returnType="array" version="4.1.0 - 4.2.3 only">
+ <attr name="alias" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_auth_user" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="apop" type="string" status="optional"></attr>
+ </tag>
+ <tag name="vpopmail_del_domain_ex" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_del_domain" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_del_user" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ </tag>
+ <tag name="vpopmail_error" type="function" returnType="string" version="4.0.5 - 4.2.3 only">
+ </tag>
+ <tag name="vpopmail_passwd" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="password" type="string" status="required"></attr>
+ <attr name="apop" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="vpopmail_set_user_quota" type="function" returnType="bool" version="4.0.5 - 4.2.3 only">
+ <attr name="user" type="string" status="required"></attr>
+ <attr name="domain" type="string" status="required"></attr>
+ <attr name="quota" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/w32api.tag b/quanta/data/dtep/php/w32api.tag
new file mode 100644
index 00000000..03fe773d
--- /dev/null
+++ b/quanta/data/dtep/php/w32api.tag
@@ -0,0 +1,28 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="w32api_deftype" type="function" returnType="bool" version="4.2.0 - 4.2.3 only">
+ <attr name="typename" type="string" status="required"></attr>
+ <attr name="member1_type" type="string" status="required"></attr>
+ <attr name="member1_name" type="string" status="required"></attr>
+ <attr name="..." type="string" status="optional"></attr>
+ <attr name="..." type="string" status="optional"></attr>
+ </tag>
+ <tag name="w32api_init_dtype" type="function" returnType="resource" version="4.2.0 - 4.2.3 only">
+ <attr name="typename" type="string" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="w32api_invoke_function" type="function" returnType="mixed" version="4.2.0 - 4.2.3 only">
+ <attr name="funcname" type="string" status="required"></attr>
+ <attr name="argument" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="w32api_register_function" type="function" returnType="bool" version="4.2.0 - 4.2.3 only">
+ <attr name="library" type="string" status="required"></attr>
+ <attr name="function_name" type="string" status="required"></attr>
+ <attr name="return_type" type="string" status="required"></attr>
+ </tag>
+ <tag name="w32api_set_call_method" type="function" returnType="void" version="4.2.0 - 4.2.3 only">
+ <attr name="method" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/wddx.tag b/quanta/data/dtep/php/wddx.tag
new file mode 100644
index 00000000..97cdebee
--- /dev/null
+++ b/quanta/data/dtep/php/wddx.tag
@@ -0,0 +1,25 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="wddx_add_vars" type="function" returnType="bool" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="packet_id" type="int" status="required"></attr>
+ <attr name="name_var" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="wddx_deserialize" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="packet" type="string" status="required"></attr>
+ </tag>
+ <tag name="wddx_packet_end" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="packet_id" type="int" status="required"></attr>
+ </tag>
+ <tag name="wddx_packet_start" type="function" returnType="int" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="comment" type="string" status="optional"></attr>
+ </tag>
+ <tag name="wddx_serialize_value" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="var" type="mixed" status="required"></attr>
+ <attr name="comment" type="string" status="optional"></attr>
+ </tag>
+ <tag name="wddx_serialize_vars" type="function" returnType="string" version="PHP 3&gt;= 3.0.7, PHP 4 , PHP 5">
+ <attr name="var_name" type="mixed" status="required"></attr>
+ <attr name="..." type="mixed" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/xattr.tag b/quanta/data/dtep/php/xattr.tag
new file mode 100644
index 00000000..446adf8c
--- /dev/null
+++ b/quanta/data/dtep/php/xattr.tag
@@ -0,0 +1,26 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="xattr_get" type="function" returnType="string" version="">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="xattr_list" type="function" returnType="array" version="">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="xattr_remove" type="function" returnType="bool" version="">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="xattr_set" type="function" returnType="bool" version="">
+ <attr name="path" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="xattr_supported" type="function" returnType="bool" version="">
+ <attr name="path" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/xdiff.tag b/quanta/data/dtep/php/xdiff.tag
new file mode 100644
index 00000000..255e8691
--- /dev/null
+++ b/quanta/data/dtep/php/xdiff.tag
@@ -0,0 +1,58 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="xdiff_file_diff_binary" type="function" returnType="bool" version="">
+ <attr name="file1" type="string" status="required"></attr>
+ <attr name="file2" type="string" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ </tag>
+ <tag name="xdiff_file_diff" type="function" returnType="bool" version="">
+ <attr name="file1" type="string" status="required"></attr>
+ <attr name="file2" type="string" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ <attr name="context" type="int" status="optional"></attr>
+ <attr name="minimal" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="xdiff_file_merge3" type="function" returnType="mixed" version="">
+ <attr name="file1" type="string" status="required"></attr>
+ <attr name="file2" type="string" status="required"></attr>
+ <attr name="file3" type="string" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ </tag>
+ <tag name="xdiff_file_patch_binary" type="function" returnType="bool" version="">
+ <attr name="file" type="string" status="required"></attr>
+ <attr name="patch" type="string" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ </tag>
+ <tag name="xdiff_file_patch" type="function" returnType="mixed" version="">
+ <attr name="file" type="string" status="required"></attr>
+ <attr name="patch" type="string" status="required"></attr>
+ <attr name="dest" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ </tag>
+ <tag name="xdiff_string_diff_binary" type="function" returnType="mixed" version="">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ </tag>
+ <tag name="xdiff_string_diff" type="function" returnType="mixed" version="">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="context" type="int" status="optional"></attr>
+ <attr name="minimal" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="xdiff_string_merge3" type="function" returnType="string" version="">
+ <attr name="str1" type="string" status="required"></attr>
+ <attr name="str2" type="string" status="required"></attr>
+ <attr name="str3" type="string" status="required"></attr>
+ <attr name="&amp;error" type="string" status="optional"></attr>
+ </tag>
+ <tag name="xdiff_string_patch_binary" type="function" returnType="string" version="">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="patch" type="string" status="required"></attr>
+ </tag>
+ <tag name="xdiff_string_patch" type="function" returnType="string" version="">
+ <attr name="str" type="string" status="required"></attr>
+ <attr name="patch" type="string" status="required"></attr>
+ <attr name="flags" type="int" status="optional"></attr>
+ <attr name="&amp;error" type="string" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/xml.tag b/quanta/data/dtep/php/xml.tag
new file mode 100644
index 00000000..bb9143c8
--- /dev/null
+++ b/quanta/data/dtep/php/xml.tag
@@ -0,0 +1,95 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="utf8_decode" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="utf8_encode" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ </tag>
+ <tag name="xml_error_string" type="function" returnType="string" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="code" type="int" status="required"></attr>
+ </tag>
+ <tag name="xml_get_current_byte_index" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xml_get_current_column_number" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xml_get_current_line_number" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xml_get_error_code" type="function" returnType="int" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xml_parse_into_struct" type="function" returnType="int" version="PHP 3&gt;= 3.0.8, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="&amp;values" type="array" status="required"></attr>
+ <attr name="&amp;index" type="array" status="optional"></attr>
+ </tag>
+ <tag name="xml_parse" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="is_final" type="bool" status="optional"></attr>
+ </tag>
+ <tag name="xml_parser_create_ns" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="encoding" type="string" status="optional"></attr>
+ <attr name="separator" type="string" status="optional"></attr>
+ </tag>
+ <tag name="xml_parser_create" type="function" returnType="resource" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="xml_parser_free" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xml_parser_get_option" type="function" returnType="mixed" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ </tag>
+ <tag name="xml_parser_set_option" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="option" type="int" status="required"></attr>
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="xml_set_character_data_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_default_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_element_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="start_element_handler" type="callback" status="required"></attr>
+ <attr name="end_element_handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_end_namespace_decl_handler" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_external_entity_ref_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_notation_decl_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_object" type="function" returnType="void" version="PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="&amp;object" type="object" status="required"></attr>
+ </tag>
+ <tag name="xml_set_processing_instruction_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_start_namespace_decl_handler" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+ <tag name="xml_set_unparsed_entity_decl_handler" type="function" returnType="bool" version="PHP 3&gt;= 3.0.6, PHP 4 , PHP 5">
+ <attr name="parser" type="resource" status="required"></attr>
+ <attr name="handler" type="callback" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/xmlrpc.tag b/quanta/data/dtep/php/xmlrpc.tag
new file mode 100644
index 00000000..587d1388
--- /dev/null
+++ b/quanta/data/dtep/php/xmlrpc.tag
@@ -0,0 +1,57 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="xmlrpc_decode_request" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="xml" type="string" status="required"></attr>
+ <attr name="&amp;method" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="xmlrpc_decode" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="xml" type="string" status="required"></attr>
+ <attr name="encoding" type="string" status="optional"></attr>
+ </tag>
+ <tag name="xmlrpc_encode_request" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="method" type="string" status="required"></attr>
+ <attr name="params" type="mixed" status="required"></attr>
+ <attr name="output_options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="xmlrpc_encode" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_get_type" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="value" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_is_fault" type="function" returnType="bool" version="PHP 4 &gt;= 4.3.0, PHP 5">
+ <attr name="arg" type="array" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_parse_method_descriptions" type="function" returnType="array" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="xml" type="string" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_server_add_introspection_data" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="server" type="resource" status="required"></attr>
+ <attr name="desc" type="array" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_server_call_method" type="function" returnType="mixed" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="server" type="resource" status="required"></attr>
+ <attr name="xml" type="string" status="required"></attr>
+ <attr name="user_data" type="mixed" status="required"></attr>
+ <attr name="output_options" type="array" status="optional"></attr>
+ </tag>
+ <tag name="xmlrpc_server_create" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ </tag>
+ <tag name="xmlrpc_server_destroy" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="server" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_server_register_introspection_callback" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="server" type="resource" status="required"></attr>
+ <attr name="function" type="string" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_server_register_method" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="server" type="resource" status="required"></attr>
+ <attr name="method_name" type="string" status="required"></attr>
+ <attr name="function" type="string" status="required"></attr>
+ </tag>
+ <tag name="xmlrpc_set_type" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="&amp;value" type="string" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/xsl.tag b/quanta/data/dtep/php/xsl.tag
new file mode 100644
index 00000000..c13b4b3b
--- /dev/null
+++ b/quanta/data/dtep/php/xsl.tag
@@ -0,0 +1,33 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="xsl_xsltprocessor_get_parameter" type="function" returnType="string" version="">
+ <attr name="namespace" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="xsl_xsltprocessor_has_exslt_support" type="function" returnType="bool" version="">
+ </tag>
+ <tag name="xsl_xsltprocessor_import_stylesheet" type="function" returnType="bool" version="">
+ <attr name="index" type="object" status="required"></attr>
+ </tag>
+ <tag name="xsl_xsltprocessor_register_php_functions" type="function" returnType="void" version="">
+ </tag>
+ <tag name="xsl_xsltprocessor_remove_parameter" type="function" returnType="bool" version="">
+ <attr name="namespace" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="xsl_xsltprocessor_set_parameter" type="function" returnType="bool" version="">
+ <attr name="namespace" type="string" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="xsl_xsltprocessor_transform_to_doc" type="function" returnType="bool" version="">
+ <attr name="doc" type="object" status="required"></attr>
+ </tag>
+ <tag name="xsl_xsltprocessor_transform_to_uri" type="function" returnType="bool" version="">
+ <attr name="doc" type="object" status="required"></attr>
+ <attr name="uri" type="string" status="required"></attr>
+ </tag>
+ <tag name="xsl_xsltprocessor_transform_to_xml" type="function" returnType="bool" version="">
+ <attr name="doc" type="object" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/xslt.tag b/quanta/data/dtep/php/xslt.tag
new file mode 100644
index 00000000..15d90be5
--- /dev/null
+++ b/quanta/data/dtep/php/xslt.tag
@@ -0,0 +1,71 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="xslt_backend_info" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0">
+ </tag>
+ <tag name="xslt_backend_name" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0">
+ </tag>
+ <tag name="xslt_backend_version" type="function" returnType="string" version="PHP 4 &gt;= 4.3.0">
+ </tag>
+ <tag name="xslt_create" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.3">
+ </tag>
+ <tag name="xslt_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.3">
+ <attr name="xh" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xslt_error" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.3">
+ <attr name="xh" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xslt_free" type="function" returnType="void" version="PHP 4 &gt;= 4.0.3">
+ <attr name="xh" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xslt_getopt" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0">
+ <attr name="processor" type="resource" status="required"></attr>
+ </tag>
+ <tag name="xslt_process" type="function" returnType="mixed" version="PHP 4 &gt;= 4.0.3">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="xmlcontainer" type="string" status="required"></attr>
+ <attr name="xslcontainer" type="string" status="required"></attr>
+ <attr name="resultcontainer" type="string" status="optional"></attr>
+ <attr name="arguments" type="array" status="optional"></attr>
+ <attr name="parameters" type="array" status="optional"></attr>
+ </tag>
+ <tag name="xslt_set_base" type="function" returnType="void" version="PHP 4 &gt;= 4.0.5">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="uri" type="string" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_encoding" type="function" returnType="void" version="PHP 4 &gt;= 4.0.5">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="encoding" type="string" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_error_handler" type="function" returnType="void" version="PHP 4 &gt;= 4.0.4">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="handler" type="mixed" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_log" type="function" returnType="void" version="PHP 4 &gt;= 4.0.6">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="log" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="xslt_set_object" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0">
+ <attr name="processor" type="resource" status="required"></attr>
+ <attr name="&amp;obj" type="object" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_sax_handler" type="function" returnType="void" version="4.0.3 - 4.0.6 only">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="handlers" type="array" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_sax_handlers" type="function" returnType="void" version="PHP 4 &gt;= 4.0.6">
+ <attr name="processor" type="resource" status="required"></attr>
+ <attr name="handlers" type="array" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_scheme_handler" type="function" returnType="void" version="4.0.5 - 4.0.6 only">
+ <attr name="xh" type="resource" status="required"></attr>
+ <attr name="handlers" type="array" status="required"></attr>
+ </tag>
+ <tag name="xslt_set_scheme_handlers" type="function" returnType="void" version="PHP 4 &gt;= 4.0.6">
+ <attr name="processor" type="resource" status="required"></attr>
+ <attr name="handlers" type="array" status="required"></attr>
+ </tag>
+ <tag name="xslt_setopt" type="function" returnType="int" version="PHP 4 &gt;= 4.3.0">
+ <attr name="processor" type="resource" status="required"></attr>
+ <attr name="newmask" type="int" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/yaz.tag b/quanta/data/dtep/php/yaz.tag
new file mode 100644
index 00000000..5614688a
--- /dev/null
+++ b/quanta/data/dtep/php/yaz.tag
@@ -0,0 +1,98 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="yaz_addinfo" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_ccl_conf" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="config" type="array" status="required"></attr>
+ </tag>
+ <tag name="yaz_ccl_parse" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ <attr name="&amp;result" type="array" status="required"></attr>
+ </tag>
+ <tag name="yaz_close" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_connect" type="function" returnType="resource" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="zurl" type="string" status="required"></attr>
+ <attr name="options" type="mixed" status="optional"></attr>
+ </tag>
+ <tag name="yaz_database" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.6, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="databases" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_element" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="elementset" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_errno" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_error" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_es_result" type="function" returnType="array" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_get_option" type="function" returnType="string" version="PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_hits" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_itemorder" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="args" type="array" status="required"></attr>
+ </tag>
+ <tag name="yaz_present" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ </tag>
+ <tag name="yaz_range" type="function" returnType="bool" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="start" type="int" status="required"></attr>
+ <attr name="number" type="int" status="required"></attr>
+ </tag>
+ <tag name="yaz_record" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="pos" type="int" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_scan_result" type="function" returnType="array" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="&amp;result" type="array" status="optional"></attr>
+ </tag>
+ <tag name="yaz_scan" type="function" returnType="int" version="PHP 4 &gt;= 4.0.5, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ <attr name="startterm" type="string" status="required"></attr>
+ <attr name="flags" type="array" status="optional"></attr>
+ </tag>
+ <tag name="yaz_schema" type="function" returnType="int" version="PHP 4 &gt;= 4.2.0, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="schema" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_search" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="type" type="string" status="required"></attr>
+ <attr name="query" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_set_option" type="function" returnType="string" version="PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="name" type="string" status="required"></attr>
+ <attr name="value" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_sort" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="criteria" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_syntax" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="id" type="resource" status="required"></attr>
+ <attr name="syntax" type="string" status="required"></attr>
+ </tag>
+ <tag name="yaz_wait" type="function" returnType="int" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="&amp;options" type="array" status="optional"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/zip.tag b/quanta/data/dtep/php/zip.tag
new file mode 100644
index 00000000..0aca446c
--- /dev/null
+++ b/quanta/data/dtep/php/zip.tag
@@ -0,0 +1,36 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="zip_close" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip" type="resource" status="required"></attr>
+ </tag>
+ <tag name="zip_entry_close" type="function" returnType="void" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ </tag>
+ <tag name="zip_entry_compressedsize" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ </tag>
+ <tag name="zip_entry_compressionmethod" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ </tag>
+ <tag name="zip_entry_filesize" type="function" returnType="int" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ </tag>
+ <tag name="zip_entry_name" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ </tag>
+ <tag name="zip_entry_open" type="function" returnType="bool" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip" type="resource" status="required"></attr>
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ <attr name="mode" type="string" status="optional"></attr>
+ </tag>
+ <tag name="zip_entry_read" type="function" returnType="string" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip_entry" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="zip_open" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0">
+ <attr name="filename" type="string" status="required"></attr>
+ </tag>
+ <tag name="zip_read" type="function" returnType="resource" version="PHP 4 &gt;= 4.1.0">
+ <attr name="zip" type="resource" status="required"></attr>
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/php/zlib.tag b/quanta/data/dtep/php/zlib.tag
new file mode 100644
index 00000000..1f1c60cd
--- /dev/null
+++ b/quanta/data/dtep/php/zlib.tag
@@ -0,0 +1,79 @@
+<!DOCTYPE tags>
+<tags>
+ <tag name="gzclose" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gzcompress" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="level" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzdeflate" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="level" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzencode" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="level" type="int" status="optional"></attr>
+ <attr name="encoding_mode" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzeof" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gzfile" type="function" returnType="array" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="use_include_path" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzgetc" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gzgets" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ </tag>
+ <tag name="gzgetss" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ <attr name="allowable_tags" type="string" status="optional"></attr>
+ </tag>
+ <tag name="gzinflate" type="function" returnType="string" version="PHP 4 &gt;= 4.0.4, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzopen" type="function" returnType="resource" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="mode" type="string" status="required"></attr>
+ <attr name="use_include_path" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzpassthru" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gzread" type="function" returnType="string" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ <attr name="length" type="int" status="required"></attr>
+ </tag>
+ <tag name="gzrewind" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gzseek" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ <attr name="offset" type="int" status="required"></attr>
+ </tag>
+ <tag name="gztell" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ </tag>
+ <tag name="gzuncompress" type="function" returnType="string" version="PHP 4 &gt;= 4.0.1, PHP 5">
+ <attr name="data" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="gzwrite" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="zp" type="resource" status="required"></attr>
+ <attr name="string" type="string" status="required"></attr>
+ <attr name="length" type="int" status="optional"></attr>
+ </tag>
+ <tag name="readgzfile" type="function" returnType="int" version="PHP 3, PHP 4 , PHP 5">
+ <attr name="filename" type="string" status="required"></attr>
+ <attr name="use_include_path" type="int" status="optional"></attr>
+ </tag>
+ <tag name="zlib_get_coding_type" type="function" returnType="string" version="PHP 4 &gt;= 4.3.2, PHP 5">
+ </tag>
+</tags> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/Makefile.am b/quanta/data/dtep/relaxng/Makefile.am
new file mode 100644
index 00000000..607b8c14
--- /dev/null
+++ b/quanta/data/dtep/relaxng/Makefile.am
@@ -0,0 +1,4 @@
+
+METASOURCES = AUTO
+quanta_DATA = anyName.tag attribute.tag choice.tag data.tag define.tag description.rc div.tag element.tag empty.tag except.tag externalRef.tag grammar.tag group.tag include.tag interleave.tag list.tag mixed.tag name.tag notAllowed.tag nsName.tag oneOrMore.tag optional.tag param.tag parentRef.tag ref.tag start.tag text.tag value.tag zeroOrMore.tag
+quantadir = ${quanta_datadir}/dtep/relaxng
diff --git a/quanta/data/dtep/relaxng/anyName.tag b/quanta/data/dtep/relaxng/anyName.tag
new file mode 100644
index 00000000..fc6e4c31
--- /dev/null
+++ b/quanta/data/dtep/relaxng/anyName.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="anyName">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="except" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/attribute.tag b/quanta/data/dtep/relaxng/attribute.tag
new file mode 100644
index 00000000..da288603
--- /dev/null
+++ b/quanta/data/dtep/relaxng/attribute.tag
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="attribute">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="name" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="anyName" />
+ <child name="choice" />
+ <child name="name" />
+ <child name="nsName" />
+ <child name="element" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/choice.tag b/quanta/data/dtep/relaxng/choice.tag
new file mode 100644
index 00000000..a5b07483
--- /dev/null
+++ b/quanta/data/dtep/relaxng/choice.tag
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="choice">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="name" />
+ <child name="anyName" />
+ <child name="nsName" />
+ <child name="choice" />
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/data.tag b/quanta/data/dtep/relaxng/data.tag
new file mode 100644
index 00000000..d7c01c05
--- /dev/null
+++ b/quanta/data/dtep/relaxng/data.tag
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="data">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <attr name="type" type="input" />
+ <children>
+ <child name="except" />
+ <child name="param" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/define.tag b/quanta/data/dtep/relaxng/define.tag
new file mode 100644
index 00000000..3d43ef67
--- /dev/null
+++ b/quanta/data/dtep/relaxng/define.tag
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="define">
+ <attr name="combine" type="input" />
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="name" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/description.rc b/quanta/data/dtep/relaxng/description.rc
new file mode 100644
index 00000000..0c7f950b
--- /dev/null
+++ b/quanta/data/dtep/relaxng/description.rc
@@ -0,0 +1,12 @@
+[General]
+Name = Relax NG
+NickName = Relax NG 1.0
+DefaultExtension = rng
+NumOfPages = 0
+CaseSensitive = true
+Family = 1
+
+[Extra rules]
+Single Tag Style = XML
+
+[Parsing rules]
diff --git a/quanta/data/dtep/relaxng/div.tag b/quanta/data/dtep/relaxng/div.tag
new file mode 100644
index 00000000..1be93bb0
--- /dev/null
+++ b/quanta/data/dtep/relaxng/div.tag
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="div">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="div" />
+ <child name="include" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/element.tag b/quanta/data/dtep/relaxng/element.tag
new file mode 100644
index 00000000..7d508021
--- /dev/null
+++ b/quanta/data/dtep/relaxng/element.tag
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="element">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="name" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="anyName" />
+ <child name="choice" />
+ <child name="name" />
+ <child name="nsName" />
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/empty.tag b/quanta/data/dtep/relaxng/empty.tag
new file mode 100644
index 00000000..2693f198
--- /dev/null
+++ b/quanta/data/dtep/relaxng/empty.tag
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="empty">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/except.tag b/quanta/data/dtep/relaxng/except.tag
new file mode 100644
index 00000000..bd85cab5
--- /dev/null
+++ b/quanta/data/dtep/relaxng/except.tag
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="except">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="anyName" />
+ <child name="choice" />
+ <child name="name" />
+ <child name="nsName" />
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/externalRef.tag b/quanta/data/dtep/relaxng/externalRef.tag
new file mode 100644
index 00000000..43a7ac44
--- /dev/null
+++ b/quanta/data/dtep/relaxng/externalRef.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="externalRef">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="href" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/grammar.tag b/quanta/data/dtep/relaxng/grammar.tag
new file mode 100644
index 00000000..0f3f4a99
--- /dev/null
+++ b/quanta/data/dtep/relaxng/grammar.tag
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="grammar">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <attr name="xmlns" type="input" />
+ <children>
+ <child name="define" />
+ <child name="div" />
+ <child name="include" />
+ <child name="start" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/group.tag b/quanta/data/dtep/relaxng/group.tag
new file mode 100644
index 00000000..42f9858b
--- /dev/null
+++ b/quanta/data/dtep/relaxng/group.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="group">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/include.tag b/quanta/data/dtep/relaxng/include.tag
new file mode 100644
index 00000000..ff3310f9
--- /dev/null
+++ b/quanta/data/dtep/relaxng/include.tag
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="include">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="href" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="define" />
+ <child name="div" />
+ <child name="start" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/interleave.tag b/quanta/data/dtep/relaxng/interleave.tag
new file mode 100644
index 00000000..d30632ab
--- /dev/null
+++ b/quanta/data/dtep/relaxng/interleave.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="interleave">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/list.tag b/quanta/data/dtep/relaxng/list.tag
new file mode 100644
index 00000000..f5660fb8
--- /dev/null
+++ b/quanta/data/dtep/relaxng/list.tag
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="list">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="group" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="mixed" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/mixed.tag b/quanta/data/dtep/relaxng/mixed.tag
new file mode 100644
index 00000000..f14335cf
--- /dev/null
+++ b/quanta/data/dtep/relaxng/mixed.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="mixed">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/name.tag b/quanta/data/dtep/relaxng/name.tag
new file mode 100644
index 00000000..02dc6fa7
--- /dev/null
+++ b/quanta/data/dtep/relaxng/name.tag
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="name">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/notAllowed.tag b/quanta/data/dtep/relaxng/notAllowed.tag
new file mode 100644
index 00000000..be1abb66
--- /dev/null
+++ b/quanta/data/dtep/relaxng/notAllowed.tag
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="notAllowed">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/nsName.tag b/quanta/data/dtep/relaxng/nsName.tag
new file mode 100644
index 00000000..39a73cd9
--- /dev/null
+++ b/quanta/data/dtep/relaxng/nsName.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="nsName">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="except" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/oneOrMore.tag b/quanta/data/dtep/relaxng/oneOrMore.tag
new file mode 100644
index 00000000..4658479f
--- /dev/null
+++ b/quanta/data/dtep/relaxng/oneOrMore.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="oneOrMore">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/optional.tag b/quanta/data/dtep/relaxng/optional.tag
new file mode 100644
index 00000000..5d56d5f9
--- /dev/null
+++ b/quanta/data/dtep/relaxng/optional.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="optional">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/param.tag b/quanta/data/dtep/relaxng/param.tag
new file mode 100644
index 00000000..50964f33
--- /dev/null
+++ b/quanta/data/dtep/relaxng/param.tag
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="param" single="1">
+ <attr name="name" type="input" />
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/relaxng/parentRef.tag b/quanta/data/dtep/relaxng/parentRef.tag
new file mode 100644
index 00000000..39ace697
--- /dev/null
+++ b/quanta/data/dtep/relaxng/parentRef.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="parentRef" single="1">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="name" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/ref.tag b/quanta/data/dtep/relaxng/ref.tag
new file mode 100644
index 00000000..2cd02abc
--- /dev/null
+++ b/quanta/data/dtep/relaxng/ref.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="ref" single="1">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="name" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/start.tag b/quanta/data/dtep/relaxng/start.tag
new file mode 100644
index 00000000..2e1a4429
--- /dev/null
+++ b/quanta/data/dtep/relaxng/start.tag
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="start">
+ <attr name="combine" type="input" />
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/text.tag b/quanta/data/dtep/relaxng/text.tag
new file mode 100644
index 00000000..6a0d8b08
--- /dev/null
+++ b/quanta/data/dtep/relaxng/text.tag
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="text">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/value.tag b/quanta/data/dtep/relaxng/value.tag
new file mode 100644
index 00000000..30737c12
--- /dev/null
+++ b/quanta/data/dtep/relaxng/value.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="value" single="1">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <attr name="type" type="input" />
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/relaxng/zeroOrMore.tag b/quanta/data/dtep/relaxng/zeroOrMore.tag
new file mode 100644
index 00000000..7b8bea98
--- /dev/null
+++ b/quanta/data/dtep/relaxng/zeroOrMore.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="zeroOrMore">
+ <attr name="datatypeLibrary" type="input" />
+ <attr name="ns" type="input" />
+ <children>
+ <child name="element" />
+ <child name="attribute" />
+ <child name="group" />
+ <child name="interleave" />
+ <child name="choice" />
+ <child name="optional" />
+ <child name="zeroOrMore" />
+ <child name="oneOrMore" />
+ <child name="list" />
+ <child name="mixed" />
+ <child name="ref" />
+ <child name="parentRef" />
+ <child name="empty" />
+ <child name="text" />
+ <child name="value" />
+ <child name="data" />
+ <child name="notAllowed" />
+ <child name="externalRef" />
+ <child name="grammar" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/schema/Makefile.am b/quanta/data/dtep/schema/Makefile.am
new file mode 100644
index 00000000..73c0f238
--- /dev/null
+++ b/quanta/data/dtep/schema/Makefile.am
@@ -0,0 +1,7 @@
+quanta_DATA = all.tag annotation.tag any.tag anyAttribute.tag appInfo.tag attribute.tag attributeGroup.tag choice.tag complexContent.tag complexType.tag description.rc \
+ documentation.tag element.tag enumeration.tag extension.tag field.tag fractionDigits.tag group.tag import.tag include.tag key.tag keyref.tag \
+ length.tag list.tag maxInclusive.tag maxLength.tag minInclusive.tag minLength.tag notation.tag pattern.tag redefine.tag restriction.tag schema.tag \
+ selector.tag sequence.tag simpleContent.tag simpleType.tag totalDigits.tag union.tag unique.tag whiteSpace.tag minExclusive.tag maxExclusive.tag
+
+quantadir = ${quanta_datadir}/dtep/xml-schema
+
diff --git a/quanta/data/dtep/schema/all.tag b/quanta/data/dtep/schema/all.tag
new file mode 100644
index 00000000..62e9bb6a
--- /dev/null
+++ b/quanta/data/dtep/schema/all.tag
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="all">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>minOccurs</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="minOccurs" type="list">
+ <items>
+ <item>0</item>
+ <item>1</item>
+ </items>
+ <tooltip>Minimum number of times the element can occur. Value can be 0 or 1. Default is 1.</tooltip>
+ <whatsthis>Minimum number of times the element can occur. Value can be 0 or 1. Default is 1.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>maxOccurs</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="maxOccurs" type="list">
+ <items>
+ <item>1</item>
+ </items>
+ <tooltip>Maximum number of times the element can occur. The value must be 1.</tooltip>
+ <whatsthis>Maximum number of times the element can occur. The value must be 1.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="element" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/annotation.tag b/quanta/data/dtep/schema/annotation.tag
new file mode 100644
index 00000000..1846c969
--- /dev/null
+++ b/quanta/data/dtep/schema/annotation.tag
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="annotation">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="appinfo" />
+ <child name="documentation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/any.tag b/quanta/data/dtep/schema/any.tag
new file mode 100644
index 00000000..182ebdf7
--- /dev/null
+++ b/quanta/data/dtep/schema/any.tag
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="any">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>minOccurs</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="minOccurs" type="input">
+ <tooltip>Minimum number of times the element can occur. Value can be >=0. Default is 1.</tooltip>
+ <whatsthis>Minimum number of times the element can occur. Value can be >=0. Default is 1.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>maxOccurs</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="maxOccurs" type="input">
+ <tooltip>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1.</tooltip>
+ <whatsthis>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>namespace</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="namespace" type="input">
+ <tooltip>Namespaces containing the elements that can be used.</tooltip>
+ <whatsthis>Namespaces containing the elements that can be used.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <label>
+ <text>processContents</text>
+ <location col="0" row="4"/>
+ </label>
+ <attr name="processContents" type="list">
+ <items>
+ <item>lax</item>
+ <item>skip</item>
+ <item>strict</item>
+ </items>
+ <tooltip>How should the XML processor handle validation, in regard to elements specified by this element?</tooltip>
+ <whatsthis>How should the XML processor handle validation, in regard to elements specified by this element?</whatsthis>
+ <location col="1" row="4"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/anyAttribute.tag b/quanta/data/dtep/schema/anyAttribute.tag
new file mode 100644
index 00000000..62e43733
--- /dev/null
+++ b/quanta/data/dtep/schema/anyAttribute.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="anyAttribute">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>namespace</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="namespace" type="input">
+ <tooltip>Namespaces containing the attributes that can be used.</tooltip>
+ <whatsthis>Namespaces containing the attributes that can be used.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>processContents</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="processContents" type="list">
+ <items>
+ <item>lax</item>
+ <item>skip</item>
+ <item>strict</item>
+ </items>
+ <tooltip>How should the XML processor handle validation, in regard to attributes specified by this element?</tooltip>
+ <whatsthis>How should the XML processor handle validation, in regard to attributes specified by this element?</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/appInfo.tag b/quanta/data/dtep/schema/appInfo.tag
new file mode 100644
index 00000000..440581aa
--- /dev/null
+++ b/quanta/data/dtep/schema/appInfo.tag
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="appInfo">
+ <label>
+ <text>source</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="source" type="input">
+ <tooltip>URI reference which specifies the source of the application information.</tooltip>
+ <whatsthis>URI reference which specifies the source of the application information.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/attribute.tag b/quanta/data/dtep/schema/attribute.tag
new file mode 100644
index 00000000..b4e5c1bc
--- /dev/null
+++ b/quanta/data/dtep/schema/attribute.tag
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="attribute">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name of the attribute. Cannot be present if ref is used.</tooltip>
+ <whatsthis>Name of the attribute. Cannot be present if ref is used.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>ref</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="ref" type="input">
+ <tooltip>Reference to a named attribute. Cannot be present if name is used.</tooltip>
+ <whatsthis>Reference to a named attribute. Cannot be present if name is used.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>type</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="type" type="input">
+ <tooltip>Built-in data type or a simple type. If a simpleType element is present, then type cannot be used.</tooltip>
+ <whatsthis>Built-in data type or a simple type. If a simpleType element is present, then type cannot be used.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <label>
+ <text>default</text>
+ <location col="0" row="4"/>
+ </label>
+ <attr name="default" type="input">
+ <tooltip>Default value for the attribute. Cannot be present if fixed is used.</tooltip>
+ <whatsthis>Default value for the attribute. Cannot be present if fixed is used.</whatsthis>
+ <location col="1" row="4"/>
+ </attr>
+
+ <label>
+ <text>fixed</text>
+ <location col="0" row="5"/>
+ </label>
+ <attr name="fixed" type="input">
+ <tooltip>Fixed value for the attribute. Cannot be present if default is used.</tooltip>
+ <whatsthis>Fixed value for the attribute. Cannot be present if default is used.</whatsthis>
+ <location col="1" row="5"/>
+ </attr>
+
+ <label>
+ <text>form</text>
+ <location col="0" row="6"/>
+ </label>
+ <attr name="form" type="list">
+ <items>
+ <item>qualified</item>
+ <item>unqualified</item>
+ </items>
+ <tooltip>Form for the attribute. Default value is specified by the attributeFormDefault attribute in the schema element.</tooltip>
+ <whatsthis>Form for the attribute. Default value is specified by the attributeFormDefault attribute in the schema element.</whatsthis>
+ <location col="1" row="6"/>
+ </attr>
+
+ <label>
+ <text>use</text>
+ <location col="0" row="7"/>
+ </label>
+ <attr name="use" type="list">
+ <items>
+ <item>optional</item>
+ <item>required</item>
+ <item>prohibited</item>
+ </items>
+ <tooltip>Specifies usage of the attribute.</tooltip>
+ <whatsthis>Specifies usage of the attribute.</whatsthis>
+ <location col="1" row="7"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ <child name="simpleType" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/attributeGroup.tag b/quanta/data/dtep/schema/attributeGroup.tag
new file mode 100644
index 00000000..5e07e926
--- /dev/null
+++ b/quanta/data/dtep/schema/attributeGroup.tag
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="attributeGroup">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name of the attribute group. Cannot be present if ref is used.</tooltip>
+ <whatsthis>Name of the attribute group. Cannot be present if ref is used.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>ref</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="ref" type="input">
+ <tooltip>Reference to a named attribute group. Cannot be present if name is used.</tooltip>
+ <whatsthis>Reference to a named attribute group. Cannot be present if name is used.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="element" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ <child name="attribute" />
+ <child name="attributeGroup" />
+ <child name="anyAttribute" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/choice.tag b/quanta/data/dtep/schema/choice.tag
new file mode 100644
index 00000000..d45f2356
--- /dev/null
+++ b/quanta/data/dtep/schema/choice.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="choice">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>minOccurs</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="minOccurs" type="input">
+ <tooltip>Minimum number of times the element can occur. Value can be >=0. Default is 1.</tooltip>
+ <whatsthis>Minimum number of times the element can occur. Value can be >=0. Default is 1.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>maxOccurs</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="maxOccurs" type="input">
+ <tooltip>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1.</tooltip>
+ <whatsthis>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="element" />
+ <child name="group" />
+ <child name="choice" />
+ <child name="sequence" />
+ <child name="any" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/complexContent.tag b/quanta/data/dtep/schema/complexContent.tag
new file mode 100644
index 00000000..4096b604
--- /dev/null
+++ b/quanta/data/dtep/schema/complexContent.tag
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="complexContent">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>mixed</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="mixed" type="list">
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ <tooltip>true, if character data is allowed to appear between the child elements. Default is false.</tooltip>
+ <whatsthis>true, if character data is allowed to appear between the child elements. Default is false.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="restriction" />
+ <child name="extension" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/complexType.tag b/quanta/data/dtep/schema/complexType.tag
new file mode 100644
index 00000000..4ea80bfa
--- /dev/null
+++ b/quanta/data/dtep/schema/complexType.tag
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="complexType">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name for the element.</tooltip>
+ <whatsthis>Name for the element.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>mixed</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="mixed" type="list">
+ <items>
+ <item>false</item>
+ <item>true</item>
+ </items>
+ <tooltip>true, if character data is allowed to appear between the child elements. Default is false. If simpleContent is used within this type, then mixed is not allowed.</tooltip>
+ <whatsthis>true, if character data is allowed to appear between the child elements. Default is false. If simpleContent is used within this type, then mixed is not allowed.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>abstract</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="abstract" type="list">
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ <tooltip>true, if an element must use a complex type derived from this complex type. Default is false.</tooltip>
+ <whatsthis>true, if an element must use a complex type derived from this complex type. Default is false.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <label>
+ <text>block</text>
+ <location col="0" row="4"/>
+ </label>
+ <attr name="block" type="input">
+ <location col="1" row="4"/>
+ </attr>
+
+ <label>
+ <text>final</text>
+ <location col="0" row="5"/>
+ </label>
+ <attr name="final" type="input">
+ <location col="1" row="5"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="element" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="all" />
+ <child name="annotation" />
+ <child name="anyAttribute" />
+ <child name="attribute" />
+ <child name="attributeGroup" />
+ <child name="choice" />
+ <child name="complexContent" />
+ <child name="group" />
+ <child name="sequence" />
+ <child name="simpleContent" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/description.rc b/quanta/data/dtep/schema/description.rc
new file mode 100644
index 00000000..9c4bb2e0
--- /dev/null
+++ b/quanta/data/dtep/schema/description.rc
@@ -0,0 +1,17 @@
+[General]
+Name = XML Schema
+NickName = XML Schema 1.0
+MimeTypes = application/xsd
+DefaultExtension = xsd
+NumOfPages = 0
+CaseSensitive = true
+Family = 1
+
+[Toolbars]
+Location = schema
+Names = main,complex,simple,attributes,facets,documentation,misc
+
+[Extra rules]
+Single Tag Style = XML
+
+[Parsing rules]
diff --git a/quanta/data/dtep/schema/documentation.tag b/quanta/data/dtep/schema/documentation.tag
new file mode 100644
index 00000000..066ff146
--- /dev/null
+++ b/quanta/data/dtep/schema/documentation.tag
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="documentation">
+ <label>
+ <text>source</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="source" type="string">
+ <tooltip>Source of the application information.</tooltip>
+ <whatsthis>Source of the application information.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>xml:lang</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="xml:lang" type="input">
+ <tooltip>Language used.</tooltip>
+ <whatsthis>Language used.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/element.tag b/quanta/data/dtep/schema/element.tag
new file mode 100644
index 00000000..24adffa3
--- /dev/null
+++ b/quanta/data/dtep/schema/element.tag
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="element">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name for the element. Cannot be used if ref is present.</tooltip>
+ <whatsthis>Name for the element. Cannot be used if ref is present.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>ref</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="ref" type="input">
+ <tooltip>Reference to a named element. Cannot be used if name is present.</tooltip>
+ <whatsthis>Reference to a named element. Cannot be used if name is present.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>type</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="type" type="input">
+ <tooltip>Name of a built-in data type, simpleType, or complexType.</tooltip>
+ <whatsthis>Name of a built-in data type, simpleType, or complexType.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <label>
+ <text>minOccurs</text>
+ <location col="0" row="4"/>
+ </label>
+ <attr name="minOccurs" type="input">
+ <tooltip>Minimum number of times the element can occur. Value can be >=0. Default is 1. Only usable with ref.</tooltip>
+ <whatsthis>Minimum number of times the element can occur. Value can be >=0. Default is 1. Only usable with ref.</whatsthis>
+ <location col="1" row="4"/>
+ </attr>
+
+ <label>
+ <text>maxOccurs</text>
+ <location col="0" row="5"/>
+ </label>
+ <attr name="maxOccurs" type="input">
+ <tooltip>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1. Only usable with ref.</tooltip>
+ <whatsthis>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1. Only usable with ref.</whatsthis>
+ <location col="1" row="5"/>
+ </attr>
+
+ <label>
+ <text>nullable</text>
+ <location col="0" row="6"/>
+ </label>
+ <attr name="nullable" type="list">
+ <items>
+ <item>false</item>
+ <item>true</item>
+ </items>
+ <tooltip>Whether an explicit null value can be assigned to the element. Default is false.</tooltip>
+ <whatsthis>Whether an explicit null value can be assigned to the element. Default is false.</whatsthis>
+ <location col="1" row="6"/>
+ </attr>
+
+ <label>
+ <text>abstract</text>
+ <location col="0" row="7"/>
+ </label>
+ <attr name="abstract" type="list">
+ <items>
+ <item>false</item>
+ <item>true</item>
+ </items>
+ <location col="1" row="7"/>
+ </attr>
+
+ <label>
+ <text>block</text>
+ <location col="0" row="8"/>
+ </label>
+ <attr name="block" type="input">
+ <location col="1" row="8"/>
+ </attr>
+
+ <label>
+ <text>final</text>
+ <location col="0" row="9"/>
+ </label>
+ <attr name="final" type="input">
+ <location col="1" row="9"/>
+ </attr>
+
+ <label>
+ <text>default</text>
+ <location col="0" row="10"/>
+ </label>
+ <attr name="default" type="input">
+ <tooltip>Default value for the element. Only usable if the element's content is a simple type or text-only.</tooltip>
+ <whatsthis>Default value for the element. Only usable if the element's content is a simple type or text-only.</whatsthis>
+ <location col="1" row="10"/>
+ </attr>
+
+ <label>
+ <text>fixed</text>
+ <location col="0" row="11"/>
+ </label>
+ <attr name="fixed" type="input">
+ <tooltip>Fixed value for the element. Only usable if the element's content is a simple type or text-only.</tooltip>
+ <whatsthis>Fixed value for the element. Only usable if the element's content is a simple type or text-only.</whatsthis>
+ <location col="1" row="11"/>
+ </attr>
+
+ <label>
+ <text>form</text>
+ <location col="0" row="12"/>
+ </label>
+ <attr name="form" type="list">
+ <items>
+ <item>qualified</item>
+ <item>unqualified</item>
+ </items>
+ <location col="1" row="12"/>
+ </attr>
+
+ <label>
+ <text>substitutionGroup</text>
+ <location col="0" row="13"/>
+ </label>
+ <attr name="substitutionGroup" type="input">
+ <tooltip>Name of an element that can be substituted with this one. Only usable if the parent element is schema.</tooltip>
+ <whatsthis>Name of an element that can be substituted with this one. Only usable if the parent element is schema.</whatsthis>
+ <location col="1" row="13"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ <child name="simpleType" />
+ <child name="complexType" />
+ <child name="unique" />
+ <child name="key" />
+ <child name="keyref" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/enumeration.tag b/quanta/data/dtep/schema/enumeration.tag
new file mode 100644
index 00000000..3995f0ea
--- /dev/null
+++ b/quanta/data/dtep/schema/enumeration.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="enumeration">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Acceptable value.</tooltip>
+ <whatsthis>Acceptable value.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/extension.tag b/quanta/data/dtep/schema/extension.tag
new file mode 100644
index 00000000..12f5689f
--- /dev/null
+++ b/quanta/data/dtep/schema/extension.tag
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="extension">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>base</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="base" type="input">
+ <tooltip>Name of a built-in data type, simpleType, or complexType.</tooltip>
+ <whatsthis>Name of a built-in data type, simpleType, or complexType.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="group" />
+ <child name="all" />
+ <child name="choice" />
+ <child name="sequence" />
+ <child name="attribute" />
+ <child name="attributeGroup" />
+ <child name="anyAttribute" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/field.tag b/quanta/data/dtep/schema/field.tag
new file mode 100644
index 00000000..c5c1fa08
--- /dev/null
+++ b/quanta/data/dtep/schema/field.tag
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="field">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>xpath</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="xpath" type="input">
+ <tooltip>Single element or attribute whose content or value is used for the constraint.</tooltip>
+ <whatsthis>Single element or attribute whose content or value is used for the constraint.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/fractionDigits.tag b/quanta/data/dtep/schema/fractionDigits.tag
new file mode 100644
index 00000000..360679d1
--- /dev/null
+++ b/quanta/data/dtep/schema/fractionDigits.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="fractionDigits">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Maximum number of decimal places allowed, which must be >=0.</tooltip>
+ <whatsthis>Maximum number of decimal places allowed, which must be >=0.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/schema/group.tag b/quanta/data/dtep/schema/group.tag
new file mode 100644
index 00000000..8a945c0a
--- /dev/null
+++ b/quanta/data/dtep/schema/group.tag
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="group">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name for the group. Only usable when used as a child element to schema and ref is not used.</tooltip>
+ <whatsthis>Name for the group. Only usable when used as a child element to schema and ref is not used.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>ref</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="ref" type="input">
+ <tooltip>Reference to a named group. Cannot be present when name is.</tooltip>
+ <whatsthis></whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>minOccurs</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="minOccurs" type="input">
+ <tooltip>Minimum number of times the element can occur. Value can be >=0. Default is 1. Only usable with ref.</tooltip>
+ <whatsthis>Minimum number of times the element can occur. Value can be >=0. Default is 1. Only usable with ref.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <label>
+ <text>maxOccurs</text>
+ <location col="0" row="4"/>
+ </label>
+ <attr name="maxOccurs" type="input">
+ <tooltip>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1. Only usable with ref.</tooltip>
+ <whatsthis>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1. Only usable with ref.</whatsthis>
+ <location col="1" row="4"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ <child name="all" />
+ <child name="choice" />
+ <child name="sequence" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/import.tag b/quanta/data/dtep/schema/import.tag
new file mode 100644
index 00000000..a7a7015e
--- /dev/null
+++ b/quanta/data/dtep/schema/import.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="import">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>namespace</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="namespace" type="input">
+ <tooltip>URI of the namespace to import.</tooltip>
+ <whatsthis>URI of the namespace to import.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>schemaLocation</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="schemaLocation" type="input">
+ <tooltip>URI to the schema for the imported namespace.</tooltip>
+ <whatsthis>URI to the schema for the imported namespace.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/include.tag b/quanta/data/dtep/schema/include.tag
new file mode 100644
index 00000000..0a19816d
--- /dev/null
+++ b/quanta/data/dtep/schema/include.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="include">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>schemaLocation</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="schemaLocation" type="input">
+ <tooltip>URI to the schema to include in the target namespace of the containing schema.</tooltip>
+ <whatsthis>URI to the schema to include in the target namespace of the containing schema.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/key.tag b/quanta/data/dtep/schema/key.tag
new file mode 100644
index 00000000..9798beb5
--- /dev/null
+++ b/quanta/data/dtep/schema/key.tag
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="key">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name of the key element.</tooltip>
+ <whatsthis>Name of the key element.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="selector" />
+ <child name="field" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/keyref.tag b/quanta/data/dtep/schema/keyref.tag
new file mode 100644
index 00000000..87d2dcb5
--- /dev/null
+++ b/quanta/data/dtep/schema/keyref.tag
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="keyref">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name of the keyref element.</tooltip>
+ <whatsthis>Name of the keyref element.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>refer</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="refer" type="input">
+ <tooltip>Name of a key or unique element defined in this or another schema.</tooltip>
+ <whatsthis>Name of a key or unique element defined in this or another schema.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="selector" />
+ <child name="field" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/length.tag b/quanta/data/dtep/schema/length.tag
new file mode 100644
index 00000000..5153975c
--- /dev/null
+++ b/quanta/data/dtep/schema/length.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="length">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Exact number of characters or list items allowed, which must be >=0.</tooltip>
+ <whatsthis>Exact number of characters or list items allowed, which must be >=0.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/list.tag b/quanta/data/dtep/schema/list.tag
new file mode 100644
index 00000000..454c3225
--- /dev/null
+++ b/quanta/data/dtep/schema/list.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="list">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>itemType</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="itemType" type="input">
+ <tooltip>Name of a built-in data type or simpleType. If the content contains a simpleType element, then itemType is not allowed, else itemType is required.</tooltip>
+ <whatsthis>Name of a built-in data type or simpleType. If the content contains a simpleType element, then itemType is not allowed, else itemType is required.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="simpleType" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/maxExclusive.tag b/quanta/data/dtep/schema/maxExclusive.tag
new file mode 100644
index 00000000..b30d15bf
--- /dev/null
+++ b/quanta/data/dtep/schema/maxExclusive.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="maxInclusive">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Upper bounds for numeric values. data less than value.</tooltip>
+ <whatsthis>Upper bounds for numeric values. data less than value.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/maxInclusive.tag b/quanta/data/dtep/schema/maxInclusive.tag
new file mode 100644
index 00000000..85e2a28c
--- /dev/null
+++ b/quanta/data/dtep/schema/maxInclusive.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="maxInclusive">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Upper bounds for numeric values. Data less than or equal to value.</tooltip>
+ <whatsthis>Upper bounds for numeric values. Data less than or equal to value.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/maxLength.tag b/quanta/data/dtep/schema/maxLength.tag
new file mode 100644
index 00000000..f0f285fa
--- /dev/null
+++ b/quanta/data/dtep/schema/maxLength.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="maxLength">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Maximum number of characters or list items allowed, which must be >=0.</tooltip>
+ <whatsthis>Maximum number of characters or list items allowed, which must be >=0.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/minExclusive.tag b/quanta/data/dtep/schema/minExclusive.tag
new file mode 100644
index 00000000..0cba57e1
--- /dev/null
+++ b/quanta/data/dtep/schema/minExclusive.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="minInclusive">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Lower bounds for numeric values. Data > value.</tooltip>
+ <whatsthis>Lower bounds for numeric values. Data > value.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/minInclusive.tag b/quanta/data/dtep/schema/minInclusive.tag
new file mode 100644
index 00000000..b3eb6dd5
--- /dev/null
+++ b/quanta/data/dtep/schema/minInclusive.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="minInclusive">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Lower bounds for numeric values. Data >= value.</tooltip>
+ <whatsthis>Lower bounds for numeric values. Data >= value.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/minLength.tag b/quanta/data/dtep/schema/minLength.tag
new file mode 100644
index 00000000..761f4302
--- /dev/null
+++ b/quanta/data/dtep/schema/minLength.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="minLength">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Minimum number of characters or list items allowed, which must be >=0.</tooltip>
+ <whatsthis>Minimum number of characters or list items allowed, which must be >=0.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/notation.tag b/quanta/data/dtep/schema/notation.tag
new file mode 100644
index 00000000..016c30d0
--- /dev/null
+++ b/quanta/data/dtep/schema/notation.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="notation">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name for the element.</tooltip>
+ <whatsthis>Name for the element.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>public</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="public" type="input">
+ <tooltip>URI corresponding to the public identifier.</tooltip>
+ <whatsthis>URI corresponding to the public identifier.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>system</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="system" type="input">
+ <tooltip>URI corresponding to the system identifier.</tooltip>
+ <whatsthis>URI corresponding to the system identifier.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/pattern.tag b/quanta/data/dtep/schema/pattern.tag
new file mode 100644
index 00000000..4a81f785
--- /dev/null
+++ b/quanta/data/dtep/schema/pattern.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="pattern">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Exact sequence of characters that are acceptable.</tooltip>
+ <whatsthis>Exact sequence of characters that are acceptable.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/redefine.tag b/quanta/data/dtep/schema/redefine.tag
new file mode 100644
index 00000000..8dcb0456
--- /dev/null
+++ b/quanta/data/dtep/schema/redefine.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="redefine">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>schemaLocation</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="schemaLocation" type="input">
+ <tooltip>URI to the location of a schema document.</tooltip>
+ <whatsthis>URI to the location of a schema document.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ <child name="simpleType" />
+ <child name="complexType" />
+ <child name="group" />
+ <child name="attributeGroup" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/restriction.tag b/quanta/data/dtep/schema/restriction.tag
new file mode 100644
index 00000000..c4562b34
--- /dev/null
+++ b/quanta/data/dtep/schema/restriction.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="restriction">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>base</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="base" type="input">
+ <tooltip>Name of a built-in data type, simpleType, or complexType.</tooltip>
+ <whatsthis>Name of a built-in data type, simpleType, or complexType.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="simpleType" />
+ <child name="attribute" />
+ <child name="attributeGroup" />
+ <child name="anyAttribute" />
+ <child name="group" />
+ <child name="all" />
+ <child name="choice" />
+ <child name="sequence" />
+ <child name="minExclusive" />
+ <child name="minInclusive" />
+ <child name="maxExclusive" />
+ <child name="maxInclusive" />
+ <child name="totalDigits" />
+ <child name="fractionDigits" />
+ <child name="length" />
+ <child name="minLength" />
+ <child name="maxLength" />
+ <child name="enumeration" />
+ <child name="whiteSpace" />
+ <child name="pattern" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/schema.tag b/quanta/data/dtep/schema/schema.tag
new file mode 100644
index 00000000..28d38b3b
--- /dev/null
+++ b/quanta/data/dtep/schema/schema.tag
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="schema">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>version</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="version" type="input">
+ <tooltip>Version of the schema.</tooltip>
+ <whatsthis>Version of the schema.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>targetNamespace</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="targetNamespace" type="input">
+ <tooltip>URI reference of the namespace of this schema.</tooltip>
+ <whatsthis>URI reference of the namespace of this schema.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+
+ <label>
+ <text>xmlns</text>
+ <location col="0" row="3"/>
+ </label>
+ <attr name="xmlns" type="input">
+ <tooltip>URI reference for one or more namespaces for use in this schema. If no prefix is used, then components of that namespace may be used unqualified.</tooltip>
+ <whatsthis>URI reference for one or more namespaces for use in this schema. If no prefix is used, then components of that namespace may be used unqualified.</whatsthis>
+ <location col="1" row="3"/>
+ </attr>
+
+ <label>
+ <text>attributeFormDefault</text>
+ <location col="0" row="4"/>
+ </label>
+ <attr name="attributeFormDefault" type="list">
+ <items>
+ <item>qualified</item>
+ <item>unqualified</item>
+ </items>
+ <tooltip>Default form for all attributes within this schema.</tooltip>
+ <whatsthis>Default form for all attributes within this schema.</whatsthis>
+ <location col="1" row="4"/>
+ </attr>
+
+ <label>
+ <text>elementFormDefault</text>
+ <location col="0" row="5"/>
+ </label>
+ <attr name="elementFormDefault" type="list">
+ <items>
+ <item>qualified</item>
+ <item>unqualified</item>
+ </items>
+ <tooltip>Default form for all elements within this schema.</tooltip>
+ <whatsthis>Default form for all elements within this schema.</whatsthis>
+ <location col="1" row="5"/>
+ </attr>
+
+ <label>
+ <text>blockDefault</text>
+ <location col="0" row="6"/>
+ </label>
+ <attr name="blockDefault" type="input">
+ <location col="1" row="6"/>
+ </attr>
+
+ <label>
+ <text>finalDefault</text>
+ <location col="0" row="7"/>
+ </label>
+ <attr name="finalDefault" type="input">
+ <location col="1" row="7"/>
+ </attr>
+ <children>
+ <child name="include" />
+ <child name="import" />
+ <child name="redefine" />
+ <child name="annotation" />
+ <child name="simpleType" />
+ <child name="complexType" />
+ <child name="group" />
+ <child name="attributeGroup" />
+ <child name="element" />
+ <child name="attribute" />
+ <child name="notation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/selector.tag b/quanta/data/dtep/schema/selector.tag
new file mode 100644
index 00000000..33ab2ad3
--- /dev/null
+++ b/quanta/data/dtep/schema/selector.tag
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="selector">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>xpath</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="xpath" type="input">
+ <tooltip>An XPath expression, relative to the element being declared, that identifies the child elements to which the identity constraint applies.</tooltip>
+ <whatsthis>An XPath expression, relative to the element being declared, that identifies the child elements to which the identity constraint applies.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/sequence.tag b/quanta/data/dtep/schema/sequence.tag
new file mode 100644
index 00000000..08aa3e04
--- /dev/null
+++ b/quanta/data/dtep/schema/sequence.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="sequence">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>minOccurs</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="minOccurs" type="input">
+ <tooltip>Minimum number of times the element can occur. Value can be >=0. Default is 1.</tooltip>
+ <whatsthis>Minimum number of times the element can occur. Value can be >=0. Default is 1.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <label>
+ <text>maxOccurs</text>
+ <location col="0" row="2"/>
+ </label>
+ <attr name="maxOccurs" type="input">
+ <tooltip>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1.</tooltip>
+ <whatsthis>Maximum number of times the element can occur. Value can be >=0 or unbounded. Default is 1.</whatsthis>
+ <location col="1" row="2"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="element" />
+ <child name="group" />
+ <child name="choice" />
+ <child name="sequence" />
+ <child name="any" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/simpleContent.tag b/quanta/data/dtep/schema/simpleContent.tag
new file mode 100644
index 00000000..7c55c717
--- /dev/null
+++ b/quanta/data/dtep/schema/simpleContent.tag
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="simpleContent">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="restriction" />
+ <child name="extension" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/simpleType.tag b/quanta/data/dtep/schema/simpleType.tag
new file mode 100644
index 00000000..7b3f7534
--- /dev/null
+++ b/quanta/data/dtep/schema/simpleType.tag
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="simpleType">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name for the simpleType. Required, if the simpleType element is a child of the schema element; else it is prohibited.</tooltip>
+ <whatsthis>Name for the simpleType. Required, if the simpleType element is a child of the schema element; else it is prohibited.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="include" />
+ <stoppingtag name="import" />
+ <stoppingtag name="redefine" />
+ <stoppingtag name="simpleType" />
+ <stoppingtag name="complexType" />
+ <stoppingtag name="group" />
+ <stoppingtag name="attributeGroup" />
+ <stoppingtag name="element" />
+ <stoppingtag name="attribute" />
+ <stoppingtag name="notation" />
+ </stoppingtags>
+ <children>
+ <child name="annotation" />
+ <child name="restriction" />
+ <child name="list" />
+ <child name="union" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/totalDigits.tag b/quanta/data/dtep/schema/totalDigits.tag
new file mode 100644
index 00000000..73001d4e
--- /dev/null
+++ b/quanta/data/dtep/schema/totalDigits.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="totalDigits">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="input">
+ <tooltip>Exact number of digits allowed, which must be >=0.</tooltip>
+ <whatsthis>Exact number of digits allowed, which must be >=0.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/union.tag b/quanta/data/dtep/schema/union.tag
new file mode 100644
index 00000000..bb598cec
--- /dev/null
+++ b/quanta/data/dtep/schema/union.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="union">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>memberTypes</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="memberTypes" type="input">
+ <tooltip>List of built-in data types or simpleType elements defined in a schema.</tooltip>
+ <whatsthis>List of built-in data types or simpleType elements defined in a schema.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="simpleType" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/unique.tag b/quanta/data/dtep/schema/unique.tag
new file mode 100644
index 00000000..e8083013
--- /dev/null
+++ b/quanta/data/dtep/schema/unique.tag
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="unique">
+ <label>
+ <text>id</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="id" type="input">
+ <tooltip>A unique ID for the element.</tooltip>
+ <whatsthis>A unique ID for the element.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1"/>
+ </label>
+ <attr name="name" type="input">
+ <tooltip>Name for the element. Usage is required.</tooltip>
+ <whatsthis>Name for the element. Usage is required.</whatsthis>
+ <location col="1" row="1"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ <child name="selector" />
+ <child name="field" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/schema/whiteSpace.tag b/quanta/data/dtep/schema/whiteSpace.tag
new file mode 100644
index 00000000..4210eb25
--- /dev/null
+++ b/quanta/data/dtep/schema/whiteSpace.tag
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+ <tag name="whiteSpace">
+ <label>
+ <text>value</text>
+ <location col="0" row="0"/>
+ </label>
+ <attr name="value" type="list">
+ <items>
+ <item>preserve</item>
+ <item>replace</item>
+ <item>collapse</item>
+ </items>
+ <tooltip>How white space (line feeds, tabs, spaces, and carriage returns) is handled.</tooltip>
+ <whatsthis>How white space (line feeds, tabs, spaces, and carriage returns) is handled.</whatsthis>
+ <location col="1" row="0"/>
+ </attr>
+ <children>
+ <child name="annotation" />
+ </children>
+ </tag>
+</TAGS>
diff --git a/quanta/data/dtep/tagxml/Makefile.am b/quanta/data/dtep/tagxml/Makefile.am
new file mode 100644
index 00000000..788676a4
--- /dev/null
+++ b/quanta/data/dtep/tagxml/Makefile.am
@@ -0,0 +1,3 @@
+quanta_DATA = childstop.tag spacer.tag attr.tag location.tag tag.tag nonparams.tag vpl.tag description.rc
+quantadir = ${quanta_datadir}/dtep/tagxml
+
diff --git a/quanta/data/dtep/tagxml/attr.tag b/quanta/data/dtep/tagxml/attr.tag
new file mode 100644
index 00000000..1d56e92d
--- /dev/null
+++ b/quanta/data/dtep/tagxml/attr.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="attr">
+
+ <label>
+ <text>Name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <tooltip>attribute name </tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <label>
+ <text>Type</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="type" type="list">
+ <tooltip>attribute type </tooltip>
+ <items>
+ <item>input</item>
+ <item>check</item>
+ <item>color</item>
+ <item>url</item>
+ <item>list</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+<children>
+<child name="items" />
+<child name="tooltip" />
+<child name="location" />
+<child name="label" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/tagxml/childstop.tag b/quanta/data/dtep/tagxml/childstop.tag
new file mode 100644
index 00000000..64218734
--- /dev/null
+++ b/quanta/data/dtep/tagxml/childstop.tag
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="child" single="1">
+
+ <label>
+ <text>Name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <tooltip>Child's name</tooltip>
+ <location col="1" row="0" />
+ </attr>
+</tag>
+<tag name="stoppingtag" single="1">
+
+ <label>
+ <text>Name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <tooltip>Stopping tag's name</tooltip>
+ <location col="1" row="0" />
+ </attr>
+</tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/tagxml/description.rc b/quanta/data/dtep/tagxml/description.rc
new file mode 100644
index 00000000..f786c600
--- /dev/null
+++ b/quanta/data/dtep/tagxml/description.rc
@@ -0,0 +1,17 @@
+[General]
+Name = TAGS
+MimeTypes = text/xml
+DefaultExtension = tag
+NickName = Quanta Tag Files
+NumOfPages = 0
+CaseSensitive = true
+DoctypeString = TAGS
+
+[Toolbars]
+Location = tagxml
+Names = tagxml
+
+[Parsing rules]
+
+[Extra rules]
+Single Tag Style = XML
diff --git a/quanta/data/dtep/tagxml/location.tag b/quanta/data/dtep/tagxml/location.tag
new file mode 100644
index 00000000..8e18e36e
--- /dev/null
+++ b/quanta/data/dtep/tagxml/location.tag
@@ -0,0 +1,178 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="location" single="1">
+
+ <label>
+ <text>Row</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="row" type="list">
+ <tooltip>zero based row index </tooltip>
+ <items>
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="1" row="0" />
+ </attr>
+
+ <label>
+ <text>Column</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="col" type="list">
+ <tooltip>zero based column index - best limited to 3 </tooltip>
+ <items>
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+ <label>
+ <text>Row span</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="rowspan" type="list">
+ <tooltip>Optional - rows to span </tooltip>
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ <item>10</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <label>
+ <text>Col span</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="colspan" type="list">
+ <tooltip>Optional - cols to span </tooltip>
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ </items>
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+<tag name="textlocation" single="1">
+
+ <label>
+ <text>Row</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="row" type="list">
+ <tooltip>zero based row index </tooltip>
+ <items>
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ </items>
+ <location col="1" row="0" />
+ </attr>
+
+ <label>
+ <text>Column</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="col" type="list">
+ <tooltip>zero based column index - best limited to 3 </tooltip>
+ <items>
+ <item>0</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+ <label>
+ <text>Row span</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="rowspan" type="list">
+ <tooltip>Optional - rows to span </tooltip>
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ <item>9</item>
+ <item>10</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <label>
+ <text>Col span</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="colspan" type="list">
+ <tooltip>Optional - cols to span </tooltip>
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ <item>8</item>
+ </items>
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/tagxml/nonparams.tag b/quanta/data/dtep/tagxml/nonparams.tag
new file mode 100644
index 00000000..b1244f82
--- /dev/null
+++ b/quanta/data/dtep/tagxml/nonparams.tag
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="items"><children><child name="item" /></children></tag>
+<tag name="item" />
+<tag name="label"><children><child name="text" /><child name="location" /><child name="textlocation" /></children></tag>
+<tag name="text" />
+<tag name="tooltip" />
+<tag name="whatsthis" />
+<tag name="children"><children><child name="child" /></children></tag>
+<tag name="stoppingtags"><children><child name="stoppingtag" /></children></tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/tagxml/spacer.tag b/quanta/data/dtep/tagxml/spacer.tag
new file mode 100644
index 00000000..71d776ae
--- /dev/null
+++ b/quanta/data/dtep/tagxml/spacer.tag
@@ -0,0 +1,25 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="spacer">
+
+ <label>
+ <text>Orientation</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="orientation" type="list">
+ <tooltip>defaults to horizontal </tooltip>
+ <items>
+ <item>h</item>
+ <item>v</item>
+ </items>
+ <location col="1" row="0" />
+ </attr>
+
+
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/tagxml/tag.tag b/quanta/data/dtep/tagxml/tag.tag
new file mode 100644
index 00000000..cf4be3d1
--- /dev/null
+++ b/quanta/data/dtep/tagxml/tag.tag
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tag">
+
+ <label>
+ <text>Tag</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <tooltip>tag name </tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <label>
+ <text>Has Core</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="hasCore" type="list">
+ <tooltip>Uses Core Page</tooltip>
+ <location col="1" row="1" />
+ <items>
+ <item>0</item>
+ <item>1</item>
+ </items>
+ </attr>
+
+ <label>
+ <text>Has I18n</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="hasI18n" type="list">
+ <tooltip>Uses I18n Page</tooltip>
+ <location col="1" row="2" />
+ <items>
+ <item>0</item>
+ <item>1</item>
+ </items>
+ </attr>
+
+ <label>
+ <text>Has Script</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="hasScript" type="list">
+ <tooltip>Uses Script Page</tooltip>
+ <location col="1" row="3" />
+ <items>
+ <item>0</item>
+ <item>1</item>
+ </items>
+ </attr>
+
+ <label>
+ <text>Single Tag</text>
+ <location col="0" row="4" />
+ </label>
+
+ <attr name="single" type="list">
+ <tooltip>Single tag requiring a / at the end</tooltip>
+ <location col="1" row="4" />
+ <items>
+ <item>0</item>
+ <item>1</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/tagxml/vpl.tag b/quanta/data/dtep/tagxml/vpl.tag
new file mode 100644
index 00000000..0a6b50c9
--- /dev/null
+++ b/quanta/data/dtep/tagxml/vpl.tag
@@ -0,0 +1,65 @@
+<!DOCTYPE TAGS>
+<TAGS>
+
+<tag name="kafkainfos">
+
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+
+</tag>
+
+<tag name="rootnode">
+ <label>
+ <text>Can Be Deleted</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="canbedeleted" type="check">
+ <tooltip>Indicate if the Node could be deleted in the VPL view.</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <label>
+ <text>Can Be Modified</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="canbemodified" type="check">
+ <tooltip>Indicate if the Node could be modified in the VPL view.</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <label>
+ <text>Can Have Cursor Focus</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="canhavecursorfocus" type="list">
+ <tooltip>Indicate if the Node could have the cursor focus in the VPL view</tooltip>
+ <items>
+ <item>no</item>
+ <item>left</item>
+ <item>right</item>
+ <item>leftandright</item>
+ <item>singlenode</item>
+ <item>singlenodeanditself</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <label>
+ <text>Cursor Can Enter</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="cursorcanenter" type="check">
+ <tooltip>Indicate if the cursor could enter/leave the Node in the VPL view</tooltip>
+ <location col="1" row="3" />
+ </attr>
+
+ <spacer orientation="v">
+ <location col="0" row="9" colspan="2" />
+ </spacer>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/Makefile.am b/quanta/data/dtep/wml-1-2/Makefile.am
new file mode 100644
index 00000000..6b8fca48
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/Makefile.am
@@ -0,0 +1,5 @@
+quanta_DATA = a.tag access.tag anchor.tag br.tag card.tag description.rc do.tag fieldset.tag go.tag img.tag input.tag meta.tag noop.tag onevent.tag optgroup.tag option.tag p.tag \
+postfield.tag pre.tag select.tag setvar.tag table.tag template.tag timer.tag wml.tag common.tag
+
+quantadir = ${quanta_datadir}/dtep/wml-1-2
+
diff --git a/quanta/data/dtep/wml-1-2/a.tag b/quanta/data/dtep/wml-1-2/a.tag
new file mode 100644
index 00000000..9dfa559c
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/a.tag
@@ -0,0 +1,30 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1">
+
+ <attr name="href" status="required" type="url">
+ <text>URL</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ </attr>
+
+ <attr name="accesskey" status="implied" type="input">
+ <text>Access key</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/access.tag b/quanta/data/dtep/wml-1-2/access.tag
new file mode 100644
index 00000000..a06e2147
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/access.tag
@@ -0,0 +1,20 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="access" hasCore="1" single="1">
+
+ <attr name="domain" status="implied" type="input">
+ <text>Domain</text>
+ <tooltip>URL domain that can access this deck</tooltip>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="path" status="implied" type="input">
+ <text>Path</text>
+ <textlocation col="0" row="1" />
+ <tooltip>The URL root that can access this deck</tooltip>
+ <location col="1" row="1"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/anchor.tag b/quanta/data/dtep/wml-1-2/anchor.tag
new file mode 100644
index 00000000..0525193f
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/anchor.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="anchor" hasCore="1">
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="accesskey" status="implied" type="input">
+ <text>Access key</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/br.tag b/quanta/data/dtep/wml-1-2/br.tag
new file mode 100644
index 00000000..6e77a278
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/br.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="br" hasCore="1" single="1">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/card.tag b/quanta/data/dtep/wml-1-2/card.tag
new file mode 100644
index 00000000..e13741cb
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/card.tag
@@ -0,0 +1,56 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="card" hasCore="1">
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="newcontext" defaultValue="false" type="list">
+ <text>Initialise context</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ </attr>
+
+ <attr name="ordered" defaultValue="true" type="list">
+ <text>Allow user to navigate</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2"/>
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onenterforward" status="implied" type="url">
+ <text>URL for go</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+ <attr name="onenterbackward" status="implied" type="url">
+ <text>URL for prev</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="ontimer" status="implied" type="url">
+ <text>URL for timer</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/common.tag b/quanta/data/dtep/wml-1-2/common.tag
new file mode 100644
index 00000000..7be9453e
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/common.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/wml-1-2/description.rc b/quanta/data/dtep/wml-1-2/description.rc
new file mode 100644
index 00000000..1f5392a2
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/description.rc
@@ -0,0 +1,58 @@
+[General]
+Name = -//WAPFORUM//DTD WML 1.2//EN
+NickName = WML 1.2
+MimeTypes = text/vnd.wap.wml
+DefaultExtension = wml
+Groups = Core
+NumOfPages = 1
+CaseSensitive = true
+
+[Toolbars]
+Location = wml-1-2
+Names = deck, forms, table, tasks, text, misc
+
+[Page1]
+Title = Core Attributes
+Groups = Core
+
+[Extra tags]
+List =!DOCTYPE, td, tr, small, big, u, i, strong, em, refresh, prev, head
+
+small=xml:lang
+small_options = hasCore
+big=xml:lang
+big_options = hasCore
+u=xml:lang
+u_options = hasCore
+i=xml:lang
+i_options = hasCore
+strong=xml:lang
+strong_options = hasCore
+em=xml:lang
+em_options = hasCore
+td=xml:lang
+td_options = hasCore
+tr_options = hasCore
+prev_options = hasCore
+refresh_options = hasCore
+head_options = hasCore
+
+[Extra rules]
+BooleanAttributes = simple
+Single Tag Style = XML
+StructGroupsCount = 2
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links
+No_Name = No Links
+Icon = www
+Tag = a(title,href)
+HasFileName = true
+FileNameRx = .*\||#.*
diff --git a/quanta/data/dtep/wml-1-2/do.tag b/quanta/data/dtep/wml-1-2/do.tag
new file mode 100644
index 00000000..b6f6d07c
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/do.tag
@@ -0,0 +1,51 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="do" hasCore="1" >
+
+ <attr name="type" status="required" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>accept</item>
+ <item>delete</item>
+ <item>help</item>
+ <item>options</item>
+ <item>prev</item>
+ <item>reset</item>
+ <item>unknown</item>
+ <item>vnd.</item>
+ </items>
+ </attr>
+
+ <attr name="label" status="implied" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ </attr>
+
+ <attr name="name" status="implied" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2"/>
+ </attr>
+
+
+ <attr name="optional" defaultValue="false" type="list">
+ <text>Ignore this element</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/fieldset.tag b/quanta/data/dtep/wml-1-2/fieldset.tag
new file mode 100644
index 00000000..8020e3e4
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/fieldset.tag
@@ -0,0 +1,18 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasCore="1">
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/go.tag b/quanta/data/dtep/wml-1-2/go.tag
new file mode 100644
index 00000000..a7e851e6
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/go.tag
@@ -0,0 +1,44 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="go" hasCore="1">
+
+ <attr name="href" status="required" type="url">
+ <text>HREF</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="sendreferer" defaultValue="false" type="list">
+ <text>Include URL in request</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ </attr>
+
+ <attr name="method" defaultValue="get" type="list">
+ <text>HTTP submission method</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>post</item>
+ <item>get</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" defaultValue="application/x-www-form-urlencoded" type="input">
+ <text>Encoding type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="accept-charset" status="implied" type="input">
+ <text>Encodings accepted</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/img.tag b/quanta/data/dtep/wml-1-2/img.tag
new file mode 100644
index 00000000..83b3da49
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/img.tag
@@ -0,0 +1,65 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="img" hasCore="1" single="1">
+
+ <attr name="alt" status="required" type="input">
+ <text>Alt text</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="src" status="required" type="url">
+ <text>URL</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3"/>
+ </attr>
+
+ <attr name="localsrc" status="implied" type="input">
+ <text>Local icon name</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="vspace" defaultValue="0" type="input">
+ <text>Vertical Space</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="hspace" defaultValue="0" type="input">
+ <text>Horizontal Space</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="align" defaultValue="bottom" type="list">
+ <text>Alignment to text</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5"/>
+ <items>
+ <item>top</item>
+ <item>middle</item>
+ <item>bottom</item>
+ </items>
+ </attr>
+
+ <attr name="height" status="implied" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6"/>
+ </attr>
+
+ <attr name="width" status="implied" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7"/>
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/input.tag b/quanta/data/dtep/wml-1-2/input.tag
new file mode 100644
index 00000000..e18b90d6
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/input.tag
@@ -0,0 +1,80 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="input" hasCore="1" single="1">
+
+ <attr name="name" status="required" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="type" defaultValue="text" type="list">
+ <text>Text Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>text</item>
+ <item>password</item>
+ </items>
+ </attr>
+
+ <attr name="value" status="implied" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="format" status="implied" type="input">
+ <text>Format Mask</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="emptyok" defaultValue="false" type="list">
+ <text>Leave field blank</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ </attr>
+
+ <attr name="size" status="implied" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="maxlength" status="implied" type="input">
+ <text>Maximum length</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="tabindex" status="implied" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="accesskey" status="implied"type="input">
+ <text>Access key</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="10" />
+ <location col="1" row="10" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/meta.tag b/quanta/data/dtep/wml-1-2/meta.tag
new file mode 100644
index 00000000..41854ddc
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/meta.tag
@@ -0,0 +1,40 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="meta" hasCore="1" single="1">
+
+ <attr name="name" status="implied" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" status="implied" type="input">
+ <text>HTTP-Equiv</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="content" status="required" type="input">
+ <text>Content</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="scheme" status="implied" type="input">
+ <text>Scheme</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="forua" defaultValue="false" type="list">
+ <text>For User Agent</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/noop.tag b/quanta/data/dtep/wml-1-2/noop.tag
new file mode 100644
index 00000000..faf83aea
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/noop.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noop" hasCore="1" single="1">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/onevent.tag b/quanta/data/dtep/wml-1-2/onevent.tag
new file mode 100644
index 00000000..a0e5e67e
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/onevent.tag
@@ -0,0 +1,22 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="onevent" hasCore="1">
+
+ <attr name="type" staus="required" type="list">
+ <text>Event</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>accept</item>
+ <item>delete</item>
+ <item>help</item>
+ <item>options</item>
+ <item>prev</item>
+ <item>reset</item>
+ <item>unknown</item>
+ <item>vnd.</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/optgroup.tag b/quanta/data/dtep/wml-1-2/optgroup.tag
new file mode 100644
index 00000000..4d98dd0d
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/optgroup.tag
@@ -0,0 +1,18 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="optgroup" hasCore="1">
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="xml:lang" status="implied"type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/option.tag b/quanta/data/dtep/wml-1-2/option.tag
new file mode 100644
index 00000000..4bb7086b
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/option.tag
@@ -0,0 +1,30 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="option" hasCore="1">
+
+ <attr name="value" status="implied" type="input">
+ <text>Value of variable</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ </attr>
+
+ <attr name="onpick" status="implied" type="url">
+ <text>URL</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/p.tag b/quanta/data/dtep/wml-1-2/p.tag
new file mode 100644
index 00000000..794f7a93
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/p.tag
@@ -0,0 +1,33 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasCore="1">
+
+ <attr name="align" defaultValue="left" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ </attr>
+
+ <attr name="mode" status="implied" type="list">
+ <text>Text wrap mode</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>wrap</item>
+ <item>nowrap</item>
+ </items>
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/postfield.tag b/quanta/data/dtep/wml-1-2/postfield.tag
new file mode 100644
index 00000000..c8d73ae4
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/postfield.tag
@@ -0,0 +1,18 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="postfield" hasCore="1" single="1">
+
+ <attr name="name" status="required" type="input">
+ <text>Variable Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="value" status="required"type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/pre.tag b/quanta/data/dtep/wml-1-2/pre.tag
new file mode 100644
index 00000000..b53de122
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/pre.tag
@@ -0,0 +1,12 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="pre" hasCore="1">
+
+ <attr name="xml:space" status="required" defaultValue="preserve" type="input">
+ <text>Fixed as "preserve"</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/select.tag b/quanta/data/dtep/wml-1-2/select.tag
new file mode 100644
index 00000000..ecf0ba13
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/select.tag
@@ -0,0 +1,58 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="select" hasCore="1">
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="name" status="implied" type="input">
+ <text>Variable Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ </attr>
+
+ <attr name="value" status="implied" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="iname" status="implied" type="input">
+ <text>Index variable name</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="ivalue" status="implied" type="input">
+ <text>Index variable deafult</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="multiple" defaultValue="false" type="list">
+ <text>Select multiple values</text>
+ <textlocation col="0" row="5" />
+ <items>
+ <item>true</item>
+ <item>false</item>
+ </items>
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="tabindex" status="implied" type="input">
+ <text>Tab index</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/setvar.tag b/quanta/data/dtep/wml-1-2/setvar.tag
new file mode 100644
index 00000000..0d535c3e
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/setvar.tag
@@ -0,0 +1,18 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="setvar" hasCore="1" single="1">
+
+ <attr name="name" status="required"type="input">
+ <text>Variable Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0"/>
+ </attr>
+
+ <attr name="value" status="required"type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/table.tag b/quanta/data/dtep/wml-1-2/table.tag
new file mode 100644
index 00000000..380f0579
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/table.tag
@@ -0,0 +1,37 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasCore="1">
+
+ <attr name="title" status="implied" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="0" />
+ <tooltip>A label of the table</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="align" status="implied" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="columns" status="required" type="input">
+ <text>Number of columns</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <tooltip>Must be greater than zero</tooltip>
+ </attr>
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/template.tag b/quanta/data/dtep/wml-1-2/template.tag
new file mode 100644
index 00000000..8106432a
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/template.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="template" hasCore="1">
+
+ <attr name="onenterforward" status="implied" type="url">
+ <text>URL for go</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="onenterbackward" status="implied" type="url">
+ <text>URL for prev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3"/>
+ </attr>
+
+ <attr name="ontimer" status="implied" type="url">
+ <text>URL for timer</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/timer.tag b/quanta/data/dtep/wml-1-2/timer.tag
new file mode 100644
index 00000000..f892418f
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/timer.tag
@@ -0,0 +1,18 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="timer" hasCore="1" single="1">
+
+ <attr name="name" status="implied" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="value" status="required" type="input">
+ <text>Value in 0.1 second units</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/wml-1-2/wml.tag b/quanta/data/dtep/wml-1-2/wml.tag
new file mode 100644
index 00000000..75747803
--- /dev/null
+++ b/quanta/data/dtep/wml-1-2/wml.tag
@@ -0,0 +1,13 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="wml" hasCore="1">
+
+ <attr name="xml:lang" status="implied" type="input">
+ <text>Override xml:lang</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/Makefile.am b/quanta/data/dtep/xhtml-basic/Makefile.am
new file mode 100644
index 00000000..d12ee344
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/Makefile.am
@@ -0,0 +1,6 @@
+quanta_DATA = base.tag body.tag description.rc form.tag headings.tag input.tag \
+ link.tag ol.tag p.tag table.tag textarea.tag tr.tag a.tag blockquote.tag \
+ br.tag div.tag head.tag html.tag li.tag meta.tag option.tag select.tag \
+ td.tag th.tag ul.tag common.tag
+quantadir = ${quanta_datadir}/dtep/xhtml-basic
+
diff --git a/quanta/data/dtep/xhtml-basic/a.tag b/quanta/data/dtep/xhtml-basic/a.tag
new file mode 100644
index 00000000..7d02f942
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/a.tag
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1">
+
+ <attr name="href" type="url" source="selection">
+ <text>href</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="rel" type="input">
+ <text>rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>rev</text>
+ <textlocation col="2" row="2" />
+ <location col="3" row="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input" />
+ <attr name="charset" type="input" />
+ <attr name="accesskey" type="input" />
+ <attr name="tabindex" type="input" />
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/base.tag b/quanta/data/dtep/xhtml-basic/base.tag
new file mode 100644
index 00000000..5ca1c92c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/base.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="base">
+ <attr name="href" type="url">
+ <text>href</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/blockquote.tag b/quanta/data/dtep/xhtml-basic/blockquote.tag
new file mode 100644
index 00000000..ad642e61
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/blockquote.tag
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="blockquote" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="url">
+ <text>cite</text>
+ <textlocation col="0" row="0" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="div" />
+<child name="dl" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/body.tag b/quanta/data/dtep/xhtml-basic/body.tag
new file mode 100644
index 00000000..c9bcca72
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/body.tag
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="body" hasCore="1" hasI18n="1">
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="div" />
+<child name="dl" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/br.tag b/quanta/data/dtep/xhtml-basic/br.tag
new file mode 100644
index 00000000..d4d2bb06
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/br.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="br" hasCore="1" single="1" />
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/common.tag b/quanta/data/dtep/xhtml-basic/common.tag
new file mode 100644
index 00000000..25baba50
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/common.tag
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="xml:lang" type="input">
+ </attr>
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml-basic/description.rc b/quanta/data/dtep/xhtml-basic/description.rc
new file mode 100644
index 00000000..045b93d9
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/description.rc
@@ -0,0 +1,50 @@
+[General]
+Name = -//W3C//DTD XHTML Basic 1.0//EN
+NickName = XHTML 1.0 Basic
+URL = http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd
+DoctypeString = html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n
+NumOfPages = 1
+CaseSensitive = true
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core and i18n
+Groups = Core, I18n
+
+[Extra rules]
+BooleanAttributes = simple
+Single Tag Style = XML
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links (anchor)
+No_Name = No Links (anchor)
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
diff --git a/quanta/data/dtep/xhtml-basic/div.tag b/quanta/data/dtep/xhtml-basic/div.tag
new file mode 100644
index 00000000..9dfc2599
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/div.tag
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="div" hasCore="1" hasI18n="1" scope="paragraph">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="blockquote" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="table" />
+<child name="textarea" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml-basic/form.tag b/quanta/data/dtep/xhtml-basic/form.tag
new file mode 100644
index 00000000..d4e0b368
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/form.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="form" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="input">
+ <text>action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>GET</item>
+ <item>POST</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="div" />
+<child name="dl" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/head.tag b/quanta/data/dtep/xhtml-basic/head.tag
new file mode 100644
index 00000000..bdcc1ef7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/head.tag
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="head" hasI18n="1">
+
+ <attr name="profile" type="url">
+ <text>profile</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="link" />
+<child name="meta" />
+<child name="object" />
+<child name="title" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/headings.tag b/quanta/data/dtep/xhtml-basic/headings.tag
new file mode 100644
index 00000000..af41ba13
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/headings.tag
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+</tag>
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/html.tag b/quanta/data/dtep/xhtml-basic/html.tag
new file mode 100644
index 00000000..4d9b566e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/html.tag
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="html" hasI18n="1">
+
+ <attr name="XHTML" type="input">
+ <text>XHTML</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="xmlns" type="url">
+ <text>xmlns</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="body" />
+<child name="head" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/input.tag b/quanta/data/dtep/xhtml-basic/input.tag
new file mode 100644
index 00000000..379ececb
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/input.tag
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="input" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>name</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>No of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>maxlength</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ <tooltip>URL for image to use</tooltip>
+ </attr>
+
+ <attr name="accesskey" type="input">
+ <text>accesskey</text>
+ <textlocation col="2" row="6" colspan="1" />
+ <location col="3" row="6" colspan="1" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="caption" />
+<child name="cite" />
+<child name="code" />
+<child name="dd" />
+<child name="dfn" />
+<child name="div" />
+<child name="dt" />
+<child name="em" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="kbd" />
+<child name="label" />
+<child name="li" />
+<child name="object" />
+<child name="p" />
+<child name="q" />
+<child name="samp" />
+<child name="span" />
+<child name="strong" />
+<child name="td" />
+<child name="th" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/li.tag b/quanta/data/dtep/xhtml-basic/li.tag
new file mode 100644
index 00000000..570d70c7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/li.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="li" hasCore="1" hasI18n="1">
+ <stoppingtags>
+ <stoppingtag name="li" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="blockquote" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="table" />
+<child name="textarea" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/link.tag b/quanta/data/dtep/xhtml-basic/link.tag
new file mode 100644
index 00000000..5832db9a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/link.tag
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="link" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="input">
+ <text>rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="href" type="url">
+ <text>href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>media</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>hreflang</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>charset</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/meta.tag b/quanta/data/dtep/xhtml-basic/meta.tag
new file mode 100644
index 00000000..b55fbb29
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/meta.tag
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="name" type="input">
+ <text>name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>http-equiv</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>content</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>scheme</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/ol.tag b/quanta/data/dtep/xhtml-basic/ol.tag
new file mode 100644
index 00000000..4e9adab9
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/ol.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ol" hasCore="1" hasI18n="1">
+ <children>
+ <child name="li" usage="required" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/option.tag b/quanta/data/dtep/xhtml-basic/option.tag
new file mode 100644
index 00000000..5c3a8424
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/option.tag
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="option" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="value" type="input">
+ <text>value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="option" />
+ </stoppingtags>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/p.tag b/quanta/data/dtep/xhtml-basic/p.tag
new file mode 100644
index 00000000..eadc4781
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/p.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasCore="1" hasI18n="1" optional="1">
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="em" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/select.tag b/quanta/data/dtep/xhtml-basic/select.tag
new file mode 100644
index 00000000..241684e6
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/select.tag
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="select" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="multiple" type="check">
+ <text>multiple</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="size" type="input" />
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="option" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/table.tag b/quanta/data/dtep/xhtml-basic/table.tag
new file mode 100644
index 00000000..ead404b5
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/table.tag
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasCore="1" hasI18n="1">
+
+ <attr name="summary" type="input" />
+<children>
+<child name="caption" />
+<child name="tr" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/td.tag b/quanta/data/dtep/xhtml-basic/td.tag
new file mode 100644
index 00000000..cde92e8f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/td.tag
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="td" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="colspan" type="input">
+ <text>colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="rowspan" type="input">
+ <text>rowspan</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input" />
+ <attr name="abbr" type="input" />
+ <attr name="scope" type="list">
+ <text>scope</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ <location col="0" row="3" colspan="1" />
+ </attr>
+ <attr name="axis" type="input" />
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="blockquote" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/textarea.tag b/quanta/data/dtep/xhtml-basic/textarea.tag
new file mode 100644
index 00000000..35161dd7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/textarea.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="textarea" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="4" />
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>cols</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>rows</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="accesskey" type="input" />
+</tag>
+<children>
+ <child name="#text" />
+</children>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/th.tag b/quanta/data/dtep/xhtml-basic/th.tag
new file mode 100644
index 00000000..d6851796
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/th.tag
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="th" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="colspan" type="input">
+ <text>colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="rowspan" type="input">
+ <text>rowspan</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input" />
+ <attr name="abbr" type="input" />
+ <attr name="scope" type="list">
+ <text>scope</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ <location col="0" row="3" colspan="1" />
+ </attr>
+ <attr name="axis" type="input" />
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="blockquote" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="img" />
+<child name="input" />
+<child name="kbd" />
+<child name="label" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/tr.tag b/quanta/data/dtep/xhtml-basic/tr.tag
new file mode 100644
index 00000000..5a544503
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/tr.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tr" hasCore="1" hasI18n="1" optional="1">
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+
+<children>
+<child name="td" />
+<child name="th" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-basic/ul.tag b/quanta/data/dtep/xhtml-basic/ul.tag
new file mode 100644
index 00000000..a2ce9a38
--- /dev/null
+++ b/quanta/data/dtep/xhtml-basic/ul.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasCore="1" hasI18n="1">
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/Makefile.am b/quanta/data/dtep/xhtml-frameset/Makefile.am
new file mode 100644
index 00000000..b47c8ded
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/Makefile.am
@@ -0,0 +1,3 @@
+quanta_DATA = basefont.tag font.tag frame.tag frameset.tag isindex.tag description.rc a.tag abbr.tag acronym.tag address.tag applet.tag area.tag b.tag base.tag bdo.tag big.tag blockquote.tag body.tag br.tag button.tag caption.tag center.tag cite.tag code.tag col.tag colgroup.tag dd.tag del.tag dfn.tag dir.tag div.tag dl.tag dt.tag em.tag fieldset.tag form.tag head.tag headings.tag hr.tag html.tag i.tag iframe.tag img.tag input.tag ins.tag kbd.tag label.tag legend.tag li.tag link.tag map.tag menu.tag meta.tag noframes.tag noscript.tag object.tag ol.tag optgroup.tag option.tag p.tag param.tag pre.tag q.tag s.tag samp.tag script.tag select.tag small.tag span.tag strike.tag strong.tag style.tag sub.tag sup.tag table.tag tbody.tag td.tag textarea.tag tfoot.tag th.tag thead.tag title.tag tr.tag tt.tag u.tag ul.tag var.tag common.tag
+quantadir = ${quanta_datadir}/dtep/xhtml-frameset
+
diff --git a/quanta/data/dtep/xhtml-frameset/a.tag b/quanta/data/dtep/xhtml-frameset/a.tag
new file mode 100644
index 00000000..9140cd66
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/a.tag
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1" hasScript="1" hasFocus="1">
+
+ <attr name="href" type="url" source="selection">
+ <text>Href</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rel" type="input">
+ <text>Rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>Rev</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>Hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/abbr.tag b/quanta/data/dtep/xhtml-frameset/abbr.tag
new file mode 100644
index 00000000..93aa69d7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/abbr.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="abbr" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/acronym.tag b/quanta/data/dtep/xhtml-frameset/acronym.tag
new file mode 100644
index 00000000..93d73b08
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/acronym.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="acronym" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/address.tag b/quanta/data/dtep/xhtml-frameset/address.tag
new file mode 100644
index 00000000..7626fbf5
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/address.tag
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="address" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="p" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/applet.tag b/quanta/data/dtep/xhtml-frameset/applet.tag
new file mode 100644
index 00000000..1da9149e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/applet.tag
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="applet" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>Codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="code" type="input">
+ <text>Code</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="object" type="input">
+ <text>Object</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="7" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>Vspace</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/area.tag b/quanta/data/dtep/xhtml-frameset/area.tag
new file mode 100644
index 00000000..7bbf41b0
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/area.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="area" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>Href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2"/>
+ </attr>
+
+ <attr name="nohref" type="check">
+ <text>Nohref</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/b.tag b/quanta/data/dtep/xhtml-frameset/b.tag
new file mode 100644
index 00000000..dac70a04
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/b.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="b" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/base.tag b/quanta/data/dtep/xhtml-frameset/base.tag
new file mode 100644
index 00000000..2b34083d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/base.tag
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="base" single="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" > <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="href" type="input">
+ <text>Href</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/basefont.tag b/quanta/data/dtep/xhtml-frameset/basefont.tag
new file mode 100644
index 00000000..68c3aed7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/basefont.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="basefont" single="1">
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ </attr>
+
+ <attr name="id" type="input" >
+ <text>Id</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/bdo.tag b/quanta/data/dtep/xhtml-frameset/bdo.tag
new file mode 100644
index 00000000..676eb609
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/bdo.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="bdo" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/big.tag b/quanta/data/dtep/xhtml-frameset/big.tag
new file mode 100644
index 00000000..bbf21a7c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/big.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="big" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/blockquote.tag b/quanta/data/dtep/xhtml-frameset/blockquote.tag
new file mode 100644
index 00000000..82709643
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/blockquote.tag
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="blockquote" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/body.tag b/quanta/data/dtep/xhtml-frameset/body.tag
new file mode 100644
index 00000000..36982ce4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/body.tag
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="body" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="background" type="url">
+ <text>BG image</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>BG color</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="1" />
+ </attr>
+
+ <attr name="text" type="color">
+ <text>Text color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="2" />
+ </attr>
+
+ <attr name="link" type="color">
+ <text>Link color</text>
+ <textlocation col="0" row="3" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="3" />
+ </attr>
+
+ <attr name="alink" type="color">
+ <text>Active link color</text>
+ <textlocation col="0" row="4" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="4" />
+ </attr>
+
+ <attr name="vlink" type="color">
+ <text>Visited link color</text>
+ <textlocation col="0" row="5" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="5" />
+ </attr>
+
+ <attr name="onload" type="input">
+ <text>Onload</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>Onunload</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/br.tag b/quanta/data/dtep/xhtml-frameset/br.tag
new file mode 100644
index 00000000..738c05d8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/br.tag
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="br" hasCore="1" single="1" >
+
+ <attr name="clear" type="list">
+ <text>Clear</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>all</item>
+ <item>right</item>
+ <item>none</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/button.tag b/quanta/data/dtep/xhtml-frameset/button.tag
new file mode 100644
index 00000000..011def6a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/button.tag
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="button" hasFocus="1" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <items>
+ <item>button</item>
+ <item>reset</item>
+ <item>submit</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="3" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="font" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="ins" />
+<child name="kbd" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/caption.tag b/quanta/data/dtep/xhtml-frameset/caption.tag
new file mode 100644
index 00000000..7917420e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/caption.tag
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="caption" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/center.tag b/quanta/data/dtep/xhtml-frameset/center.tag
new file mode 100644
index 00000000..67943607
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/center.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="center" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/cite.tag b/quanta/data/dtep/xhtml-frameset/cite.tag
new file mode 100644
index 00000000..815bac00
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/cite.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cite" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/code.tag b/quanta/data/dtep/xhtml-frameset/code.tag
new file mode 100644
index 00000000..28759903
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/code.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="code" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/col.tag b/quanta/data/dtep/xhtml-frameset/col.tag
new file mode 100644
index 00000000..b86c06e6
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/col.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="col" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/colgroup.tag b/quanta/data/dtep/xhtml-frameset/colgroup.tag
new file mode 100644
index 00000000..d4ecc9a8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/colgroup.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="colgroup" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+<children>
+<child name="col" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/common.tag b/quanta/data/dtep/xhtml-frameset/common.tag
new file mode 100644
index 00000000..72c0d679
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/common.tag
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="xml:lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+<tag name="Focus" common="yes">
+ <attr name="accesskey" type="input">
+ </attr>
+ <attr name="tabindex" type="input">
+ </attr>
+ <attr name="onfocus" type="input">
+ </attr>
+ <attr name="onblur" type="input">
+ </attr>
+</tag>
+
+<tag name="Others" common="yes">
+ <attr name="name" type="input">
+ </attr>
+ <attr name="longdesc" type="input">
+ </attr>
+ <attr name="ismap" type="input">
+ </attr>
+ <attr name="usemap" type="input">
+ </attr>
+
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml-frameset/dd.tag b/quanta/data/dtep/xhtml-frameset/dd.tag
new file mode 100644
index 00000000..b6a135ef
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/dd.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dd" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/del.tag b/quanta/data/dtep/xhtml-frameset/del.tag
new file mode 100644
index 00000000..4d07e4b9
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/del.tag
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="del" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>Datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/description.rc b/quanta/data/dtep/xhtml-frameset/description.rc
new file mode 100644
index 00000000..f511606e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/description.rc
@@ -0,0 +1,55 @@
+[General]
+Name = -//W3C//DTD XHTML 1.0 Frameset//EN
+NickName = XHTML 1.0 Frameset
+URL = http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd
+DoctypeString = html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script, Focus, Others
+NumOfPages = 4
+CaseSensitive = true
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core and i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Page3]
+Title= Focus
+Groups=Focus
+
+[Page4]
+Title= Others
+Groups=Others
+
+[Extra rules]
+BooleanAttributes = complex
+Single Tag Style = XML
+StructGroupsCount = 2
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links
+No_Name = No Links
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
diff --git a/quanta/data/dtep/xhtml-frameset/dfn.tag b/quanta/data/dtep/xhtml-frameset/dfn.tag
new file mode 100644
index 00000000..99e3daff
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/dfn.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dfn" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/dir.tag b/quanta/data/dtep/xhtml-frameset/dir.tag
new file mode 100644
index 00000000..13612182
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/dir.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dir" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="0" />
+ </attr>
+
+<children>
+<child name="li" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/div.tag b/quanta/data/dtep/xhtml-frameset/div.tag
new file mode 100644
index 00000000..ca4b037a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/div.tag
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="div" hasScript="1" hasCore="1" hasI18n="1" scope="paragraph">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/dl.tag b/quanta/data/dtep/xhtml-frameset/dl.tag
new file mode 100644
index 00000000..1f38c5a0
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/dl.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dl" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="compact" type="check">
+ <text>compact</text>
+ <location col="0" row="0" />
+ </attr>
+
+<children>
+<child name="dt" />
+<child name="dd" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/dt.tag b/quanta/data/dtep/xhtml-frameset/dt.tag
new file mode 100644
index 00000000..4d9192aa
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/dt.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dt" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/em.tag b/quanta/data/dtep/xhtml-frameset/em.tag
new file mode 100644
index 00000000..3c5005b1
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/em.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="em" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/fieldset.tag b/quanta/data/dtep/xhtml-frameset/fieldset.tag
new file mode 100644
index 00000000..f2e942bd
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/fieldset.tag
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="legend" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/font.tag b/quanta/data/dtep/xhtml-frameset/font.tag
new file mode 100644
index 00000000..4cc18db6
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/font.tag
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="font" hasCore="1" hasI18n="1">
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Font color</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2"/>
+ <items>
+ <item>+1</item>
+ <item>-1</item>
+ <item>+2</item>
+ <item>-2</item>
+ <item>+3</item>
+ <item>-3</item>
+ <item>+4</item>
+ <item>-4</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml-frameset/form.tag b/quanta/data/dtep/xhtml-frameset/form.tag
new file mode 100644
index 00000000..b3d554b1
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/form.tag
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="form" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="url">
+ <text>Action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>Method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3"/>
+ <items>
+ <item>get</item>
+ <item>post</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>Enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>Accept</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="accept-charset" type="input">
+ <text>Accept-charset</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+ <attr name="onsubmit" type="input">
+ <text>Onsubmit</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="onreset" type="input">
+ <text>Onreset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3"/>
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="3"/>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3"/>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/frame.tag b/quanta/data/dtep/xhtml-frameset/frame.tag
new file mode 100644
index 00000000..d069d644
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/frame.tag
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="frame" hasCore="1" single="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="longdesc" type="input">
+ <text>Longdesc</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="frameborder" type="list">
+ <text>Frameborder</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ <items>
+ <item>1</item>
+ <item>0</item>
+ </items>
+ </attr>
+
+ <attr name="marginwidth" type="input">
+ <text>Marginwidth</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+ <attr name="marginheight" type="input">
+ <text>Marginheight</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2"/>
+ </attr>
+
+ <attr name="noresize" type="check">
+ <text>Noresize</text>
+ <location col="1" row="7" colspan="2"/>
+ </attr>
+
+ <attr name="scrolling" type="list">
+ <text>Scrolling</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="2"/>
+ <items>
+ <item>auto</item>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/frameset.tag b/quanta/data/dtep/xhtml-frameset/frameset.tag
new file mode 100644
index 00000000..7e0b6f09
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/frameset.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="frameset" hasCore="1">
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Cols</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="onload" type="input">
+ <text>Onload</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2"/>
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>Onunload</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+<children>
+<child name="frame" />
+<child name="frameset" />
+<child name="noframes" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/head.tag b/quanta/data/dtep/xhtml-frameset/head.tag
new file mode 100644
index 00000000..9305caea
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/head.tag
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="head" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="profile" type="url">
+ <text>Profile</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="base" />
+<child name="link" />
+<child name="meta" usage="required" />
+<child name="object" />
+<child name="title" usage="required" />
+<child name="script" />
+<child name="style" />
+<child name="isindex" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/headings.tag b/quanta/data/dtep/xhtml-frameset/headings.tag
new file mode 100644
index 00000000..5469ac0b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/headings.tag
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/hr.tag b/quanta/data/dtep/xhtml-frameset/hr.tag
new file mode 100644
index 00000000..c0f16a62
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/hr.tag
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="hr" hasScript="1" hasCore="1" single="1" >
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="noshade" type="check" >
+ <text>No shade</text>
+ <location col="0" row="3"/>
+ </attr>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/html.tag b/quanta/data/dtep/xhtml-frameset/html.tag
new file mode 100644
index 00000000..d401f801
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/html.tag
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="html" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="xmlns" type="list">
+ <text>Xmlns</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>http://www.w3.org/1999/xhtml</item>
+ </items>
+ </attr>
+
+<children>
+<child name="head" />
+<child name="frameset" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/i.tag b/quanta/data/dtep/xhtml-frameset/i.tag
new file mode 100644
index 00000000..eefb38d4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/i.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="i" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/iframe.tag b/quanta/data/dtep/xhtml-frameset/iframe.tag
new file mode 100644
index 00000000..fb5ffb99
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/iframe.tag
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="iframe" hasCore="1" hasI18n="1">
+
+ <attr name="longdesc" type="url">
+ <text>Longdesc</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="scrolling" type="list">
+ <text>Scrolling</text>
+ <textlocation col="0" row="4" />
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ <item>auto</item>
+ </items>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="7" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="marginheight" type="input">
+ <text>Marginheight</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="marginwidth" type="input">
+ <text>Marginwidth</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+ <attr name="frameborder" type="list">
+ <text>Frameborder</text>
+ <textlocation col="0" row="10" />
+ <items>
+ <item>1</item>
+ <item>0</item>
+ </items>
+ <location col="1" row="10" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" />
+ </attr>
+
+ <attr name="longdesc" type="input">
+ <text>Longdesc</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/img.tag b/quanta/data/dtep/xhtml-frameset/img.tag
new file mode 100644
index 00000000..ace47a0f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/img.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="img" hasCore="1" hasI18n="1" hasScript="1" hasOthers="1" single="1">
+
+ <attr name="src" type="url">
+ <text>src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>alt</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>Vspace</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/input.tag b/quanta/data/dtep/xhtml-frameset/input.tag
new file mode 100644
index 00000000..a6a2b3cc
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/input.tag
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="input" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>Checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>Number of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>Maxlength</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="usemap" type="url">
+ <text>Usemap</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Readonly</text>
+ <location col="3" row="3" colspan="1" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>Accept</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="6" colspan="1" />
+ <location col="1" row="6" colspan="3" />
+ <tooltip>Alternate text for image</tooltip>
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>Onselect</text>
+ <textlocation col="0" row="7" colspan="1" />
+ <location col="1" row="7" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="9" colspan="1" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="10" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="10" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/ins.tag b/quanta/data/dtep/xhtml-frameset/ins.tag
new file mode 100644
index 00000000..de225ae1
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/ins.tag
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ins" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>Datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/isindex.tag b/quanta/data/dtep/xhtml-frameset/isindex.tag
new file mode 100644
index 00000000..53a940c3
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/isindex.tag
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="isindex" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="prompt" type="input">
+ <text>Prompt</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/kbd.tag b/quanta/data/dtep/xhtml-frameset/kbd.tag
new file mode 100644
index 00000000..6cfaa511
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/kbd.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="kbd" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/label.tag b/quanta/data/dtep/xhtml-frameset/label.tag
new file mode 100644
index 00000000..3e53f7ba
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/label.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="label" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+ <attr name="for" type="input">
+ <text>For</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/legend.tag b/quanta/data/dtep/xhtml-frameset/legend.tag
new file mode 100644
index 00000000..685ae528
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/legend.tag
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="legend" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/li.tag b/quanta/data/dtep/xhtml-frameset/li.tag
new file mode 100644
index 00000000..c4acfaa2
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/li.tag
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="li" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="li" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/link.tag b/quanta/data/dtep/xhtml-frameset/link.tag
new file mode 100644
index 00000000..b5d9f5fe
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/link.tag
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="link" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="input">
+ <text>Rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>Rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="href" type="url">
+ <text>Href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>all</item>
+ <item>aural</item>
+ <item>braille</item>
+ <item>embossed</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>projection</item>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>Hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/map.tag b/quanta/data/dtep/xhtml-frameset/map.tag
new file mode 100644
index 00000000..b64d44f2
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/map.tag
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="map" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="area" />
+<child name="blockquote" />
+<child name="center" />
+<child name="del" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="isindex" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/menu.tag b/quanta/data/dtep/xhtml-frameset/menu.tag
new file mode 100644
index 00000000..10322fc8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/menu.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="menu" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="0" />
+ </attr>
+
+<children>
+<child name="li" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/meta.tag b/quanta/data/dtep/xhtml-frameset/meta.tag
new file mode 100644
index 00000000..d4afefe4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/meta.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>Http-equiv</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>Content</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>Scheme</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/noframes.tag b/quanta/data/dtep/xhtml-frameset/noframes.tag
new file mode 100644
index 00000000..59ff061b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/noframes.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noframes" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="body" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/noscript.tag b/quanta/data/dtep/xhtml-frameset/noscript.tag
new file mode 100644
index 00000000..a973201b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/noscript.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noscript" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/object.tag b/quanta/data/dtep/xhtml-frameset/object.tag
new file mode 100644
index 00000000..baebd55d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/object.tag
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="object" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="classid" type="input">
+ <text>Classid</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>Codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <attr name="codetype" type="list">
+ <text>Codetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="data" type="url">
+ <text>Data</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="2" row="6" />
+ <location col="3" row="6" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <attr name="standby" type="input">
+ <text>Standby</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="declare" type="check">
+ <text>Declare</text>
+ <location col="1" row="10" />
+ </attr>
+
+ <attr name="usemap" type="input">
+ <text>Usemap</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" colspan="3" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" colspan="3" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="13" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="13" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="2" row="13" />
+ <location col="3" row="13" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>VSpace</text>
+ <textlocation col="2" row="7" />
+ <location col="3" row="7" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/ol.tag b/quanta/data/dtep/xhtml-frameset/ol.tag
new file mode 100644
index 00000000..4a33b85a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/ol.tag
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ol" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="start" type="input">
+ <text>Start</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/optgroup.tag b/quanta/data/dtep/xhtml-frameset/optgroup.tag
new file mode 100644
index 00000000..08a52ff5
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/optgroup.tag
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="optgroup" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="1" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+<children>
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/option.tag b/quanta/data/dtep/xhtml-frameset/option.tag
new file mode 100644
index 00000000..a1c646ea
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/option.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="option" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <attr name="disabled" type="list">
+ <text>Disabled</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>disabled</item>
+ </items>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/p.tag b/quanta/data/dtep/xhtml-frameset/p.tag
new file mode 100644
index 00000000..48008e82
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/p.tag
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/param.tag b/quanta/data/dtep/xhtml-frameset/param.tag
new file mode 100644
index 00000000..347cc722
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/param.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="param" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valuetype" type="list">
+ <text>Valuetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>data</item>
+ <item>ref</item>
+ <item>object</item>
+ </items>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/pre.tag b/quanta/data/dtep/xhtml-frameset/pre.tag
new file mode 100644
index 00000000..ad3955f7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/pre.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="pre" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/q.tag b/quanta/data/dtep/xhtml-frameset/q.tag
new file mode 100644
index 00000000..241bde5b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/q.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="q" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/s.tag b/quanta/data/dtep/xhtml-frameset/s.tag
new file mode 100644
index 00000000..98ad6cf7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/s.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="s" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/samp.tag b/quanta/data/dtep/xhtml-frameset/samp.tag
new file mode 100644
index 00000000..6cecf4e0
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/samp.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="samp" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/script.tag b/quanta/data/dtep/xhtml-frameset/script.tag
new file mode 100644
index 00000000..df42c39e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/script.tag
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="script">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>text/css</item>
+ <item>text/php</item>
+ <item>text/javascript</item>
+ <item>application/x-javascript</item>
+ </items>
+ </attr>
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>Defer</text>
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+
+ <attr name="language" type="input">
+ <text>Language</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/select.tag b/quanta/data/dtep/xhtml-frameset/select.tag
new file mode 100644
index 00000000..d0c87373
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/select.tag
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="select" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="multiple" type="check">
+ <text>Multiple</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="optgroup" />
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/small.tag b/quanta/data/dtep/xhtml-frameset/small.tag
new file mode 100644
index 00000000..538b3b7a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/small.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="small" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/span.tag b/quanta/data/dtep/xhtml-frameset/span.tag
new file mode 100644
index 00000000..2ff722d0
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/span.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="span" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/strike.tag b/quanta/data/dtep/xhtml-frameset/strike.tag
new file mode 100644
index 00000000..478e692c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/strike.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strike" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/strong.tag b/quanta/data/dtep/xhtml-frameset/strong.tag
new file mode 100644
index 00000000..0424fa5e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/strong.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/style.tag b/quanta/data/dtep/xhtml-frameset/style.tag
new file mode 100644
index 00000000..aa052448
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/style.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="style" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ <items>
+ <item>all</item>
+ <item>aural</item>
+ <item>braille</item>
+ <item>embossed</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>projection</item>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ </items>
+ </attr>
+
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/sub.tag b/quanta/data/dtep/xhtml-frameset/sub.tag
new file mode 100644
index 00000000..ec46544b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/sub.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sub" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/sup.tag b/quanta/data/dtep/xhtml-frameset/sup.tag
new file mode 100644
index 00000000..d441423a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/sup.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sup" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/table.tag b/quanta/data/dtep/xhtml-frameset/table.tag
new file mode 100644
index 00000000..b76d5095
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/table.tag
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="cellspacing" type="input">
+ <text>Cellspacing</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Set in pixels</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="cellpadding" type="input">
+ <text>Cellpadding</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="frame" type="list">
+ <text>Frame</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>above</item>
+ <item>below</item>
+ <item>border</item>
+ <item>box</item>
+ <item>hsides</item>
+ <item>lhs</item>
+ <item>rhs</item>
+ <item>void</item>
+ <item>vsides</item>
+ </items>
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <attr name="rules" type="list">
+ <text>Rules</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>none</item>
+ <item>groups</item>
+ <item>rows</item>
+ <item>cols</item>
+ <item>all</item>
+ </items>
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="summary" type="input">
+ <text>Summary</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="5" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Background color</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+<children>
+<child name="caption" />
+<child name="col" />
+<child name="colgroup" />
+<child name="thead" />
+<child name="tfoot" />
+<child name="tbody" />
+<child name="tr" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/tbody.tag b/quanta/data/dtep/xhtml-frameset/tbody.tag
new file mode 100644
index 00000000..db13711d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/tbody.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tbody" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/td.tag b/quanta/data/dtep/xhtml-frameset/td.tag
new file mode 100644
index 00000000..e46c9414
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/td.tag
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="td" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="rowspan" type="input">
+ <text>Rowspan</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>Colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input">
+ <text>Headers</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+ <attr name="abbr" type="input">
+ <text>Abbr</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ </attr>
+
+ <attr name="scope" type="list">
+ <text>Scope</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input">
+ <text>Axis</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="2" row="6" />
+ <tooltip>Deprecated</tooltip>
+ <location col="3" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="2" row="7" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="3" row="7" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="1" row="9" colspan="2" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/textarea.tag b/quanta/data/dtep/xhtml-frameset/textarea.tag
new file mode 100644
index 00000000..9c94dc0f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/textarea.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="textarea" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="4" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Cols</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>Onselect</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/tfoot.tag b/quanta/data/dtep/xhtml-frameset/tfoot.tag
new file mode 100644
index 00000000..e07605f4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/tfoot.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tfoot" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/th.tag b/quanta/data/dtep/xhtml-frameset/th.tag
new file mode 100644
index 00000000..27ff8b6a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/th.tag
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="th" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="rowspan" type="input">
+ <text>Rowspan</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>Colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input">
+ <text>Headers</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+ <attr name="abbr" type="input">
+ <text>Abbr</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ </attr>
+
+ <attr name="scope" type="list">
+ <text>Scope</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input">
+ <text>Axis</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="2" row="6" />
+ <tooltip>Deprecated</tooltip>
+ <location col="3" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="2" row="7" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="3" row="7" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="1" row="9" colspan="2" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/thead.tag b/quanta/data/dtep/xhtml-frameset/thead.tag
new file mode 100644
index 00000000..059263d1
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/thead.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="thead" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/title.tag b/quanta/data/dtep/xhtml-frameset/title.tag
new file mode 100644
index 00000000..f24df571
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/title.tag
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="title" hasI18n="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+</attr>
+<children>
+ <child name="#text" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/tr.tag b/quanta/data/dtep/xhtml-frameset/tr.tag
new file mode 100644
index 00000000..4baf805c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/tr.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tr" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+
+<children>
+<child name="th" />
+<child name="td" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/tt.tag b/quanta/data/dtep/xhtml-frameset/tt.tag
new file mode 100644
index 00000000..08f25532
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/tt.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tt" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/u.tag b/quanta/data/dtep/xhtml-frameset/u.tag
new file mode 100644
index 00000000..bc931d0d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/u.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="u" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/ul.tag b/quanta/data/dtep/xhtml-frameset/ul.tag
new file mode 100644
index 00000000..21443c5d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/ul.tag
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ </items>
+ </attr>
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <tooltip>Deprecated</tooltip>
+ <location col="0" row="1" />
+ </attr>
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-frameset/var.tag b/quanta/data/dtep/xhtml-frameset/var.tag
new file mode 100644
index 00000000..ad5627b0
--- /dev/null
+++ b/quanta/data/dtep/xhtml-frameset/var.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="var" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/Makefile.am b/quanta/data/dtep/xhtml-strict/Makefile.am
new file mode 100644
index 00000000..7f8c0483
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/Makefile.am
@@ -0,0 +1,3 @@
+quanta_DATA = a.tag area.tag base.tag blockquote.tag body.tag br.tag col.tag colgroup.tag div.tag empty.tag form.tag head.tag headings.tag hr.tag html.tag input.tag li.tag link.tag meta.tag ol.tag option.tag p.tag script.tag select.tag style.tag table.tag tbody.tag td.tag textarea.tag tfoot.tag th.tag thead.tag tr.tag ul.tag description.rc abbr.tag acronym.tag address.tag b.tag bdo.tag big.tag button.tag caption.tag cite.tag code.tag dd.tag del.tag dfn.tag dl.tag dt.tag em.tag fieldset.tag i.tag img.tag ins.tag kbd.tag label.tag legend.tag map.tag noscript.tag object.tag optgroup.tag param.tag pre.tag q.tag samp.tag small.tag span.tag strong.tag sub.tag sup.tag title.tag tt.tag var.tag common.tag
+quantadir = ${quanta_datadir}/dtep/xhtml-strict
+
diff --git a/quanta/data/dtep/xhtml-strict/a.tag b/quanta/data/dtep/xhtml-strict/a.tag
new file mode 100644
index 00000000..07c82584
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/a.tag
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1" hasScript="1" hasFocus="1">
+
+ <attr name="href" type="url" source="selection">
+ <text>Href</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rel" type="input">
+ <text>Rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>Rev</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>Hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/abbr.tag b/quanta/data/dtep/xhtml-strict/abbr.tag
new file mode 100644
index 00000000..b988c322
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/abbr.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="abbr" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/acronym.tag b/quanta/data/dtep/xhtml-strict/acronym.tag
new file mode 100644
index 00000000..12bf30f1
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/acronym.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="acronym" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/address.tag b/quanta/data/dtep/xhtml-strict/address.tag
new file mode 100644
index 00000000..3b1f699e
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/address.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="address" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/area.tag b/quanta/data/dtep/xhtml-strict/area.tag
new file mode 100644
index 00000000..578166c8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/area.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="area" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>Href</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="nohref" type="check">
+ <text>Nohref</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/b.tag b/quanta/data/dtep/xhtml-strict/b.tag
new file mode 100644
index 00000000..54e28332
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/b.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="b" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/base.tag b/quanta/data/dtep/xhtml-strict/base.tag
new file mode 100644
index 00000000..200f1c1d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/base.tag
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="base" single="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" > <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="href" type="input">
+ <text>Href</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/bdo.tag b/quanta/data/dtep/xhtml-strict/bdo.tag
new file mode 100644
index 00000000..7435ea68
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/bdo.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="bdo" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/big.tag b/quanta/data/dtep/xhtml-strict/big.tag
new file mode 100644
index 00000000..b951e28b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/big.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="big" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/blockquote.tag b/quanta/data/dtep/xhtml-strict/blockquote.tag
new file mode 100644
index 00000000..c85ecfb9
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/blockquote.tag
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="blockquote" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/body.tag b/quanta/data/dtep/xhtml-strict/body.tag
new file mode 100644
index 00000000..c2e67cdf
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/body.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="body" hasScript="1" hasCore="1" hasI18n="1">
+ <attr name="onload" type="input">
+ <text>Onload</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>Onunload</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/br.tag b/quanta/data/dtep/xhtml-strict/br.tag
new file mode 100644
index 00000000..d4d2bb06
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/br.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="br" hasCore="1" single="1" />
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/button.tag b/quanta/data/dtep/xhtml-strict/button.tag
new file mode 100644
index 00000000..bf88752c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/button.tag
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="button" hasFocus="1" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <items>
+ <item>button</item>
+ <item>reset</item>
+ <item>submit</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="3" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="ins" />
+<child name="kbd" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/caption.tag b/quanta/data/dtep/xhtml-strict/caption.tag
new file mode 100644
index 00000000..0d433812
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/caption.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="caption" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/cite.tag b/quanta/data/dtep/xhtml-strict/cite.tag
new file mode 100644
index 00000000..58cb492f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/cite.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cite" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/code.tag b/quanta/data/dtep/xhtml-strict/code.tag
new file mode 100644
index 00000000..b29a87d4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/code.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="code" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/col.tag b/quanta/data/dtep/xhtml-strict/col.tag
new file mode 100644
index 00000000..b86c06e6
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/col.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="col" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/colgroup.tag b/quanta/data/dtep/xhtml-strict/colgroup.tag
new file mode 100644
index 00000000..d4ecc9a8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/colgroup.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="colgroup" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+<children>
+<child name="col" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/common.tag b/quanta/data/dtep/xhtml-strict/common.tag
new file mode 100644
index 00000000..e52f08ea
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/common.tag
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="xml:lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+<tag name="Focus" common="yes">
+ <attr name="accesskey" type="input">
+ </attr>
+ <attr name="tabindex" type="input">
+ </attr>
+ <attr name="onfocus" type="input">
+ </attr>
+ <attr name="onblur" type="input">
+ </attr>
+</tag>
+
+<tag name="Others" common="yes">
+ <attr name="longdesc" type="input">
+ </attr>
+ <attr name="ismap" type="input">
+ </attr>
+ <attr name="usemap" type="input">
+ </attr>
+
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml-strict/dd.tag b/quanta/data/dtep/xhtml-strict/dd.tag
new file mode 100644
index 00000000..97992bf9
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/dd.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dd" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/del.tag b/quanta/data/dtep/xhtml-strict/del.tag
new file mode 100644
index 00000000..eab2ed61
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/del.tag
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="del" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>Datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/description.rc b/quanta/data/dtep/xhtml-strict/description.rc
new file mode 100644
index 00000000..562bd13f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/description.rc
@@ -0,0 +1,62 @@
+[General]
+Name = -//W3C//DTD XHTML 1.0 Strict//EN
+NickName = XHTML 1.0 Strict
+URL = http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
+DoctypeString = html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script, Focus, Others
+NumOfPages = 4
+CaseSensitive = true
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core and i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Page3]
+Title = Focus
+Groups = Focus
+
+[Page4]
+Title= Others
+Groups=Others
+
+[Extra rules]
+BooleanAttributes = complex
+Single Tag Style = XML
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links (anchor)
+No_Name = No Links (anchor)
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
diff --git a/quanta/data/dtep/xhtml-strict/dfn.tag b/quanta/data/dtep/xhtml-strict/dfn.tag
new file mode 100644
index 00000000..fbeb6d72
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/dfn.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dfn" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/div.tag b/quanta/data/dtep/xhtml-strict/div.tag
new file mode 100644
index 00000000..aba511ae
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/div.tag
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="div" hasScript="1" hasCore="1" hasI18n="1" scope="paragraph">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/dl.tag b/quanta/data/dtep/xhtml-strict/dl.tag
new file mode 100644
index 00000000..430067b8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/dl.tag
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dl" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="dt" />
+<child name="dd" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/dt.tag b/quanta/data/dtep/xhtml-strict/dt.tag
new file mode 100644
index 00000000..ef239795
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/dt.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dt" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/em.tag b/quanta/data/dtep/xhtml-strict/em.tag
new file mode 100644
index 00000000..807065df
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/em.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="em" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/empty.tag b/quanta/data/dtep/xhtml-strict/empty.tag
new file mode 100644
index 00000000..24836947
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/empty.tag
@@ -0,0 +1,12 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="">
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/fieldset.tag b/quanta/data/dtep/xhtml-strict/fieldset.tag
new file mode 100644
index 00000000..588944d5
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/fieldset.tag
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="legend" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/form.tag b/quanta/data/dtep/xhtml-strict/form.tag
new file mode 100644
index 00000000..d8b0e6dc
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/form.tag
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="form" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="url">
+ <text>Action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>Method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3"/>
+ <items>
+ <item>get</item>
+ <item>post</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>Enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>Accept</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="accept-charset" type="input">
+ <text>Accept-charset</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+ <attr name="onsubmit" type="input">
+ <text>Onsubmit</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="onreset" type="input">
+ <text>Onreset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3"/>
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/head.tag b/quanta/data/dtep/xhtml-strict/head.tag
new file mode 100644
index 00000000..917a21b3
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/head.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="head" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="profile" type="url">
+ <text>Profile</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="base" />
+<child name="link" />
+<child name="meta" usage="required" />
+<child name="object" />
+<child name="title" usage="required" />
+<child name="script" />
+<child name="style" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/headings.tag b/quanta/data/dtep/xhtml-strict/headings.tag
new file mode 100644
index 00000000..b7190ebc
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/headings.tag
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/hr.tag b/quanta/data/dtep/xhtml-strict/hr.tag
new file mode 100644
index 00000000..21e1d51f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/hr.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="hr" hasScript="1" hasCore="1" single="1" />
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/html.tag b/quanta/data/dtep/xhtml-strict/html.tag
new file mode 100644
index 00000000..afc592c3
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/html.tag
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="html" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="xmlns" type="list">
+ <text>Xmlns</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>http://www.w3.org/1999/xhtml</item>
+ </items>
+ </attr>
+
+<children>
+<child name="head" />
+<child name="body" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/i.tag b/quanta/data/dtep/xhtml-strict/i.tag
new file mode 100644
index 00000000..36dbd43a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/i.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="i" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/img.tag b/quanta/data/dtep/xhtml-strict/img.tag
new file mode 100644
index 00000000..ec60b539
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/img.tag
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="img" hasCore="1" hasI18n="1" hasScript="1" hasOthers="1" single="1">
+
+ <attr name="src" type="url">
+ <text>src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>alt</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/input.tag b/quanta/data/dtep/xhtml-strict/input.tag
new file mode 100644
index 00000000..99ec6003
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/input.tag
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="input" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>Checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>Number of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>Maxlength</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="usemap" type="url">
+ <text>Usemap</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Readonly</text>
+ <location col="3" row="3" colspan="1" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>Accept</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="6" colspan="1" />
+ <location col="1" row="6" colspan="3" />
+ <tooltip>Alternate text for image</tooltip>
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>Onselect</text>
+ <textlocation col="0" row="7" colspan="1" />
+ <location col="1" row="7" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="9" colspan="1" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/ins.tag b/quanta/data/dtep/xhtml-strict/ins.tag
new file mode 100644
index 00000000..eed48a2c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/ins.tag
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ins" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>Datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/kbd.tag b/quanta/data/dtep/xhtml-strict/kbd.tag
new file mode 100644
index 00000000..2b222085
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/kbd.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="kbd" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/label.tag b/quanta/data/dtep/xhtml-strict/label.tag
new file mode 100644
index 00000000..9b898aee
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/label.tag
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="label" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+ <attr name="for" type="input">
+ <text>For</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/legend.tag b/quanta/data/dtep/xhtml-strict/legend.tag
new file mode 100644
index 00000000..1a5f486c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/legend.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="legend" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="2" row="0" colspan="1" />
+ <location col="3" row="0" colspan="1" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/li.tag b/quanta/data/dtep/xhtml-strict/li.tag
new file mode 100644
index 00000000..5ceb4358
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/li.tag
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="li" hasCore="1" hasI18n="1" hasScript="1">
+
+ <stoppingtags>
+ <stoppingtag name="li" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/link.tag b/quanta/data/dtep/xhtml-strict/link.tag
new file mode 100644
index 00000000..2ac313c8
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/link.tag
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="link" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="input">
+ <text>Rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>Rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="href" type="url">
+ <text>Href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>all</item>
+ <item>aural</item>
+ <item>braille</item>
+ <item>embossed</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>projection</item>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>Hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/map.tag b/quanta/data/dtep/xhtml-strict/map.tag
new file mode 100644
index 00000000..8f6a1e9d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/map.tag
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="map" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="area" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/meta.tag b/quanta/data/dtep/xhtml-strict/meta.tag
new file mode 100644
index 00000000..d4afefe4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/meta.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>Http-equiv</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>Content</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>Scheme</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/noscript.tag b/quanta/data/dtep/xhtml-strict/noscript.tag
new file mode 100644
index 00000000..451adfd4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/noscript.tag
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noscript" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/object.tag b/quanta/data/dtep/xhtml-strict/object.tag
new file mode 100644
index 00000000..add63d74
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/object.tag
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="object" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="classid" type="input">
+ <text>Classid</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>Codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="codetype" type="list">
+ <text>Codetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="data" type="url">
+ <text>Data</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="standby" type="input">
+ <text>Standby</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+ <attr name="declare" type="check">
+ <text>Declare</text>
+ <location col="1" row="10" />
+ </attr>
+
+ <attr name="usemap" type="input">
+ <text>Usemap</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/ol.tag b/quanta/data/dtep/xhtml-strict/ol.tag
new file mode 100644
index 00000000..25c76d7a
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/ol.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ol" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/optgroup.tag b/quanta/data/dtep/xhtml-strict/optgroup.tag
new file mode 100644
index 00000000..08a52ff5
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/optgroup.tag
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="optgroup" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="1" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+<children>
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/option.tag b/quanta/data/dtep/xhtml-strict/option.tag
new file mode 100644
index 00000000..a1c646ea
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/option.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="option" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <attr name="disabled" type="list">
+ <text>Disabled</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>disabled</item>
+ </items>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/p.tag b/quanta/data/dtep/xhtml-strict/p.tag
new file mode 100644
index 00000000..4c5e225f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/p.tag
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasScript="1" hasCore="1" hasI18n="1">
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/param.tag b/quanta/data/dtep/xhtml-strict/param.tag
new file mode 100644
index 00000000..347cc722
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/param.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="param" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valuetype" type="list">
+ <text>Valuetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>data</item>
+ <item>ref</item>
+ <item>object</item>
+ </items>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/pre.tag b/quanta/data/dtep/xhtml-strict/pre.tag
new file mode 100644
index 00000000..9abff9a7
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/pre.tag
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="pre" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/q.tag b/quanta/data/dtep/xhtml-strict/q.tag
new file mode 100644
index 00000000..ebb1b878
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/q.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="q" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/samp.tag b/quanta/data/dtep/xhtml-strict/samp.tag
new file mode 100644
index 00000000..2ec41eb4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/samp.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="samp" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/script.tag b/quanta/data/dtep/xhtml-strict/script.tag
new file mode 100644
index 00000000..d87e8615
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/script.tag
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="script">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>text/css</item>
+ <item>text/php</item>
+ <item>text/javascript</item>
+ <item>application/x-javascript</item>
+ </items>
+ </attr>
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>Defer</text>
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/select.tag b/quanta/data/dtep/xhtml-strict/select.tag
new file mode 100644
index 00000000..d0c87373
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/select.tag
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="select" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="multiple" type="check">
+ <text>Multiple</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="optgroup" />
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/small.tag b/quanta/data/dtep/xhtml-strict/small.tag
new file mode 100644
index 00000000..0fdbe561
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/small.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="small" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/span.tag b/quanta/data/dtep/xhtml-strict/span.tag
new file mode 100644
index 00000000..ca85ab65
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/span.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="span" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/strong.tag b/quanta/data/dtep/xhtml-strict/strong.tag
new file mode 100644
index 00000000..98d57d89
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/strong.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/style.tag b/quanta/data/dtep/xhtml-strict/style.tag
new file mode 100644
index 00000000..aa052448
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/style.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="style" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ <items>
+ <item>all</item>
+ <item>aural</item>
+ <item>braille</item>
+ <item>embossed</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>projection</item>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ </items>
+ </attr>
+
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/sub.tag b/quanta/data/dtep/xhtml-strict/sub.tag
new file mode 100644
index 00000000..5691c5f0
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/sub.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sub" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/sup.tag b/quanta/data/dtep/xhtml-strict/sup.tag
new file mode 100644
index 00000000..33e052d3
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/sup.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sup" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/table.tag b/quanta/data/dtep/xhtml-strict/table.tag
new file mode 100644
index 00000000..aa22e02c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/table.tag
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="cellspacing" type="input">
+ <text>Cellspacing</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Set in pixels</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="cellpadding" type="input">
+ <text>Cellpadding</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="frame" type="list">
+ <text>Frame</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>above</item>
+ <item>below</item>
+ <item>border</item>
+ <item>box</item>
+ <item>hsides</item>
+ <item>lhs</item>
+ <item>rhs</item>
+ <item>void</item>
+ <item>vsides</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="rules" type="list">
+ <text>Rules</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>none</item>
+ <item>groups</item>
+ <item>rows</item>
+ <item>cols</item>
+ <item>all</item>
+ </items>
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="summary" type="input">
+ <text>Summary</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+<children>
+<child name="caption" />
+<child name="col" />
+<child name="colgroup" />
+<child name="thead" />
+<child name="tfoot" />
+<child name="tbody" />
+<child name="tr" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/tbody.tag b/quanta/data/dtep/xhtml-strict/tbody.tag
new file mode 100644
index 00000000..db13711d
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/tbody.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tbody" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/td.tag b/quanta/data/dtep/xhtml-strict/td.tag
new file mode 100644
index 00000000..48775d37
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/td.tag
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="td" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="rowspan" type="input">
+ <text>Rowspan</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>Colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input">
+ <text>Headers</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+ <attr name="abbr" type="input">
+ <text>Abbr</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ </attr>
+
+ <attr name="scope" type="list">
+ <text>Scope</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input">
+ <text>Axis</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/textarea.tag b/quanta/data/dtep/xhtml-strict/textarea.tag
new file mode 100644
index 00000000..9c94dc0f
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/textarea.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="textarea" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="4" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Cols</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>Onselect</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/tfoot.tag b/quanta/data/dtep/xhtml-strict/tfoot.tag
new file mode 100644
index 00000000..e07605f4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/tfoot.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tfoot" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/th.tag b/quanta/data/dtep/xhtml-strict/th.tag
new file mode 100644
index 00000000..d5c619f2
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/th.tag
@@ -0,0 +1,148 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="th" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="rowspan" type="input">
+ <text>Rowspan</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>Colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input">
+ <text>Headers</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+ <attr name="abbr" type="input">
+ <text>Abbr</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ </attr>
+
+ <attr name="scope" type="list">
+ <text>Scope</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input">
+ <text>Axis</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/thead.tag b/quanta/data/dtep/xhtml-strict/thead.tag
new file mode 100644
index 00000000..059263d1
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/thead.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="thead" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/title.tag b/quanta/data/dtep/xhtml-strict/title.tag
new file mode 100644
index 00000000..f24df571
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/title.tag
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="title" hasI18n="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+</attr>
+<children>
+ <child name="#text" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/tr.tag b/quanta/data/dtep/xhtml-strict/tr.tag
new file mode 100644
index 00000000..4baf805c
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/tr.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tr" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+
+<children>
+<child name="th" />
+<child name="td" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/tt.tag b/quanta/data/dtep/xhtml-strict/tt.tag
new file mode 100644
index 00000000..a7506a8b
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/tt.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tt" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/ul.tag b/quanta/data/dtep/xhtml-strict/ul.tag
new file mode 100644
index 00000000..bd4404c4
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/ul.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml-strict/var.tag b/quanta/data/dtep/xhtml-strict/var.tag
new file mode 100644
index 00000000..1c20c088
--- /dev/null
+++ b/quanta/data/dtep/xhtml-strict/var.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="var" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/Makefile.am b/quanta/data/dtep/xhtml/Makefile.am
new file mode 100644
index 00000000..6fb654db
--- /dev/null
+++ b/quanta/data/dtep/xhtml/Makefile.am
@@ -0,0 +1,3 @@
+quanta_DATA = basefont.tag font.tag isindex.tag description.rc a.tag abbr.tag acronym.tag address.tag applet.tag area.tag b.tag base.tag bdo.tag big.tag blockquote.tag body.tag br.tag button.tag caption.tag center.tag cite.tag code.tag col.tag colgroup.tag dd.tag del.tag dfn.tag dir.tag div.tag dl.tag dt.tag em.tag fieldset.tag form.tag head.tag headings.tag hr.tag html.tag i.tag iframe.tag img.tag input.tag ins.tag kbd.tag label.tag legend.tag li.tag link.tag map.tag menu.tag meta.tag noframes.tag noscript.tag object.tag ol.tag optgroup.tag option.tag p.tag param.tag pre.tag q.tag s.tag samp.tag script.tag select.tag small.tag span.tag strike.tag strong.tag style.tag sub.tag sup.tag table.tag tbody.tag td.tag textarea.tag tfoot.tag th.tag thead.tag title.tag tr.tag tt.tag u.tag ul.tag var.tag common.tag
+quantadir = ${quanta_datadir}/dtep/xhtml
+
diff --git a/quanta/data/dtep/xhtml/a.tag b/quanta/data/dtep/xhtml/a.tag
new file mode 100644
index 00000000..9140cd66
--- /dev/null
+++ b/quanta/data/dtep/xhtml/a.tag
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1" hasScript="1" hasFocus="1">
+
+ <attr name="href" type="url" source="selection">
+ <text>Href</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="rel" type="input">
+ <text>Rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>Rev</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>Hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/abbr.tag b/quanta/data/dtep/xhtml/abbr.tag
new file mode 100644
index 00000000..9748630f
--- /dev/null
+++ b/quanta/data/dtep/xhtml/abbr.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="abbr" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/acronym.tag b/quanta/data/dtep/xhtml/acronym.tag
new file mode 100644
index 00000000..93d73b08
--- /dev/null
+++ b/quanta/data/dtep/xhtml/acronym.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="acronym" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/address.tag b/quanta/data/dtep/xhtml/address.tag
new file mode 100644
index 00000000..6a309b43
--- /dev/null
+++ b/quanta/data/dtep/xhtml/address.tag
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="address" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="p" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/applet.tag b/quanta/data/dtep/xhtml/applet.tag
new file mode 100644
index 00000000..98aed01a
--- /dev/null
+++ b/quanta/data/dtep/xhtml/applet.tag
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="applet" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>Codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="code" type="input">
+ <text>Code</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="object" type="input">
+ <text>Object</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="7" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>Vspace</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+<children>
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/area.tag b/quanta/data/dtep/xhtml/area.tag
new file mode 100644
index 00000000..7bbf41b0
--- /dev/null
+++ b/quanta/data/dtep/xhtml/area.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="area" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="shape" type="list">
+ <text>Shape</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="input">
+ <text>Coords</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>Href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2"/>
+ </attr>
+
+ <attr name="nohref" type="check">
+ <text>Nohref</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2"/>
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/b.tag b/quanta/data/dtep/xhtml/b.tag
new file mode 100644
index 00000000..dac70a04
--- /dev/null
+++ b/quanta/data/dtep/xhtml/b.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="b" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/base.tag b/quanta/data/dtep/xhtml/base.tag
new file mode 100644
index 00000000..2b34083d
--- /dev/null
+++ b/quanta/data/dtep/xhtml/base.tag
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="base" single="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" > <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="href" type="input">
+ <text>Href</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/basefont.tag b/quanta/data/dtep/xhtml/basefont.tag
new file mode 100644
index 00000000..68c3aed7
--- /dev/null
+++ b/quanta/data/dtep/xhtml/basefont.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="basefont" single="1">
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ </attr>
+
+ <attr name="id" type="input" >
+ <text>Id</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/bdo.tag b/quanta/data/dtep/xhtml/bdo.tag
new file mode 100644
index 00000000..2a592a37
--- /dev/null
+++ b/quanta/data/dtep/xhtml/bdo.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="bdo" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/big.tag b/quanta/data/dtep/xhtml/big.tag
new file mode 100644
index 00000000..bbf21a7c
--- /dev/null
+++ b/quanta/data/dtep/xhtml/big.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="big" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/blockquote.tag b/quanta/data/dtep/xhtml/blockquote.tag
new file mode 100644
index 00000000..82709643
--- /dev/null
+++ b/quanta/data/dtep/xhtml/blockquote.tag
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="blockquote" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/body.tag b/quanta/data/dtep/xhtml/body.tag
new file mode 100644
index 00000000..c7fe5941
--- /dev/null
+++ b/quanta/data/dtep/xhtml/body.tag
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="body" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="background" type="url">
+ <text>BG image</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>BG color</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="1" />
+ </attr>
+
+ <attr name="text" type="color">
+ <text>Text color</text>
+ <textlocation col="0" row="2" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="2" />
+ </attr>
+
+ <attr name="link" type="color">
+ <text>Link color</text>
+ <textlocation col="0" row="3" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="3" />
+ </attr>
+
+ <attr name="alink" type="color">
+ <text>Active link color</text>
+ <textlocation col="0" row="4" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="4" />
+ </attr>
+
+ <attr name="vlink" type="color">
+ <text>Visited link color</text>
+ <textlocation col="0" row="5" />
+ <tooltip>Deprecated</tooltip>
+ <location col="2" row="5" />
+ </attr>
+
+ <attr name="onload" type="input">
+ <text>Onload</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>Onunload</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/br.tag b/quanta/data/dtep/xhtml/br.tag
new file mode 100644
index 00000000..738c05d8
--- /dev/null
+++ b/quanta/data/dtep/xhtml/br.tag
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="br" hasCore="1" single="1" >
+
+ <attr name="clear" type="list">
+ <text>Clear</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>all</item>
+ <item>right</item>
+ <item>none</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/button.tag b/quanta/data/dtep/xhtml/button.tag
new file mode 100644
index 00000000..011def6a
--- /dev/null
+++ b/quanta/data/dtep/xhtml/button.tag
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="button" hasFocus="1" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <items>
+ <item>button</item>
+ <item>reset</item>
+ <item>submit</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="3" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="font" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="ins" />
+<child name="kbd" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/caption.tag b/quanta/data/dtep/xhtml/caption.tag
new file mode 100644
index 00000000..8936eb10
--- /dev/null
+++ b/quanta/data/dtep/xhtml/caption.tag
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="caption" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/center.tag b/quanta/data/dtep/xhtml/center.tag
new file mode 100644
index 00000000..860eff90
--- /dev/null
+++ b/quanta/data/dtep/xhtml/center.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="center" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/cite.tag b/quanta/data/dtep/xhtml/cite.tag
new file mode 100644
index 00000000..57f00da6
--- /dev/null
+++ b/quanta/data/dtep/xhtml/cite.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cite" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/code.tag b/quanta/data/dtep/xhtml/code.tag
new file mode 100644
index 00000000..e96dfd0b
--- /dev/null
+++ b/quanta/data/dtep/xhtml/code.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="code" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/col.tag b/quanta/data/dtep/xhtml/col.tag
new file mode 100644
index 00000000..b86c06e6
--- /dev/null
+++ b/quanta/data/dtep/xhtml/col.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="col" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/colgroup.tag b/quanta/data/dtep/xhtml/colgroup.tag
new file mode 100644
index 00000000..d4ecc9a8
--- /dev/null
+++ b/quanta/data/dtep/xhtml/colgroup.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="colgroup" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>Span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+<children>
+<child name="col" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/common.tag b/quanta/data/dtep/xhtml/common.tag
new file mode 100644
index 00000000..1fd94db2
--- /dev/null
+++ b/quanta/data/dtep/xhtml/common.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="lang" type="input">
+ </attr>
+ <attr name="xml:lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml/dd.tag b/quanta/data/dtep/xhtml/dd.tag
new file mode 100644
index 00000000..7b6779b9
--- /dev/null
+++ b/quanta/data/dtep/xhtml/dd.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dd" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/del.tag b/quanta/data/dtep/xhtml/del.tag
new file mode 100644
index 00000000..f4026744
--- /dev/null
+++ b/quanta/data/dtep/xhtml/del.tag
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="del" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>Datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/description.rc b/quanta/data/dtep/xhtml/description.rc
new file mode 100644
index 00000000..cae32ab0
--- /dev/null
+++ b/quanta/data/dtep/xhtml/description.rc
@@ -0,0 +1,68 @@
+[General]
+Name = -//W3C//DTD XHTML 1.0 Transitional//EN
+NickName = XHTML 1.0 Transitional
+URL = http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
+DoctypeString = html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script, Focus, Others
+NumOfPages = 4
+CaseSensitive = true
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Focus]
+Attributes = accesskey, tabindex, onfocus, onblur
+
+[Others]
+Attributes = name, longdesc, ismap, usemap
+
+[Page1]
+Title = Core and i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Page3]
+Title= Focus
+Groups=Focus
+
+[Page4]
+Title= Others
+Groups=Others
+
+[Extra rules]
+BooleanAttributes = complex
+Single Tag Style = XML
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images
+No_Name = No Images
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links (anchor)
+No_Name = No Links (anchor)
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
diff --git a/quanta/data/dtep/xhtml/dfn.tag b/quanta/data/dtep/xhtml/dfn.tag
new file mode 100644
index 00000000..dcd1fbb9
--- /dev/null
+++ b/quanta/data/dtep/xhtml/dfn.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dfn" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/dir.tag b/quanta/data/dtep/xhtml/dir.tag
new file mode 100644
index 00000000..13612182
--- /dev/null
+++ b/quanta/data/dtep/xhtml/dir.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dir" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="0" />
+ </attr>
+
+<children>
+<child name="li" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/div.tag b/quanta/data/dtep/xhtml/div.tag
new file mode 100644
index 00000000..21a5b47c
--- /dev/null
+++ b/quanta/data/dtep/xhtml/div.tag
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="div" hasScript="1" hasCore="1" hasI18n="1" scope="paragraph">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/dl.tag b/quanta/data/dtep/xhtml/dl.tag
new file mode 100644
index 00000000..1f38c5a0
--- /dev/null
+++ b/quanta/data/dtep/xhtml/dl.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dl" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="compact" type="check">
+ <text>compact</text>
+ <location col="0" row="0" />
+ </attr>
+
+<children>
+<child name="dt" />
+<child name="dd" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/dt.tag b/quanta/data/dtep/xhtml/dt.tag
new file mode 100644
index 00000000..4d9192aa
--- /dev/null
+++ b/quanta/data/dtep/xhtml/dt.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dt" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/em.tag b/quanta/data/dtep/xhtml/em.tag
new file mode 100644
index 00000000..3c5005b1
--- /dev/null
+++ b/quanta/data/dtep/xhtml/em.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="em" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/fieldset.tag b/quanta/data/dtep/xhtml/fieldset.tag
new file mode 100644
index 00000000..550b5e7f
--- /dev/null
+++ b/quanta/data/dtep/xhtml/fieldset.tag
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="legend" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/font.tag b/quanta/data/dtep/xhtml/font.tag
new file mode 100644
index 00000000..61c00a64
--- /dev/null
+++ b/quanta/data/dtep/xhtml/font.tag
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="font" hasCore="1" hasI18n="1">
+
+ <attr name="color" type="color">
+ <text>Color</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Font color</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="face" type="input">
+ <text>Face</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="size" type="list">
+ <text>Size</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2"/>
+ <items>
+ <item>+1</item>
+ <item>-1</item>
+ <item>+2</item>
+ <item>-2</item>
+ <item>+3</item>
+ <item>-3</item>
+ <item>+4</item>
+ <item>-4</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
+ <item>4</item>
+ <item>5</item>
+ <item>6</item>
+ <item>7</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/form.tag b/quanta/data/dtep/xhtml/form.tag
new file mode 100644
index 00000000..e913755e
--- /dev/null
+++ b/quanta/data/dtep/xhtml/form.tag
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="form" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="url">
+ <text>Action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>Method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3"/>
+ <items>
+ <item>get</item>
+ <item>post</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>Enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>Accept</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="accept-charset" type="input">
+ <text>Accept-charset</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+ <attr name="onsubmit" type="input">
+ <text>Onsubmit</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="onreset" type="input">
+ <text>Onreset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3"/>
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="3"/>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3"/>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/head.tag b/quanta/data/dtep/xhtml/head.tag
new file mode 100644
index 00000000..9305caea
--- /dev/null
+++ b/quanta/data/dtep/xhtml/head.tag
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="head" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="profile" type="url">
+ <text>Profile</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="base" />
+<child name="link" />
+<child name="meta" usage="required" />
+<child name="object" />
+<child name="title" usage="required" />
+<child name="script" />
+<child name="style" />
+<child name="isindex" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/headings.tag b/quanta/data/dtep/xhtml/headings.tag
new file mode 100644
index 00000000..37e6eca2
--- /dev/null
+++ b/quanta/data/dtep/xhtml/headings.tag
@@ -0,0 +1,369 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/hr.tag b/quanta/data/dtep/xhtml/hr.tag
new file mode 100644
index 00000000..c0f16a62
--- /dev/null
+++ b/quanta/data/dtep/xhtml/hr.tag
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="hr" hasScript="1" hasCore="1" single="1" >
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="noshade" type="check" >
+ <text>No shade</text>
+ <location col="0" row="3"/>
+ </attr>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/html.tag b/quanta/data/dtep/xhtml/html.tag
new file mode 100644
index 00000000..afc592c3
--- /dev/null
+++ b/quanta/data/dtep/xhtml/html.tag
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="html" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="xmlns" type="list">
+ <text>Xmlns</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>http://www.w3.org/1999/xhtml</item>
+ </items>
+ </attr>
+
+<children>
+<child name="head" />
+<child name="body" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/i.tag b/quanta/data/dtep/xhtml/i.tag
new file mode 100644
index 00000000..45855df4
--- /dev/null
+++ b/quanta/data/dtep/xhtml/i.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="i" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/iframe.tag b/quanta/data/dtep/xhtml/iframe.tag
new file mode 100644
index 00000000..7c09ad13
--- /dev/null
+++ b/quanta/data/dtep/xhtml/iframe.tag
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="iframe" hasCore="1" hasI18n="1">
+
+ <attr name="longdesc" type="url">
+ <text>Longdesc</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="scrolling" type="list">
+ <text>Scrolling</text>
+ <textlocation col="0" row="4" />
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ <item>auto</item>
+ </items>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="7" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="marginheight" type="input">
+ <text>Marginheight</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="marginwidth" type="input">
+ <text>Marginwidth</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+ <attr name="frameborder" type="list">
+ <text>Frameborder</text>
+ <textlocation col="0" row="10" />
+ <items>
+ <item>1</item>
+ <item>0</item>
+ </items>
+ <location col="1" row="10" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" />
+ </attr>
+
+ <attr name="longdesc" type="input">
+ <text>Longdesc</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" />
+ </attr>
+
+<children>
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/img.tag b/quanta/data/dtep/xhtml/img.tag
new file mode 100644
index 00000000..fd2c4e9c
--- /dev/null
+++ b/quanta/data/dtep/xhtml/img.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="img" hasCore="1" hasI18n="1" hasScript="1" hasOthers="1" single="1">
+
+ <attr name="src" type="url">
+ <text>src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>alt</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>Vspace</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/input.tag b/quanta/data/dtep/xhtml/input.tag
new file mode 100644
index 00000000..a6a2b3cc
--- /dev/null
+++ b/quanta/data/dtep/xhtml/input.tag
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="input" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>Checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>Number of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>Maxlength</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="usemap" type="url">
+ <text>Usemap</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Readonly</text>
+ <location col="3" row="3" colspan="1" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>Accept</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>Alt</text>
+ <textlocation col="0" row="6" colspan="1" />
+ <location col="1" row="6" colspan="3" />
+ <tooltip>Alternate text for image</tooltip>
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>Onselect</text>
+ <textlocation col="0" row="7" colspan="1" />
+ <location col="1" row="7" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="9" colspan="1" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="10" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="10" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/ins.tag b/quanta/data/dtep/xhtml/ins.tag
new file mode 100644
index 00000000..e3b082e8
--- /dev/null
+++ b/quanta/data/dtep/xhtml/ins.tag
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ins" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>Datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/isindex.tag b/quanta/data/dtep/xhtml/isindex.tag
new file mode 100644
index 00000000..53a940c3
--- /dev/null
+++ b/quanta/data/dtep/xhtml/isindex.tag
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="isindex" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="prompt" type="input">
+ <text>Prompt</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/kbd.tag b/quanta/data/dtep/xhtml/kbd.tag
new file mode 100644
index 00000000..433d0310
--- /dev/null
+++ b/quanta/data/dtep/xhtml/kbd.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="kbd" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/label.tag b/quanta/data/dtep/xhtml/label.tag
new file mode 100644
index 00000000..249d512a
--- /dev/null
+++ b/quanta/data/dtep/xhtml/label.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="label" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+ <attr name="for" type="input">
+ <text>For</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/legend.tag b/quanta/data/dtep/xhtml/legend.tag
new file mode 100644
index 00000000..18de65d3
--- /dev/null
+++ b/quanta/data/dtep/xhtml/legend.tag
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="legend" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>Accesskey</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>right</item>
+ <item>top</item>
+ <item>bottom</item>
+ </items>
+ <location col="1" row="1" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/li.tag b/quanta/data/dtep/xhtml/li.tag
new file mode 100644
index 00000000..f6644cee
--- /dev/null
+++ b/quanta/data/dtep/xhtml/li.tag
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="li" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="li" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/link.tag b/quanta/data/dtep/xhtml/link.tag
new file mode 100644
index 00000000..b5d9f5fe
--- /dev/null
+++ b/quanta/data/dtep/xhtml/link.tag
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="link" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="input">
+ <text>Rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>Rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="href" type="url">
+ <text>Href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>all</item>
+ <item>aural</item>
+ <item>braille</item>
+ <item>embossed</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>projection</item>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>Hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="target" type="input">
+ <text>Target</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/map.tag b/quanta/data/dtep/xhtml/map.tag
new file mode 100644
index 00000000..b64d44f2
--- /dev/null
+++ b/quanta/data/dtep/xhtml/map.tag
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="map" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="area" />
+<child name="blockquote" />
+<child name="center" />
+<child name="del" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="isindex" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/menu.tag b/quanta/data/dtep/xhtml/menu.tag
new file mode 100644
index 00000000..10322fc8
--- /dev/null
+++ b/quanta/data/dtep/xhtml/menu.tag
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="menu" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="0" />
+ </attr>
+
+<children>
+<child name="li" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/meta.tag b/quanta/data/dtep/xhtml/meta.tag
new file mode 100644
index 00000000..d4afefe4
--- /dev/null
+++ b/quanta/data/dtep/xhtml/meta.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>Http-equiv</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>Content</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>Scheme</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/noframes.tag b/quanta/data/dtep/xhtml/noframes.tag
new file mode 100644
index 00000000..758e6cb2
--- /dev/null
+++ b/quanta/data/dtep/xhtml/noframes.tag
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noframes" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/noscript.tag b/quanta/data/dtep/xhtml/noscript.tag
new file mode 100644
index 00000000..0c604a67
--- /dev/null
+++ b/quanta/data/dtep/xhtml/noscript.tag
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noscript" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/object.tag b/quanta/data/dtep/xhtml/object.tag
new file mode 100644
index 00000000..baebd55d
--- /dev/null
+++ b/quanta/data/dtep/xhtml/object.tag
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="object" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>Archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="classid" type="input">
+ <text>Classid</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>Codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <attr name="codetype" type="list">
+ <text>Codetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="data" type="url">
+ <text>Data</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="2" row="6" />
+ <location col="3" row="6" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <attr name="standby" type="input">
+ <text>Standby</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="declare" type="check">
+ <text>Declare</text>
+ <location col="1" row="10" />
+ </attr>
+
+ <attr name="usemap" type="input">
+ <text>Usemap</text>
+ <textlocation col="0" row="11" />
+ <location col="1" row="11" colspan="3" />
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="12" />
+ <location col="1" row="12" colspan="3" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="13" />
+ <items>
+ <item>baseline</item>
+ <item>center</item>
+ <item>left</item>
+ <item>middle</item>
+ <item>right</item>
+ <item>textbottom</item>
+ <item>textmiddle</item>
+ <item>texttop</item>
+ </items>
+ <location col="1" row="13" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="2" row="13" />
+ <location col="3" row="13" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>Hspace</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>VSpace</text>
+ <textlocation col="2" row="7" />
+ <location col="3" row="7" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/ol.tag b/quanta/data/dtep/xhtml/ol.tag
new file mode 100644
index 00000000..4a33b85a
--- /dev/null
+++ b/quanta/data/dtep/xhtml/ol.tag
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ol" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>1</item>
+ <item>a</item>
+ <item>A</item>
+ <item>i</item>
+ <item>I</item>
+ </items>
+ </attr>
+
+ <attr name="start" type="input">
+ <text>Start</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/optgroup.tag b/quanta/data/dtep/xhtml/optgroup.tag
new file mode 100644
index 00000000..08a52ff5
--- /dev/null
+++ b/quanta/data/dtep/xhtml/optgroup.tag
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="optgroup" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="1" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+<children>
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/option.tag b/quanta/data/dtep/xhtml/option.tag
new file mode 100644
index 00000000..a1c646ea
--- /dev/null
+++ b/quanta/data/dtep/xhtml/option.tag
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="option" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <attr name="disabled" type="list">
+ <text>Disabled</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>disabled</item>
+ </items>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>Label</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/p.tag b/quanta/data/dtep/xhtml/p.tag
new file mode 100644
index 00000000..aabd50f8
--- /dev/null
+++ b/quanta/data/dtep/xhtml/p.tag
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Alignment</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Deprecated</tooltip>
+ <location col="1" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ </items>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/param.tag b/quanta/data/dtep/xhtml/param.tag
new file mode 100644
index 00000000..347cc722
--- /dev/null
+++ b/quanta/data/dtep/xhtml/param.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="param" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>Value</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valuetype" type="list">
+ <text>Valuetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>data</item>
+ <item>ref</item>
+ <item>object</item>
+ </items>
+ </attr>
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/pre.tag b/quanta/data/dtep/xhtml/pre.tag
new file mode 100644
index 00000000..0b861099
--- /dev/null
+++ b/quanta/data/dtep/xhtml/pre.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="pre" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/q.tag b/quanta/data/dtep/xhtml/q.tag
new file mode 100644
index 00000000..abc31b1b
--- /dev/null
+++ b/quanta/data/dtep/xhtml/q.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="q" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="input">
+ <text>Cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/s.tag b/quanta/data/dtep/xhtml/s.tag
new file mode 100644
index 00000000..419cb720
--- /dev/null
+++ b/quanta/data/dtep/xhtml/s.tag
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="s" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/samp.tag b/quanta/data/dtep/xhtml/samp.tag
new file mode 100644
index 00000000..6cecf4e0
--- /dev/null
+++ b/quanta/data/dtep/xhtml/samp.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="samp" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/script.tag b/quanta/data/dtep/xhtml/script.tag
new file mode 100644
index 00000000..df42c39e
--- /dev/null
+++ b/quanta/data/dtep/xhtml/script.tag
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="script">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>text/css</item>
+ <item>text/php</item>
+ <item>text/javascript</item>
+ <item>application/x-javascript</item>
+ </items>
+ </attr>
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Src</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>Defer</text>
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+
+ <attr name="language" type="input">
+ <text>Language</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/select.tag b/quanta/data/dtep/xhtml/select.tag
new file mode 100644
index 00000000..d0c87373
--- /dev/null
+++ b/quanta/data/dtep/xhtml/select.tag
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="select" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="multiple" type="check">
+ <text>Multiple</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>Tabindex</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>Onfocus</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>Onblur</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>Size</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="optgroup" />
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/small.tag b/quanta/data/dtep/xhtml/small.tag
new file mode 100644
index 00000000..4d045201
--- /dev/null
+++ b/quanta/data/dtep/xhtml/small.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="small" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/span.tag b/quanta/data/dtep/xhtml/span.tag
new file mode 100644
index 00000000..d674850e
--- /dev/null
+++ b/quanta/data/dtep/xhtml/span.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="span" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/strike.tag b/quanta/data/dtep/xhtml/strike.tag
new file mode 100644
index 00000000..4907d5be
--- /dev/null
+++ b/quanta/data/dtep/xhtml/strike.tag
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strike" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/strong.tag b/quanta/data/dtep/xhtml/strong.tag
new file mode 100644
index 00000000..2be3da65
--- /dev/null
+++ b/quanta/data/dtep/xhtml/strong.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/style.tag b/quanta/data/dtep/xhtml/style.tag
new file mode 100644
index 00000000..781181b4
--- /dev/null
+++ b/quanta/data/dtep/xhtml/style.tag
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="style" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>Media</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ <items>
+ <item>all</item>
+ <item>aural</item>
+ <item>braille</item>
+ <item>embossed</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>projection</item>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ </items>
+ </attr>
+
+ <attr name="title" type="input">
+ <text>Title</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>Xml:space</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/sub.tag b/quanta/data/dtep/xhtml/sub.tag
new file mode 100644
index 00000000..ec46544b
--- /dev/null
+++ b/quanta/data/dtep/xhtml/sub.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sub" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/sup.tag b/quanta/data/dtep/xhtml/sup.tag
new file mode 100644
index 00000000..176cf71a
--- /dev/null
+++ b/quanta/data/dtep/xhtml/sup.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sup" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/table.tag b/quanta/data/dtep/xhtml/table.tag
new file mode 100644
index 00000000..b76d5095
--- /dev/null
+++ b/quanta/data/dtep/xhtml/table.tag
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="cellspacing" type="input">
+ <text>Cellspacing</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>Border</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Set in pixels</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="cellpadding" type="input">
+ <text>Cellpadding</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="frame" type="list">
+ <text>Frame</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>above</item>
+ <item>below</item>
+ <item>border</item>
+ <item>box</item>
+ <item>hsides</item>
+ <item>lhs</item>
+ <item>rhs</item>
+ <item>void</item>
+ <item>vsides</item>
+ </items>
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <attr name="rules" type="list">
+ <text>Rules</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>none</item>
+ <item>groups</item>
+ <item>rows</item>
+ <item>cols</item>
+ <item>all</item>
+ </items>
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="summary" type="input">
+ <text>Summary</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="5" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ </items>
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Background color</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+<children>
+<child name="caption" />
+<child name="col" />
+<child name="colgroup" />
+<child name="thead" />
+<child name="tfoot" />
+<child name="tbody" />
+<child name="tr" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/tbody.tag b/quanta/data/dtep/xhtml/tbody.tag
new file mode 100644
index 00000000..db13711d
--- /dev/null
+++ b/quanta/data/dtep/xhtml/tbody.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tbody" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/td.tag b/quanta/data/dtep/xhtml/td.tag
new file mode 100644
index 00000000..e46c9414
--- /dev/null
+++ b/quanta/data/dtep/xhtml/td.tag
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="td" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="rowspan" type="input">
+ <text>Rowspan</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>Colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input">
+ <text>Headers</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+ <attr name="abbr" type="input">
+ <text>Abbr</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ </attr>
+
+ <attr name="scope" type="list">
+ <text>Scope</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input">
+ <text>Axis</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="2" row="6" />
+ <tooltip>Deprecated</tooltip>
+ <location col="3" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="2" row="7" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="3" row="7" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="1" row="9" colspan="2" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/textarea.tag b/quanta/data/dtep/xhtml/textarea.tag
new file mode 100644
index 00000000..ea019898
--- /dev/null
+++ b/quanta/data/dtep/xhtml/textarea.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="textarea" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="name" type="input">
+ <text>Name</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="4" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="cols" type="input">
+ <text>Cols</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>Disabled</text>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>Read only</text>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>Onselect</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>Onchange</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/tfoot.tag b/quanta/data/dtep/xhtml/tfoot.tag
new file mode 100644
index 00000000..e07605f4
--- /dev/null
+++ b/quanta/data/dtep/xhtml/tfoot.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tfoot" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/th.tag b/quanta/data/dtep/xhtml/th.tag
new file mode 100644
index 00000000..78b82c25
--- /dev/null
+++ b/quanta/data/dtep/xhtml/th.tag
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="th" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="rowspan" type="input">
+ <text>Rowspan</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>Colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="2" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input">
+ <text>Headers</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ </attr>
+
+ <attr name="abbr" type="input">
+ <text>Abbr</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="3"/>
+ </attr>
+
+ <attr name="scope" type="list">
+ <text>Scope</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input">
+ <text>Axis</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>Height</text>
+ <textlocation col="2" row="6" />
+ <tooltip>Deprecated</tooltip>
+ <location col="3" row="6" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>Width</text>
+ <textlocation col="2" row="7" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="3" row="7" />
+ </attr>
+
+ <attr name="bgcolor" type="color">
+ <text>Bg color</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <attr name="nowrap" type="check">
+ <text>NoWrap</text>
+ <location col="1" row="9" colspan="2" />
+ <tooltip>Deprecated</tooltip>
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="applet" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="center" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="dir" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="font" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="isindex" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="menu" />
+<child name="noframes" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/thead.tag b/quanta/data/dtep/xhtml/thead.tag
new file mode 100644
index 00000000..059263d1
--- /dev/null
+++ b/quanta/data/dtep/xhtml/thead.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="thead" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/title.tag b/quanta/data/dtep/xhtml/title.tag
new file mode 100644
index 00000000..f24df571
--- /dev/null
+++ b/quanta/data/dtep/xhtml/title.tag
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="title" hasI18n="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+</attr>
+<children>
+ <child name="#text" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/tr.tag b/quanta/data/dtep/xhtml/tr.tag
new file mode 100644
index 00000000..4baf805c
--- /dev/null
+++ b/quanta/data/dtep/xhtml/tr.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tr" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>Align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>Valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>Char</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>Charoff</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+
+<children>
+<child name="th" />
+<child name="td" usage="required" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/tt.tag b/quanta/data/dtep/xhtml/tt.tag
new file mode 100644
index 00000000..08f25532
--- /dev/null
+++ b/quanta/data/dtep/xhtml/tt.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tt" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/u.tag b/quanta/data/dtep/xhtml/u.tag
new file mode 100644
index 00000000..38e47050
--- /dev/null
+++ b/quanta/data/dtep/xhtml/u.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="u" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/ul.tag b/quanta/data/dtep/xhtml/ul.tag
new file mode 100644
index 00000000..21443c5d
--- /dev/null
+++ b/quanta/data/dtep/xhtml/ul.tag
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ <items>
+ <item>disc</item>
+ <item>square</item>
+ <item>circle</item>
+ </items>
+ </attr>
+
+ <attr name="compact" type="check">
+ <text>Compact</text>
+ <tooltip>Deprecated</tooltip>
+ <location col="0" row="1" />
+ </attr>
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml/var.tag b/quanta/data/dtep/xhtml/var.tag
new file mode 100644
index 00000000..74e336d4
--- /dev/null
+++ b/quanta/data/dtep/xhtml/var.tag
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="var" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="applet" />
+<child name="acronym" />
+<child name="b" />
+<child name="basefont" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="font" />
+<child name="i" />
+<child name="iframe" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="s" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strike" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="u" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/Makefile.am b/quanta/data/dtep/xhtml11/Makefile.am
new file mode 100644
index 00000000..34115590
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/Makefile.am
@@ -0,0 +1,14 @@
+quanta_DATA = a.tag abbr.tag acronym.tag address.tag area.tag b.tag base.tag \
+ bdo.tag big.tag blockquote.tag body.tag br.tag caption.tag cite.tag \
+ code.tag col.tag colgroup.tag dd.tag del.tag description.rc dfn.tag \
+ div.tag dl.tag dt.tag em.tag empty.tag fieldset.tag form.tag head.tag \
+ headings.tag hr.tag html.tag i.tag image.tag input.tag ins.tag kbd.tag \
+ label.tag legend.tag li.tag link.tag map.tag meta.tag noscript.tag \
+ object.tag ol.tag optgroup.tag option.tag p.tag param.tag pre.tag \
+ q.tag rb.tag rbc.tag rp.tag rt.tag rtc.tag ruby.tag samp.tag script.tag \
+ select.tag small.tag span.tag strong.tag style.tag sub.tag sup.tag \
+ table.tag tbody.tag td.tag textarea.tag tfoot.tag th.tag thead.tag \
+ title.tag tr.tag tt.tag ul.tag var.tag button.tag applet.tag common.tag
+
+quantadir = ${quanta_datadir}/dtep/xhtml11
+
diff --git a/quanta/data/dtep/xhtml11/a.tag b/quanta/data/dtep/xhtml11/a.tag
new file mode 100644
index 00000000..eda33421
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/a.tag
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="a" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="href" type="input" source="selection">
+ <text>href</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3"/>
+ </attr>
+
+ <attr name="rel" type="input">
+ <text>rel</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>rev</text>
+ <textlocation col="2" row="2" />
+ <location col="3" row="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>application/mathml+xml</item>
+ <item>application/rss+xml</item>
+ <item>application/xhtml+xml</item>
+ <item>application/xml</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ <item>text/xml</item>
+ </items>
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>onfocus</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>onblur</text>
+ <textlocation col="0" row="9" />
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <attr name="hreflang" type="input" />
+ <attr name="charset" type="input" />
+ <attr name="accesskey" type="input" />
+ <attr name="tabindex" type="input" />
+ <attr name="shape" type="list">
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+ <attr name="coords" type="input" />
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/abbr.tag b/quanta/data/dtep/xhtml11/abbr.tag
new file mode 100644
index 00000000..b988c322
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/abbr.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="abbr" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/acronym.tag b/quanta/data/dtep/xhtml11/acronym.tag
new file mode 100644
index 00000000..12bf30f1
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/acronym.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="acronym" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/address.tag b/quanta/data/dtep/xhtml11/address.tag
new file mode 100644
index 00000000..3b1f699e
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/address.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="address" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/applet.tag b/quanta/data/dtep/xhtml11/applet.tag
new file mode 100644
index 00000000..1a9d5acd
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/applet.tag
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="applet" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="classid" type="input">
+ <text>classid</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="code" type="input">
+ <text>code</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="object" type="input">
+ <text>object</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>height</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="align" type="input">
+ <text>align</text>
+ <textlocation col="2" row="7" />
+ <location col="3" row="7" colspan="1" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>hspace</text>
+ <textlocation col="2" row="8" />
+ <location col="3" row="8" colspan="1" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>vspace</text>
+ <textlocation col="2" row="9" />
+ <location col="3" row="9" colspan="1" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="di" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/area.tag b/quanta/data/dtep/xhtml11/area.tag
new file mode 100644
index 00000000..1c992e3b
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/area.tag
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="area" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="shape" type="list">
+ <text>shape</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2"/>
+ <items>
+ <item>rect</item>
+ <item>circle</item>
+ <item>poly</item>
+ <item>default</item>
+ </items>
+ </attr>
+
+ <attr name="coords" type="text">
+ <text>coords</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2"/>
+ </attr>
+
+ <attr name="href" type="url">
+ <text>href</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2"/>
+ </attr>
+
+ <attr name="accesskey" type="input">
+ <text>accesskey</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="1" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>alt</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2"/>
+ </attr>
+
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/b.tag b/quanta/data/dtep/xhtml11/b.tag
new file mode 100644
index 00000000..54e28332
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/b.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="b" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/base.tag b/quanta/data/dtep/xhtml11/base.tag
new file mode 100644
index 00000000..200f1c1d
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/base.tag
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="base" single="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" > <text>Id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="href" type="input">
+ <text>Href</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/bdo.tag b/quanta/data/dtep/xhtml11/bdo.tag
new file mode 100644
index 00000000..47fc984f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/bdo.tag
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="bdo" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="dir" type="list">
+ <text>dir</text>
+ <textlocation col="0" row="1" />
+ <tooltip>This is not widely supported</tooltip>
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>ltr</item>
+ <item>rtl</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/big.tag b/quanta/data/dtep/xhtml11/big.tag
new file mode 100644
index 00000000..b951e28b
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/big.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="big" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/blockquote.tag b/quanta/data/dtep/xhtml11/blockquote.tag
new file mode 100644
index 00000000..b74910eb
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/blockquote.tag
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="blockquote" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cite" type="input">
+ <text>cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="di" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/body.tag b/quanta/data/dtep/xhtml11/body.tag
new file mode 100644
index 00000000..6b46aba5
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/body.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="body" hasScript="1" hasCore="1" hasI18n="1">
+ <attr name="onload" type="input">
+ <text>onload</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="onunload" type="input">
+ <text>onunload</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/br.tag b/quanta/data/dtep/xhtml11/br.tag
new file mode 100644
index 00000000..d4d2bb06
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/br.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="br" hasCore="1" single="1" />
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/button.tag b/quanta/data/dtep/xhtml11/button.tag
new file mode 100644
index 00000000..c659c0e3
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/button.tag
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="button" hasFocus="1" hasCore="1" hasI18n="1" hasScript="1">
+
+<attr name="value" type="input" />
+
+<attr name="type" type="list">
+<items>
+<item>submit</item>
+<item>button</item>
+<item>reset</item>
+</items>
+</attr>
+
+<attr name="disabled" type="check" />
+
+<children>
+<child name="#text" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="ins" />
+<child name="kbd" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/caption.tag b/quanta/data/dtep/xhtml11/caption.tag
new file mode 100644
index 00000000..0d433812
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/caption.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="caption" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/cite.tag b/quanta/data/dtep/xhtml11/cite.tag
new file mode 100644
index 00000000..58cb492f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/cite.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="cite" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/code.tag b/quanta/data/dtep/xhtml11/code.tag
new file mode 100644
index 00000000..b29a87d4
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/code.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="code" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/col.tag b/quanta/data/dtep/xhtml11/col.tag
new file mode 100644
index 00000000..9bad383d
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/col.tag
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="col" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation col="0" row="4" />
+ <tooltip>alignment character for cells</tooltip>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation col="0" row="5" />
+ <tooltip>alignment character offset</tooltip>
+ <location col="1" row="5" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/colgroup.tag b/quanta/data/dtep/xhtml11/colgroup.tag
new file mode 100644
index 00000000..a0dfb5d2
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/colgroup.tag
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="colgroup" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels
+You can add multiple values with commas</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="span" type="input">
+ <text>span</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="3" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input">
+ <text>char</text>
+ <textlocation col="0" row="4" />
+ <tooltip>alignment character for cells</tooltip>
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="charoff" type="input">
+ <text>charoff</text>
+ <textlocation col="0" row="5" />
+ <tooltip>alignment character offset</tooltip>
+ <location col="1" row="5" />
+ </attr>
+<children>
+<child name="col" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/common.tag b/quanta/data/dtep/xhtml11/common.tag
new file mode 100644
index 00000000..0ff1796a
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/common.tag
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="Core" common="yes">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ </attr>
+ <attr name="class" type="list" source="dcop" interface="QuantaIf" method="selectors(QString)" arguments="%tagname%" >
+ </attr>
+ <attr name="style" type="css-style">
+ </attr>
+ <attr name="title" type="input">
+ </attr>
+</tag>
+
+<tag name="I18n" common="yes">
+ <attr name="xml:lang" type="input">
+ </attr>
+ <attr name="dir" type="input">
+ </attr>
+</tag>
+
+<tag name="Script" common="yes">
+ <attr name="onclick" type="input">
+ </attr>
+ <attr name="ondblclick" type="input">
+ </attr>
+ <attr name="onmousedown" type="input">
+ </attr>
+ <attr name="onmouseup" type="input">
+ </attr>
+ <attr name="onmouseover" type="input">
+ </attr>
+ <attr name="onmousemove" type="input">
+ </attr>
+ <attr name="onmouseout" type="input">
+ </attr>
+ <attr name="onkeypress" type="input">
+ </attr>
+ <attr name="onkeydown" type="input">
+ </attr>
+ <attr name="onkeyup" type="input">
+ </attr>
+</tag>
+
+<tag name="Focus" common="yes">
+ <attr name="accesskey" type="input">
+ </attr>
+ <attr name="tabindex" type="input">
+ </attr>
+ <attr name="onfocus" type="input">
+ </attr>
+ <attr name="onblur" type="input">
+ </attr>
+</tag>
+
+</TAGS> \ No newline at end of file
diff --git a/quanta/data/dtep/xhtml11/dd.tag b/quanta/data/dtep/xhtml11/dd.tag
new file mode 100644
index 00000000..97992bf9
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/dd.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dd" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/del.tag b/quanta/data/dtep/xhtml11/del.tag
new file mode 100644
index 00000000..1a7c17db
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/del.tag
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="del" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="input">
+ <text>cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/description.rc b/quanta/data/dtep/xhtml11/description.rc
new file mode 100644
index 00000000..f3e84e1b
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/description.rc
@@ -0,0 +1,58 @@
+[General]
+Name = -//W3C//DTD XHTML 1.1//EN
+NickName = XHTML 1.1
+URL = http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd
+DoctypeString = html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
+MimeTypes = text/html
+DefaultExtension = html
+Groups = Core, I18n, Script,Focus
+NumOfPages = 3
+CaseSensitive = true
+Documentation = HTML
+
+[Toolbars]
+Location = html
+Names = standard, style, tables, lists, forms, other
+
+[Page1]
+Title = Core and i18n
+Groups = Core, I18n
+
+[Page2]
+Title = Events
+Groups = Script
+
+[Page3]
+Title = Focus
+Groups = Focus
+
+[Extra rules]
+BooleanAttributes = simple
+Single Tag Style = XML
+StructGroupsCount = 3
+
+[Parsing rules]
+SpecialTags = script(language)
+MayContain = php, css
+
+[StructGroup_1]
+Name = Images (anchor)
+No_Name = No Images (anchor)
+Icon = image
+Tag = img(src)
+HasFileName = true
+
+[StructGroup_2]
+Name = Links
+No_Name = No Links
+Icon = www
+Tag = a(name,href)
+HasFileName = true
+FileNameRx = .*\||#.*
+
+[StructGroup_3]
+Name = Resources (link)
+No_Name = No Links (link)
+Icon = www
+Tag = link(href)
+HasFileName = true
diff --git a/quanta/data/dtep/xhtml11/dfn.tag b/quanta/data/dtep/xhtml11/dfn.tag
new file mode 100644
index 00000000..fbeb6d72
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/dfn.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dfn" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/div.tag b/quanta/data/dtep/xhtml11/div.tag
new file mode 100644
index 00000000..1f8500f0
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/div.tag
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="div" hasScript="1" hasCore="1" hasI18n="1" scope="paragraph">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/dl.tag b/quanta/data/dtep/xhtml11/dl.tag
new file mode 100644
index 00000000..430067b8
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/dl.tag
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dl" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="dt" />
+<child name="dd" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/dt.tag b/quanta/data/dtep/xhtml11/dt.tag
new file mode 100644
index 00000000..ef239795
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/dt.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="dt" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/em.tag b/quanta/data/dtep/xhtml11/em.tag
new file mode 100644
index 00000000..807065df
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/em.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="em" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/empty.tag b/quanta/data/dtep/xhtml11/empty.tag
new file mode 100644
index 00000000..06fe883c
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/empty.tag
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="">
+
+ <attr name="rows" type="input">
+ <text>Rows</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/fieldset.tag b/quanta/data/dtep/xhtml11/fieldset.tag
new file mode 100644
index 00000000..c2bc156f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/fieldset.tag
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fieldset" hasScript="1" hasCore="1">
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="attr" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="legend" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/form.tag b/quanta/data/dtep/xhtml11/form.tag
new file mode 100644
index 00000000..c332c515
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/form.tag
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="form" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="action" type="url">
+ <text>action</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <attr name="method" type="list">
+ <text>method</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1"/>
+ <items>
+ <item>GET</item>
+ <item>POST</item>
+ </items>
+ </attr>
+
+ <attr name="enctype" type="list">
+ <text>enctype</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="accept-charset" type="input">
+ <text>acceptcharset</text>
+ <textlocation col="2" row="3" />
+ <location col="3" row="3"/>
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>accept</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="onsubmit" type="input">
+ <text>onsubmit</text>
+ <textlocation col="2" row="5" />
+ <location col="3" row="5"/>
+ </attr>
+
+ <attr name="onreset" type="input">
+ <text>onreset</text>
+ <textlocation col="2" row="6" />
+ <location col="3" row="6"/>
+ </attr>
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/head.tag b/quanta/data/dtep/xhtml11/head.tag
new file mode 100644
index 00000000..b53932b3
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/head.tag
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="head" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="profile" type="url">
+ <text>profile</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+<children>
+<child name="base" />
+<child name="link" />
+<child name="meta" usage="required" />
+<child name="object" />
+<child name="title" usage="required" />
+<child name="script" />
+<child name="style" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/headings.tag b/quanta/data/dtep/xhtml11/headings.tag
new file mode 100644
index 00000000..eb0b4fa0
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/headings.tag
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+
+<tag name="h1" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+
+<tag name="h2" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+
+<tag name="h3" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+
+<tag name="h4" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+
+<tag name="h5" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+
+<tag name="h6" hasScript="1" hasCore="1" hasI18n="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/hr.tag b/quanta/data/dtep/xhtml11/hr.tag
new file mode 100644
index 00000000..21e1d51f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/hr.tag
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="hr" hasScript="1" hasCore="1" single="1" />
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/html.tag b/quanta/data/dtep/xhtml11/html.tag
new file mode 100644
index 00000000..22894f8d
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/html.tag
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="html" hasI18n="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="xmlns" type="list">
+ <text>xmlns</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items><item>http://www.w3.org/1999/xhtml</item></items>
+ </attr>
+
+<children>
+<child name="body" />
+<child name="head" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/i.tag b/quanta/data/dtep/xhtml11/i.tag
new file mode 100644
index 00000000..36dbd43a
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/i.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="i" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/image.tag b/quanta/data/dtep/xhtml11/image.tag
new file mode 100644
index 00000000..edeb3729
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/image.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="img" hasCore="1" hasI18n="1" hasScript="1" single="1">
+
+ <attr name="longdesc" type="url">
+ <text>longdesc</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="src" type="url">
+ <text>src</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>height</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>alt</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <attr name="usemap" type="input">
+ <text>usemap</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <attr name="ismap" type="check">
+ <text>ismap</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="3" />
+ </attr>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/input.tag b/quanta/data/dtep/xhtml11/input.tag
new file mode 100644
index 00000000..3c5361a8
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/input.tag
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="input" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1" single="1">
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <items>
+ <item>text</item>
+ <item>password</item>
+ <item>checkbox</item>
+ <item>radio</item>
+ <item>submit</item>
+ <item>reset</item>
+ <item>file</item>
+ <item>hidden</item>
+ <item>image</item>
+ <item>button</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="checked" type="check">
+ <text>checked</text>
+ <location col="3" row="0" colspan="1" />
+ <tooltip>For radio button or check box</tooltip>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>value</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>size</text>
+ <textlocation col="0" row="2" colspan="1" />
+ <location col="1" row="2" colspan="1" />
+ <tooltip>No of characters for text input</tooltip>
+ </attr>
+
+ <attr name="maxlength" type="input">
+ <text>maxlength</text>
+ <textlocation col="2" row="2" colspan="1" />
+ <location col="3" row="2" colspan="1" />
+ <tooltip>Max characters allowed</tooltip>
+ </attr>
+
+ <attr name="alt" type="input">
+ <text>alt</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ <tooltip>Alternate text for image</tooltip>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>src</text>
+ <textlocation col="0" row="4" colspan="1" />
+ <location col="1" row="4" colspan="3" />
+ <tooltip>URL for image to use</tooltip>
+ </attr>
+
+ <attr name="accept" type="list">
+ <text>accept</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="3"/>
+ <items>
+ <item>application/x-www-form-urlencoded</item>
+ <item>multipart/form-data</item>
+ </items>
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>readonly</text>
+ <location col="3" row="5" colspan="1" />
+ </attr>
+
+ <attr name="usemap" type="input">
+ <text>use</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>onselect</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>onchange</text>
+ <textlocation col="0" row="3" colspan="1" />
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/ins.tag b/quanta/data/dtep/xhtml11/ins.tag
new file mode 100644
index 00000000..c088199f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/ins.tag
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ins" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="url">
+ <text>cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="datetime" type="input">
+ <text>datetime</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/kbd.tag b/quanta/data/dtep/xhtml11/kbd.tag
new file mode 100644
index 00000000..2b222085
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/kbd.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="kbd" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/label.tag b/quanta/data/dtep/xhtml11/label.tag
new file mode 100644
index 00000000..75fb81c6
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/label.tag
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="label" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>accesskey</text>
+ <textlocation col="2" row="0" colspan="1" />
+ <location col="3" row="0" colspan="1" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+
+ <attr name="for" type="input">
+ <text>for</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+ <attr name="onfocus" type="input">
+ <text>onfocus</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>onblur</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/legend.tag b/quanta/data/dtep/xhtml11/legend.tag
new file mode 100644
index 00000000..048dff82
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/legend.tag
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="legend" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="accesskey" type="input">
+ <text>accesskey</text>
+ <textlocation col="2" row="0" colspan="1" />
+ <location col="3" row="0" colspan="1" />
+ <tooltip>Shortcut</tooltip>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/li.tag b/quanta/data/dtep/xhtml11/li.tag
new file mode 100644
index 00000000..5ceb4358
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/li.tag
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="li" hasCore="1" hasI18n="1" hasScript="1">
+
+ <stoppingtags>
+ <stoppingtag name="li" />
+ </stoppingtags>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/link.tag b/quanta/data/dtep/xhtml11/link.tag
new file mode 100644
index 00000000..2d0e9bd8
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/link.tag
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="link" hasScript="1" hasCore="1" hasI18n="1" single="1">
+ <attr name="rel" type="input">
+ <text>rel</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="rev" type="input">
+ <text>rev</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="href" type="url">
+ <text>href</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>text/css</item>
+ <item>text/javascript</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>media</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="hreflang" type="input">
+ <text>hreflang</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>charset</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/map.tag b/quanta/data/dtep/xhtml11/map.tag
new file mode 100644
index 00000000..156f895f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/map.tag
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="map" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="address" />
+<child name="area" />
+<child name="blockquote" />
+<child name="del" />
+<child name="div" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/meta.tag b/quanta/data/dtep/xhtml11/meta.tag
new file mode 100644
index 00000000..794eb693
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/meta.tag
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="meta" hasI18n="1" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="http-equiv" type="input">
+ <text>http-equiv</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="content" type="input">
+ <text>content</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="scheme" type="input">
+ <text>scheme</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/noscript.tag b/quanta/data/dtep/xhtml11/noscript.tag
new file mode 100644
index 00000000..86b73ab5
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/noscript.tag
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="noscript" hasCore="1" hasI18n="1" hasScript="1">
+
+<children>
+<child name="address" />
+<child name="blockquote" />
+<child name="del" />
+<child name="di" />
+<child name="dl" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="ins" />
+<child name="noscript" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="script" />
+<child name="table" />
+<child name="ul" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/object.tag b/quanta/data/dtep/xhtml11/object.tag
new file mode 100644
index 00000000..3953c45b
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/object.tag
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="object" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="archive" type="input">
+ <text>archive</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="classid" type="input">
+ <text>classid</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="codebase" type="input">
+ <text>codebase</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="codetype" type="list">
+ <text>codetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="data" type="url">
+ <text>data</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+
+ <attr name="height" type="input">
+ <text>height</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" colspan="2" />
+ </attr>
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="7" />
+ <location col="1" row="7" colspan="2" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>tabindex</text>
+ <textlocation col="0" row="8" />
+ <location col="1" row="8" colspan="1" />
+ </attr>
+
+ <attr name="standby" type="input">
+ <text>standby</text>
+ <textlocation col="2" row="9" />
+ <location col="3" row="9" colspan="1" />
+ </attr>
+
+ <attr name="declare" type="check">
+ <text>declare</text>
+ <textlocation col="2" row="10" />
+ <location col="3" row="10" colspan="1" />
+ </attr>
+
+ <attr name="usemap" type="input">
+ <text>usemap</text>
+ <textlocation col="2" row="11" />
+ <location col="3" row="11" colspan="1" />
+ </attr>
+
+ <attr name="align" type="input">
+ <text>align</text>
+ <textlocation col="2" row="12" />
+ <location col="3" row="12" colspan="1" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>border</text>
+ <textlocation col="2" row="13" />
+ <location col="3" row="13" colspan="1" />
+ </attr>
+
+ <attr name="hspace" type="input">
+ <text>hspace</text>
+ <textlocation col="2" row="14" />
+ <location col="3" row="14" colspan="1" />
+ </attr>
+
+ <attr name="vspace" type="input">
+ <text>vspace</text>
+ <textlocation col="2" row="15" />
+ <location col="3" row="15" colspan="1" />
+ </attr>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="di" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="param" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/ol.tag b/quanta/data/dtep/xhtml11/ol.tag
new file mode 100644
index 00000000..25c76d7a
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/ol.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ol" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/optgroup.tag b/quanta/data/dtep/xhtml11/optgroup.tag
new file mode 100644
index 00000000..82452057
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/optgroup.tag
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="optgroup" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="disabled" type="check">
+ <text>disabled</text>
+ <location col="2" row="0" colspan="1" />
+ <tooltip>Disable the element</tooltip>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation col="0" row="1" colspan="1" />
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+<children>
+<child name="option" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/option.tag b/quanta/data/dtep/xhtml11/option.tag
new file mode 100644
index 00000000..ef02c508
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/option.tag
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="option" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="value" type="input">
+ <text>value</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="selected" type="list">
+ <text>Selected</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" />
+ <items>
+ <item>selected</item>
+ </items>
+ </attr>
+
+ <attr name="disabled" type="list">
+ <text>Disabled</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ <items>
+ <item>disabled</item>
+ </items>
+ </attr>
+
+ <attr name="label" type="input">
+ <text>label</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="option" />
+ </stoppingtags>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/p.tag b/quanta/data/dtep/xhtml11/p.tag
new file mode 100644
index 00000000..bffe7b97
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/p.tag
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="p" hasScript="1" hasCore="1" hasI18n="1">
+
+ <stoppingtags>
+ <stoppingtag name="p" />
+ <stoppingtag name="li" />
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ <stoppingtag name="dt" />
+ <stoppingtag name="dd" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/param.tag b/quanta/data/dtep/xhtml11/param.tag
new file mode 100644
index 00000000..4211b9c2
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/param.tag
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="param" single="1">
+
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>image/jpeg</item>
+ <item>image/gif</item>
+ <item>image/png</item>
+ <item>model/vrml</item>
+ <item>video/quicktime</item>
+ <item>application/java</item>
+ <item>audio/basic</item>
+ <item>text/html</item>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="value" type="input">
+ <text>value</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valuetype" type="list">
+ <text>valuetype</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ <items>
+ <item>data</item>
+ <item>ref</item>
+ <item>object</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/pre.tag b/quanta/data/dtep/xhtml11/pre.tag
new file mode 100644
index 00000000..623064c4
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/pre.tag
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="pre" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="xml:space" type="list">
+ <text>xml:space</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="span" />
+<child name="strong" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/q.tag b/quanta/data/dtep/xhtml11/q.tag
new file mode 100644
index 00000000..1eaefcd1
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/q.tag
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="q" hasCore="1" hasI18n="1" hasScript="1">
+
+ <attr name="cite" type="input">
+ <text>cite</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/rb.tag b/quanta/data/dtep/xhtml11/rb.tag
new file mode 100644
index 00000000..6c465cd9
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/rb.tag
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="rb" hasCore="1" hasI18n="1" hasScript="1">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/rbc.tag b/quanta/data/dtep/xhtml11/rbc.tag
new file mode 100644
index 00000000..fbd5b7ec
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/rbc.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="rbc" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="rb" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/rp.tag b/quanta/data/dtep/xhtml11/rp.tag
new file mode 100644
index 00000000..36df8a3a
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/rp.tag
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="rp" hasCore="1" hasI18n="1" hasScript="1">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/rt.tag b/quanta/data/dtep/xhtml11/rt.tag
new file mode 100644
index 00000000..da0098ed
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/rt.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="rt" hasCore="1" hasI18n="1" hasScript="1">
+
+<attr name="rbspan" type="input" />
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/rtc.tag b/quanta/data/dtep/xhtml11/rtc.tag
new file mode 100644
index 00000000..97c21176
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/rtc.tag
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="rtc" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="rt" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/ruby.tag b/quanta/data/dtep/xhtml11/ruby.tag
new file mode 100644
index 00000000..d133114f
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/ruby.tag
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ruby" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="rb" />
+<child name="rt" />
+<child name="rp" />
+<child name="rtc" />
+<child name="rbc" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/samp.tag b/quanta/data/dtep/xhtml11/samp.tag
new file mode 100644
index 00000000..2ec41eb4
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/samp.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="samp" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/script.tag b/quanta/data/dtep/xhtml11/script.tag
new file mode 100644
index 00000000..2dccc895
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/script.tag
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="script">
+
+ <attr name="type" type="list">
+ <text>Type</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ <items>
+ <item>text/html</item>
+ <item>text/css</item>
+ <item>text/php</item>
+ <item>text/javascript</item>
+ <item>application/x-javascript</item>
+ </items>
+ </attr>
+
+ <attr name="src" type="url">
+ <text>Source</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ </attr>
+
+ <attr name="charset" type="input">
+ <text>Charset</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>Defer (script execution may wait)</text>
+ <location col="0" row="3" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>xml:space</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/select.tag b/quanta/data/dtep/xhtml11/select.tag
new file mode 100644
index 00000000..74eb9e58
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/select.tag
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="select" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="multiple" type="check">
+ <text>multiple</text>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>disabled</text>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="tabindex" type="input">
+ <text>tabindex</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" />
+ </attr>
+
+ <attr name="size" type="input">
+ <text>size</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" />
+ </attr>
+
+ <attr name="onfocus" type="input">
+ <text>onfocus</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" />
+ </attr>
+
+ <attr name="onblur" type="input">
+ <text>onblur</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>onchange</text>
+ <textlocation col="0" row="6" />
+ <location col="1" row="6" />
+ </attr>
+
+ <stoppingtags>
+ <stoppingtag name="select" />
+ </stoppingtags>
+
+<children>
+<child name="optgroup" />
+<child name="option" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/small.tag b/quanta/data/dtep/xhtml11/small.tag
new file mode 100644
index 00000000..0fdbe561
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/small.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="small" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/span.tag b/quanta/data/dtep/xhtml11/span.tag
new file mode 100644
index 00000000..ca85ab65
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/span.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="span" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/strong.tag b/quanta/data/dtep/xhtml11/strong.tag
new file mode 100644
index 00000000..98d57d89
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/strong.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strong" hasCore="1" hasI18n="1" hasScript="1" scope="word">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/style.tag b/quanta/data/dtep/xhtml11/style.tag
new file mode 100644
index 00000000..d3c16a0e
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/style.tag
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="style" hasI18n="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+ </attr>
+ <attr name="type" type="list">
+ <text>type</text>
+ <textlocation col="0" row="1" />
+ <location col="1" row="1" colspan="2" />
+ <items>
+ <item>text/css</item>
+ </items>
+ </attr>
+
+ <attr name="media" type="list">
+ <text>media</text>
+ <textlocation col="0" row="2" />
+ <location col="1" row="2" colspan="2" />
+ <items>
+ <item>screen</item>
+ <item>tty</item>
+ <item>tv</item>
+ <item>projection</item>
+ <item>handheld</item>
+ <item>print</item>
+ <item>braille</item>
+ <item>aural</item>
+ <item>all</item>
+ </items>
+ </attr>
+
+ <attr name="title" type="input">
+ <text>title</text>
+ <textlocation col="0" row="3" />
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="xml:space" type="list">
+ <text>xml:space</text>
+ <textlocation col="0" row="4" />
+ <location col="1" row="4" colspan="2" />
+ <items>
+ <item>preserve</item>
+ </items>
+ </attr>
+
+ <attr name="defer" type="check">
+ <text>defer</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2" />
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/sub.tag b/quanta/data/dtep/xhtml11/sub.tag
new file mode 100644
index 00000000..5691c5f0
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/sub.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sub" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/sup.tag b/quanta/data/dtep/xhtml11/sup.tag
new file mode 100644
index 00000000..33e052d3
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/sup.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sup" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/table.tag b/quanta/data/dtep/xhtml11/table.tag
new file mode 100644
index 00000000..2680b2d3
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/table.tag
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="table" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>Use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="cellspacing" type="input">
+ <text>cellspacing</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="border" type="input">
+ <text>border</text>
+ <textlocation col="0" row="1" />
+ <tooltip>Set in pixels</tooltip>
+ <location col="1" row="1" />
+ </attr>
+
+ <attr name="cellpadding" type="input">
+ <text>cellpadding</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="frame" type="list">
+ <text>frame</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>above</item>
+ <item>below</item>
+ <item>border</item>
+ <item>box</item>
+ <item>hsides</item>
+ <item>lhs</item>
+ <item>rhs</item>
+ <item>void</item>
+ <item>vsides</item>
+ </items>
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <attr name="rules" type="list">
+ <text>rules</text>
+ <textlocation col="0" row="3" />
+ <items>
+ <item>none</item>
+ <item>groups</item>
+ <item>rows</item>
+ <item>cols</item>
+ <item>all</item>
+ </items>
+ <location col="1" row="3" colspan="2" />
+ </attr>
+
+ <attr name="summary" type="input">
+ <text>summary</text>
+ <textlocation col="0" row="5" />
+ <location col="1" row="5" colspan="2"/>
+ </attr>
+
+<children>
+<child name="caption" />
+<child name="col" />
+<child name="colgroup" />
+<child name="thead" />
+<child name="tfoot" />
+<child name="tbody" />
+<child name="tr" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/tbody.tag b/quanta/data/dtep/xhtml11/tbody.tag
new file mode 100644
index 00000000..62814633
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/tbody.tag
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tbody" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input" />
+ <attr name="charoff" type="input" />
+
+<children>
+<child name="tr" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/td.tag b/quanta/data/dtep/xhtml11/td.tag
new file mode 100644
index 00000000..4ace9ce3
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/td.tag
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="td" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="rowspan" type="input">
+ <text>rowspan</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input" />
+
+ <attr name="abbr" type="input" />
+
+ <attr name="scope" type="list">
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input" />
+
+ <attr name="char" type="input" />
+
+ <attr name="charoff" type="input" />
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/textarea.tag b/quanta/data/dtep/xhtml11/textarea.tag
new file mode 100644
index 00000000..e19a6061
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/textarea.tag
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="textarea" hasFocus="1" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="cols" type="input">
+ <text>cols</text>
+ <textlocation col="0" row="0" colspan="1" />
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="rows" type="input">
+ <text>rows</text>
+ <textlocation col="2" row="1" colspan="1" />
+ <location col="3" row="1" colspan="1" />
+ </attr>
+
+ <attr name="disabled" type="check">
+ <text>disabled</text>
+ <location col="0" row="2" colspan="2" />
+ </attr>
+
+ <attr name="readonly" type="check">
+ <text>readonly</text>
+ <location col="0" row="3" colspan="2" />
+ </attr>
+
+ <attr name="onselect" type="input">
+ <text>onselect</text>
+ <textlocation col="2" row="4" colspan="1" />
+ <location col="3" row="4" colspan="1" />
+ </attr>
+
+ <attr name="onchange" type="input">
+ <text>onchange</text>
+ <textlocation col="2" row="5" colspan="1" />
+ <location col="3" row="5" colspan="1" />
+ </attr>
+ <children>
+ <child name="#text" />
+ </children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/tfoot.tag b/quanta/data/dtep/xhtml11/tfoot.tag
new file mode 100644
index 00000000..ec0b79a2
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/tfoot.tag
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tfoot" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input" />
+ <attr name="charoff" type="input" />
+
+<children>
+<child name="tr" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/th.tag b/quanta/data/dtep/xhtml11/th.tag
new file mode 100644
index 00000000..bd944333
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/th.tag
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="th" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="width" type="input">
+ <text>width</text>
+ <textlocation col="0" row="0" />
+ <tooltip>use % for percent or it will set pixels</tooltip>
+ <location col="1" row="0" />
+ </attr>
+
+ <attr name="colspan" type="input">
+ <text>colspan</text>
+ <textlocation col="2" row="0" />
+ <location col="3" row="0" />
+ </attr>
+
+ <attr name="rowspan" type="input">
+ <text>rowspan</text>
+ <textlocation col="2" row="1" />
+ <location col="3" row="1" />
+ </attr>
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="2" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="2" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="2" row="2" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="3" row="2" colspan="1" />
+ </attr>
+
+ <attr name="headers" type="input" />
+
+ <attr name="abbr" type="input" />
+
+ <attr name="scope" type="list">
+ <items>
+ <item>row</item>
+ <item>col</item>
+ <item>rowgroup</item>
+ <item>colgroup</item>
+ </items>
+ </attr>
+
+ <attr name="axis" type="input" />
+
+ <attr name="char" type="input" />
+
+ <attr name="charoff" type="input" />
+
+ <stoppingtags>
+ <stoppingtag name="td" />
+ <stoppingtag name="tr" />
+ <stoppingtag name="th" />
+ </stoppingtags>
+
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="address" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="blockquote" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="div" />
+<child name="dl" />
+<child name="em" />
+<child name="fieldset" />
+<child name="form" />
+<child name="h1" />
+<child name="h2" />
+<child name="h3" />
+<child name="h4" />
+<child name="h5" />
+<child name="h6" />
+<child name="hr" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="noscript" />
+<child name="object" />
+<child name="ol" />
+<child name="p" />
+<child name="pre" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="table" />
+<child name="textarea" />
+<child name="tt" />
+<child name="ul" />
+<child name="var" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/thead.tag b/quanta/data/dtep/xhtml11/thead.tag
new file mode 100644
index 00000000..326a1b87
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/thead.tag
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="thead" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input" />
+ <attr name="charoff" type="input" />
+
+<children>
+<child name="tr" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/title.tag b/quanta/data/dtep/xhtml11/title.tag
new file mode 100644
index 00000000..4c9f61b7
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/title.tag
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="title" hasI18n="1">
+ <attr name="id" type="list" source="dcop" interface="QuantaIf" method="idSelectors()" arguments="" >
+ <text>id</text>
+ <textlocation col="0" row="0" />
+ <location col="1" row="0" colspan="2" />
+</attr>
+<children>
+ <child name="#text" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/tr.tag b/quanta/data/dtep/xhtml11/tr.tag
new file mode 100644
index 00000000..27c68366
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/tr.tag
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tr" hasScript="1" hasCore="1" hasI18n="1">
+
+ <attr name="align" type="list">
+ <text>align</text>
+ <textlocation col="0" row="0" />
+ <items>
+ <item>left</item>
+ <item>center</item>
+ <item>right</item>
+ <item>justify</item>
+ <item>char</item>
+ </items>
+ <location col="1" row="0" colspan="1" />
+ </attr>
+
+ <attr name="valign" type="list">
+ <text>valign</text>
+ <textlocation col="0" row="1" />
+ <items>
+ <item>baseline</item>
+ <item>bottom</item>
+ <item>middle</item>
+ <item>top</item>
+ </items>
+ <location col="1" row="1" colspan="1" />
+ </attr>
+
+ <attr name="char" type="input" />
+ <attr name="charoff" type="input" />
+
+ <stoppingtags>
+ <stoppingtag name="tr" />
+ <stoppingtag name="tfoot" />
+ </stoppingtags>
+
+<children>
+<child name="th" />
+<child name="td" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/tt.tag b/quanta/data/dtep/xhtml11/tt.tag
new file mode 100644
index 00000000..a7506a8b
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/tt.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="tt" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/ul.tag b/quanta/data/dtep/xhtml11/ul.tag
new file mode 100644
index 00000000..bd4404c4
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/ul.tag
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="ul" hasScript="1" hasCore="1" hasI18n="1">
+
+<children>
+<child name="li" usage="required" />
+</children>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xhtml11/var.tag b/quanta/data/dtep/xhtml11/var.tag
new file mode 100644
index 00000000..1c20c088
--- /dev/null
+++ b/quanta/data/dtep/xhtml11/var.tag
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="var" hasCore="1" hasI18n="1" hasScript="1">
+<children>
+<child name="#text" />
+<child name="a" />
+<child name="abbr" />
+<child name="acronym" />
+<child name="b" />
+<child name="bdo" />
+<child name="big" />
+<child name="br" />
+<child name="button" />
+<child name="cite" />
+<child name="code" />
+<child name="del" />
+<child name="dfn" />
+<child name="em" />
+<child name="i" />
+<child name="img" />
+<child name="input" />
+<child name="ins" />
+<child name="kbd" />
+<child name="label" />
+<child name="map" />
+<child name="object" />
+<child name="q" />
+<child name="samp" />
+<child name="script" />
+<child name="select" />
+<child name="small" />
+<child name="span" />
+<child name="strong" />
+<child name="sub" />
+<child name="sup" />
+<child name="textarea" />
+<child name="tt" />
+<child name="var" />
+</children>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/Makefile.am b/quanta/data/dtep/xslt/Makefile.am
new file mode 100644
index 00000000..909d85d7
--- /dev/null
+++ b/quanta/data/dtep/xslt/Makefile.am
@@ -0,0 +1,2 @@
+quanta_DATA = apply-imports.tag attribute-set.tag attribute.tag call-template.tag choose.tag comment.tag copy-of.tag decimal-format.tag description.rc element.tag fallback.tag for-each.tag if.tag import.tag key.tag message.tag namespace-alias.tag number.tag otherwise.tag output.tag param.tag preserve-space.tag processing-instruction.tag sort.tag strip-space.tag stylesheet.tag template.tag text.tag transform.tag value-of.tag variable.tag when.tag with-param.tag
+quantadir = ${quanta_datadir}/dtep/xslt
diff --git a/quanta/data/dtep/xslt/apply-imports.tag b/quanta/data/dtep/xslt/apply-imports.tag
new file mode 100644
index 00000000..4a92fc3a
--- /dev/null
+++ b/quanta/data/dtep/xslt/apply-imports.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="apply-imports">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/attribute-set.tag b/quanta/data/dtep/xslt/attribute-set.tag
new file mode 100644
index 00000000..834ea958
--- /dev/null
+++ b/quanta/data/dtep/xslt/attribute-set.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="attribute-set">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>use-attribute-sets</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="use-attribute-sets">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/attribute.tag b/quanta/data/dtep/xslt/attribute.tag
new file mode 100644
index 00000000..c464f6c3
--- /dev/null
+++ b/quanta/data/dtep/xslt/attribute.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="attribute">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>namespace</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="namespace" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/call-template.tag b/quanta/data/dtep/xslt/call-template.tag
new file mode 100644
index 00000000..e03f7e19
--- /dev/null
+++ b/quanta/data/dtep/xslt/call-template.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="call-template">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/choose.tag b/quanta/data/dtep/xslt/choose.tag
new file mode 100644
index 00000000..162556d4
--- /dev/null
+++ b/quanta/data/dtep/xslt/choose.tag
@@ -0,0 +1,5 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="choose">
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/comment.tag b/quanta/data/dtep/xslt/comment.tag
new file mode 100644
index 00000000..e7265406
--- /dev/null
+++ b/quanta/data/dtep/xslt/comment.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="comment">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/copy-of.tag b/quanta/data/dtep/xslt/copy-of.tag
new file mode 100644
index 00000000..5e14e0fd
--- /dev/null
+++ b/quanta/data/dtep/xslt/copy-of.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="copy-of">
+
+ <label>
+ <text>select</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/decimal-format.tag b/quanta/data/dtep/xslt/decimal-format.tag
new file mode 100644
index 00000000..aec33aba
--- /dev/null
+++ b/quanta/data/dtep/xslt/decimal-format.tag
@@ -0,0 +1,105 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="decimal-format">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>decimal-separator</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="decimal-separator" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>grouping-separator</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="grouping-separator" type="input">
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <label>
+ <text>infinity</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="infinity" type="input">
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <label>
+ <text>minus-sign</text>
+ <location col="0" row="4" />
+ </label>
+
+ <attr name="minus-sign" type="input">
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <label>
+ <text>NaN</text>
+ <location col="0" row="5" />
+ </label>
+
+ <attr name="NaN" type="input">
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <label>
+ <text>percent</text>
+ <location col="0" row="6" />
+ </label>
+
+ <attr name="percent" type="input">
+ <location col="1" row="6" colspan="3" />
+ </attr>
+
+ <label>
+ <text>per-mille</text>
+ <location col="0" row="7" />
+ </label>
+
+ <attr name="per-mille" type="input">
+ <location col="1" row="7" colspan="3" />
+ </attr>
+
+ <label>
+ <text>zero-digit</text>
+ <location col="0" row="8" />
+ </label>
+
+ <attr name="zero-digit" type="input">
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <label>
+ <text>digit</text>
+ <location col="0" row="9" />
+ </label>
+
+ <attr name="digit" type="input">
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+ <label>
+ <text>pattern-separator</text>
+ <location col="0" row="10" />
+ </label>
+
+ <attr name="pattern-separator" type="input">
+ <location col="1" row="10" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/description.rc b/quanta/data/dtep/xslt/description.rc
new file mode 100644
index 00000000..e2c7324d
--- /dev/null
+++ b/quanta/data/dtep/xslt/description.rc
@@ -0,0 +1,15 @@
+[General]
+Name = XSLT
+NickName = XSLT 1.0
+MimeTypes = text/x-xslt
+DefaultExtension = xslt
+NumOfPages = 0
+CaseSensitive = true
+
+[Toolbars]
+Location = xsl
+Names = fonts
+
+[Extra rules]
+
+[Parsing rules]
diff --git a/quanta/data/dtep/xslt/element.tag b/quanta/data/dtep/xslt/element.tag
new file mode 100644
index 00000000..e46279df
--- /dev/null
+++ b/quanta/data/dtep/xslt/element.tag
@@ -0,0 +1,33 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="element">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>namespace</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="namespace" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>use-attribute-sets</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="use-attribute-sets" type="input">
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/fallback.tag b/quanta/data/dtep/xslt/fallback.tag
new file mode 100644
index 00000000..a0abb786
--- /dev/null
+++ b/quanta/data/dtep/xslt/fallback.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="fallback">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/for-each.tag b/quanta/data/dtep/xslt/for-each.tag
new file mode 100644
index 00000000..dd28bcf6
--- /dev/null
+++ b/quanta/data/dtep/xslt/for-each.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="for-each">
+
+ <label>
+ <text>select</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/if.tag b/quanta/data/dtep/xslt/if.tag
new file mode 100644
index 00000000..d4552ba0
--- /dev/null
+++ b/quanta/data/dtep/xslt/if.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="if">
+
+ <label>
+ <text>test</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="test" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/import.tag b/quanta/data/dtep/xslt/import.tag
new file mode 100644
index 00000000..6414c90c
--- /dev/null
+++ b/quanta/data/dtep/xslt/import.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="import">
+
+ <label>
+ <text>href</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="href" type="url">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/key.tag b/quanta/data/dtep/xslt/key.tag
new file mode 100644
index 00000000..adf9d9ca
--- /dev/null
+++ b/quanta/data/dtep/xslt/key.tag
@@ -0,0 +1,33 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="key">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>match</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="match" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>use</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="use" type="input">
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/message.tag b/quanta/data/dtep/xslt/message.tag
new file mode 100644
index 00000000..f94d61ff
--- /dev/null
+++ b/quanta/data/dtep/xslt/message.tag
@@ -0,0 +1,19 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="message">
+
+ <label>
+ <text>terminate</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="terminate" type="list">
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ <location col="1" row="0" colspan="2" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/namespace-alias.tag b/quanta/data/dtep/xslt/namespace-alias.tag
new file mode 100644
index 00000000..cb21b124
--- /dev/null
+++ b/quanta/data/dtep/xslt/namespace-alias.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="namespace-alias">
+
+ <label>
+ <text>stylesheet-prefix</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="stylesheet-prefix" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>result-prefix</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="result-prefix" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/number.tag b/quanta/data/dtep/xslt/number.tag
new file mode 100644
index 00000000..38618a20
--- /dev/null
+++ b/quanta/data/dtep/xslt/number.tag
@@ -0,0 +1,95 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="number">
+
+ <label>
+ <text>level</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="level" type="list">
+ <items>
+ <item>single</item>
+ <item>multiple</item>
+ <item>any</item>
+ </items>
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>count</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="count" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>from</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="from" type="input">
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <label>
+ <text>value</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="value" type="input">
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <label>
+ <text>format</text>
+ <location col="0" row="4" />
+ </label>
+
+ <attr name="format" type="input">
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <label>
+ <text>lang</text>
+ <location col="0" row="5" />
+ </label>
+
+ <attr name="lang" type="input">
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <label>
+ <text>letter-value</text>
+ <location col="0" row="6" />
+ </label>
+ <attr name="letter-value" type="list">
+ <items>
+ <item>alphabetic</item>
+ <item>traditional</item>
+ </items>
+ <location col="1" row="6" colspan="3" />
+ </attr>
+
+ <label>
+ <text>grouping-separator</text>
+ <location col="0" row="7" />
+ </label>
+
+ <attr name="grouping-separator" type="input">
+ <location col="1" row="7" colspan="3" />
+ </attr>
+
+ <label>
+ <text>grouping-size</text>
+ <location col="0" row="8" />
+ </label>
+
+ <attr name="grouping-size" type="input">
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/otherwise.tag b/quanta/data/dtep/xslt/otherwise.tag
new file mode 100644
index 00000000..ddf48c17
--- /dev/null
+++ b/quanta/data/dtep/xslt/otherwise.tag
@@ -0,0 +1,6 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="otherwise">
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/output.tag b/quanta/data/dtep/xslt/output.tag
new file mode 100644
index 00000000..d06d156d
--- /dev/null
+++ b/quanta/data/dtep/xslt/output.tag
@@ -0,0 +1,113 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="output">
+
+ <label>
+ <text>method</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="method" type="list">
+ <items>
+ <item>xml</item>
+ <item>html</item>
+ <item>text</item>
+ </items>
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>version</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="version" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>encoding</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="encoding" type="input">
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <label>
+ <text>omit-xml-declaration</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="omit-xml-declaration" type="list">
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+ <label>
+ <text>standalone</text>
+ <location col="0" row="4" />
+ </label>
+
+ <attr name="standalone" type="list">
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+ <label>
+ <text>doctype-public</text>
+ <location col="0" row="5" />
+ </label>
+
+ <attr name="doctype-public" type="input">
+ <location col="1" row="5" colspan="3" />
+ </attr>
+
+ <label>
+ <text>doctype-system</text>
+ <location col="0" row="6" />
+ </label>
+
+ <attr name="doctype-system" type="input">
+ <location col="1" row="6" colspan="3" />
+ </attr>
+
+ <label>
+ <text>cdata-section-elements</text>
+ <location col="0" row="7" />
+ </label>
+
+ <attr name="cdata-section-elements" type="input">
+ <location col="1" row="7" colspan="3" />
+ </attr>
+
+ <label>
+ <text>indent</text>
+ <location col="0" row="8" />
+ </label>
+
+ <attr name="indent" type="list">
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ <location col="1" row="8" colspan="3" />
+ </attr>
+
+ <label>
+ <text>media-type</text>
+ <location col="0" row="9" />
+ </label>
+
+ <attr name="media-type" type="input">
+ <location col="1" row="9" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/param.tag b/quanta/data/dtep/xslt/param.tag
new file mode 100644
index 00000000..4a8626ff
--- /dev/null
+++ b/quanta/data/dtep/xslt/param.tag
@@ -0,0 +1,23 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="param">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>select</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/preserve-space.tag b/quanta/data/dtep/xslt/preserve-space.tag
new file mode 100644
index 00000000..1c906408
--- /dev/null
+++ b/quanta/data/dtep/xslt/preserve-space.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="preserve-space">
+
+ <label>
+ <text>elements</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="elements" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/processing-instruction.tag b/quanta/data/dtep/xslt/processing-instruction.tag
new file mode 100644
index 00000000..78e361d4
--- /dev/null
+++ b/quanta/data/dtep/xslt/processing-instruction.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="processing-instruction">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/sort.tag b/quanta/data/dtep/xslt/sort.tag
new file mode 100644
index 00000000..999609ec
--- /dev/null
+++ b/quanta/data/dtep/xslt/sort.tag
@@ -0,0 +1,64 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="sort">
+
+ <label>
+ <text>select</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>lang</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="lang" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>data-type</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="data-type" type="list">
+ <items>
+ <item>text</item>
+ <item>number</item>
+ </items>
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <label>
+ <text>order</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="order" type="list">
+ <items>
+ <item>ascending</item>
+ <item>descending</item>
+ </items>
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+
+ <label>
+ <text>case-order</text>
+ <location col="0" row="4" />
+ </label>
+
+ <attr name="data-type" type="list">
+ <items>
+ <item>upper-first</item>
+ <item>lower-first</item>
+ </items>
+ <location col="1" row="4" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/strip-space.tag b/quanta/data/dtep/xslt/strip-space.tag
new file mode 100644
index 00000000..76b6105f
--- /dev/null
+++ b/quanta/data/dtep/xslt/strip-space.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="strip-space">
+
+ <label>
+ <text>elements</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="elements" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/stylesheet.tag b/quanta/data/dtep/xslt/stylesheet.tag
new file mode 100644
index 00000000..f98f5804
--- /dev/null
+++ b/quanta/data/dtep/xslt/stylesheet.tag
@@ -0,0 +1,42 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="stylesheet">
+
+ <label>
+ <text>version</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="version" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>id</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="id" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>extension-element-prefixes</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="extension-element-prefixes" type="input">
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <label>
+ <text>exclude-result-prefixes</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="exclude-result-prefixes" type="input">
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/template.tag b/quanta/data/dtep/xslt/template.tag
new file mode 100644
index 00000000..87884712
--- /dev/null
+++ b/quanta/data/dtep/xslt/template.tag
@@ -0,0 +1,42 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="template">
+
+ <label>
+ <text>match</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="match" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>name</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>priority</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="priority" type="input">
+ <location col="1" row="2" colspan="3" />
+ </attr>
+
+ <label>
+ <text>mode</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="mode" type="input">
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/text.tag b/quanta/data/dtep/xslt/text.tag
new file mode 100644
index 00000000..1b4ef2cd
--- /dev/null
+++ b/quanta/data/dtep/xslt/text.tag
@@ -0,0 +1,19 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="text">
+
+ <label>
+ <text>disable-output-escaping</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="disable-output-escaping" type="list">
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/transform.tag b/quanta/data/dtep/xslt/transform.tag
new file mode 100644
index 00000000..dfec5977
--- /dev/null
+++ b/quanta/data/dtep/xslt/transform.tag
@@ -0,0 +1,43 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="transform">
+
+
+ <label>
+ <text>version</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="version" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>id</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="id" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+ <label>
+ <text>extension-element-prefixes</text>
+ <location col="0" row="2" />
+ </label>
+
+ <attr name="extension-element-prefixes" type="input">
+ <location col="1" row="2" colspan="2" />
+ </attr>
+
+ <label>
+ <text>exclude-result-prefixes</text>
+ <location col="0" row="3" />
+ </label>
+
+ <attr name="exclude-result-prefixes" type="input">
+ <location col="1" row="3" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/value-of.tag b/quanta/data/dtep/xslt/value-of.tag
new file mode 100644
index 00000000..436caa0e
--- /dev/null
+++ b/quanta/data/dtep/xslt/value-of.tag
@@ -0,0 +1,28 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="value-of">
+
+ <label>
+ <text>select</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>disable-output-escaping</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="disable-output-escaping" type="list">
+ <items>
+ <item>yes</item>
+ <item>no</item>
+ </items>
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/variable.tag b/quanta/data/dtep/xslt/variable.tag
new file mode 100644
index 00000000..d367a7e7
--- /dev/null
+++ b/quanta/data/dtep/xslt/variable.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="variable">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>select</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/when.tag b/quanta/data/dtep/xslt/when.tag
new file mode 100644
index 00000000..38df30ff
--- /dev/null
+++ b/quanta/data/dtep/xslt/when.tag
@@ -0,0 +1,15 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="when">
+
+ <label>
+ <text>test</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="test" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/dtep/xslt/with-param.tag b/quanta/data/dtep/xslt/with-param.tag
new file mode 100644
index 00000000..163efc83
--- /dev/null
+++ b/quanta/data/dtep/xslt/with-param.tag
@@ -0,0 +1,24 @@
+<!DOCTYPE TAGS>
+<TAGS>
+<tag name="with-param">
+
+ <label>
+ <text>name</text>
+ <location col="0" row="0" />
+ </label>
+
+ <attr name="name" type="input">
+ <location col="1" row="0" colspan="3" />
+ </attr>
+
+ <label>
+ <text>select</text>
+ <location col="0" row="1" />
+ </label>
+
+ <attr name="select" type="input">
+ <location col="1" row="1" colspan="3" />
+ </attr>
+
+</tag>
+</TAGS>
diff --git a/quanta/data/icons/16x16/Makefile.am b/quanta/data/icons/16x16/Makefile.am
new file mode 100644
index 00000000..cfdcadc5
--- /dev/null
+++ b/quanta/data/icons/16x16/Makefile.am
@@ -0,0 +1,4 @@
+quantadir = ${quanta_datadir}/toolbar
+
+quanta_DATA = delete.png empty1x16.png java.png mini-book1.png mini-book2.png mini-modules.png tag_br_small.png tag_font_small.png tag_hr_small.png empty16x16.png debug_breakpoint.png debug_connect.png debug_disconnect.png debug_kill.png debug_pause.png debug_currentline.png
+
diff --git a/quanta/data/icons/16x16/debug_breakpoint.png b/quanta/data/icons/16x16/debug_breakpoint.png
new file mode 100644
index 00000000..3240b29d
--- /dev/null
+++ b/quanta/data/icons/16x16/debug_breakpoint.png
Binary files differ
diff --git a/quanta/data/icons/16x16/debug_connect.png b/quanta/data/icons/16x16/debug_connect.png
new file mode 100644
index 00000000..9465e0e0
--- /dev/null
+++ b/quanta/data/icons/16x16/debug_connect.png
Binary files differ
diff --git a/quanta/data/icons/16x16/debug_currentline.png b/quanta/data/icons/16x16/debug_currentline.png
new file mode 100644
index 00000000..abd8f18a
--- /dev/null
+++ b/quanta/data/icons/16x16/debug_currentline.png
Binary files differ
diff --git a/quanta/data/icons/16x16/debug_disconnect.png b/quanta/data/icons/16x16/debug_disconnect.png
new file mode 100644
index 00000000..0b752fc7
--- /dev/null
+++ b/quanta/data/icons/16x16/debug_disconnect.png
Binary files differ
diff --git a/quanta/data/icons/16x16/debug_kill.png b/quanta/data/icons/16x16/debug_kill.png
new file mode 100644
index 00000000..d41d26c3
--- /dev/null
+++ b/quanta/data/icons/16x16/debug_kill.png
Binary files differ
diff --git a/quanta/data/icons/16x16/debug_pause.png b/quanta/data/icons/16x16/debug_pause.png
new file mode 100644
index 00000000..2083104f
--- /dev/null
+++ b/quanta/data/icons/16x16/debug_pause.png
Binary files differ
diff --git a/quanta/data/icons/16x16/delete.png b/quanta/data/icons/16x16/delete.png
new file mode 100644
index 00000000..6d0d29d7
--- /dev/null
+++ b/quanta/data/icons/16x16/delete.png
Binary files differ
diff --git a/quanta/data/icons/16x16/empty16x16.png b/quanta/data/icons/16x16/empty16x16.png
new file mode 100644
index 00000000..0ce40dbc
--- /dev/null
+++ b/quanta/data/icons/16x16/empty16x16.png
Binary files differ
diff --git a/quanta/data/icons/16x16/empty1x16.png b/quanta/data/icons/16x16/empty1x16.png
new file mode 100644
index 00000000..78ba7399
--- /dev/null
+++ b/quanta/data/icons/16x16/empty1x16.png
Binary files differ
diff --git a/quanta/data/icons/16x16/java.png b/quanta/data/icons/16x16/java.png
new file mode 100644
index 00000000..c9df082b
--- /dev/null
+++ b/quanta/data/icons/16x16/java.png
Binary files differ
diff --git a/quanta/data/icons/16x16/mini-book1.png b/quanta/data/icons/16x16/mini-book1.png
new file mode 100644
index 00000000..5d042a94
--- /dev/null
+++ b/quanta/data/icons/16x16/mini-book1.png
Binary files differ
diff --git a/quanta/data/icons/16x16/mini-book2.png b/quanta/data/icons/16x16/mini-book2.png
new file mode 100644
index 00000000..e2a44eca
--- /dev/null
+++ b/quanta/data/icons/16x16/mini-book2.png
Binary files differ
diff --git a/quanta/data/icons/16x16/mini-modules.png b/quanta/data/icons/16x16/mini-modules.png
new file mode 100644
index 00000000..a4acb09c
--- /dev/null
+++ b/quanta/data/icons/16x16/mini-modules.png
Binary files differ
diff --git a/quanta/data/icons/16x16/tag_br_small.png b/quanta/data/icons/16x16/tag_br_small.png
new file mode 100644
index 00000000..d433721a
--- /dev/null
+++ b/quanta/data/icons/16x16/tag_br_small.png
Binary files differ
diff --git a/quanta/data/icons/16x16/tag_font_small.png b/quanta/data/icons/16x16/tag_font_small.png
new file mode 100644
index 00000000..550f3bb7
--- /dev/null
+++ b/quanta/data/icons/16x16/tag_font_small.png
Binary files differ
diff --git a/quanta/data/icons/16x16/tag_hr_small.png b/quanta/data/icons/16x16/tag_hr_small.png
new file mode 100644
index 00000000..1dacca1f
--- /dev/null
+++ b/quanta/data/icons/16x16/tag_hr_small.png
Binary files differ
diff --git a/quanta/data/icons/22x22/Makefile.am b/quanta/data/icons/22x22/Makefile.am
new file mode 100644
index 00000000..7eb10c7d
--- /dev/null
+++ b/quanta/data/icons/22x22/Makefile.am
@@ -0,0 +1,172 @@
+quantadir = ${quanta_datadir}/toolbar
+quanta_DATA = ball.png \
+check_clear.png \
+check_grey.png \
+check.png \
+css.png \
+date.png \
+debug_leap.png \
+debug_run.png \
+debug_skip.png \
+debug_stepinto.png \
+debug_stepout.png \
+debug_stepover.png \
+div_center.png \
+div_justify.png \
+div_left.png \
+div_right.png \
+font_dec.png \
+font_inc.png \
+form.png \
+frame.png \
+ftab.png \
+ftpclient.png \
+lineedit.png \
+linepas.png \
+output_win.png \
+preview.png \
+ptab.png \
+quick_list.png \
+quick-screenshot.png \
+quick_start.png \
+quick_table.png \
+radio.png \
+replace.png \
+reset.png \
+select.png \
+submit.png \
+button.png \
+table_data.png \
+table_head.png \
+tag_access.png \
+tag_all.png \
+tag_anyAttribute.png \
+tag_any.png \
+tag_a.png \
+tag_appInfo.png \
+tag_attributeGroup.png \
+tag_attribute.png \
+tag_attr.png \
+tag_a_url.png \
+tag_bold.png \
+tag_br.png \
+tag_caption.png \
+tag_card.png \
+tag_chapter.png \
+tag_choice.png \
+tag_comm.png \
+tag_complexContent.png \
+tag_complexType.png \
+tag_dd.png \
+tag_dl.png \
+tag_documenation.png \
+tag_do.png \
+tag_dt.png \
+tag_element.png \
+tag_em.png \
+tag_example.png \
+tag_extension.png \
+tag_field.png \
+tag_font_base.png \
+tag_font.png \
+tag_footnote.png \
+tag_footnoteref.png \
+tag_fractionDigits.png \
+tag_go.png \
+tag_group.png \
+tag_guimenuitem.png \
+tag_guimenu.png \
+tag_guisubmenu.png \
+tag_h1.png \
+tag_h2.png \
+tag_h3.png \
+tag_h4.png \
+tag_h5.png \
+tag_head.png \
+tag_hr.png \
+tag_imagedata.png \
+tag_image.png \
+tag_import.png \
+tag_include.png \
+tag_informalexample.png \
+tag_inlinemediaobject.png \
+tag_i.png \
+tag_keycap.png \
+tag_keycombo.png \
+tag_key.png \
+tag_keyref.png \
+tag_label.png \
+tag_link.png \
+tag_li.png \
+tag_listitem.png \
+tag_list.png \
+tag_loc.png \
+tag_mail.png \
+tag_member.png \
+tag_menuchoice.png \
+tag_menu.png \
+tag_meta.png \
+tag_misc.png \
+tag_nbsp.png \
+tag_noop.png \
+tag_notation.png \
+tag_ol.png \
+tag_onevent.png \
+tag_para.png \
+tag_postfield.png \
+tag_p.png \
+tag_pre.png \
+tag_procedure.png \
+tag_redefine.png \
+tag_restriction.png \
+tag_schema.png \
+tag_screenshotinfo.png \
+tag_screenshot.png \
+tag_sect1.png \
+tag_sect2.png \
+tag_sect3.png \
+tag_sect4.png \
+tag_sect5.png \
+tag_selector.png \
+tag_sequence.png \
+tag_setvar.png \
+tag_shortcut.png \
+tag_simpleContent.png \
+tag_simpleType.png \
+tag_step.png \
+tag_sub.png \
+tag_substeps.png \
+tag_sup.png \
+tag_table_body.png \
+tag_table.png \
+tag_table_row.png \
+tag_tag.png \
+tag_tbody.png \
+tag_td.png \
+tag_term.png \
+tag_tgroup.png \
+tag_th.png \
+tag_title.png \
+tag_tr.png \
+tag_ulink.png \
+tag_ul.png \
+tag_union.png \
+tag_unique.png \
+tag_u.png \
+tag_variablelist.png \
+tag_varlistentry.png \
+tag_varlistitem.png \
+tag_what.png \
+tag_wml.png \
+tag_xref.png \
+textarea.png \
+tree_win.png \
+ttab.png \
+view_text.png \
+vpl.png \
+vpl_text.png \
+xmlval.png \
+xsltproc.png \
+tag_amp.png \
+tag_cdata.png
+
diff --git a/quanta/data/icons/22x22/ball.png b/quanta/data/icons/22x22/ball.png
new file mode 100644
index 00000000..0e180b4d
--- /dev/null
+++ b/quanta/data/icons/22x22/ball.png
Binary files differ
diff --git a/quanta/data/icons/22x22/button.png b/quanta/data/icons/22x22/button.png
new file mode 100644
index 00000000..fb6f41ce
--- /dev/null
+++ b/quanta/data/icons/22x22/button.png
Binary files differ
diff --git a/quanta/data/icons/22x22/check.png b/quanta/data/icons/22x22/check.png
new file mode 100644
index 00000000..52954660
--- /dev/null
+++ b/quanta/data/icons/22x22/check.png
Binary files differ
diff --git a/quanta/data/icons/22x22/check_clear.png b/quanta/data/icons/22x22/check_clear.png
new file mode 100644
index 00000000..13fee700
--- /dev/null
+++ b/quanta/data/icons/22x22/check_clear.png
Binary files differ
diff --git a/quanta/data/icons/22x22/check_grey.png b/quanta/data/icons/22x22/check_grey.png
new file mode 100644
index 00000000..b5531795
--- /dev/null
+++ b/quanta/data/icons/22x22/check_grey.png
Binary files differ
diff --git a/quanta/data/icons/22x22/css.png b/quanta/data/icons/22x22/css.png
new file mode 100644
index 00000000..bcef9763
--- /dev/null
+++ b/quanta/data/icons/22x22/css.png
Binary files differ
diff --git a/quanta/data/icons/22x22/date.png b/quanta/data/icons/22x22/date.png
new file mode 100644
index 00000000..2e1c0a6e
--- /dev/null
+++ b/quanta/data/icons/22x22/date.png
Binary files differ
diff --git a/quanta/data/icons/22x22/debug_leap.png b/quanta/data/icons/22x22/debug_leap.png
new file mode 100644
index 00000000..32f4badc
--- /dev/null
+++ b/quanta/data/icons/22x22/debug_leap.png
Binary files differ
diff --git a/quanta/data/icons/22x22/debug_run.png b/quanta/data/icons/22x22/debug_run.png
new file mode 100644
index 00000000..861c549a
--- /dev/null
+++ b/quanta/data/icons/22x22/debug_run.png
Binary files differ
diff --git a/quanta/data/icons/22x22/debug_skip.png b/quanta/data/icons/22x22/debug_skip.png
new file mode 100644
index 00000000..ee94f585
--- /dev/null
+++ b/quanta/data/icons/22x22/debug_skip.png
Binary files differ
diff --git a/quanta/data/icons/22x22/debug_stepinto.png b/quanta/data/icons/22x22/debug_stepinto.png
new file mode 100644
index 00000000..ae84a9f4
--- /dev/null
+++ b/quanta/data/icons/22x22/debug_stepinto.png
Binary files differ
diff --git a/quanta/data/icons/22x22/debug_stepout.png b/quanta/data/icons/22x22/debug_stepout.png
new file mode 100644
index 00000000..caaf806c
--- /dev/null
+++ b/quanta/data/icons/22x22/debug_stepout.png
Binary files differ
diff --git a/quanta/data/icons/22x22/debug_stepover.png b/quanta/data/icons/22x22/debug_stepover.png
new file mode 100644
index 00000000..c4a76043
--- /dev/null
+++ b/quanta/data/icons/22x22/debug_stepover.png
Binary files differ
diff --git a/quanta/data/icons/22x22/div_center.png b/quanta/data/icons/22x22/div_center.png
new file mode 100644
index 00000000..89e28f04
--- /dev/null
+++ b/quanta/data/icons/22x22/div_center.png
Binary files differ
diff --git a/quanta/data/icons/22x22/div_justify.png b/quanta/data/icons/22x22/div_justify.png
new file mode 100644
index 00000000..1909fd5c
--- /dev/null
+++ b/quanta/data/icons/22x22/div_justify.png
Binary files differ
diff --git a/quanta/data/icons/22x22/div_left.png b/quanta/data/icons/22x22/div_left.png
new file mode 100644
index 00000000..ec018f9e
--- /dev/null
+++ b/quanta/data/icons/22x22/div_left.png
Binary files differ
diff --git a/quanta/data/icons/22x22/div_right.png b/quanta/data/icons/22x22/div_right.png
new file mode 100644
index 00000000..1a507805
--- /dev/null
+++ b/quanta/data/icons/22x22/div_right.png
Binary files differ
diff --git a/quanta/data/icons/22x22/font_dec.png b/quanta/data/icons/22x22/font_dec.png
new file mode 100644
index 00000000..ec05afe5
--- /dev/null
+++ b/quanta/data/icons/22x22/font_dec.png
Binary files differ
diff --git a/quanta/data/icons/22x22/font_inc.png b/quanta/data/icons/22x22/font_inc.png
new file mode 100644
index 00000000..64cb89b0
--- /dev/null
+++ b/quanta/data/icons/22x22/font_inc.png
Binary files differ
diff --git a/quanta/data/icons/22x22/form.png b/quanta/data/icons/22x22/form.png
new file mode 100644
index 00000000..797a8d81
--- /dev/null
+++ b/quanta/data/icons/22x22/form.png
Binary files differ
diff --git a/quanta/data/icons/22x22/frame.png b/quanta/data/icons/22x22/frame.png
new file mode 100644
index 00000000..19ca73c4
--- /dev/null
+++ b/quanta/data/icons/22x22/frame.png
Binary files differ
diff --git a/quanta/data/icons/22x22/ftab.png b/quanta/data/icons/22x22/ftab.png
new file mode 100644
index 00000000..b179f808
--- /dev/null
+++ b/quanta/data/icons/22x22/ftab.png
Binary files differ
diff --git a/quanta/data/icons/22x22/ftpclient.png b/quanta/data/icons/22x22/ftpclient.png
new file mode 100644
index 00000000..4083df1f
--- /dev/null
+++ b/quanta/data/icons/22x22/ftpclient.png
Binary files differ
diff --git a/quanta/data/icons/22x22/lineedit.png b/quanta/data/icons/22x22/lineedit.png
new file mode 100644
index 00000000..b0d47f1e
--- /dev/null
+++ b/quanta/data/icons/22x22/lineedit.png
Binary files differ
diff --git a/quanta/data/icons/22x22/linepas.png b/quanta/data/icons/22x22/linepas.png
new file mode 100644
index 00000000..a42ddb67
--- /dev/null
+++ b/quanta/data/icons/22x22/linepas.png
Binary files differ
diff --git a/quanta/data/icons/22x22/output_win.png b/quanta/data/icons/22x22/output_win.png
new file mode 100644
index 00000000..8816d5ce
--- /dev/null
+++ b/quanta/data/icons/22x22/output_win.png
Binary files differ
diff --git a/quanta/data/icons/22x22/preview.png b/quanta/data/icons/22x22/preview.png
new file mode 100644
index 00000000..4ad75a2a
--- /dev/null
+++ b/quanta/data/icons/22x22/preview.png
Binary files differ
diff --git a/quanta/data/icons/22x22/ptab.png b/quanta/data/icons/22x22/ptab.png
new file mode 100644
index 00000000..977f1dd9
--- /dev/null
+++ b/quanta/data/icons/22x22/ptab.png
Binary files differ
diff --git a/quanta/data/icons/22x22/quick-screenshot.png b/quanta/data/icons/22x22/quick-screenshot.png
new file mode 100644
index 00000000..8087fabc
--- /dev/null
+++ b/quanta/data/icons/22x22/quick-screenshot.png
Binary files differ
diff --git a/quanta/data/icons/22x22/quick_list.png b/quanta/data/icons/22x22/quick_list.png
new file mode 100644
index 00000000..dcdd6455
--- /dev/null
+++ b/quanta/data/icons/22x22/quick_list.png
Binary files differ
diff --git a/quanta/data/icons/22x22/quick_start.png b/quanta/data/icons/22x22/quick_start.png
new file mode 100644
index 00000000..42d41b89
--- /dev/null
+++ b/quanta/data/icons/22x22/quick_start.png
Binary files differ
diff --git a/quanta/data/icons/22x22/quick_table.png b/quanta/data/icons/22x22/quick_table.png
new file mode 100644
index 00000000..d08694c4
--- /dev/null
+++ b/quanta/data/icons/22x22/quick_table.png
Binary files differ
diff --git a/quanta/data/icons/22x22/radio.png b/quanta/data/icons/22x22/radio.png
new file mode 100644
index 00000000..fdbfed25
--- /dev/null
+++ b/quanta/data/icons/22x22/radio.png
Binary files differ
diff --git a/quanta/data/icons/22x22/replace.png b/quanta/data/icons/22x22/replace.png
new file mode 100644
index 00000000..88a3e57b
--- /dev/null
+++ b/quanta/data/icons/22x22/replace.png
Binary files differ
diff --git a/quanta/data/icons/22x22/reset.png b/quanta/data/icons/22x22/reset.png
new file mode 100644
index 00000000..156398f8
--- /dev/null
+++ b/quanta/data/icons/22x22/reset.png
Binary files differ
diff --git a/quanta/data/icons/22x22/select.png b/quanta/data/icons/22x22/select.png
new file mode 100644
index 00000000..ab8d66fc
--- /dev/null
+++ b/quanta/data/icons/22x22/select.png
Binary files differ
diff --git a/quanta/data/icons/22x22/submit.png b/quanta/data/icons/22x22/submit.png
new file mode 100644
index 00000000..c605e87e
--- /dev/null
+++ b/quanta/data/icons/22x22/submit.png
Binary files differ
diff --git a/quanta/data/icons/22x22/table_data.png b/quanta/data/icons/22x22/table_data.png
new file mode 100644
index 00000000..2452fa46
--- /dev/null
+++ b/quanta/data/icons/22x22/table_data.png
Binary files differ
diff --git a/quanta/data/icons/22x22/table_head.png b/quanta/data/icons/22x22/table_head.png
new file mode 100644
index 00000000..84915eaa
--- /dev/null
+++ b/quanta/data/icons/22x22/table_head.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_a.png b/quanta/data/icons/22x22/tag_a.png
new file mode 100644
index 00000000..2186bb5a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_a.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_a_url.png b/quanta/data/icons/22x22/tag_a_url.png
new file mode 100644
index 00000000..aa578a4c
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_a_url.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_access.png b/quanta/data/icons/22x22/tag_access.png
new file mode 100644
index 00000000..f0bc1243
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_access.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_all.png b/quanta/data/icons/22x22/tag_all.png
new file mode 100644
index 00000000..c325511c
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_all.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_amp.png b/quanta/data/icons/22x22/tag_amp.png
new file mode 100644
index 00000000..d3d107d0
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_amp.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_any.png b/quanta/data/icons/22x22/tag_any.png
new file mode 100644
index 00000000..a0ec6a00
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_any.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_anyAttribute.png b/quanta/data/icons/22x22/tag_anyAttribute.png
new file mode 100644
index 00000000..94ed50b8
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_anyAttribute.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_appInfo.png b/quanta/data/icons/22x22/tag_appInfo.png
new file mode 100644
index 00000000..0eccfad6
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_appInfo.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_attr.png b/quanta/data/icons/22x22/tag_attr.png
new file mode 100644
index 00000000..3249207a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_attr.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_attribute.png b/quanta/data/icons/22x22/tag_attribute.png
new file mode 100644
index 00000000..0ac27604
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_attribute.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_attributeGroup.png b/quanta/data/icons/22x22/tag_attributeGroup.png
new file mode 100644
index 00000000..95f0cb6c
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_attributeGroup.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_bold.png b/quanta/data/icons/22x22/tag_bold.png
new file mode 100644
index 00000000..486877fe
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_bold.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_br.png b/quanta/data/icons/22x22/tag_br.png
new file mode 100644
index 00000000..573c78a9
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_br.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_caption.png b/quanta/data/icons/22x22/tag_caption.png
new file mode 100644
index 00000000..91af8909
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_caption.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_card.png b/quanta/data/icons/22x22/tag_card.png
new file mode 100644
index 00000000..72c37072
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_card.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_cdata.png b/quanta/data/icons/22x22/tag_cdata.png
new file mode 100644
index 00000000..b05642a9
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_cdata.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_chapter.png b/quanta/data/icons/22x22/tag_chapter.png
new file mode 100644
index 00000000..a3154dab
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_chapter.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_choice.png b/quanta/data/icons/22x22/tag_choice.png
new file mode 100644
index 00000000..da630d23
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_choice.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_comm.png b/quanta/data/icons/22x22/tag_comm.png
new file mode 100644
index 00000000..6d9f71ed
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_comm.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_complexContent.png b/quanta/data/icons/22x22/tag_complexContent.png
new file mode 100644
index 00000000..a14a6204
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_complexContent.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_complexType.png b/quanta/data/icons/22x22/tag_complexType.png
new file mode 100644
index 00000000..9e4b0212
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_complexType.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_dd.png b/quanta/data/icons/22x22/tag_dd.png
new file mode 100644
index 00000000..41f40dca
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_dd.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_dl.png b/quanta/data/icons/22x22/tag_dl.png
new file mode 100644
index 00000000..d9861055
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_dl.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_do.png b/quanta/data/icons/22x22/tag_do.png
new file mode 100644
index 00000000..99c5fea9
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_do.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_documenation.png b/quanta/data/icons/22x22/tag_documenation.png
new file mode 100644
index 00000000..6f89600d
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_documenation.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_dt.png b/quanta/data/icons/22x22/tag_dt.png
new file mode 100644
index 00000000..636a2530
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_dt.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_element.png b/quanta/data/icons/22x22/tag_element.png
new file mode 100644
index 00000000..e5d3e68b
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_element.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_em.png b/quanta/data/icons/22x22/tag_em.png
new file mode 100644
index 00000000..c492cd8a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_em.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_example.png b/quanta/data/icons/22x22/tag_example.png
new file mode 100644
index 00000000..42a3c5ff
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_example.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_extension.png b/quanta/data/icons/22x22/tag_extension.png
new file mode 100644
index 00000000..b2e236b4
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_extension.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_field.png b/quanta/data/icons/22x22/tag_field.png
new file mode 100644
index 00000000..3b7620df
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_field.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_font.png b/quanta/data/icons/22x22/tag_font.png
new file mode 100644
index 00000000..8e23a9e7
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_font.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_font_base.png b/quanta/data/icons/22x22/tag_font_base.png
new file mode 100644
index 00000000..6e2ff1b8
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_font_base.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_footnote.png b/quanta/data/icons/22x22/tag_footnote.png
new file mode 100644
index 00000000..8ee2df01
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_footnote.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_footnoteref.png b/quanta/data/icons/22x22/tag_footnoteref.png
new file mode 100644
index 00000000..4b6ee6f3
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_footnoteref.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_fractionDigits.png b/quanta/data/icons/22x22/tag_fractionDigits.png
new file mode 100644
index 00000000..eaa9473f
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_fractionDigits.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_go.png b/quanta/data/icons/22x22/tag_go.png
new file mode 100644
index 00000000..c67f8849
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_go.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_group.png b/quanta/data/icons/22x22/tag_group.png
new file mode 100644
index 00000000..9f951f97
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_group.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_guimenu.png b/quanta/data/icons/22x22/tag_guimenu.png
new file mode 100644
index 00000000..6f25213e
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_guimenu.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_guimenuitem.png b/quanta/data/icons/22x22/tag_guimenuitem.png
new file mode 100644
index 00000000..6752f380
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_guimenuitem.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_guisubmenu.png b/quanta/data/icons/22x22/tag_guisubmenu.png
new file mode 100644
index 00000000..17d158c3
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_guisubmenu.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_h1.png b/quanta/data/icons/22x22/tag_h1.png
new file mode 100644
index 00000000..b185d625
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_h1.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_h2.png b/quanta/data/icons/22x22/tag_h2.png
new file mode 100644
index 00000000..531efd66
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_h2.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_h3.png b/quanta/data/icons/22x22/tag_h3.png
new file mode 100644
index 00000000..684e5cbc
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_h3.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_h4.png b/quanta/data/icons/22x22/tag_h4.png
new file mode 100644
index 00000000..d965f10a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_h4.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_h5.png b/quanta/data/icons/22x22/tag_h5.png
new file mode 100644
index 00000000..58221cf2
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_h5.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_head.png b/quanta/data/icons/22x22/tag_head.png
new file mode 100644
index 00000000..b48f196a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_head.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_hr.png b/quanta/data/icons/22x22/tag_hr.png
new file mode 100644
index 00000000..70431f70
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_hr.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_i.png b/quanta/data/icons/22x22/tag_i.png
new file mode 100644
index 00000000..ffa7ddb3
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_i.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_image.png b/quanta/data/icons/22x22/tag_image.png
new file mode 100644
index 00000000..ed1b1c12
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_image.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_imagedata.png b/quanta/data/icons/22x22/tag_imagedata.png
new file mode 100644
index 00000000..0288752d
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_imagedata.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_import.png b/quanta/data/icons/22x22/tag_import.png
new file mode 100644
index 00000000..6d9b8a5b
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_import.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_include.png b/quanta/data/icons/22x22/tag_include.png
new file mode 100644
index 00000000..31a8f71f
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_include.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_informalexample.png b/quanta/data/icons/22x22/tag_informalexample.png
new file mode 100644
index 00000000..c4fcfa64
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_informalexample.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_inlinemediaobject.png b/quanta/data/icons/22x22/tag_inlinemediaobject.png
new file mode 100644
index 00000000..2966d647
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_inlinemediaobject.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_key.png b/quanta/data/icons/22x22/tag_key.png
new file mode 100644
index 00000000..07439f63
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_key.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_keycap.png b/quanta/data/icons/22x22/tag_keycap.png
new file mode 100644
index 00000000..5288946c
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_keycap.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_keycombo.png b/quanta/data/icons/22x22/tag_keycombo.png
new file mode 100644
index 00000000..6b6c08ef
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_keycombo.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_keyref.png b/quanta/data/icons/22x22/tag_keyref.png
new file mode 100644
index 00000000..66da7831
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_keyref.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_label.png b/quanta/data/icons/22x22/tag_label.png
new file mode 100644
index 00000000..085d4e0f
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_label.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_li.png b/quanta/data/icons/22x22/tag_li.png
new file mode 100644
index 00000000..7e05efcf
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_li.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_link.png b/quanta/data/icons/22x22/tag_link.png
new file mode 100644
index 00000000..c04b2798
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_link.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_list.png b/quanta/data/icons/22x22/tag_list.png
new file mode 100644
index 00000000..ce92c1c6
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_list.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_listitem.png b/quanta/data/icons/22x22/tag_listitem.png
new file mode 100644
index 00000000..8a8d846e
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_listitem.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_loc.png b/quanta/data/icons/22x22/tag_loc.png
new file mode 100644
index 00000000..ceea3794
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_loc.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_mail.png b/quanta/data/icons/22x22/tag_mail.png
new file mode 100644
index 00000000..3342f1a5
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_mail.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_member.png b/quanta/data/icons/22x22/tag_member.png
new file mode 100644
index 00000000..ce7d5aeb
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_member.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_menu.png b/quanta/data/icons/22x22/tag_menu.png
new file mode 100644
index 00000000..ec4ba916
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_menu.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_menuchoice.png b/quanta/data/icons/22x22/tag_menuchoice.png
new file mode 100644
index 00000000..4de46173
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_menuchoice.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_meta.png b/quanta/data/icons/22x22/tag_meta.png
new file mode 100644
index 00000000..f781357f
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_meta.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_misc.png b/quanta/data/icons/22x22/tag_misc.png
new file mode 100644
index 00000000..7ae77650
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_misc.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_nbsp.png b/quanta/data/icons/22x22/tag_nbsp.png
new file mode 100644
index 00000000..290d7b19
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_nbsp.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_noop.png b/quanta/data/icons/22x22/tag_noop.png
new file mode 100644
index 00000000..02f491c8
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_noop.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_notation.png b/quanta/data/icons/22x22/tag_notation.png
new file mode 100644
index 00000000..1bc7cac6
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_notation.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_ol.png b/quanta/data/icons/22x22/tag_ol.png
new file mode 100644
index 00000000..972679b9
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_ol.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_onevent.png b/quanta/data/icons/22x22/tag_onevent.png
new file mode 100644
index 00000000..9c475574
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_onevent.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_p.png b/quanta/data/icons/22x22/tag_p.png
new file mode 100644
index 00000000..33bfafdb
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_p.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_para.png b/quanta/data/icons/22x22/tag_para.png
new file mode 100644
index 00000000..9094e952
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_para.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_postfield.png b/quanta/data/icons/22x22/tag_postfield.png
new file mode 100644
index 00000000..6b1714a5
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_postfield.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_pre.png b/quanta/data/icons/22x22/tag_pre.png
new file mode 100644
index 00000000..8a14a10f
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_pre.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_procedure.png b/quanta/data/icons/22x22/tag_procedure.png
new file mode 100644
index 00000000..8bafd79d
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_procedure.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_redefine.png b/quanta/data/icons/22x22/tag_redefine.png
new file mode 100644
index 00000000..aa5df89a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_redefine.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_restriction.png b/quanta/data/icons/22x22/tag_restriction.png
new file mode 100644
index 00000000..c2dc945a
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_restriction.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_schema.png b/quanta/data/icons/22x22/tag_schema.png
new file mode 100644
index 00000000..4512517e
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_schema.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_screenshot.png b/quanta/data/icons/22x22/tag_screenshot.png
new file mode 100644
index 00000000..a42b7352
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_screenshot.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_screenshotinfo.png b/quanta/data/icons/22x22/tag_screenshotinfo.png
new file mode 100644
index 00000000..dc1f58dc
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_screenshotinfo.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sect1.png b/quanta/data/icons/22x22/tag_sect1.png
new file mode 100644
index 00000000..7b8c3564
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sect1.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sect2.png b/quanta/data/icons/22x22/tag_sect2.png
new file mode 100644
index 00000000..1998beb5
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sect2.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sect3.png b/quanta/data/icons/22x22/tag_sect3.png
new file mode 100644
index 00000000..cb23afbf
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sect3.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sect4.png b/quanta/data/icons/22x22/tag_sect4.png
new file mode 100644
index 00000000..e88083e1
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sect4.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sect5.png b/quanta/data/icons/22x22/tag_sect5.png
new file mode 100644
index 00000000..fa682e3e
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sect5.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_selector.png b/quanta/data/icons/22x22/tag_selector.png
new file mode 100644
index 00000000..fe05d587
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_selector.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sequence.png b/quanta/data/icons/22x22/tag_sequence.png
new file mode 100644
index 00000000..67753324
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sequence.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_setvar.png b/quanta/data/icons/22x22/tag_setvar.png
new file mode 100644
index 00000000..0de73a9e
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_setvar.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_shortcut.png b/quanta/data/icons/22x22/tag_shortcut.png
new file mode 100644
index 00000000..3f3ee918
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_shortcut.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_simpleContent.png b/quanta/data/icons/22x22/tag_simpleContent.png
new file mode 100644
index 00000000..2247d22d
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_simpleContent.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_simpleType.png b/quanta/data/icons/22x22/tag_simpleType.png
new file mode 100644
index 00000000..fe961e53
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_simpleType.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_step.png b/quanta/data/icons/22x22/tag_step.png
new file mode 100644
index 00000000..989df8ba
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_step.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sub.png b/quanta/data/icons/22x22/tag_sub.png
new file mode 100644
index 00000000..c9870d00
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sub.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_substeps.png b/quanta/data/icons/22x22/tag_substeps.png
new file mode 100644
index 00000000..ae37f521
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_substeps.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_sup.png b/quanta/data/icons/22x22/tag_sup.png
new file mode 100644
index 00000000..af54334c
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_sup.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_table.png b/quanta/data/icons/22x22/tag_table.png
new file mode 100644
index 00000000..d28cd748
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_table.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_table_body.png b/quanta/data/icons/22x22/tag_table_body.png
new file mode 100644
index 00000000..ee9237df
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_table_body.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_table_row.png b/quanta/data/icons/22x22/tag_table_row.png
new file mode 100644
index 00000000..3dfe0d28
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_table_row.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_tag.png b/quanta/data/icons/22x22/tag_tag.png
new file mode 100644
index 00000000..cca9b639
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_tag.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_tbody.png b/quanta/data/icons/22x22/tag_tbody.png
new file mode 100644
index 00000000..94fa1c84
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_tbody.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_td.png b/quanta/data/icons/22x22/tag_td.png
new file mode 100644
index 00000000..40a708cd
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_td.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_term.png b/quanta/data/icons/22x22/tag_term.png
new file mode 100644
index 00000000..a37bac9b
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_term.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_tgroup.png b/quanta/data/icons/22x22/tag_tgroup.png
new file mode 100644
index 00000000..6278c0e5
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_tgroup.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_th.png b/quanta/data/icons/22x22/tag_th.png
new file mode 100644
index 00000000..59828d4e
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_th.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_title.png b/quanta/data/icons/22x22/tag_title.png
new file mode 100644
index 00000000..a5ea40ed
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_title.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_tr.png b/quanta/data/icons/22x22/tag_tr.png
new file mode 100644
index 00000000..47a49ceb
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_tr.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_u.png b/quanta/data/icons/22x22/tag_u.png
new file mode 100644
index 00000000..f0f2b5d8
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_u.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_ul.png b/quanta/data/icons/22x22/tag_ul.png
new file mode 100644
index 00000000..4b153555
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_ul.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_ulink.png b/quanta/data/icons/22x22/tag_ulink.png
new file mode 100644
index 00000000..4fac40e7
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_ulink.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_union.png b/quanta/data/icons/22x22/tag_union.png
new file mode 100644
index 00000000..28aaa447
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_union.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_unique.png b/quanta/data/icons/22x22/tag_unique.png
new file mode 100644
index 00000000..677b3387
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_unique.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_variablelist.png b/quanta/data/icons/22x22/tag_variablelist.png
new file mode 100644
index 00000000..094262d2
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_variablelist.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_varlistentry.png b/quanta/data/icons/22x22/tag_varlistentry.png
new file mode 100644
index 00000000..aa10dd3c
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_varlistentry.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_varlistitem.png b/quanta/data/icons/22x22/tag_varlistitem.png
new file mode 100644
index 00000000..bf2fc532
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_varlistitem.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_what.png b/quanta/data/icons/22x22/tag_what.png
new file mode 100644
index 00000000..0f687b92
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_what.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_wml.png b/quanta/data/icons/22x22/tag_wml.png
new file mode 100644
index 00000000..1660ed63
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_wml.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tag_xref.png b/quanta/data/icons/22x22/tag_xref.png
new file mode 100644
index 00000000..d9d89a76
--- /dev/null
+++ b/quanta/data/icons/22x22/tag_xref.png
Binary files differ
diff --git a/quanta/data/icons/22x22/textarea.png b/quanta/data/icons/22x22/textarea.png
new file mode 100644
index 00000000..dea297ff
--- /dev/null
+++ b/quanta/data/icons/22x22/textarea.png
Binary files differ
diff --git a/quanta/data/icons/22x22/tree_win.png b/quanta/data/icons/22x22/tree_win.png
new file mode 100644
index 00000000..8b99b73c
--- /dev/null
+++ b/quanta/data/icons/22x22/tree_win.png
Binary files differ
diff --git a/quanta/data/icons/22x22/ttab.png b/quanta/data/icons/22x22/ttab.png
new file mode 100644
index 00000000..f6d5c08b
--- /dev/null
+++ b/quanta/data/icons/22x22/ttab.png
Binary files differ
diff --git a/quanta/data/icons/22x22/view_text.png b/quanta/data/icons/22x22/view_text.png
new file mode 100644
index 00000000..f789dda1
--- /dev/null
+++ b/quanta/data/icons/22x22/view_text.png
Binary files differ
diff --git a/quanta/data/icons/22x22/vpl.png b/quanta/data/icons/22x22/vpl.png
new file mode 100644
index 00000000..dc18f06c
--- /dev/null
+++ b/quanta/data/icons/22x22/vpl.png
Binary files differ
diff --git a/quanta/data/icons/22x22/vpl_text.png b/quanta/data/icons/22x22/vpl_text.png
new file mode 100644
index 00000000..7795915c
--- /dev/null
+++ b/quanta/data/icons/22x22/vpl_text.png
Binary files differ
diff --git a/quanta/data/icons/22x22/xmlval.png b/quanta/data/icons/22x22/xmlval.png
new file mode 100644
index 00000000..180729f9
--- /dev/null
+++ b/quanta/data/icons/22x22/xmlval.png
Binary files differ
diff --git a/quanta/data/icons/22x22/xsltproc.png b/quanta/data/icons/22x22/xsltproc.png
new file mode 100644
index 00000000..54de7447
--- /dev/null
+++ b/quanta/data/icons/22x22/xsltproc.png
Binary files differ
diff --git a/quanta/data/icons/Makefile.am b/quanta/data/icons/Makefile.am
new file mode 100644
index 00000000..f1c52db0
--- /dev/null
+++ b/quanta/data/icons/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = 22x22 16x16
+KDE_ICON = quanta
+quantadir = ${quanta_datadir}/toolbar
+quanta_DATA = files.png
diff --git a/quanta/data/icons/files.png b/quanta/data/icons/files.png
new file mode 100644
index 00000000..7838f516
--- /dev/null
+++ b/quanta/data/icons/files.png
Binary files differ
diff --git a/quanta/data/icons/hi16-app-quanta.png b/quanta/data/icons/hi16-app-quanta.png
new file mode 100644
index 00000000..95e0c2f3
--- /dev/null
+++ b/quanta/data/icons/hi16-app-quanta.png
Binary files differ
diff --git a/quanta/data/icons/hi16-app-quanta_be.png b/quanta/data/icons/hi16-app-quanta_be.png
new file mode 100644
index 00000000..95e0c2f3
--- /dev/null
+++ b/quanta/data/icons/hi16-app-quanta_be.png
Binary files differ
diff --git a/quanta/data/icons/hi22-app-quanta.png b/quanta/data/icons/hi22-app-quanta.png
new file mode 100644
index 00000000..3edabc68
--- /dev/null
+++ b/quanta/data/icons/hi22-app-quanta.png
Binary files differ
diff --git a/quanta/data/icons/hi22-app-quanta_be.png b/quanta/data/icons/hi22-app-quanta_be.png
new file mode 100644
index 00000000..3edabc68
--- /dev/null
+++ b/quanta/data/icons/hi22-app-quanta_be.png
Binary files differ
diff --git a/quanta/data/icons/hi32-app-quanta.png b/quanta/data/icons/hi32-app-quanta.png
new file mode 100644
index 00000000..9eda303b
--- /dev/null
+++ b/quanta/data/icons/hi32-app-quanta.png
Binary files differ
diff --git a/quanta/data/icons/hi32-app-quanta_be.png b/quanta/data/icons/hi32-app-quanta_be.png
new file mode 100644
index 00000000..9eda303b
--- /dev/null
+++ b/quanta/data/icons/hi32-app-quanta_be.png
Binary files differ
diff --git a/quanta/data/icons/hi48-app-quanta.png b/quanta/data/icons/hi48-app-quanta.png
new file mode 100644
index 00000000..6ed0e38f
--- /dev/null
+++ b/quanta/data/icons/hi48-app-quanta.png
Binary files differ
diff --git a/quanta/data/icons/hi48-app-quanta_be.png b/quanta/data/icons/hi48-app-quanta_be.png
new file mode 100644
index 00000000..6ed0e38f
--- /dev/null
+++ b/quanta/data/icons/hi48-app-quanta_be.png
Binary files differ
diff --git a/quanta/data/pics/Makefile.am b/quanta/data/pics/Makefile.am
new file mode 100644
index 00000000..8c20b8fd
--- /dev/null
+++ b/quanta/data/pics/Makefile.am
@@ -0,0 +1,3 @@
+quantadir = ${quanta_datadir}/toolbar
+
+quanta_DATA = quantalogo.png wiznewprjweb.png wiznewprjglb.png wiznewprjfin.png wiznewprjloc.png quantalogo_be.png
diff --git a/quanta/data/pics/quantalogo.png b/quanta/data/pics/quantalogo.png
new file mode 100644
index 00000000..9822f260
--- /dev/null
+++ b/quanta/data/pics/quantalogo.png
Binary files differ
diff --git a/quanta/data/pics/quantalogo_be.png b/quanta/data/pics/quantalogo_be.png
new file mode 100644
index 00000000..d73f0a41
--- /dev/null
+++ b/quanta/data/pics/quantalogo_be.png
Binary files differ
diff --git a/quanta/data/pics/wiznewprjfin.png b/quanta/data/pics/wiznewprjfin.png
new file mode 100644
index 00000000..1b490dbf
--- /dev/null
+++ b/quanta/data/pics/wiznewprjfin.png
Binary files differ
diff --git a/quanta/data/pics/wiznewprjglb.png b/quanta/data/pics/wiznewprjglb.png
new file mode 100644
index 00000000..6bd24c1b
--- /dev/null
+++ b/quanta/data/pics/wiznewprjglb.png
Binary files differ
diff --git a/quanta/data/pics/wiznewprjloc.png b/quanta/data/pics/wiznewprjloc.png
new file mode 100644
index 00000000..ce1b9eae
--- /dev/null
+++ b/quanta/data/pics/wiznewprjloc.png
Binary files differ
diff --git a/quanta/data/pics/wiznewprjweb.png b/quanta/data/pics/wiznewprjweb.png
new file mode 100644
index 00000000..e1cbd3cf
--- /dev/null
+++ b/quanta/data/pics/wiznewprjweb.png
Binary files differ
diff --git a/quanta/data/templates/Makefile.am b/quanta/data/templates/Makefile.am
new file mode 100644
index 00000000..2b540b4a
--- /dev/null
+++ b/quanta/data/templates/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = images text documents binaries pages scripts
diff --git a/quanta/data/templates/binaries/Makefile.am b/quanta/data/templates/binaries/Makefile.am
new file mode 100644
index 00000000..7a83c6ca
--- /dev/null
+++ b/quanta/data/templates/binaries/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = images others
+
+templatesbinariesdir = ${quanta_datadir}/templates/binaries
+templatesbinaries_DATA = dirinfo
+
+install-data-hook:
+ @mv $(DESTDIR)$(templatesbinariesdir)/dirinfo $(DESTDIR)$(templatesbinariesdir)/.dirinfo
diff --git a/quanta/data/templates/binaries/dirinfo b/quanta/data/templates/binaries/dirinfo
new file mode 100644
index 00000000..620c4ce3
--- /dev/null
+++ b/quanta/data/templates/binaries/dirinfo
@@ -0,0 +1,6 @@
+PostText=
+PreText=
+Type=file/all
+UsePrePostText=false
+
+
diff --git a/quanta/data/templates/binaries/images/Makefile.am b/quanta/data/templates/binaries/images/Makefile.am
new file mode 100644
index 00000000..9d86cd98
--- /dev/null
+++ b/quanta/data/templates/binaries/images/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS = jpg others png
+
diff --git a/quanta/data/templates/binaries/images/jpg/Makefile.am b/quanta/data/templates/binaries/images/jpg/Makefile.am
new file mode 100644
index 00000000..621a66ff
--- /dev/null
+++ b/quanta/data/templates/binaries/images/jpg/Makefile.am
@@ -0,0 +1,2 @@
+templatesbinariesimagesjpgdir = ${quanta_datadir}/templates/binaries/images/jpg
+templatesbinariesimagesjpg_DATA = demo.jpg
diff --git a/quanta/data/templates/binaries/images/jpg/demo.jpg b/quanta/data/templates/binaries/images/jpg/demo.jpg
new file mode 100644
index 00000000..eea8f549
--- /dev/null
+++ b/quanta/data/templates/binaries/images/jpg/demo.jpg
Binary files differ
diff --git a/quanta/data/templates/binaries/images/others/Makefile.am b/quanta/data/templates/binaries/images/others/Makefile.am
new file mode 100644
index 00000000..5889bc15
--- /dev/null
+++ b/quanta/data/templates/binaries/images/others/Makefile.am
@@ -0,0 +1,2 @@
+templatesbinariesimagesothersdir = ${quanta_datadir}/templates/binaries/images/others
+templatesbinariesimagesothers_DATA = demo.tif
diff --git a/quanta/data/templates/binaries/images/others/demo.tif b/quanta/data/templates/binaries/images/others/demo.tif
new file mode 100644
index 00000000..efe75e39
--- /dev/null
+++ b/quanta/data/templates/binaries/images/others/demo.tif
Binary files differ
diff --git a/quanta/data/templates/binaries/images/png/Makefile.am b/quanta/data/templates/binaries/images/png/Makefile.am
new file mode 100644
index 00000000..4d800c96
--- /dev/null
+++ b/quanta/data/templates/binaries/images/png/Makefile.am
@@ -0,0 +1,2 @@
+templatesbinariesimagespngdir = ${quanta_datadir}/templates/binaries/images/png
+templatesbinariesimagespng_DATA = demo.png
diff --git a/quanta/data/templates/binaries/images/png/demo.png b/quanta/data/templates/binaries/images/png/demo.png
new file mode 100644
index 00000000..3c733c65
--- /dev/null
+++ b/quanta/data/templates/binaries/images/png/demo.png
Binary files differ
diff --git a/quanta/data/templates/binaries/others/Makefile.am b/quanta/data/templates/binaries/others/Makefile.am
new file mode 100644
index 00000000..3f512f5b
--- /dev/null
+++ b/quanta/data/templates/binaries/others/Makefile.am
@@ -0,0 +1,2 @@
+templatesbinariesothersdir = ${quanta_datadir}/templates/binaries/others
+templatesbinariesothers_DATA = print.pdf
diff --git a/quanta/data/templates/binaries/others/print.pdf b/quanta/data/templates/binaries/others/print.pdf
new file mode 100644
index 00000000..98db664b
--- /dev/null
+++ b/quanta/data/templates/binaries/others/print.pdf
Binary files differ
diff --git a/quanta/data/templates/documents/Makefile.am b/quanta/data/templates/documents/Makefile.am
new file mode 100644
index 00000000..eb6533cd
--- /dev/null
+++ b/quanta/data/templates/documents/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = html others scripts
+
+templatesdocumentsdir = ${quanta_datadir}/templates/documents
+templatesdocuments_DATA = dirinfo
+
+install-data-hook:
+ @mv $(DESTDIR)$(templatesdocumentsdir)/dirinfo $(DESTDIR)$(templatesdocumentsdir)/.dirinfo
diff --git a/quanta/data/templates/documents/dirinfo b/quanta/data/templates/documents/dirinfo
new file mode 100644
index 00000000..2e7b4451
--- /dev/null
+++ b/quanta/data/templates/documents/dirinfo
@@ -0,0 +1,6 @@
+Type=template/all
+PostText=
+PreText=
+UsePrePostText=false
+
+
diff --git a/quanta/data/templates/documents/html/Makefile.am b/quanta/data/templates/documents/html/Makefile.am
new file mode 100644
index 00000000..8f43ee1e
--- /dev/null
+++ b/quanta/data/templates/documents/html/Makefile.am
@@ -0,0 +1,2 @@
+templatesdocumentshtmldir = ${quanta_datadir}/templates/documents/html
+templatesdocumentshtml_DATA = demo.html
diff --git a/quanta/data/templates/documents/html/demo.html b/quanta/data/templates/documents/html/demo.html
new file mode 100644
index 00000000..4f0692e0
--- /dev/null
+++ b/quanta/data/templates/documents/html/demo.html
@@ -0,0 +1 @@
+<!-- Put here the HTML Document templates --> \ No newline at end of file
diff --git a/quanta/data/templates/documents/others/Makefile.am b/quanta/data/templates/documents/others/Makefile.am
new file mode 100644
index 00000000..ede3e126
--- /dev/null
+++ b/quanta/data/templates/documents/others/Makefile.am
@@ -0,0 +1,2 @@
+templatesdocumentsothersdir = ${quanta_datadir}/templates/documents/others
+templatesdocumentsothers_DATA = demo.txt
diff --git a/quanta/data/templates/documents/others/demo.txt b/quanta/data/templates/documents/others/demo.txt
new file mode 100644
index 00000000..e650dc4f
--- /dev/null
+++ b/quanta/data/templates/documents/others/demo.txt
@@ -0,0 +1,2 @@
+ Put here your other text documents that you can use
+to start a new page. \ No newline at end of file
diff --git a/quanta/data/templates/documents/scripts/Makefile.am b/quanta/data/templates/documents/scripts/Makefile.am
new file mode 100644
index 00000000..76f0862f
--- /dev/null
+++ b/quanta/data/templates/documents/scripts/Makefile.am
@@ -0,0 +1,2 @@
+templatesdocumentsscriptsdir = ${quanta_datadir}/templates/documents/scripts
+templatesdocumentsscripts_DATA = demo.script
diff --git a/quanta/data/templates/documents/scripts/demo.script b/quanta/data/templates/documents/scripts/demo.script
new file mode 100644
index 00000000..0b887062
--- /dev/null
+++ b/quanta/data/templates/documents/scripts/demo.script
@@ -0,0 +1 @@
+// Put here your script templates/skeletons. \ No newline at end of file
diff --git a/quanta/data/templates/images/Makefile.am b/quanta/data/templates/images/Makefile.am
new file mode 100644
index 00000000..99e7294e
--- /dev/null
+++ b/quanta/data/templates/images/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = jpg png others
+
+templatesimagesdir = ${quanta_datadir}/templates/images
+templatesimages_DATA = dirinfo
+
+install-data-hook:
+ @mv $(DESTDIR)$(templatesimagesdir)/dirinfo $(DESTDIR)$(templatesimagesdir)/.dirinfo
diff --git a/quanta/data/templates/images/banners/Makefile.am b/quanta/data/templates/images/banners/Makefile.am
new file mode 100644
index 00000000..6f99997c
--- /dev/null
+++ b/quanta/data/templates/images/banners/Makefile.am
@@ -0,0 +1,2 @@
+templatesimagesbannerdir = ${quanta_datadir}/templates/images/banners
+templatesimagesbanner_DATA = demo.jpg
diff --git a/quanta/data/templates/images/banners/demo.jpg b/quanta/data/templates/images/banners/demo.jpg
new file mode 100644
index 00000000..eea8f549
--- /dev/null
+++ b/quanta/data/templates/images/banners/demo.jpg
Binary files differ
diff --git a/quanta/data/templates/images/buttons/Makefile.am b/quanta/data/templates/images/buttons/Makefile.am
new file mode 100644
index 00000000..fdcd09b3
--- /dev/null
+++ b/quanta/data/templates/images/buttons/Makefile.am
@@ -0,0 +1,2 @@
+templatesimagesbuttonsdir = ${quanta_datadir}/templates/images/buttons
+templatesimagesbuttons_DATA = ball.png
diff --git a/quanta/data/templates/images/buttons/ball.png b/quanta/data/templates/images/buttons/ball.png
new file mode 100644
index 00000000..0e180b4d
--- /dev/null
+++ b/quanta/data/templates/images/buttons/ball.png
Binary files differ
diff --git a/quanta/data/templates/images/dirinfo b/quanta/data/templates/images/dirinfo
new file mode 100644
index 00000000..f7d6e032
--- /dev/null
+++ b/quanta/data/templates/images/dirinfo
@@ -0,0 +1,4 @@
+Type=file/all
+PostText=
+PreText=
+UsePrePostText=false
diff --git a/quanta/data/templates/images/jpg/Makefile.am b/quanta/data/templates/images/jpg/Makefile.am
new file mode 100644
index 00000000..056df6d9
--- /dev/null
+++ b/quanta/data/templates/images/jpg/Makefile.am
@@ -0,0 +1,2 @@
+templatesimagesjpgdir = ${quanta_datadir}/templates/images/jpg
+templatesimagesjpg_DATA = demo.jpg
diff --git a/quanta/data/templates/images/jpg/demo.jpg b/quanta/data/templates/images/jpg/demo.jpg
new file mode 100644
index 00000000..eea8f549
--- /dev/null
+++ b/quanta/data/templates/images/jpg/demo.jpg
Binary files differ
diff --git a/quanta/data/templates/images/others/Makefile.am b/quanta/data/templates/images/others/Makefile.am
new file mode 100644
index 00000000..61b7bd57
--- /dev/null
+++ b/quanta/data/templates/images/others/Makefile.am
@@ -0,0 +1,2 @@
+templatesimagesothersdir = ${quanta_datadir}/templates/images/others
+templatesimagesothers_DATA = demo.tif
diff --git a/quanta/data/templates/images/others/demo.tif b/quanta/data/templates/images/others/demo.tif
new file mode 100644
index 00000000..efe75e39
--- /dev/null
+++ b/quanta/data/templates/images/others/demo.tif
Binary files differ
diff --git a/quanta/data/templates/images/png/Makefile.am b/quanta/data/templates/images/png/Makefile.am
new file mode 100644
index 00000000..a73b78db
--- /dev/null
+++ b/quanta/data/templates/images/png/Makefile.am
@@ -0,0 +1,2 @@
+templatesimagespngdir = ${quanta_datadir}/templates/images/png
+templatesimagespng_DATA = demo.png
diff --git a/quanta/data/templates/images/png/demo.png b/quanta/data/templates/images/png/demo.png
new file mode 100644
index 00000000..3c733c65
--- /dev/null
+++ b/quanta/data/templates/images/png/demo.png
Binary files differ
diff --git a/quanta/data/templates/pages/Makefile.am b/quanta/data/templates/pages/Makefile.am
new file mode 100644
index 00000000..6eaaa6a8
--- /dev/null
+++ b/quanta/data/templates/pages/Makefile.am
@@ -0,0 +1,7 @@
+SUBDIRS = php html docbook
+
+templatespagesdir = ${quanta_datadir}/templates/pages
+templatespages_DATA = dirinfo
+
+install-data-hook:
+ @mv $(DESTDIR)$(templatespagesdir)/dirinfo $(DESTDIR)$(templatespagesdir)/.dirinfo
diff --git a/quanta/data/templates/pages/dirinfo b/quanta/data/templates/pages/dirinfo
new file mode 100644
index 00000000..345f5eb8
--- /dev/null
+++ b/quanta/data/templates/pages/dirinfo
@@ -0,0 +1,4 @@
+PostText=
+PreText=
+Type=template/all
+UsePrePostText=false
diff --git a/quanta/data/templates/pages/docbook/Makefile.am b/quanta/data/templates/pages/docbook/Makefile.am
new file mode 100644
index 00000000..6d748996
--- /dev/null
+++ b/quanta/data/templates/pages/docbook/Makefile.am
@@ -0,0 +1,2 @@
+templagespagesdocbookdir = ${quanta_datadir}/templates/pages/docbook
+templagespagesdocbook_DATA = kde-doc-template.docbook
diff --git a/quanta/data/templates/pages/docbook/kde-doc-template.docbook b/quanta/data/templates/pages/docbook/kde-doc-template.docbook
new file mode 100644
index 00000000..65a5773c
--- /dev/null
+++ b/quanta/data/templates/pages/docbook/kde-doc-template.docbook
@@ -0,0 +1,568 @@
+<?xml version="1.0" ?>
+<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
+ <!-- Define an entity for your application if it is not part of KDE
+ CVS -->
+ <!ENTITY kmyapplication "<application>KMyApp</application>">
+ <!ENTITY kappname "&kmyapplication;"><!-- replace kmyapplication here
+ do *not* replace kappname-->
+ <!ENTITY package "kde-module"><!-- kdebase, kdeadmin, etc. Leave
+ this unchanged if your
+ application is not maintained in KDE CVS -->
+ <!ENTITY % addindex "IGNORE">
+ <!ENTITY % English "INCLUDE"> <!-- ONLY If you are writing non-English
+ original documentation, change
+ the language here -->
+
+ <!-- Do not define any other entities; instead, use the entities
+ from entities/general.entities and $LANG/user.entities. -->
+]>
+<!-- kdoctemplate v0.9 January 10 2003
+ Changes to comments to clarify entity usage January 10 2003
+ Minor update to "Credits and Licenses" section on August 24, 2000
+ Removed "Revision history" section on 22 January 2001
+ Changed to Installation/Help menu entities 18 October 2001
+ Other minor cleanup and changes 18 October 2001
+ FPI change and minor changes November 2002 -->
+
+<!--
+This template was designed by: David Rugge davidrugge@mindspring.com
+with lots of help from: Eric Bischoff ebisch@cybercable.tm.fr
+and Frederik Fouvry fouvry@sfs.nphil.uni-tuebingen.de
+of the KDE DocBook team.
+
+You may freely use this template for writing any sort of KDE documentation.
+If you have any changes or improvements, please let us know.
+
+Remember:
+- in XML, the case of the <tags> and attributes is relevant ;
+- also, quote all attributes.
+
+Please don't forget to remove all these comments in your final documentation,
+thanks ;-).
+-->
+
+<!-- ................................................................ -->
+
+<!-- The language must NOT be changed here. -->
+<!-- If you are writing original documentation in a language other -->
+<!-- than English, change the language above ONLY, not here -->
+<book lang="&language;">
+
+<!-- This header contains all of the meta-information for the document such
+as Authors, publish date, the abstract, and Keywords -->
+
+<bookinfo>
+<title>The &kmyapplication; Handbook</title>
+
+<authorgroup>
+<author>
+<!-- This is just put in as an example. For real documentation, please
+ define a general entity in entities/contributor.entities, e.g.
+<!ENTITY George.N.Ugnacious "<personname><firstname>George</firstname><othername>N.</othername><surname>Ugnacious</surname></personname>">
+<!ENTITY George.N.Ugnacious.mail "<email>gnu@kde.org</email>">
+and use `&George.N.Ugnacious; &George.N.Ugnacious.mail;' in the author element.
+ -->
+<personname>
+<firstname>George</firstname>
+<othername>N.</othername>
+<surname>Ugnacious</surname>
+</personname>
+<email>gnu@kde.org</email>
+</author>
+</authorgroup>
+
+<!-- TRANS:ROLES_OF_TRANSLATORS -->
+
+<copyright>
+<year>2002</year>
+<holder>George N. Ugnacious</holder>
+</copyright>
+<!-- Translators: put here the copyright notice of the translation -->
+<!-- Put here the FDL notice. Read the explanation in fdl-notice.docbook
+ and in the FDL itself on how to use it. -->
+<legalnotice>&FDLNotice;</legalnotice>
+
+<!-- Date and version information of the documentation
+Don't forget to include this last date and this last revision number, we
+need them for translation coordination !
+Please respect the format of the date (YYYY-MM-DD) and of the version
+(V.MM.LL), it could be used by automation scripts.
+Do NOT change these in the translation. -->
+
+<date>2003-01-10</date>
+<releaseinfo>1.01.00</releaseinfo>
+
+<!-- Abstract about this handbook -->
+
+<abstract>
+<para>
+&kmyapplication; is an application specially designed to do nothing you would
+ever want.
+</para>
+</abstract>
+
+<!-- This is a set of Keywords for indexing by search engines.
+Please at least include KDE, the KDE package it is in, the name
+ of your application, and a few relevant keywords. -->
+
+<keywordset>
+<keyword>KDE</keyword>
+<keyword>kdeutils</keyword>
+<keyword>Kapp</keyword>
+<keyword>nothing</keyword>
+<keyword>nothing else</keyword>
+</keywordset>
+
+</bookinfo>
+
+<!-- The contents of the documentation begin here. Label
+each chapter so with the id attribute. This is necessary for two reasons: it
+allows you to easily reference the chapter from other chapters of your
+document, and if there is no ID, the name of the generated HTML files will vary
+from time to time making it hard to manage for maintainers and for the CVS
+system. Any chapter labelled (OPTIONAL) may be left out at the author's
+discretion. Other chapters should not be left out in order to maintain a
+consistent documentation style across all KDE apps. -->
+
+<chapter id="introduction">
+<title>Introduction</title>
+
+<!-- The introduction chapter contains a brief introduction for the
+application that explains what it does and where to report
+problems. Basically a long version of the abstract. Don't include a
+revision history. (see installation appendix comment) -->
+
+<para>
+&kmyapplication; is a program that lets you do absolutely nothing. Please report
+any problems or feature requests to the &kde; mailing lists.
+</para>
+</chapter>
+
+<chapter id="using-kapp">
+<title>Using &kmyapplication;</title>
+
+<!-- This chapter should tell the user how to use your app. You should use as
+many sections (Chapter, Sect1, Sect3, etc...) as is necessary to fully document
+your application. -->
+
+<para>
+
+<!-- Note that all graphics should be in .png format. Use no gifs because of
+patent issues. -->
+
+<screenshot>
+<screeninfo>Here's a screenshot of &kmyapplication;</screeninfo>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="screenshot.png" format="PNG"/>
+ </imageobject>
+ <imageobject>
+ <imagedata fileref="screenshot.eps" format="EPS"/>
+ </imageobject>
+ <textobject>
+ <phrase>Screenshot</phrase>
+ </textobject>
+ </mediaobject>
+</screenshot>
+</para>
+
+
+<sect1 id="kapp-features">
+<title>More &kmyapplication; features</title>
+
+<para>It slices! It dices! and it comes with a free toaster!</para>
+<para>
+The Squiggle Tool <guiicon><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="squiggle.png" format="PNG"/>
+ </imageobject>
+ <imageobject>
+ <imagedata fileref="squiggle.eps" format="EPS"/>
+ </imageobject>
+ <textobject>
+ <phrase>Squiggle</phrase>
+ </textobject>
+</inlinemediaobject></guiicon> is used to draw squiggly lines all over
+the &kmyapplication; main window. It's not a bug, it's a feature!
+</para>
+
+</sect1>
+</chapter>
+
+<chapter id="commands">
+<title>Command Reference</title>
+
+<!-- (OPTIONAL, BUT RECOMMENDED) This chapter should list all of the
+application windows and their menubar and toolbar commands for easy reference.
+Also include any keys that have a special function but have no equivalent in the
+menus or toolbars. This may not be necessary for small apps or apps with no tool
+or menu bars. -->
+
+<sect1 id="kapp-mainwindow">
+<title>The main &kmyapplication; window</title>
+
+<sect2>
+<title>The File Menu</title>
+<para>
+<variablelist>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>N</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>New</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Creates a new document</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>S</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Save</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Saves the document</action></para></listitem>
+</varlistentry>
+<varlistentry>
+<term><menuchoice>
+<shortcut>
+<keycombo action="simul">&Ctrl;<keycap>Q</keycap></keycombo>
+</shortcut>
+<guimenu>File</guimenu>
+<guimenuitem>Quit</guimenuitem>
+</menuchoice></term>
+<listitem><para><action>Quits</action> &kmyapplication;</para></listitem>
+</varlistentry>
+</variablelist>
+</para>
+
+</sect2>
+
+<sect2>
+<title>The <guimenu>Help</guimenu> Menu</title>
+
+<!-- Assuming you have a standard help menu (help, what's this, about -->
+<!-- &kmyapplication;, about KDE) then the documentation is already written. -->
+<!-- The following entity is valid anywhere that a variablelist is -->
+<!-- valid. -->
+
+&help.menu.documentation;
+
+</sect2>
+
+</sect1>
+</chapter>
+
+<chapter id="developers">
+<title>Developer's Guide to &kmyapplication;</title>
+
+<!-- (OPTIONAL) A Programming/Scripting reference chapter should be
+used for apps that use plugins or that provide their own scripting hooks
+and/or development libraries. -->
+
+<para>
+Programming &kmyapplication; plugins is a joy to behold. Just read through the next
+66 pages of API's to learn how!
+</para>
+
+<!-- Use refentries to describe APIs. Refentries are fairly complicated and you
+should consult the docbook reference for further details. The example below was
+taken from that reference and shortened a bit for readability. -->
+
+<refentry id="re-1007-unmanagechildren-1">
+<refmeta>
+<refentrytitle>XtUnmanageChildren</refentrytitle>
+<refmiscinfo>Xt - Geometry Management</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>XtUnmanageChildren
+</refname>
+<refpurpose>remove a list of children from a parent widget's managed
+list.
+<indexterm id="ix-1007-unmanagechildren-1"><primary>widgets</primary><secondary>removing</secondary></indexterm>
+<indexterm id="ix-1007-unmanagechildren-2"><primary>XtUnmanageChildren</primary></indexterm>
+</refpurpose>
+
+</refnamediv>
+<refsynopsisdiv>
+<refsynopsisdivinfo>
+<date>4 March 1996</date>
+</refsynopsisdivinfo>
+<synopsis>
+void XtUnmanageChildren(<replaceable class="parameter">children</replaceable>, <replaceable class="parameter">num_children</replaceable>)
+ WidgetList <replaceable class="parameter">children</replaceable>;
+ Cardinal <replaceable class="parameter">num_children</replaceable>;
+</synopsis>
+
+<refsect2 id="r2-1007-unmanagechildren-1">
+<title>Inputs</title>
+<variablelist>
+<varlistentry>
+<term><replaceable class="parameter">children</replaceable>
+</term>
+<listitem>
+<para>Specifies an array of child widgets. Each child must be of
+class RectObj or any subclass thereof.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term><replaceable class="parameter">num_children</replaceable>
+</term>
+<listitem>
+<para>Specifies the number of elements in <replaceable class="parameter">children</replaceable>.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+</refsect2></refsynopsisdiv>
+
+<refsect1 id="r1-1007-unmanagechildren-1">
+<title>Description
+</title>
+<para><function>XtUnmanageChildren()</function> unmaps the specified widgets
+and removes them from their parent's geometry management.
+The widgets will disappear from the screen, and (depending
+on its parent) may no longer have screen space allocated for
+them.
+</para>
+<para>Each of the widgets in the <replaceable class="parameter">children</replaceable> array must have
+the same parent.
+</para>
+<para>See the &ldquo;Algorithm&rdquo; section below for full details of the
+widget unmanagement procedure.
+</para>
+</refsect1>
+
+<refsect1 id="r1-1007-unmanagechildren-2">
+<title>Usage</title>
+<para>Unmanaging widgets is the usual method for temporarily
+making them invisible. They can be re-managed with
+<function>XtManageChildren()</function>.
+</para>
+<para>You can unmap a widget, but leave it under geometry
+management by calling <function>XtUnmapWidget()</function>. You can
+destroy a widget's window without destroying the widget by
+calling <function>XtUnrealizeWidget()</function>. You can destroy a
+widget completely with <function>XtDestroyWidget()</function>.
+</para>
+<para>If you are only going to unmanage a single widget, it is
+more convenient to call <function>XtUnmanageChild()</function>. It is
+often more convenient to call <function>XtUnmanageChild()</function>
+several times than it is to declare and initialize an array
+of widgets to pass to <function>XtUnmanageChildren()</function>. Calling
+<function>XtUnmanageChildren()</function> is more efficient, however,
+because it only calls the parent's <function>change_managed()</function>
+method once.
+</para>
+</refsect1>
+
+<refsect1 id="r1-1007-unmanagechildren-3">
+<title>Algorithm
+</title>
+<para><function>XtUnmanageChildren()</function> performs the following:
+</para>
+<variablelist>
+<varlistentry>
+<term>-
+</term>
+<listitem>
+<para>Ignores the child if it already is unmanaged or is being
+destroyed.
+</para>
+</listitem>
+</varlistentry>
+<varlistentry>
+<term>-
+</term>
+<listitem>
+<para>Otherwise, if the child is realized, it makes it nonvisible
+by unmapping it.
+</para>
+</listitem>
+</varlistentry>
+</variablelist>
+<para>
+</para>
+</refsect1>
+
+<refsect1 id="r1-1007-unmanagechildren-4">
+<title>Structures</title>
+<para>The <type>WidgetList</type> type is simply an array of widgets:
+</para>
+<screen id="sc-1007-unmanagechildren-1">typedef Widget *WidgetList;
+</screen>
+</refsect1>
+</refentry>
+
+</chapter>
+
+<chapter id="faq">
+<title>Questions and Answers</title>
+
+<!-- (OPTIONAL but recommended) This chapter should include all of the silly
+(and not-so-silly) newbie questions that fill up your mailbox. This chapter
+should be reserved for BRIEF questions and answers! If one question uses more
+than a page or so then it should probably be part of the
+"Using this Application" chapter instead. You should use links to
+cross-reference questions to the parts of your documentation that answer them.
+This is also a great place to provide pointers to other FAQ's if your users
+must do some complicated configuration on other programs in order for your
+application work. -->
+
+&reporting.bugs;
+&updating.documentation;
+
+<qandaset id="faqlist">
+<qandaentry>
+<question>
+<para>My Mouse doesn't work. How do I quit &kmyapplication;?</para>
+</question>
+<answer>
+<para>You silly goose! Check out the <link linkend="commands">Commands
+Section</link> for the answer.</para>
+</answer>
+</qandaentry>
+<qandaentry>
+<question>
+<para>Why can't I twiddle my documents?</para>
+</question>
+<answer>
+<para>You can only twiddle your documents if you have the foobar.lib
+installed.</para>
+</answer>
+</qandaentry>
+</qandaset>
+</chapter>
+
+<chapter id="credits">
+
+<!-- Include credits for the programmers, documentation writers, and
+contributors here. The license for your software should then be included below
+the credits with a reference to the appropriate license file included in the KDE
+distribution. -->
+
+<title>Credits and License</title>
+
+<para>
+&kmyapplication;
+</para>
+<para>
+Program copyright 1997 John Q. Hacker <email>jqh@kde.org</email>
+</para>
+<para>
+Contributors:
+<itemizedlist>
+<listitem><para>Konqui the KDE Dragon <email>konqui@kde.org</email></para>
+</listitem>
+<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para>
+</listitem>
+</itemizedlist>
+</para>
+
+<para>
+Documentation Copyright &copy; 1999 George N. Ugnacious <email>gnu@kde.org</email>
+</para>
+
+<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
+
+&underFDL; <!-- FDL: do not remove -->
+
+<!-- Determine which license your application is licensed under,
+ and delete all the remaining licenses below:
+
+ (NOTE: All documentation are licensed under the FDL,
+ regardless of what license the application uses) -->
+
+&underGPL; <!-- GPL License -->
+&underBSDLicense; <!-- BSD License -->
+&underArtisticLicense; <!-- BSD Artistic License -->
+&underX11License; <!-- X11 License -->
+
+</chapter>
+
+<appendix id="installation">
+<title>Installation</title>
+
+<sect1 id="getting-kapp">
+<title>How to obtain &kmyapplication;</title>
+
+<!-- This first entity contains boiler plate for applications that are
+part of KDE CVS. You should remove it if you are releasing your
+application -->
+
+&install.intro.documentation;
+
+</sect1>
+
+<sect1 id="requirements">
+<title>Requirements</title>
+
+<!--
+List any special requirements for your application here. This should include:
+.Libraries or other software that is not included in kdesupport,
+kdelibs, or kdebase.
+.Hardware requirements like amount of RAM, disk space, graphics card
+capabilities, screen resolution, special expansion cards, etc.
+.Operating systems the app will run on. If your app is designed only for a
+specific OS, (you wrote a graphical LILO configurator for example) put this
+information here.
+-->
+
+<para>
+In order to successfully use &kmyapplication;, you need &kde; 1.1. Foobar.lib is
+required in order to support the advanced &kmyapplication; features. &kmyapplication; uses
+about 5 megs of memory to run, but this may vary depending on your
+platform and configuration.
+</para>
+
+<para>
+All required libraries as well as &kmyapplication; itself can be found
+on <ulink url="ftp://ftp.kapp.org">The &kmyapplication; home page</ulink>.
+</para>
+
+<!-- For a list of updates, you may refer to the application web site
+or the ChangeLog file, or ... -->
+<para>
+You can find a list of changes at <ulink
+url="http://apps.kde.org/kapp">http://apps.kde.org/kapp</ulink>.
+</para>
+</sect1>
+
+<sect1 id="compilation">
+<title>Compilation and Installation</title>
+
+<!-- This entity contains the boilerplate text for standard -->
+<!-- compilation instructions. If your application requires any -->
+<!-- special handling, remove it, and replace with your own text. -->
+
+&install.compile.documentation;
+
+</sect1>
+
+<sect1 id="configuration">
+<title>Configuration</title>
+
+<para>Don't forget to tell your system to start the <filename>dtd</filename>
+dicer-toaster daemon first, or &kmyapplication; won't work !</para>
+
+</sect1>
+
+</appendix>
+
+&documentation.index;
+</book>
+
+<!--
+Local Variables:
+mode: xml
+sgml-minimize-attributes:nil
+sgml-general-insert-case:lower
+sgml-indent-step:0
+sgml-indent-data:nil
+End:
+
+vim:tabstop=2:shiftwidth=2:expandtab
+-->
diff --git a/quanta/data/templates/pages/html/Makefile.am b/quanta/data/templates/pages/html/Makefile.am
new file mode 100644
index 00000000..5921ba1f
--- /dev/null
+++ b/quanta/data/templates/pages/html/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = xhtml html_4.0.1 special
diff --git a/quanta/data/templates/pages/html/html_4.0.1/Makefile.am b/quanta/data/templates/pages/html/html_4.0.1/Makefile.am
new file mode 100644
index 00000000..6e5569e8
--- /dev/null
+++ b/quanta/data/templates/pages/html/html_4.0.1/Makefile.am
@@ -0,0 +1,2 @@
+templatespageshtml401dir = ${quanta_datadir}/templates/pages/html_4.0.1
+templatespageshtml401_DATA = basic.html
diff --git a/quanta/data/templates/pages/html/html_4.0.1/basic.html b/quanta/data/templates/pages/html/html_4.0.1/basic.html
new file mode 100644
index 00000000..27fcdc20
--- /dev/null
+++ b/quanta/data/templates/pages/html/html_4.0.1/basic.html
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0.1//EN">
+<!-- $Id Exp $ -->
+<!--Generated by quanta Plus template - freely use and distribute-->
+<html>
+<head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <meta name="GENERATOR" content="Quanta Plus">
+ <link>
+ <style type="text/css">
+ </style>
+ <script>
+ </script>
+</head>
+<body>
+
+</body>
+</html> \ 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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <title>d and d men</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ /* <![CDATA[ */
+ .move {
+ width:100%;
+ background-color:#acd2ff;
+ border-bottom:1px solid black;
+ font-size:14px;
+ font-family:vardana;
+ font-color:black;
+ text-align:center;
+ }
+
+.info {
+ width:100%;
+ background-color:#acd2ff;
+ border-top:1px solid black;else {
+ob.pixelLeft = event.clientX-X + document.body.scrollLeft;
+ob.pixelTop = event.clientY-Y + document.body.scrollTop;
+return false;
+}
+ font-size:13px;
+ font-family:vardana;
+ font-color:"#33CCAA";
+ }
+
+.panel {
+ width:150;
+ position:absolute;
+ border:1px solid black;
+ left:350;
+ top:200;
+ font-size:13px;
+ font-family:vardana;
+ }
+
+.panel a:visited{color:blue;}
+
+.panel a{text-decoration:none;color:black}
+
+.panel a:hover{text-decoration:none;}
+
+
+#panel a.visited{text-decoration:none;}
+
+.menu {
+ width:100%;
+ background-color:#eae9e8;
+ font-size:13px;
+ font-family:vardana;
+ }
+ /* ]]> */
+ </style>
+ <script language="javascript" type="text/javascript">
+ /* <![CDATA[ */
+N = (document.all) ? 0 : 1;
+var ob;
+var over = false;
+
+ function MD(e) {
+ if (over)
+ {
+ if (N) {
+ ob = document.getElementById("panel");
+ X=e.layerX;
+ Y=e.layerY;
+ return false;
+ }
+ else {
+ ob = document.getElementById("panel");
+ ob = ob.style;
+ X=event.offsetX;
+ Y=event.offsetY;
+ }
+ }
+}
+
+function MM(e) {
+if (ob) {
+if (N) {
+ob.style.top = e.pageY-Y;
+ob.style.left = e.pageX-X;
+ }
+ else {
+ ob.pixelLeft = event.clientX-X + document.body.scrollLeft;
+ ob.pixelTop = event.clientY-Y + document.body.scrollTop;
+ return false;
+ }
+ }
+}
+
+function MU() {
+ob = null;
+ }
+
+if (N) {
+document.captureEvents(Event.MOUSEDOWN | Event.MOUSEMOVE | Event.MOUSEUP);
+}
+
+document.onmousedown = MD;
+document.onmousemove = MM;
+document.onmouseup = MU;
+ /* ]]> */
+ </script>
+</head>
+<body>
+<div id="panel" class="panel" >
+<script language="JavaScript" type="text/javascript">
+function getArray(id)
+{
+ var splitarray = link[id].split("|");
+ return splitarray;
+}
+
+function info(i,obj,col)
+{
+ sublink = getArray(i);
+ infobar = document.getElementById("infob");
+ infobar.innerHTML = "<img src='quanta_icon.png'> "+sublink[2];
+ obj.style.backgroundColor=col;
+}
+
+function endi(obj,col)
+{
+ obj.style.backgroundColor=col;
+ infobar = document.getElementById("infob");
+ infobar.innerHTML = "<img src='quanta_icon.png'> <br>";
+}
+
+var link = new Array();
+link[0] = "&nbsp; Quanta|http://kdewebdev.org |Quanta Home";
+link[1] = "&nbsp; KDE|http://www.javascripts.com|Visit KDE.org";
+link[2] = "&nbsp; null link|http://# |null link";
+link[3] = "&nbsp; null link|http://# |null link";
+link[4] = "&nbsp; null link|http://#|null link";
+link[5] = "&nbsp; null link|http://# |null link";
+
+document.write("<div class='move' onmouseover='over=true;' onmouseout='over=false;' style='cursor:move'><b>Quanta Rocks!!!</b></div><div class='menu'><br></div>");
+for(i=0;i<link.length;i++)
+{
+sublink = getArray(i);
+document.write("<a href='"+sublink[1]+"'><div class='menu' onmouseover=\"info("+i+",this,'#acd2ff')\" onmouseout=\"endi(this,'#eae9e8')\" style='cursor:hand'> "+ sublink[0] +"</div></a>");
+}
+document.write("<div class='menu'><br></div><div class='info' id='infob' name='infob'><img src='pointer2.gif'> <br></div>");
+</script>
+</div>
+</body>
+</html> \ 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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+ <title>NewsPaper</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ /* <![CDATA[ */
+body {margin:0%;
+ padding:0%;
+ font-weight:bold;
+ }
+
+p {padding:5px;
+ position:relative;
+ top:-0.5em;
+ }
+
+h1 {position:relative;
+ width:95%;
+ border-bottom:1px double black;
+ }
+
+#masthead {background:white;
+ font-size:70px;
+ color:black;
+ padding:20px 0 20px 0;
+ border-bottom:1px double black;
+ text-align:center;
+ text-decoration:underline;
+ height:100px;
+ }
+
+#col1 {position:absolute;
+ left:1%;
+ width:20%;
+ top:150px;
+ height:500px;
+ font-size:1em;
+ border-right:1px solid black;
+ }
+
+#col2 {position:absolute;
+ left:22%;
+ width:25%;
+ top:150px;
+ height:500px;
+ font-size:1em;
+ border-right:1px solid black;
+ }
+
+#col3 {position:absolute;
+ left:48%;
+ width:25%;
+ top:150px;
+ height:500px;
+ font-size:1em;
+ border-right:1px solid black;
+ }
+#col4 {position:absolute;
+ left:74%;
+ width:auto;
+ top:150px;
+ height:500px;
+ font-size:1em;
+ }
+
+#footer {position:relative;
+ top:600px;
+ text-align:center;
+ text-decoration:underline overline;
+ font-size:small;
+ }
+
+.subl {float:left;
+ width:40%;
+ margin:0 10px 0 0;
+ padding:5px 5px 5px 0;
+ border-right:1px solid black;
+ }
+ /* ]]> */
+ </style>
+</head>
+<body>
+<div id="masthead">Quanta Times.</div>
+
+<div id="col1"><h1>News!</h1><p>The Quanta editor continues to improve and expand! Both in terms of usability and of functionality. <br /><br />
+This fab all purpose script and markup editor contius to make strides in every direction. Prompting the question from FOSS observers <em>"Just how many legs does Quanta have anyway?"</em></p></div>
+
+<div id="col2"><h1>Developers</h1><p><em>Undisclosed</em> honours are said to be on the way for the chief Quanta developers.<span class="subl"><em>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!</em></span>More news on this development will be printed when it comes to light.<br /><br />
+Just how many will be honoured and in what way is yet to be announced. Early speculation however suggests that some may recieve <em>personaly typed emails</em> possibly containing the word <em>&#8220;Thanks&#8221;</em> at some point in the text.</p></div>
+
+<div id="col3"><h1>Killer App!</h1><p>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 <em>certainly more and more web profesionals</em> to open source solutions.<br /><br />
+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.</p></div>
+
+<div id="col4"><h1>Comment!</h1><p>In a world without walls and fences who needs windows and gates?</p></div>
+
+<div id="footer">This has been Quanta News!</div>
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+<head>
+ <title>rightMen-Float.html</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ /* <![CDATA[ */
+ body {margin:0%;
+ padding:0%;
+ color:#000000;
+ background-color:#ffffff;
+ font-family: sans-serif;
+ }
+
+ #masthead {
+ }
+
+ #menu {float:left;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ }
+#mainText {margin:0 5% 0 25%;}
+
+#foot {text-align:center;
+ font-size:smaller;
+ }
+
+ul {list-style:none;}
+ /* ]]> */
+ </style>
+</head>
+<body>
+<a href="http://www.quanta.sourcforge.net">
+<div id="masthead">Quanta web I.D.E.</div>
+</a>
+
+<div id="menu">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="mainText">
+<!--enter your body content here-->
+<h1>Welcome to Quanta</h1>
+<p>
+Quanta Plus is a web development tool for
+the K Desktop Environment. Quanta is designed for <em>quick web development</em>
+and is a mature yet continuously developing editor with a number of great features.</p>
+<h1>Community</h1>
+<p>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.</p>
+<!--end of body content-->
+</div>
+
+<div id="foot"><a href="http://kdewebdev.org">
+Quanta web development IDE.</a>
+</div>
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+<head>
+ <title>rightMen-Float.html</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ /* <![CDATA[ */
+ body {margin:0%;
+ padding:0%;
+ color:#000000;
+ background-color:#ffffff;
+ font-family: sans-serif;
+ }
+
+ #masthead {font-size:3em;
+ color:#000000;
+ background-color:#a9d1ff;
+ padding:0.5em;
+ text-align:right;
+ }
+
+ #menu {float:left;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ color:#3179ac;
+ background-color:#eae9e8;
+ }
+#mainText {margin:0 5% 0 25%;}
+
+#foot {text-align:center;
+ font-size:smaller;
+ }
+
+a {text-decoration:none;
+ color:#3179ac;
+ font-weight:bold;
+ display:block;
+ }
+
+a:hover {color:grey;}
+
+ul {list-style:none;}
+ /* ]]> */
+ </style>
+</head>
+<body>
+<div id="masthead"><a href="http://www.quanta.sourcforge.net" style="color:black;">Quanta web I.D.E.</a></div>
+<div id="menu">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="mainText">
+<!--enter your body content here-->
+<h1>Welcome to Quanta</h1>
+<p>
+Quanta Plus is a web development tool for
+the K Desktop Environment. Quanta is designed for <em>quick web development</em>
+and is a mature yet continuously developing editor with a number of great features.</p>
+<h1>Community</h1>
+<p>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.</p>
+<!--end of body content-->
+</div>
+
+<div id="foot"><a href="http://kdewebdev.org">
+Quanta web development IDE.</a>
+</div>
+</body>
+</html>
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 @@
+ <?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+<head>
+ <title>rightMen-Float.html</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ /* <![CDATA[ */
+ body {margin:0%;
+ padding:0%;
+ color:#000000;
+ background-color:#ffffff;
+ font-family: sans-serif;
+ }
+
+ #masthead {
+ }
+
+ #menu {float:right;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ }
+
+#mainText {margin:0 25% 0 5%;}
+
+#foot {text-align:center;
+ font-size:smaller;
+ }
+ /* ]]> */
+ </style>
+</head>
+<body>
+<a href="http://www.quanta.sourcforge.net">
+<div id="masthead">Quanta web I.D.E.</div>
+</a>
+
+<div id="menu">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="mainText">
+<!--enter your body content here-->
+<h1>Welcome to Quanta</h1>
+<p>
+Quanta Plus is a web development tool for
+the K Desktop Environment. Quanta is designed for <em>quick web development</em>
+and is a mature yet continuously developing editor with a number of great features.</p>
+<h1>Community</h1>
+<p>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.</p>
+<!--end of body content-->
+</div>
+
+<div id="foot"><a href="http://kdewebdev.org">
+Quanta web development IDE.</a>
+</div>
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+<head>
+ <title>rightMen-Float.html</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+ /* <![CDATA[ */
+ body {margin:0%;
+ padding:0%;
+ color:#000000;
+ background-color:#ffffff;
+ font-family: sans-serif;
+ }
+
+ #masthead {font-size:3em;
+ color:#000000;
+ background-color:#a9d1ff;
+ padding:0.5em;
+ }
+
+ #menu {float:right;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ color:#3179ac;
+ background-color:#eae9e8;
+ }
+
+#mainText {margin:0 25% 0 5%;}
+
+#foot {text-align:center;
+ font-size:smaller;
+ }
+
+a {text-decoration:none;
+ color:#3179ac;
+ font-weight:bold;
+ display:block;
+ }
+
+a:hover {color:grey;}
+
+ul {list-style:none;}
+ /* ]]> */
+ </style>
+</head>
+<body>
+<div id="masthead"><a href="http://www.quanta.sourcforge.net" style="color:black;">Quanta web I.D.E.</a></div>
+<div id="menu">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="mainText">
+<!--enter your body content here-->
+<h1>Welcome to Quanta</h1>
+<p>
+Quanta Plus is a web development tool for
+the K Desktop Environment. Quanta is designed for <em>quick web development</em>
+and is a mature yet continuously developing editor with a number of great features.</p>
+<h1>Community</h1>
+<p>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.</p>
+<!--end of body content-->
+</div>
+
+<div id="foot"><a href="http://kdewebdev.org">
+Quanta web development IDE.</a>
+</div>
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+<head>
+ <title>rightMen-Float.html</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+/* <![CDATA[ */
+ body {margin:0%;
+ padding:0%;
+ color:#000000;
+ background-color:#ffffff;
+ font-family: sans-serif;
+ }
+
+ #masthead {
+ }
+
+ #menuRight {float:right;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ }
+
+#menuLeft {float:left;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ }
+
+#mainText {margin:0 25% 0 25%;}
+
+#foot {text-align:center;
+ font-size:smaller;
+ }
+ /* ]]> */
+ </style>
+</head>
+<body>
+<a href="http://www.quanta.sourcforge.net">
+<div id="masthead">Quanta web I.D.E.</div>
+</a>
+
+<div id="menuRight">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="menuLeft">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="mainText">
+<!--enter your body content here-->
+<h1>Welcome to Quanta</h1>
+<p>
+Quanta Plus is a web development tool for
+the K Desktop Environment. Quanta is designed for <em>quick web development</em>
+and is a mature yet continuously developing editor with a number of great features.</p>
+<h1>Community</h1>
+<p>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.</p>
+<!--end of body content-->
+</div>
+
+<div id="foot"><a href="http://kdewebdev.org">
+Quanta web development IDE.</a>
+</div>
+</body>
+</html>
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 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<!-- $Id$ -->
+<head>
+ <title>rightMen-Float.html</title>
+ <meta name="GENERATOR" content="Quanta Plus" />
+ <meta name="AUTHOR" content="D.Reddish" />
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <style type="text/css">
+/* <![CDATA[ */
+ body {margin:0%;
+ padding:0%;
+ color:#000000;
+ background-color:#ffffff;
+ font-family: sans-serif;
+ }
+
+ #masthead {font-size:3em;
+ color:#000000;
+ background-color:#a9d1ff;
+ padding:0.5em;
+ text-align:center;
+ }
+
+ #menuRight {float:right;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ color:#3179ac;
+ background-color:#eae9e8;
+ }
+
+#menuLeft {float:left;
+ width:22%;
+ height:auto;
+ margin-left:0%;
+ color:#3179ac;
+ background-color:#eae9e8;
+ }
+#mainText {margin:0 25% 0 25%;}
+
+#foot {text-align:center;
+ font-size:smaller;
+ }
+
+a {text-decoration:none;
+ color:#3179ac;
+ font-weight:bold;
+ display:block;
+ }
+
+a:hover {color:grey;}
+
+ul {list-style:none;}
+ /* ]]> */
+ </style>
+</head>
+<body>
+<div id="masthead"><a href="http://www.quanta.sourcforge.net" style="color:black;">Quanta web I.D.E.</a></div>
+<div id="menuRight">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="menuLeft">
+<!--enter your hyperlinks here-->
+<ul>
+<li><a href="http://kdewebdev.org">Quanta</a></li>
+<li><a href="http://www.kde.org">KDE.org</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+<li><a href="#">null link</a></li>
+</ul>
+<!--end of hyperlinks-->
+</div>
+
+<div id="mainText">
+<!--enter your body content here-->
+<h1>Welcome to Quanta</h1>
+<p>
+Quanta Plus is a web development tool for
+the K Desktop Environment. Quanta is designed for <em>quick web development</em>
+and is a mature yet continuously developing editor with a number of great features.</p>
+<h1>Community</h1>
+<p>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.</p>
+<!--end of body content-->
+</div>
+
+<div id="foot"><a href="http://kdewebdev.org">
+Quanta web development IDE.</a>
+</div>
+</body>
+</html>
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 @@
+<?
+
+//You can put script parts here and in the subdirs.
+
+?> \ 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.
+
+<script type="text/javascript" src="./validate.js"></script>
+
+or copy and paste the script into your document head enclosed in
+<script type="text/javascript"></script> tags
+
+add the following in place of your usual <body> tag
+<body onload="document.form1.yourname.focus();">
+
+
+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 = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 class=\""+o3_bgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+o3_fgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
+ if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 style=\"background-color: "+o3_bgcolor+"; height: "+o3_height+o3_heightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+o3_fgcolor+"; background-color: "+o3_fgcolor+"; height: "+o3_height+o3_heightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+"; text-decoration: "+o3_textdecoration+"; font-weight: "+o3_textweight+"; font-style:"+o3_textstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
+ if (o3_css == CSSOFF) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 "+o3_bgcolor+" "+o3_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+o3_fgcolor+" "+o3_fgbackground+" "+o3_height+"><TR><TD VALIGN=TOP><FONT FACE=\""+o3_textfont+"\" COLOR=\""+o3_textcolor+"\" SIZE=\""+o3_textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
+
+ 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 = "<IMG SRC=\""+o3_capicon+"\"> ";
+
+ if (close != "") {
+ if (o3_css == CSSCLASS) closing = "<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\" class=\""+o3_closefontclass+"\">"+close+"</A></TD>";
+ if (o3_css == CSSSTYLE) closing = "<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\" style=\"color: "+o3_closecolor+"; font-family: "+o3_closefont+"; font-size: "+o3_closesize+o3_closesizeunit+"; text-decoration: "+o3_closedecoration+"; font-weight: "+o3_closeweight+"; font-style:"+o3_closestyle+";\">"+close+"</A></TD>";
+ if (o3_css == CSSOFF) closing = "<TD ALIGN=RIGHT><A HREF=\"/\" "+closeevent+"=\"return cClick();\"><FONT COLOR=\""+o3_closecolor+"\" FACE=\""+o3_closefont+"\" SIZE=\""+o3_closesize+"\">"+close+"</FONT></A></TD>";
+ }
+
+ if (o3_css == CSSCLASS) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 class=\""+o3_bgclass+"\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT class=\""+o3_captionfontclass+"\">"+o3_capicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 class=\""+o3_fgclass+"\"><TR><TD VALIGN=TOP><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
+ if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 style=\"background-color: "+o3_bgcolor+"; background-image: url("+o3_bgbackground+"); height: "+o3_height+o3_heightunit+";\"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><FONT style=\"font-family: "+o3_captionfont+"; color: "+o3_capcolor+"; font-size: "+o3_captionsize+o3_captionsizeunit+"; font-weight: "+o3_captionweight+"; font-style: "+o3_captionstyle+";\">"+o3_capicon+title+"</FONT></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 style=\"color: "+o3_fgcolor+"; background-color: "+o3_fgcolor+"; height: "+o3_height+o3_heightunit+";\"><TR><TD VALIGN=TOP><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+"; text-decoration: "+o3_textdecoration+"; font-weight: "+o3_textweight+"; font-style:"+o3_textstyle+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
+ if (o3_css == CSSOFF) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING="+o3_border+" CELLSPACING=0 "+o3_bgcolor+" "+o3_bgbackground+" "+o3_height+"><TR><TD><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD><B><FONT COLOR=\""+o3_capcolor+"\" FACE=\""+o3_captionfont+"\" SIZE=\""+o3_captionsize+"\">"+o3_capicon+title+"</FONT></B></TD>"+closing+"</TR></TABLE><TABLE WIDTH=100% BORDER=0 CELLPADDING=2 CELLSPACING=0 "+o3_fgcolor+" "+o3_fgbackground+" "+o3_height+"><TR><TD VALIGN=TOP><FONT COLOR=\""+o3_textcolor+"\" FACE=\""+o3_textfont+"\" SIZE=\""+o3_textsize+"\">"+text+"</FONT></TD></TR></TABLE></TD></TR></TABLE>";
+
+ 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 = "<TABLE WIDTH="+o3_width+o3_widthunit+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+o3_heightunit+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+o3_padunit+"></TD></TR><TR><TD WIDTH="+o3_padxl+o3_padunit+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+o3_padunit+"><FONT class=\""+o3_textfontclass+"\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+o3_padunit+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+o3_padunit+"></TD></TR></TABLE>";
+ if (o3_css == CSSSTYLE) txt = "<TABLE WIDTH="+o3_width+o3_widthunit+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+o3_heightunit+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+o3_padunit+"></TD></TR><TR><TD WIDTH="+o3_padxl+o3_padunit+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+o3_padunit+"><FONT style=\"font-family: "+o3_textfont+"; color: "+o3_textcolor+"; font-size: "+o3_textsize+o3_textsizeunit+";\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+o3_padunit+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+o3_padunit+"></TD></TR></TABLE>";
+ if (o3_css == CSSOFF) txt = "<TABLE WIDTH="+o3_width+" BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT="+o3_height+"><TR><TD COLSPAN=3 HEIGHT="+o3_padyt+"></TD></TR><TR><TD WIDTH="+o3_padxl+"></TD><TD VALIGN=TOP WIDTH="+(o3_width-o3_padxl-o3_padxr)+"><FONT FACE=\""+o3_textfont+"\" COLOR=\""+o3_textcolor+"\" SIZE=\""+o3_textsize+"\">"+text+"</FONT></TD><TD WIDTH="+o3_padxr+"></TD></TR><TR><TD COLSPAN=3 HEIGHT="+o3_padyb+"></TD></TR></TABLE>";
+ }
+ 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.
+
+<script type="text/javascript" src="./preload.js"></script>
+
+or copy and paste the script into your document head enclosed in
+<script type="text/javascript"></script> 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 @@
+<?
+
+//You can put script parts here and in the subdirs.
+
+?> \ 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 @@
+<!-- You can put common HTML files/parts here. -->
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 @@
+<?
+
+//You can put script parts here and in the subdirs.
+
+?> \ 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 @@
+<tip category="IO">
+<html>
+<p>...that you can use ftp for file operations by using
+<b>ftp://user@domain/path</b> in the file dialog? It will prompt you for your password.
+</p>
+</html>
+</tip>
+
+<tip category="IO">
+<html>
+<p>...that you can use SSH/SCP for file operations by using
+<b>fish://user@domain/path</b> in the file dialog? It will prompt you for your password.
+</p>
+</html>
+</tip>
+
+<tip category="IO">
+<html>
+<p>...that you can view and manage the content of any
+<b>project upload profile</b> 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.
+</p>
+</html>
+</tip>
+
+<tip category="Editor">
+<html>
+<p>...that you can turn on line numbering and the icon border
+by default from <b>Settings &gt; Configure Editor::Defaults</b>?
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can create actions that will run scripts from
+<b>Settings &gt; Configure Actions</b> and place them on the toolbar? You can even assign hot keys to them.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can create custom toolbars and even make them project
+specific? You can customize any of Quanta's toolbars too.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that you can create remote projects and manage them with the
+<b>kio slave of your choice</b>? Look in the project settings dialog.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that you can open and close groups of files in projects with
+<b>Project Views</b>? You can even include project toolbars in the views. The new project toolbar makes it easy.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that you can have as many <b>upload profiles</b> 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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can view a summary of PHP classes, functions and variables
+in the structure tree with <b>RMB Show Groups For &gt; PHP</b>?
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can use auto-complete with PHP's built in functions by using <b>Ctrl+Space</b>?
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can turn on/off autoupdating of closing tags in
+<b>Settings &gt; Configure Quanta::Tag Style</b>?
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can cause Quanta to open files from Konqueror into the
+currently open window by adding a <b>--unique</b> switch to your .desktop
+file or menu entry? It would look like this: '[path/]quanta --unique'.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can add a keyboard shortcut for any action you define?
+Just go to <b>Settings > Configure Shortcuts</b>.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can add new local and remote top level folders to the Files Tree? Use <b>RMB New Top Folder...</b> and select a local folder or enter the remote server name in form of <i>ftp://user@server</i> and select the remote folder.
+</p>
+</html>
+</tip>
+
+<tip category="Information">
+<html>
+<p>...that there is a <b>README</b> file with useful information?
+</p>
+</html>
+</tip>
+
+<tip category="Information">
+<html>
+<p>...that we have a mailing list for Quanta users at <b><a href="http://mail.kde.org/mailman/listinfo/quanta">http://mail.kde.org/mailman/listinfo/quanta</a></b>? 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.
+</p>
+</html>
+</tip>
+
+<tip category="Information">
+<html>
+<p>...that you can search the Quanta mailing list using <b><a href="http://www.google.com/custom?hl=en&lr=&ie=ISO-8859-1&safe=off&cof=&sitesearch=http%3A%2F%2Fmail.kde.org&q=&btnG=Google+Search">Google</a></b>?
+</p>
+</html>
+</tip>
+
+<tip category="Information">
+<html>
+<p>...that we have additional mailing lists to support our users? Lists include Kommander and web development help.<b><a href="http://mail.kdewebdev.org/mailman/listinfo">Click here to see</a></b>.
+</p>
+</html>
+</tip>
+
+<tip category="Information">
+<html>
+<p>...that you can help to financially support our program of sponsoring developers? <b><a href="http://kdewebdev.org/donate.php">Click here to help</a></b>.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can use Quanta to enable new DTDs using our <b>tagxml DTD</b>? Quanta can even import a DTD for you.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can now edit and create Quanta <b>Document Type Editing Packages</b> from a dialog? Use DTD>Edit DTD settings to access this.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can use <b>Kommander</b> to create custom dialogs for Quanta? Open the editor with <i>kmdr-editor</i> or run a dialog with <i>kmdr-executor mydialog.kmdr</i>.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that <b>bookmarks are now saved</b>?
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta has a visual <b>problem reporter</b> for your current DTD? Switch to the <b>Structure Tree</b> and make the problem description widget visible with <b>View &gt; Show Problem Reporter</b>.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that you can save <b>file descriptions</b> that appear in the project tree? Right click on a project file, select <i>Properties</i> and go to the <i>Quanta File Info</i> tab.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that you can set the <b>Upload Status</b> of files and folders in the project tree? Right click on a project file or folder and select <i>Upload Status</i> 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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...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 <b>Settings &gt; Configure Quanta::User Interface</b>.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can move the file tabs now? <b>Hold the middle mouse button on a tab and drag it where you want it.</b>.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that the file tabs now have popup menus? <b>RMB on a file tab</b> and you can even select which open file to view from a menu list.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta can convert <b>tag and attribute case</b> for you? It's on the Tools menu.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can use Cervisia to manage CVS from inside Quanta? <b>Click on the Cervisia icon</b> 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.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that common CVS commands are available in the project context menu inside Quanta? <b>Open the project tree and right click on a file or folder.</b> This functionality uses the DCOP services of Cervisia so you must have it installed. It will also support any versioning system supported by Cervisia.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can use KFileReplace to find and replace across your entire project? <b>Click on the KFileReplace button</b> and you can set extensive configurations, use multi line values and wild cards, and even go to the files found in Quanta.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can create image maps easily with Quanta? <b>Select KImageMapEditor from the Plugins menu</b> and you have estensive options at your fingertips.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can debug XSL from within Quanta? <b>Click on the XSL icon for KXSL Dbg</b> and Quanta will load an interactive XSL debugger.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can visually check the status of your links from within Quanta? <b>Select KLinkStatus from the Plugins menu</b> and Quanta will load a visual link checker.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can view the HTML source when using project preview with PHP (or other server side scripting) in Quanta? <b>right click on a preview and select View Document Source</b> and Quanta will load a tab with the rendered HTML.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta has XML tools for things like XSL Transforms? <b>Select the scripts tree on the left</b> and you will find several Kommander dialogs that use your installed libxml libraries.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta has a local script library for useful scripts? <b>Select the scripts tree on the left</b> and you will find scripts and Kommander dialogs for doc generation, Quick Start, XSL Transforms and more.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can create the XML files used to display information about scripts in the Script tree? <b>Select the scripts tree on the left</b> and you will find scriptinfo.kmdr. Right click and select <i>Run Script</i> and fill in the dialog.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can create text templates using <b>Drag and Drop </b>? 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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can create <b>filter actions for templates</b>? 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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta has <b>four types of templates</b>? 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.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta has a deeply <b>integrated PHP debugger</b>? you can enable it from your <i>Project Settings</i>.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that Quanta now has <b>Team Project</b> capabilities? You can share information about roles, subprojects and tasks. This integrates with Quanta's new <b>Event Actions</b>. See the <i>Project Properties</i> dialog.
+</p>
+</html>
+</tip>
+
+<tip category="Project">
+<html>
+<p>...that Quanta supports attaching scripts to events with <b>Event Actions</b> in your projects? You can share information about roles, subprojects and tasks. This integrates with Quanta's new <b>Event Actions</b>. See the <i>Project Properties</i> dialog.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that Quanta now has a <b>public repository</b> for all resources? Quanta uses <i>KNewStuff</i> to make templates, scripts, DTEPs, toolbars and more available for download. Need something? Check the download menu items.
+</p>
+</html>
+</tip>
+
+<tip category="Application">
+<html>
+<p>...that you can contribute to <b>Quanta's public repository</b> of resources? Just <a href="mailto:submissions@kdewebdev.org?subject=Quanta%20Resource">email it here</a>.
+</p>
+</html>
+</tip>
+
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
--- /dev/null
+++ b/quanta/data/toolbars/cfml/cfml.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/cfml/fonts.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/cfml/forms.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/cfml/lists.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/cfml/standard.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/cfml/tables.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/css/css.toolbar.tgz
Binary files differ
diff --git a/quanta/data/toolbars/debug.toolbar.tgz b/quanta/data/toolbars/debug.toolbar.tgz
new file mode 100644
index 00000000..ed854a93
--- /dev/null
+++ b/quanta/data/toolbars/debug.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/docbook/docbook_code.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/docbook/docbook_ui.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/docbook/docbook_xml.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/docbook/xmltools.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/html/forms.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/html/lists.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/html/other.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/html/standard.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/html/style.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/html/tables.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kde-docbook-admonitions.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kde-docbook-images.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kde-docbook-list.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kde-docbook-standard.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kde-docbook-tables.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kde-docbook-uielements.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/kde-docbook/kdexmltools.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/attributes.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/complex.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/documentation.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/facets.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/main.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/misc.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/schema/simple.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/tagxml/tagxml.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/wml-1-2/deck.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/wml-1-2/forms.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/wml-1-2/misc.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/wml-1-2/table.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/wml-1-2/tasks.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/wml-1-2/text.toolbar.tgz
Binary files 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
--- /dev/null
+++ b/quanta/data/toolbars/xml/fonts.toolbar.tgz
Binary files 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 <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qbuttongroup.h>
+#include <qcheckbox.h>
+#include <qdom.h>
+#include <qfileinfo.h>
+#include <qlineedit.h>
+#include <qlistbox.h>
+#include <qmultilineedit.h>
+#include <qradiobutton.h>
+#include <qtabwidget.h>
+#include <qregexp.h>
+
+//kde includes
+#include <kapplication.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kicondialog.h>
+#include <kiconloader.h>
+#include <kkeybutton.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kmainwindow.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kpushbutton.h>
+#include <kstandarddirs.h>
+#include <kdeversion.h>
+#include <kinputdialog.h>
+#include <ktoolbar.h>
+
+//app includes
+#include "resource.h"
+#include "filecombo.h"
+
+#include "actionconfigdialog.h"
+#include "tagaction.h"
+#include "toolbartabwidget.h"
+
+ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &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 +" <quanta>");
+
+ //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<TagAction*>(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<TagAction *>(currentAction)->setModified(true);
+ QString s;
+ QDomElement el = static_cast<TagAction *>(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<QString, QString>::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<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients();
+ for( QPtrListIterator<KXMLGUIClient> 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<ToolbarEntry> it(m_toolbarList);
+ while (it.current())
+ {
+ it.current()->guiClient->actionCollection()->insert(currentAction);
+ ++it;
+ }
+
+ selectedShortcut = KShortcut();
+ static_cast<TagAction*>(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("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").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 <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 ACTIONCONFIGDIALOG_H
+#define ACTIONCONFIGDIALOG_H
+
+#include <qmap.h>
+#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<ToolbarEntry> &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<QString, QString> globalShortcuts;
+ KShortcut selectedShortcut;
+ KMainWindow *m_mainWindow;
+ QDict<ToolbarEntry> 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ActionConfigDialogS</class>
+<comment>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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ActionConfigDialogS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>751</width>
+ <height>628</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Configure Actions</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QSplitter" row="0" column="0">
+ <property name="name">
+ <cstring>splitter2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout17</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="2" column="3">
+ <property name="name">
+ <cstring>deleteAction</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Delete Action</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>addAction</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New Action</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>spacer14</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>spacer17</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Toolbar &amp; Action Tree</string>
+ </property>
+ </widget>
+ <widget class="KListView" row="1" column="1" rowspan="1" colspan="3">
+ <column>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="clickable">
+ <bool>false</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Shortcut</string>
+ </property>
+ <property name="clickable">
+ <bool>false</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>actionTreeView</cstring>
+ </property>
+ <property name="hScrollBarMode">
+ <enum>Auto</enum>
+ </property>
+ <property name="rootIsDecorated">
+ <bool>true</bool>
+ </property>
+ <property name="resizeMode">
+ <enum>AllColumns</enum>
+ </property>
+ <property name="tooltipColumn">
+ <number>2</number>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>layout9</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>buttonApply</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Apply</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="4">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>spacer16</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="0" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>actionProperties</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="title">
+ <string>Action Properties</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="6" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>addToolbar</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="7" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>removeToolbar</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <spacer row="6" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Tool &amp;tip:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineToolTip</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>lineToolTip</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Te&amp;xt:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineText</cstring>
+ </property>
+ </widget>
+ <widget class="KIconButton" row="1" column="4">
+ <property name="name">
+ <cstring>actionIcon</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="iconSize">
+ <number>22</number>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineText</cstring>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="4" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>buttonGroup4_2</cstring>
+ </property>
+ <property name="title">
+ <string>Shortcut</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>customShortcut</cstring>
+ </property>
+ <property name="text">
+ <string>C&amp;ustom</string>
+ </property>
+ </widget>
+ <widget class="KKeyButton" row="0" column="2">
+ <property name="name">
+ <cstring>shortcutKeyButton</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>noShortcut</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;None</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="KListBox" row="6" column="1" rowspan="2" colspan="2">
+ <property name="name">
+ <cstring>toolbarListBox</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Container toolbars:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="2" rowspan="1" colspan="3">
+ <item>
+ <property name="text">
+ <string>Tag</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Script</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>typeCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>T&amp;ype:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>typeCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="8" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>buttonGroup13</cstring>
+ </property>
+ <property name="title">
+ <string>Detailed Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QWidgetStack" row="0" column="0">
+ <property name="name">
+ <cstring>widgetStack1</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>page</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel5_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;tag&gt; :</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineTag</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>lineClosingTag</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>useClosingTag</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;/tag&gt; :</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>useActionDialog</cstring>
+ </property>
+ <property name="text">
+ <string>Run "Edit tag" dialog if available</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>page</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="FileCombo" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>scriptPath</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>64</width>
+ <height>20</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Input:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>inputBox</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Current Document</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Selected Text</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>inputBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel2_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Output:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>outputBox</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Insert in Cursor Position</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Replace Selection</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Replace Current Document</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Create New Document</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Message Window</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>outputBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentItem">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="3" column="1">
+ <item>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Insert in cursor position</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Replace selection</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Replace current document</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Create a new document</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Message window</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>errorBox</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentItem">
+ <number>5</number>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel3_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Error:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>errorBox</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>page</cstring>
+ </property>
+ <attribute name="id">
+ <number>2</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QMultiLineEdit" row="0" column="0">
+ <property name="name">
+ <cstring>textEdit</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer15</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>55</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>FileCombo</class>
+ <header location="global">filecombo.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ <slot access="public" specifier="">slotFileSelect()</slot>
+ <property type="String">text</property>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="339">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000011a494441541895d595318ac3301045bf1617ba860c7b83ade6186149b104f6762952e418aa72838551b324e9d2aa3028852c90a3911c9c75b1bf195bd85f6ffe085b596bb186de56715dd3b87be621220af9bdb556cdbd334b9c4c7333220a69fd71d324d51a1e110589ee990e9ac4b596ff240a49b5f67315512c1994a4c9a920a2100e5fc0c7262e9c8e500dbad6a6e5714ba6e37538d4a95465b8b2717aa9ffac3b66caa3cb37918d4f470000334343c3c3cfd6beefe789d5760f66c6e57a010640771a7ef070cec11833a900b0fbde157997c76da4d5d0b17691c83907f36e26b5a5c2586df738f319eed7c536070ff73312663549a295898198dd42d2a4226366c6ed7a9b662a90b66845e3c7e92e55f3ebf68afedfafe90ee225a4cc1198386d0000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>typeCombo</sender>
+ <signal>activated(int)</signal>
+ <receiver>widgetStack1</receiver>
+ <slot>raiseWidget(int)</slot>
+ </connection>
+ <connection>
+ <sender>customShortcut</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>shortcutKeyButton</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>typeCombo</sender>
+ <signal>highlighted(int)</signal>
+ <receiver>widgetStack1</receiver>
+ <slot>raiseWidget(int)</slot>
+ </connection>
+ <connection>
+ <sender>useClosingTag</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>lineClosingTag</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>addAction</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotNewAction()</slot>
+ </connection>
+ <connection>
+ <sender>deleteAction</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotDeleteAction()</slot>
+ </connection>
+ <connection>
+ <sender>addToolbar</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotAddContainerToolbar()</slot>
+ </connection>
+ <connection>
+ <sender>removeToolbar</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotRemoveContainerToolbar()</slot>
+ </connection>
+ <connection>
+ <sender>buttonApply</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotApply()</slot>
+ </connection>
+ <connection>
+ <sender>lineText</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>lineTag</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>lineClosingTag</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>textEdit</sender>
+ <signal>textChanged()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged()</slot>
+ </connection>
+ <connection>
+ <sender>customShortcut</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotToggled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>noShortcut</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotToggled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>useClosingTag</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotToggled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>useActionDialog</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotToggled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>actionIcon</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotToggled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>lineToolTip</sender>
+ <signal>textChanged(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>typeCombo</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>inputBox</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>outputBox</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>errorBox</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>shortcutKeyButton</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotToggled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>customShortcut</sender>
+ <signal>clicked()</signal>
+ <receiver>shortcutKeyButton</receiver>
+ <slot>animateClick()</slot>
+ </connection>
+ <connection>
+ <sender>actionIcon</sender>
+ <signal>clicked()</signal>
+ <receiver>ActionConfigDialogS</receiver>
+ <slot>slotTextChanged()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>actionTreeView</tabstop>
+ <tabstop>addAction</tabstop>
+ <tabstop>deleteAction</tabstop>
+ <tabstop>typeCombo</tabstop>
+ <tabstop>lineText</tabstop>
+ <tabstop>actionIcon</tabstop>
+ <tabstop>lineToolTip</tabstop>
+ <tabstop>noShortcut</tabstop>
+ <tabstop>shortcutKeyButton</tabstop>
+ <tabstop>toolbarListBox</tabstop>
+ <tabstop>addToolbar</tabstop>
+ <tabstop>removeToolbar</tabstop>
+ <tabstop>lineTag</tabstop>
+ <tabstop>useClosingTag</tabstop>
+ <tabstop>lineClosingTag</tabstop>
+ <tabstop>useActionDialog</tabstop>
+ <tabstop>inputBox</tabstop>
+ <tabstop>outputBox</tabstop>
+ <tabstop>errorBox</tabstop>
+ <tabstop>textEdit</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonApply</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kkeybutton.h</include>
+ <include location="global" impldecl="in implementation">kpushbutton.h</include>
+</includes>
+<slots>
+ <slot>buttonOk_clicked()</slot>
+ <slot>slotNewAction()</slot>
+ <slot>slotDeleteAction()</slot>
+ <slot>slotAddContainerToolbar()</slot>
+ <slot>slotRemoveContainerToolbar()</slot>
+ <slot>slotApply()</slot>
+ <slot>lineText_selectionChanged()</slot>
+ <slot>typeCombo_activated(const QString&amp;)</slot>
+ <slot>slotTextChanged(const QString&amp;)</slot>
+ <slot>shortcutKeyButton_toggled(bool)</slot>
+ <slot>slotToggled(bool)</slot>
+ <slot>slotTextChanged()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+ <includehint>kicondialog.h</includehint>
+ <includehint>kkeybutton.h</includehint>
+ <includehint>klistbox.h</includehint>
+ <includehint>filecombo.h</includehint>
+</includehints>
+</UI>
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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>CaseWidget</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CaseWidget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>500</width>
+ <height>158</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>500</width>
+ <height>100</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>buttonGroup2</cstring>
+ </property>
+ <property name="title">
+ <string>Tag Case</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>upperTag</cstring>
+ </property>
+ <property name="text">
+ <string>Upper case</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>lowerTag</cstring>
+ </property>
+ <property name="text">
+ <string>Lower case</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>unchangedTag</cstring>
+ </property>
+ <property name="text">
+ <string>Unchanged</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="0" column="1">
+ <property name="name">
+ <cstring>buttonGroup3</cstring>
+ </property>
+ <property name="title">
+ <string>Attribute Case</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>upperAttr</cstring>
+ </property>
+ <property name="text">
+ <string>Upper case</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>lowerAttr</cstring>
+ </property>
+ <property name="text">
+ <string>Lower case</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>unchangedAttr</cstring>
+ </property>
+ <property name="text">
+ <string>Unchanged</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <dima@mail.univ.kiev.ua>
+ (C) 2001-2002 Andras Mantia <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
+
+// kde includes
+#include <kio/job.h>
+#include <kio/netaccess.h>
+
+//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 <dima@mail.univ.kiev.ua>
+ (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 <kio/jobclasses.h>
+
+
+/**
+ *@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 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>DebuggerOptionsS</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>DebuggerOptionsS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>350</width>
+ <height>220</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>350</width>
+ <height>220</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>checkDebugger</cstring>
+ </property>
+ <property name="text">
+ <string>Enable debugger</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioPhp3</cstring>
+ </property>
+ <property name="text">
+ <string>PHP3 listener</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioPhp4</cstring>
+ </property>
+ <property name="text">
+ <string>PHP4 debugger</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="0" column="1" rowspan="2" colspan="1">
+ <property name="name" stdset="0">
+ <cstring>Spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name" stdset="0">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>checkDebugger</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ButtonGroup1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>DirtyDialog</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2002 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>DirtyDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>609</width>
+ <height>288</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>400</width>
+ <height>220</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>File Changed</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>The file was changed outside of the Quanta editor.</string>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>ButtonGroup2</cstring>
+ </property>
+ <property name="title">
+ <string> How Do You Want to Proceed?</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonIgnore</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Do not load the modified version from disk</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonLoad</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Use the version from disk (will lose the current content)</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="1">
+ <property name="name">
+ <cstring>warningLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>(If you later save the document, you will lose what was on the disk.)</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonCompare</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Compare the two versions and load the result</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Use Kompare if available. Otherwise this checkbox is disabled.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>buttonCompare</tabstop>
+ <tabstop>buttonIgnore</tabstop>
+ <tabstop>buttonLoad</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qevent.h>
+#include <qlabel.h>
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+
+//kde includes
+#include <kdialogbase.h>
+#include <klocale.h>
+#include <kprocess.h>
+#include <kio/job.h>
+#include <kio/jobclasses.h>
+#include <kio/netaccess.h>
+#include <kfileitem.h>
+
+//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("<qt>The file <b>%1</b> was changed outside of the Quanta editor.</qt>").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 <kio/jobclasses.h>
+
+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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>DonationDialog</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2002, 2003 Andras Mantia &lt;amantia@kde.org&gt;, (C) 2002, 2003, 2004 Eric Laffoon &lt;sequitur@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>DonationDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>497</width>
+ <height>407</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Support Quanta with Financial Donation</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>closeButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ <widget class="KTextBrowser" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>KTextBrowser5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="textFormat">
+ <enum>RichText</enum>
+ </property>
+ <property name="text">
+ <string>&lt;div align="center"&gt;&lt;h2&gt;Your Contribution Can Make a Difference&lt;/h2&gt;&lt;/div&gt;&amp;nbsp;&amp;nbsp;&amp;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, &lt;a href="http://kittyhooch.com" target="_blank"&gt;Kitty Hooch&lt;/a&gt; LLP has an ongoing financial commitment to keep Quanta in continuous development. Our sponsored developers are also a catalyst to our volunteer developers.
+&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;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.
+&lt;div align="center"&gt;&lt;h3&gt;Balancing open source ideals and fiscal
+reality&lt;/h3&gt;&lt;/div&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;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?&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;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. &lt;i&gt;We want to make Quanta the best web tool anywhere!&lt;/i&gt;. 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.
+&lt;div align="center"&gt;&lt;h3&gt;Could Quanta die without your support?&lt;/h3&gt;&lt;/div&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;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.
+&lt;br&gt;&lt;div align="center"&gt;&lt;h3&gt;Will you help make a difference?&lt;/h3&gt;&lt;/div&gt;
+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If you wish to donate through PayPal
+(online money transfer or credit card), visit our &lt;a href="http://kdewebdev.org/donate.php"&gt;donation page&lt;/a&gt;.
+&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If you are outside the PayPal area or wish to discuss corporate sponsorship contact the project manager:&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Eric Laffoon, &lt;a href="mailto:sequitur@kde.org?subject=Quanta%20sponsorship%20inquiry"&gt;sequitur@kde.org&lt;/a&gt;</string>
+ </property>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>365</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KTextBrowser" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>KTextBrowser2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>30</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>40</height>
+ </size>
+ </property>
+ <property name="backgroundOrigin">
+ <enum>WindowOrigin</enum>
+ </property>
+ <property name="focusPolicy">
+ <enum>WheelFocus</enum>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <property name="text">
+ <string>&lt;a href="http://kdewebdev.org/donate.php"&gt;Donate&lt;/a&gt; through PayPal now.</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>KTextBrowser5</tabstop>
+ <tabstop>KTextBrowser2</tabstop>
+ <tabstop>closeButton</tabstop>
+</tabstops>
+<slots>
+ <slot>init()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>ktextbrowser.h</includehint>
+ <includehint>ktextbrowser.h</includehint>
+</includehints>
+</UI>
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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>DTDSelectDialog</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2002, 2003 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>DTDSelectDialog</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>440</width>
+ <height>161</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>440</width>
+ <height>160</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>DTD Selector</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>messageLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Dialog message:
+Dialog message2:</string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>dtdCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Current DTD:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>comboLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Select DTD:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>currentDTD</cstring>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>convertDTD</cstring>
+ </property>
+ <property name="text">
+ <string>Conver&amp;t the document to the selected DTD</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>useClosestMatching</cstring>
+ </property>
+ <property name="text">
+ <string>Do not show this dialog, use the closest matching DTD</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>dtdCombo</tabstop>
+ <tabstop>currentDTD</tabstop>
+ <tabstop>convertDTD</tabstop>
+ <tabstop>useClosestMatching</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in implementation">dtdselectdialog.ui.h</include>
+</includes>
+<slots>
+ <slot>init()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <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. *
+ * *
+ ***************************************************************************/
+
+#include <qcheckbox.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qgroupbox.h>
+#include <qradiobutton.h>
+#include <qtabwidget.h>
+#include <qwidgetstack.h>
+
+
+//kde includes
+#include <kcombobox.h>
+#include <kconfig.h>
+#include <kfiledialog.h>
+#include <kicondialog.h>
+#include <klistbox.h>
+#include <klineedit.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+
+//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("<qt>The file <b>%1</b> is not writable.<br>Do you want to save the configuration to a different file?</qt>").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<StructGroup>::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<StructGroup>::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<StructGroup>::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("<qt>Do you really want to delete the <b>%1</b> group?</qt>").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 <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 DTEPEDITDLG_H
+#define DTEPEDITDLG_H
+
+//qt includes
+#include <qvaluelist.h>
+
+//own includes
+#include "dtepeditdlgs.h"
+
+/**
+@author Andras Mantia
+*/
+
+class KConfig;
+class DTEPStructureEditDlgS;
+
+struct StructGroup {
+ QString name; ///<the name of the group
+ QString noName; ///<the text when there are no elements in the group
+ QString icon; ///<the icon of the group
+ QString tag;
+ bool hasFileName;
+ QString fileNameRx;
+ bool appendToTags;
+ QString parentGroup;
+ QString definitionRx;
+ bool definitionRxMinimal;
+ QString usageRx;
+ QString typeRx;
+ QString tagType;
+ bool parseFile;
+ QString completeAfterRx;
+ QString removeRx;
+ bool simpleGroup;
+ bool variableGroup;
+ bool functionGroup;
+ bool classGroup;
+ bool objectGroup;
+};
+
+class DTEPEditDlg : public DTEPEditDlgS
+{
+ Q_OBJECT
+ public:
+ DTEPEditDlg(const QString& descriptionFile, QWidget *parent = 0, const char *name = 0);
+ ~DTEPEditDlg();
+ void saveResult();
+ void slotFamilyChanged(int family);
+ void slotEditStructGroup();
+ void slotAddStructGroup();
+ void slotDeleteStructGroup();
+
+ private:
+ void init();
+ void readGeneral();
+ void readPages();
+ void readParserRules();
+ void readStructures();
+ StructGroup readFromStructDlg(DTEPStructureEditDlgS *structDlg);
+
+ void writeGeneral(KConfig *config);
+ void writePages(KConfig *config);
+ void writeParserRules(KConfig *config);
+ void writeStructures(KConfig *config);
+ void writeEntry(KConfig *config, const QString &key, const QString &value);
+
+ QString m_descriptionFile;
+ KConfig *m_config;
+ int m_family;
+ QWidget *m_pagesWidget;
+ QValueList<StructGroup> 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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>DTEPEditDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2005 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>DTEPEditDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>655</width>
+ <height>598</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Configure DTEP</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QTabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>tabWidget</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;General</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit1</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>DTD definition string</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The real name of the DTEP. In case of XML DTEPs this should be the DTD definition string, like -&lt;i&gt;//W3C//DTD&amp;nbsp;HTML&amp;nbsp;4.01&amp;nbsp;Transitional//EN&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Short name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit2</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Beautified, user visible name</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The user visible, beautified name. If not defined, the real name is used.</string>
+ </property>
+ </widget>
+ <spacer row="3" column="3" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>nameEdit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>DTD definition string</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The real name of the DTEP. In case of XML DTEPs this should be the DTD definition string, like -&lt;i&gt;//W3C//DTD&amp;nbsp;HTML&amp;nbsp;4.01&amp;nbsp;Transitional//EN&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>nickNameEdit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Beautified, user visible name</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The user visible, beautified name. If not defined, the real name is used.</string>
+ </property>
+ </widget>
+ <spacer row="9" column="2">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="8" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Type Specific Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QWidgetStack" row="0" column="0">
+ <property name="name">
+ <cstring>generalWidgetStack</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>URL:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>urlEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>URL pointing to the DTD definiton file</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>URL pointing to the DTD definiton file, like &lt;i&gt;http://www.w3.org/TR/html4/loose.dtd&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>DOCT&amp;YPE string:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>doctypeEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The string that should appear in the !DOCTYPE tag</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The string that should appear in the !DOCTYPE tag, like&lt;br&gt;
+&lt;i&gt;HTML&amp;nbsp;PUBLIC&amp;nbsp;"-//W3C//DTD&amp;nbsp;HTML&amp;nbsp;4.01&amp;nbsp;Transitional//EN"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/i&gt;</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>urlEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>URL pointing to the DTD definiton file</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>URL pointing to the DTD definiton file, like &lt;i&gt;http://www.w3.org/TR/html4/loose.dtd&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>doctypeEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The string that should appear in the !DOCTYPE tag</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The string that should appear in the !DOCTYPE tag, like&lt;br&gt;
+&lt;i&gt;HTML&amp;nbsp;PUBLIC&amp;nbsp;"-//W3C//DTD&amp;nbsp;HTML&amp;nbsp;4.01&amp;nbsp;Transitional//EN"&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br&gt;"http://www.w3.org/TR/html4/loose.dtd"&lt;/i&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <widget class="QCheckBox">
+ <property name="name">
+ <cstring>topLevel</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>10</y>
+ <width>107</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Top level</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check if the DTEP can act as a top level DTEP.</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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 &lt;i&gt;PHP&lt;/i&gt; 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 &lt;i&gt;CSS&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ </widget>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel9</cstring>
+ </property>
+ <property name="text">
+ <string>Toolbar folder:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>toolbarFolderEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name of the folder where the toolbars are stored</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The name of the folder where the toolbars are stored. This is a relative name to &lt;br&gt;&lt;i&gt;$KDEDIR(&amp;nbsp;or&amp;nbsp;$KDEHOME)/share/apps/quanta/toolbars&lt;/i&gt; .</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>toolbarFolderEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name of the folder where the toolbars are stored</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The name of the folder where the toolbars are stored. This is a relative name to &lt;br&gt;&lt;i&gt;$KDEDIR(&amp;nbsp;or&amp;nbsp;$KDEHOME)/share/apps/quanta/toolbars&lt;/i&gt; .</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>textLabel10</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Autoloaded toolbars:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>toolbarsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of toolbars</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of toolbars from the toolbar folder that will be loaded when a document with this DTEP is loaded.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="6" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>toolbarsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of toolbars</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of toolbars from the toolbar folder that will be loaded when a document with this DTEP is loaded.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>caseSensitive</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Case sensitive</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check if the DTEP has case sensitive tags</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel7</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The family to where this DTEP belongs.</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The family to where this DTEP belong. There are two families:&lt;br&gt;&lt;p&gt;&lt;b&gt;XML style&lt;/b&gt;:DTEP describing an XML like language&lt;/p&gt;
+&lt;p&gt;&lt;b&gt;Pseudo type&lt;/b&gt;:DTEP describing some other language, where the notion of a tag is not the same as in XML. Examples are &lt;i&gt;PHP, JavaScript, CSS&lt;/i&gt;.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel8</cstring>
+ </property>
+ <property name="text">
+ <string>Inherits:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The DTEP name from where this DTEP inherits the tags.</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The real name of the DTEP (like -&lt;i&gt;//W3C//DTD&amp;nbsp;HTML&amp;nbsp;4.01&amp;nbsp;Transitional//EN&lt;/i&gt;) from where the current DTEP inherits the tags.</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="1" rowspan="1" colspan="2">
+ <item>
+ <property name="text">
+ <string>XML Style</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pseudo Type</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>typeCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The family to where this DTEP belongs.</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The family to where this DTEP belong. There are two families:&lt;br&gt;&lt;p&gt;&lt;b&gt;XML style&lt;/b&gt;:DTEP describing an XML like language&lt;/p&gt;
+&lt;p&gt;&lt;b&gt;Pseudo type&lt;/b&gt;:DTEP describing some other language, where the notion of a tag is not the same as in XML. Examples are &lt;i&gt;PHP, JavaScript, CSS&lt;/i&gt;.&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Mimet&amp;ypes:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mimeTypeEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="2" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>inheritsCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The DTEP name from where this DTEP inherits the tags.</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The real name of the DTEP (like -&lt;i&gt;//W3C//DTD&amp;nbsp;HTML&amp;nbsp;4.01&amp;nbsp;Transitional//EN&lt;/i&gt;) from where the current DTEP inherits the tags.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>mimeTypeEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of mimetypes</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of mimetypes. Files of these types are treated as belonging to this DTEP, unless the !DOCTYPE entry says something else.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="5">
+ <property name="name">
+ <cstring>extensionEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The default extension of files belonging to this DTEP</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="4">
+ <property name="name">
+ <cstring>textLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;xtension:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>extensionEdit</cstring>
+ </property>
+ </widget>
+ <spacer row="4" column="3">
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>P&amp;ages</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="15" column="2">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>enablePage1</cstring>
+ </property>
+ <property name="text">
+ <string>Enable the first extra page</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Every tab edit dialog will have one more extra page aside of the main page</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel11</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The title of the page</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The title of the page, like &lt;b&gt;Core &amp;&amp; i18n&lt;/b&gt;. As you see, the ampersand must be doubled.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel12</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Groups:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the common attribute groups</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of the common attribute groups. The attributes from the listed groups will appear on this page.&lt;br&gt;The common attributes are specified in each DTEP's &lt;i&gt;common.tag&lt;/i&gt; file, where the &lt;i&gt;common="yes"&lt;/i&gt; attribute must be set.&lt;br&gt;The following example defined the common I18n attribute group:&lt;br&gt;&lt;p&gt;&lt;b&gt;
+&amp;lt;tag name="I18n" common="yes"&gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;lt;attr name="lang" type="input" /&gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;lt;attr name="dir" type="input" /&gt;&lt;br&gt;
+&amp;lt;/tag&gt;
+&lt;/b&gt;&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>enablePage2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Enable the second extra page</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first checkbox</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>enablePage3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Enable the third extra page</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first checkbox</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="9" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>enablePage4</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Enable the fourth extra page</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first checkbox</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="12" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>enablePage5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Enable the fifth extra page</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first checkbox</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="2">
+ <property name="name">
+ <cstring>pageTitleEdit1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The title of the page</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The title of the page, like &lt;b&gt;Core &amp;&amp; i18n&lt;/b&gt;. As you see, the ampersand must be doubled.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="2">
+ <property name="name">
+ <cstring>groupsEdit1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the common attribute groups</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of the common attribute groups. The attributes from the listed groups will appear on this page.&lt;br&gt;The common attributes are specified in each DTEP's &lt;i&gt;common.tag&lt;/i&gt; file, where the &lt;i&gt;common="yes"&lt;/i&gt; attribute must be set.&lt;br&gt;The following example defined the common I18n attribute group:&lt;br&gt;&lt;p&gt;&lt;b&gt;
+&amp;lt;tag name="I18n" common="yes"&gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;lt;attr name="lang" type="input" /&gt;&lt;br&gt;
+&amp;nbsp;&amp;nbsp;&amp;lt;attr name="dir" type="input" /&gt;&lt;br&gt;
+&amp;lt;/tag&gt;
+&lt;/b&gt;&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="10" column="2">
+ <property name="name">
+ <cstring>pageTitleEdit4</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0">
+ <property name="name">
+ <cstring>textLabel12_3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Groups:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="2">
+ <property name="name">
+ <cstring>pageTitleEdit2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="10" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel11_3_2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel11_2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel12_2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Groups:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="0">
+ <property name="name">
+ <cstring>textLabel11_3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="11" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel12_3_2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Groups:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="2">
+ <property name="name">
+ <cstring>groupsEdit2</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="13" column="0">
+ <property name="name">
+ <cstring>textLabel11_5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="11" column="2">
+ <property name="name">
+ <cstring>groupsEdit4</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="14" column="0">
+ <property name="name">
+ <cstring>textLabel12_5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Groups:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="7" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>pageTitleEdit3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="8" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupsEdit3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="14" column="2">
+ <property name="name">
+ <cstring>groupsEdit5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="13" column="2">
+ <property name="name">
+ <cstring>pageTitleEdit5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>See the tooltip and "What's This?" information for the first page fields</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>Parsing &amp;Rules</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>enableMinusInWords</cstring>
+ </property>
+ <property name="text">
+ <string>Enable minus in words</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Treat the minus sign as part of a word</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>If enabled &lt;b&gt;this-is-a-word&lt;/b&gt; is treated like a word. Otherwise it is treated like 4 words.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel13</cstring>
+ </property>
+ <property name="text">
+ <string>Comments:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit10</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of area borders for comments</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of area borders for comments. &lt;i&gt;EOL&lt;/i&gt; means end of line, used for single line comments.&lt;br&gt;
+Example: &lt;b&gt;//&amp;nbsp;EOL,&amp;nbsp;/*&amp;nbsp;*/&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>groupBox7</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Type Specific Rules</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QWidgetStack" row="0" column="0">
+ <property name="name">
+ <cstring>rulesWidgetStack</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="7">
+ <property name="name">
+ <cstring>xmlStyleTags</cstring>
+ </property>
+ <property name="text">
+ <string>XML style single tags</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check to use XML style single tags</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check to use XML style single tags (&lt;b&gt;&amp;lt;single_tag /&amp;gt;&lt;/b&gt;), otherwise HTML style single tags (&lt;b&gt;&amp;lt;single_tag&amp;gt;&lt;/b&gt;) are used.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="7">
+ <property name="name">
+ <cstring>useCommonRules</cstring>
+ </property>
+ <property name="text">
+ <string>Use common rules</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Append common parsing rules</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check it to append common parsing rules. These are:
+&lt;p&gt;&lt;b&gt;
+&amp;nbsp;&amp;nbsp;SpecialAreas=&amp;lt;?xml ?&amp;gt;, &amp;lt;!-- --&amp;gt;, &amp;lt;! &amp;gt;
+&amp;nbsp;&amp;nbsp;SpecialAreaNames = XML PI, comment, DTD
+&amp;nbsp;&amp;nbsp;Comments = &amp;lt;!-- --&amp;gt;
+&lt;/b&gt;&lt;/p&gt;</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>extendedBooleans</cstring>
+ </property>
+ <property name="text">
+ <string>Extended booleans</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check if the booleans are stored in extended form</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check if you want extended booleans in the language.&lt;br&gt;
+Examples:&lt;br&gt;
+&lt;i&gt;Simple boolean&lt;/i&gt;: &lt;b&gt;&amp;lt;tag&amp;nbsp;booleanAttr&amp;gt;&lt;/b&gt;&lt;br&gt;
+&lt;i&gt;Extended boolean&lt;/i&gt;: &lt;b&gt;&amp;lt;tag&amp;nbsp;booleanAttr="1"&amp;gt;&lt;/b&gt; or &lt;b&gt;&amp;lt;tag&amp;nbsp;booleanAttr="true"&amp;gt;&lt;/b&gt;.
+&lt;br&gt;
+See the &lt;b&gt;True&lt;/b&gt; and &lt;b&gt;False&lt;/b&gt; boxes to define the values for true and false.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="6">
+ <property name="name">
+ <cstring>falseEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>2</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The value of "true" in case of extended booleans</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="4">
+ <property name="name">
+ <cstring>trueEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>2</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The value of "true" in case of extended booleans</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="5">
+ <property name="name">
+ <cstring>textLabel39</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>False:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="3">
+ <property name="name">
+ <cstring>textLabel38</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>True:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <spacer row="3" column="2">
+ <property name="name">
+ <cstring>spacer12</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>specialAreasEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the beginning and closing string for special areas</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The beginning and closing string of special areas, separated by a comma.&lt;br&gt;
+ Special areas are not parsed according to this DTD's rules, but according to their own rules.&lt;br&gt;
+ A special area can be a pseudo DTD, a comment or something like that, for example &lt;i&gt;&amp;lt;!--&amp;nbsp;--&amp;gt;&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel27</cstring>
+ </property>
+ <property name="text">
+ <string>Special areas:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit11</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the beginning and closing string for special areas</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The beginning and closing string of special areas, separated by a comma.&lt;br&gt;
+ Special areas are not parsed according to this DTD's rules, but according to their own rules.&lt;br&gt;
+ A special area can be a pseudo DTD, a comment or something like that, for example &lt;i&gt;&amp;lt;!--&amp;nbsp;--&amp;gt;&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>specialAreaNamesEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma-separated list of the names for the above-defined special areas</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel28</cstring>
+ </property>
+ <property name="text">
+ <string>Special area names:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit12</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma-separated list of the names for the above-defined special areas</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel40</cstring>
+ </property>
+ <property name="text">
+ <string>Special tags:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Specifies a tag that defines the start of a special area</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Specifies a tag which defines the start of a special area in the form of &lt;i&gt;tagname(attributename)&lt;/i&gt;.&lt;br&gt;
+Example:&lt;b&gt;script(language)&lt;/b&gt; means that any &lt;b&gt;&amp;lt;script&amp;gt;&lt;/b&gt; tag having a &lt;b&gt;language&lt;/b&gt; attribute indicates a special area.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>specialTagsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Specifies a tag that defines the start of a special area</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Specifies a tag which defines the start of a special area in the form of &lt;i&gt;tagname(attributename)&lt;/i&gt;.&lt;br&gt;
+Example:&lt;b&gt;script(language)&lt;/b&gt; means that any &lt;b&gt;&amp;lt;script&amp;gt;&lt;/b&gt; tag having a &lt;b&gt;language&lt;/b&gt; attribute indicates a special area.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel21</cstring>
+ </property>
+ <property name="text">
+ <string>Definition tags:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit14</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Tags and attributes defining this DTEP</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of tags that define this DTEP. The format used is &lt;i&gt;tagname(attribute[defaultvalue])&lt;/i&gt;. If the parent (a real) DTEP has a tag with &lt;i&gt;tagname&lt;/i&gt; and
+the &lt;i&gt;attribute value&lt;/i&gt; of this tag is equal with the name of this DTEP, the tag area
+is parsed according to the rules of this DTEP.&lt;br&gt;
+If &lt;i&gt;[defaultvalue]&lt;/i&gt; is present, it means that if the attribute is not present in the tag it is taken as present with &lt;i&gt;value = defaultvalue&lt;/i&gt;.&lt;br&gt;
+Example: &lt;b&gt;Tags=style(type[text/css])&lt;/b&gt; means that both &lt;b&gt;&amp;lt;style&amp;gt;&lt;/b&gt; and &lt;b&gt;&amp;lt;style&amp;nbsp;type="text/css"&amp;gt;&lt;/b&gt; are treated the same way and the DTEP defined by this tag is named &lt;b&gt;text/css&lt;/b&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel20</cstring>
+ </property>
+ <property name="text">
+ <string>Area borders:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit13</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the area borders</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of the area borders encapsulating this pseudo DTEP. In the case of PHP it is:&lt;br&gt;
+&lt;b&gt;&amp;lt;?&amp;nbsp;?&amp;gt;,&amp;nbsp;&amp;lt;*&amp;nbsp;*&amp;gt;,&amp;nbsp;&amp;lt;%&amp;nbsp;%&amp;gt;&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel22</cstring>
+ </property>
+ <property name="text">
+ <string>Structure keywords:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit15</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of structure keywords</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel26</cstring>
+ </property>
+ <property name="text">
+ <string>Structure delimiting:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit19</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression that finds the beginning or end of a structure</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression that finds the beginning or end of a structure. This is usually the combination of &lt;b&gt;Structure beginning&lt;/b&gt; and &lt;b&gt;Structure end&lt;/b&gt;, like &lt;b&gt;\{&amp;nbsp;|&amp;nbsp;\}&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel24</cstring>
+ </property>
+ <property name="text">
+ <string>Structure beginning:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit17</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>A string specifying the beginning of a structure</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>A string specifying the beginning of a structure, like &lt;b&gt;{&lt;/b&gt; in many cases.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel23</cstring>
+ </property>
+ <property name="text">
+ <string>Local scope keywords:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit16</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the local scope defining keywords</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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 &lt;b&gt;function&lt;/b&gt;, it means that elements, like variables found under a &lt;b&gt;function&lt;/b&gt; are local, relative to the node that holds the &lt;b&gt;function&lt;/b&gt;.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>localStructKeywordsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the local scope defining keywords</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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 &lt;b&gt;function&lt;/b&gt;, it means that elements, like variables found under a &lt;b&gt;function&lt;/b&gt; are local, relative to the node that holds the &lt;b&gt;function&lt;/b&gt;.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>structKeywordsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of structure keywords</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>definitionTagsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Tags and attributes defining this DTEP</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of tags that define this DTEP. The format used is &lt;i&gt;tagname(attribute[defaultvalue])&lt;/i&gt;. If the parent (a real) DTEP has a tag with &lt;i&gt;tagname&lt;/i&gt; and
+the &lt;i&gt;attribute value&lt;/i&gt; of this tag is equal with the name of this DTEP, the tag area
+is parsed according to the rules of this DTEP.&lt;br&gt;
+If &lt;i&gt;[defaultvalue]&lt;/i&gt; is present, it means that if the attribute is not present in the tag it is taken as present with &lt;i&gt;value = defaultvalue&lt;/i&gt;.&lt;br&gt;
+Example: &lt;b&gt;Tags=style(type[text/css])&lt;/b&gt; means that both &lt;b&gt;&amp;lt;style&amp;gt;&lt;/b&gt; and &lt;b&gt;&amp;lt;style&amp;nbsp;type="text/css"&amp;gt;&lt;/b&gt; are treated the same way and the DTEP defined by this tag is named &lt;b&gt;text/css&lt;/b&gt;.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>areaBordersEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of the area borders</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of the area borders encapsulating this pseudo DTEP. In the case of PHP it is:&lt;br&gt;
+&lt;b&gt;&amp;lt;?&amp;nbsp;?&amp;gt;,&amp;nbsp;&amp;lt;*&amp;nbsp;*&amp;gt;,&amp;nbsp;&amp;lt;%&amp;nbsp;%&amp;gt;&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="3">
+ <property name="name">
+ <cstring>structEndEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>A string specifying the end of a structure</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>A string specifying the end of a structure, like &lt;b&gt;}&lt;/b&gt; in many cases.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="2">
+ <property name="name">
+ <cstring>textLabel25</cstring>
+ </property>
+ <property name="text">
+ <string>Structure end:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit18</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>A string specifying the end of a structure</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>A string specifying the end of a structure, like &lt;b&gt;}&lt;/b&gt; in many cases.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="1">
+ <property name="name">
+ <cstring>structBeginEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>A string specifying the beginning of a structure</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>A string specifying the beginning of a structure, like &lt;b&gt;{&lt;/b&gt; in many cases.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel19</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Complete class members after:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit21</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find out when to invoke member autocompletion</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to find out when to invoke member autocompletion. &lt;br&gt;
+Example:&lt;br&gt;
+- we have a class called &lt;b&gt;foo&lt;/b&gt; with some member variables&lt;br&gt;
+- the object of type &lt;b&gt;foo&lt;/b&gt; is used in the document as $&lt;b&gt;objFoo&lt;/b&gt;&lt;br&gt;
+- the members can appear as &lt;b&gt;$objFoo-&gt;member&lt;/b&gt; or &lt;b&gt;$objFoo.member&lt;/b&gt;
+- in the above case this entry should look like &lt;b&gt;(?:-&amp;gt;|\.)$&lt;/b&gt; (autocomplete if the object is followed by &lt;b&gt;-&amp;gt;&lt;/b&gt; or &lt;b&gt;.&lt;/b&gt;)&lt;br&gt;
+ The regular expression must be terminated with &lt;b&gt;$&lt;/b&gt; (match end of line).</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel18</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Complete attributes after:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit20</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Autocomplete attributes after this character. See the information for the same entry valid for tags.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="6" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>attributesAfterEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Autocomplete attributes after this character. See the information for the same entry valid for tags.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="7" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>membersAfterEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find out when to invoke member autocompletion</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to find out when to invoke member autocompletion. &lt;br&gt;
+Example:&lt;br&gt;
+- we have a class called &lt;b&gt;foo&lt;/b&gt; with some member variables&lt;br&gt;
+- the object of type &lt;b&gt;foo&lt;/b&gt; is used in the document as $&lt;b&gt;objFoo&lt;/b&gt;&lt;br&gt;
+- the members can appear as &lt;b&gt;$objFoo-&gt;member&lt;/b&gt; or &lt;b&gt;$objFoo.member&lt;/b&gt;
+- in the above case this entry shoul look like &lt;b&gt;(?:-&amp;gt;|\.)$&lt;/b&gt; (autocomplete if the object is followed by &lt;b&gt;-&amp;gt;&lt;/b&gt; or &lt;b&gt;.&lt;/b&gt;)&lt;br&gt;
+ The regular expression must be terminated with &lt;b&gt;$&lt;/b&gt; (match end of line).</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>structRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression that finds the beginning or end of a structure</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression that finds the beginning or end of a structure. This is usually the combination of &lt;b&gt;Structure beginning&lt;/b&gt; and &lt;b&gt;Structure end&lt;/b&gt;, like &lt;b&gt;\{&amp;nbsp;|&amp;nbsp;\}&lt;/b&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel15</cstring>
+ </property>
+ <property name="text">
+ <string>Attribute separator:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit22</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The character specifying the end of an attribute</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The character specifying the end of an attribute. By default it is &lt;b&gt;"&lt;/b&gt; for XML DTEPs and &lt;b&gt;,&lt;/b&gt; for pseudo DTEPs.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>commentsEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma separated list of area borders for comments</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma separated list of area borders for comments. &lt;i&gt;EOL&lt;/i&gt; means end of line, used for single line comments.&lt;br&gt;
+Example: &lt;b&gt;//&amp;nbsp;EOL,&amp;nbsp;/*&amp;nbsp;*/&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel17</cstring>
+ </property>
+ <property name="text">
+ <string>Included DTEPs:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit25</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma-separated list of DTEPs that can be present inside this DTEP</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma-separated list of DTEPs that can be present inside this DTEP. The list consist usually of pseudo DTEPs.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel16</cstring>
+ </property>
+ <property name="text">
+ <string>Autocomplete tags after:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit24</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The character after which the list of tags should be shown</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The autocompletion box is brought up automatically once this character is entered or space is pressed after this character.&lt;br&gt; For real DTEPs it's usually &lt;b&gt;&amp;lt;&lt;/b&gt;, but for example for the CSS pseudo DTEP it is &lt;b&gt;{&lt;/b&gt;. The text &lt;b&gt;none&lt;/b&gt; instead of a character specifies that the tag completion box should not be brought up automatically, only if the user requests it.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>tagAfterEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The character after which the list of tags should be shown</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The autocompletion box is brought up automatically once this character is entered or space is pressed after this character&lt;br&gt;. For real DTEPs it's usually &lt;b&gt;&amp;lt;&lt;/b&gt;, but for example for the CSS pseudo DTEP it is &lt;b&gt;{&lt;/b&gt;. The text &lt;b&gt;none&lt;/b&gt; instead of a character specifies that the tag completion box should not be brought up automatically, only if the user requests it.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="4">
+ <property name="name">
+ <cstring>tagSeparatorEdit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The character specifying the end of a tag. See the information for the attribute separator for details.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="3">
+ <property name="name">
+ <cstring>textLabel14</cstring>
+ </property>
+ <property name="text">
+ <string>Tag separator:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>kLineEdit23</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The character specifying the end of a tag. See the information for the attribute separator for details.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>attributeSeparatorEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The character specifying the end of an attribute</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The character specifying the end of an attribute. By default it is &lt;b&gt;"&lt;/b&gt; for XML DTEPs and &lt;b&gt;,&lt;/b&gt; for pseudo DTEPs.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>mayContainEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Comma-separated list of DTEPs that can be present inside this DTEP</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Comma-separated list of DTEPs that can be present inside this DTEP. The list consist usually of pseudo DTEPs.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>TabPage</cstring>
+ </property>
+ <attribute name="title">
+ <string>Structures</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel29</cstring>
+ </property>
+ <property name="text">
+ <string>Available groups:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>listBox1</cstring>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>270</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>addStructButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>editStructButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Edit...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="2">
+ <property name="name">
+ <cstring>deleteStructButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete</string>
+ </property>
+ </widget>
+ <widget class="QListBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>structuresList</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>enablePage1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel11</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pageTitleEdit1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupsEdit1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel12</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>enablePage2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage2</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pageTitleEdit2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage2</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupsEdit2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage2</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel11_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage2</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel12_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage2</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>enablePage3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pageTitleEdit3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupsEdit3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel11_3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel12_3</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>enablePage4</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pageTitleEdit4</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupsEdit4</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel11_3_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel12_3_2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>enablePage5</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage5</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>pageTitleEdit5</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage5</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupsEdit5</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage5</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel11_5</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>enablePage5</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel12_5</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>typeCombo</sender>
+ <signal>activated(int)</signal>
+ <receiver>rulesWidgetStack</receiver>
+ <slot>raiseWidget(int)</slot>
+ </connection>
+ <connection>
+ <sender>addStructButton</sender>
+ <signal>clicked()</signal>
+ <receiver>DTEPEditDlgS</receiver>
+ <slot>slotAddStructGroup()</slot>
+ </connection>
+ <connection>
+ <sender>deleteStructButton</sender>
+ <signal>clicked()</signal>
+ <receiver>DTEPEditDlgS</receiver>
+ <slot>slotDeleteStructGroup()</slot>
+ </connection>
+ <connection>
+ <sender>editStructButton</sender>
+ <signal>clicked()</signal>
+ <receiver>DTEPEditDlgS</receiver>
+ <slot>slotEditStructGroup()</slot>
+ </connection>
+ <connection>
+ <sender>typeCombo</sender>
+ <signal>activated(int)</signal>
+ <receiver>generalWidgetStack</receiver>
+ <slot>raiseWidget(int)</slot>
+ </connection>
+ <connection>
+ <sender>typeCombo</sender>
+ <signal>activated(int)</signal>
+ <receiver>DTEPEditDlgS</receiver>
+ <slot>slotFamilyChanged(int)</slot>
+ </connection>
+ <connection>
+ <sender>extendedBooleans</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel38</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>extendedBooleans</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>trueEdit</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>extendedBooleans</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel39</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>extendedBooleans</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>falseEdit</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>structuresList</sender>
+ <signal>doubleClicked(QListBoxItem*)</signal>
+ <receiver>editStructButton</receiver>
+ <slot>animateClick()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>tabWidget</tabstop>
+ <tabstop>nameEdit</tabstop>
+ <tabstop>nickNameEdit</tabstop>
+ <tabstop>inheritsCombo</tabstop>
+ <tabstop>typeCombo</tabstop>
+ <tabstop>mimeTypeEdit</tabstop>
+ <tabstop>extensionEdit</tabstop>
+ <tabstop>toolbarFolderEdit</tabstop>
+ <tabstop>toolbarsEdit</tabstop>
+ <tabstop>caseSensitive</tabstop>
+ <tabstop>topLevel</tabstop>
+ <tabstop>urlEdit</tabstop>
+ <tabstop>doctypeEdit</tabstop>
+ <tabstop>enablePage1</tabstop>
+ <tabstop>pageTitleEdit1</tabstop>
+ <tabstop>groupsEdit1</tabstop>
+ <tabstop>enablePage2</tabstop>
+ <tabstop>pageTitleEdit2</tabstop>
+ <tabstop>groupsEdit2</tabstop>
+ <tabstop>enablePage3</tabstop>
+ <tabstop>pageTitleEdit3</tabstop>
+ <tabstop>groupsEdit3</tabstop>
+ <tabstop>enablePage4</tabstop>
+ <tabstop>pageTitleEdit4</tabstop>
+ <tabstop>groupsEdit4</tabstop>
+ <tabstop>enablePage5</tabstop>
+ <tabstop>pageTitleEdit5</tabstop>
+ <tabstop>groupsEdit5</tabstop>
+ <tabstop>areaBordersEdit</tabstop>
+ <tabstop>definitionTagsEdit</tabstop>
+ <tabstop>structKeywordsEdit</tabstop>
+ <tabstop>localStructKeywordsEdit</tabstop>
+ <tabstop>structBeginEdit</tabstop>
+ <tabstop>structEndEdit</tabstop>
+ <tabstop>structRxEdit</tabstop>
+ <tabstop>attributesAfterEdit</tabstop>
+ <tabstop>membersAfterEdit</tabstop>
+ <tabstop>specialAreasEdit</tabstop>
+ <tabstop>specialAreaNamesEdit</tabstop>
+ <tabstop>specialTagsEdit</tabstop>
+ <tabstop>extendedBooleans</tabstop>
+ <tabstop>trueEdit</tabstop>
+ <tabstop>falseEdit</tabstop>
+ <tabstop>xmlStyleTags</tabstop>
+ <tabstop>useCommonRules</tabstop>
+ <tabstop>enableMinusInWords</tabstop>
+ <tabstop>commentsEdit</tabstop>
+ <tabstop>attributeSeparatorEdit</tabstop>
+ <tabstop>tagSeparatorEdit</tabstop>
+ <tabstop>tagAfterEdit</tabstop>
+ <tabstop>mayContainEdit</tabstop>
+ <tabstop>structuresList</tabstop>
+ <tabstop>addStructButton</tabstop>
+ <tabstop>editStructButton</tabstop>
+ <tabstop>deleteStructButton</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected">slotEditStructGroup()</slot>
+ <slot>slotAddStructGroup()</slot>
+ <slot>slotDeleteStructGroup()</slot>
+ <slot>slotFamilyChanged(int)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>DTEPStructureEditDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2005 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>DTEPStructureEditDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>628</width>
+ <height>666</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Structure Group Editor</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel30</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>nameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>nameEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name of the group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="4">
+ <property name="name">
+ <cstring>textLabel32</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Icon:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>iconButton</cstring>
+ </property>
+ </widget>
+ <widget class="KIconButton" row="0" column="5" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>iconButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>50</width>
+ <height>50</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel34</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Filen&amp;ame definition:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>fileNameRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to get the filename</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to get the filename. The expression is used to &lt;b&gt;remove&lt;/b&gt; the unnecessary strings from the element's text.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>hasFilename</cstring>
+ </property>
+ <property name="text">
+ <string>Contains a &amp;filename</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>True if the element's text contains a filename</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="2" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>fileNameRxEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to get the filename</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to get the filename. The expression is used to &lt;b&gt;remove&lt;/b&gt; the unnecessary strings from the element's text.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel33</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Tag:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>tagEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Elements identified by this entry will belong to this group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Defines which tags belong to this group. The format is &lt;i&gt;tagname(attribute1, attribute2, ...)&lt;/i&gt;. Tags with name &lt;i&gt;tagname&lt;/i&gt; will appear under this group. The item text of the corresponding node in the tree will be &lt;i&gt;attribute1_value | attribute2_value | ...&lt;/i&gt;Currently only one tag may be listed here.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel31</cstring>
+ </property>
+ <property name="text">
+ <string>"No" na&amp;me:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>noNameEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name that appears when no element were found</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The user visible name of the group. It will be shown in the structure tree as a top node when there are &lt;b&gt;no&lt;/b&gt; elements belonging to this group in the document.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>noNameEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name that appears when no element were found</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The user visible name of the group. It will be shown in the structure tree as a top node when there are &lt;b&gt;no&lt;/b&gt; elements belonging to this group in the document.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>tagEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Elements ideintified by this entry will belong to this group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Defines which tags belong to this group. The format is &lt;i&gt;tagname(attribute1, attribute2, ...)&lt;/i&gt;. Tags with name &lt;i&gt;tagname&lt;/i&gt; will appear under this group. The item text of the corresponding node in the tree will be &lt;i&gt;attribute1_value | attribute2_value | ...&lt;/i&gt;Currently only one tag may be listed here.</string>
+ </property>
+ </widget>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>appendToTags</cstring>
+ </property>
+ <property name="text">
+ <string>Use elements as tags</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Treat elements as new tags</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Treat elements as new tags, so they will show up during tag autocompletion.</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="7" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>pseudoGroupBox</cstring>
+ </property>
+ <property name="title">
+ <string>&amp;Pseudo DTEP Specific Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KLineEdit" row="4" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>typeRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find the type of the element</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to find the type of the element. The pattern is searched on the result of the &lt;i&gt;DefinitionRx&lt;/i&gt; match and the first captured area will hold the element type.&lt;br&gt;
+Example (simplified):&lt;br&gt;
+&lt;b&gt;DefinitionRx=\$+([a-zA-Z]+)=new\\s[a-zA-Z]+;&lt;br&gt;
+TypeRx=new\\s([a-zA-Z]+);&lt;/b&gt;&lt;br&gt;&lt;br&gt;
+This will match strings like &lt;b&gt;$fooObj=new foo;&lt;/b&gt;. Now this string is searched and it will find &lt;b&gt;new foo;&lt;/b&gt;, where &lt;b&gt;foo&lt;/b&gt; is the first captured text (the regular expression matching &lt;b&gt;foo&lt;/b&gt; is between brackets).&lt;br&gt;
+So the type of &lt;b&gt;$fooObj&lt;/b&gt; is &lt;b&gt;foo&lt;/b&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel36</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Usage expression:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>usageRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find the usage of a group element</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to find the usage of a group element in the document.&lt;br&gt;
+Example 1:&lt;br&gt;
+- classes are defined as &lt;b&gt;class foo {...}&lt;/b&gt;&lt;br&gt;
+- classes are used as &lt;b&gt;$objFoo&lt;/b&gt;&lt;br&gt;&lt;br&gt;
+Example 2:&lt;br&gt;
+- variables are defined as &lt;b&gt;int i&lt;/b&gt;&lt;br&gt;
+- variables are used as &lt;b&gt;@i&lt;/b&gt;&lt;br&gt;&lt;br&gt;
+Example 3:&lt;br&gt;
+- variables are defined as &lt;b&gt;$i&lt;/b&gt;&lt;br&gt;
+- variables are used as &lt;b&gt;$i&lt;/b&gt;. In this case &lt;i&gt;UsageRx &lt;/i&gt;is the same as &lt;i&gt;DefinitionRx&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel37</cstring>
+ </property>
+ <property name="text">
+ <string>Element t&amp;ype expression:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>typeRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find the type of the element</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to find the type of the element. The pattern is searched on the result of the &lt;i&gt;DefinitionRx&lt;/i&gt; match and the first captured area will hold the element type.&lt;br&gt;
+Example (simplified):&lt;br&gt;
+&lt;b&gt;DefinitionRx=\$+([a-zA-Z]+)=new\\s[a-zA-Z]+;&lt;br&gt;
+TypeRx=new\\s([a-zA-Z]+);&lt;/b&gt;&lt;br&gt;&lt;br&gt;
+This will match strings like &lt;b&gt;$fooObj=new foo;&lt;/b&gt;. Now this string is searched and it will find &lt;b&gt;new foo;&lt;/b&gt;, where &lt;b&gt;foo&lt;/b&gt; is the first captured text (the regular expression matching &lt;b&gt;foo&lt;/b&gt; is between brackets).&lt;br&gt;
+So the type of &lt;b&gt;$fooObj&lt;/b&gt; is &lt;b&gt;foo&lt;/b&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel35</cstring>
+ </property>
+ <property name="text">
+ <string>Definition e&amp;xpression:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>definitionRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find what belong to this group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.&lt;br&gt;
+Example for a &lt;i&gt;class&lt;/i&gt; group:&lt;br&gt;
+&lt;b&gt;\bclass[\\s]+([0-9a-zA-Z_\x7f-\xff]*)[\\s]*&lt;/b&gt;&lt;br&gt;
+The first captured area (between "&lt;b&gt;(&lt;/b&gt;" and "&lt;b&gt;)&lt;/b&gt;") holds the class name.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="3" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>usageRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find the usage of a group element</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to find the usage of a group element in the document.&lt;br&gt;
+Example 1:&lt;br&gt;
+- classes are defined as &lt;b&gt;class foo {...}&lt;/b&gt;&lt;br&gt;
+- classes are used as &lt;b&gt;$objFoo&lt;/b&gt;&lt;br&gt;&lt;br&gt;
+Example 2:&lt;br&gt;
+- variables are defined as &lt;b&gt;int i&lt;/b&gt;&lt;br&gt;
+- variables are used as &lt;b&gt;@i&lt;/b&gt;&lt;br&gt;&lt;br&gt;
+Example 3:&lt;br&gt;
+- variables are defined as &lt;b&gt;$i&lt;/b&gt;&lt;br&gt;
+- variables are used as &lt;b&gt;$i&lt;/b&gt;. In this case &lt;i&gt;UsageRx &lt;/i&gt;is the same as &lt;i&gt;DefinitionRx&lt;/i&gt;.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel41</cstring>
+ </property>
+ <property name="text">
+ <string>Parent group:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name of the group that may be the parent of this</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The name of the group that may be the parent of this. For example &lt;b&gt;classes&lt;/b&gt; might be a parent of &lt;b&gt;functions&lt;/b&gt; in case of member functions. This entry indicates this possible relationship and is used to provide functionality like member autocompletion.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>parentGroupEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The name of the group that may be the parent of this</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The name of the group that may be the parent of this. For example &lt;b&gt;classes&lt;/b&gt; might be a parent of &lt;b&gt;functions&lt;/b&gt; in case of member functions. This entry indicates this possible relationship and is used to provide functionality like member autocompletion.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel42</cstring>
+ </property>
+ <property name="text">
+ <string>Searched tags:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Only tags of this type can be part of the group</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel44</cstring>
+ </property>
+ <property name="text">
+ <string>Remove when autocompleting:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression used to remove unwanted strings from the completion text</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel43</cstring>
+ </property>
+ <property name="text">
+ <string>Autocomplete after:</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to tell when to bring up the completion box with the elements of this group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to tell when to bring up the completion box with the elements of this group.&lt;br&gt;
+Example:&lt;b&gt;\bnew[\\s]+$&lt;/b&gt; tells that after typing &lt;b&gt;new&amp;nbsp;&lt;/b&gt;, the completion box with the elements should be shown.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="5" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>autoCompleteRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to tell when to bring up the completion box with the elements of this group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Regular expression to tell when to bring up the completion box with the elements of this group.&lt;br&gt;
+Example:&lt;b&gt;\bnew[\\s]+$&lt;/b&gt; tells that after typing &lt;b&gt;new&amp;nbsp;&lt;/b&gt;, the completion box with the elements should be shown.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="6" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>removeRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression used to remove unwanted strings from the completion text</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1" rowspan="1" colspan="2">
+ <item>
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XmlTag</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XmlTagEnd</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Comment</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>CSS</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ScriptTag</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ScriptStructureBegin</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>ScriptStructureEnd</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>tagTypeCombo</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Only tags of this type can be part of the group</string>
+ </property>
+ </widget>
+ <spacer row="1" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer13</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>340</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>parseFile</cstring>
+ </property>
+ <property name="text">
+ <string>Parse file</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check if the filename that is in the elements text should be parsed</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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 &lt;i&gt;FileNameRx&lt;/i&gt; is specified.</string>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="8" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>Type</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>simpleGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Simple</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>This is a simple group, nothing special</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>variableGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Variable group</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The group's elements are variables</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>functionGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Function group</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The group's elements are functions</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="1">
+ <property name="name">
+ <cstring>classGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Class group</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The group's elements are classes</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="2">
+ <property name="name">
+ <cstring>objectGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Ob&amp;ject group</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The group's elements are objects</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>definitionRxEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Regular expression to find what belong to this group</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>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.&lt;br&gt;
+Example for a &lt;i&gt;class&lt;/i&gt; group:&lt;br&gt;
+&lt;b&gt;\bclass[\\s]+([0-9a-zA-Z_\x7f-\xff]*)[\\s]*&lt;/b&gt;&lt;br&gt;
+The first captured area (between "&lt;b&gt;(&lt;/b&gt;" and "&lt;b&gt;)&lt;/b&gt;") holds the class name.</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="4">
+ <property name="name">
+ <cstring>definitionRxMinimal</cstring>
+ </property>
+ <property name="text">
+ <string>Minimal search mode</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enable to use the minimal style search for definition instead of the standard (greedy) matching</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>hasFilename</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>textLabel34</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>hasFilename</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>fileNameRxEdit</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>nameEdit</tabstop>
+ <tabstop>iconButton</tabstop>
+ <tabstop>noNameEdit</tabstop>
+ <tabstop>tagEdit</tabstop>
+ <tabstop>hasFilename</tabstop>
+ <tabstop>fileNameRxEdit</tabstop>
+ <tabstop>appendToTags</tabstop>
+ <tabstop>parentGroupEdit</tabstop>
+ <tabstop>tagTypeCombo</tabstop>
+ <tabstop>definitionRxEdit</tabstop>
+ <tabstop>definitionRxMinimal</tabstop>
+ <tabstop>usageRxEdit</tabstop>
+ <tabstop>typeRxEdit</tabstop>
+ <tabstop>autoCompleteRxEdit</tabstop>
+ <tabstop>removeRxEdit</tabstop>
+ <tabstop>parseFile</tabstop>
+ <tabstop>simpleGroup</tabstop>
+ <tabstop>functionGroup</tabstop>
+ <tabstop>objectGroup</tabstop>
+ <tabstop>variableGroup</tabstop>
+ <tabstop>classGroup</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kicondialog.h</includehint>
+</includehints>
+</UI>
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 <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002-2003 Andras Mantia <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 <qlayout.h>
+#include <qcombobox.h>
+#include <qpushbutton.h>
+
+// KDE includes
+#include <klocale.h>
+#include <kfiledialog.h>
+#include <kurl.h>
+
+// 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 <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002 Andras Mantia <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 FILECOMBO_H
+#define FILECOMBO_H
+
+#include <qwidget.h>
+#include <kurl.h>
+
+/**
+ *@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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>FourButtonMessageBox</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2003 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>FourButtonMessageBox</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>425</width>
+ <height>150</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>150</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>pixmapLabel</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>textLabel</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>user1Button</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Save</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>user2Button</cstring>
+ </property>
+ <property name="text">
+ <string>Save &amp;As...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>user3Button</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Do Not Save</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>FourButtonMessageBox</receiver>
+ <slot>cancelButton_clicked()</slot>
+ </connection>
+ <connection>
+ <sender>user1Button</sender>
+ <signal>clicked()</signal>
+ <receiver>FourButtonMessageBox</receiver>
+ <slot>user1Button_clicked()</slot>
+ </connection>
+ <connection>
+ <sender>user2Button</sender>
+ <signal>clicked()</signal>
+ <receiver>FourButtonMessageBox</receiver>
+ <slot>user2Button_clicked()</slot>
+ </connection>
+ <connection>
+ <sender>user3Button</sender>
+ <signal>clicked()</signal>
+ <receiver>FourButtonMessageBox</receiver>
+ <slot>user3Button_clicked()</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="local" impldecl="in implementation">fourbuttonmessagebox.ui.h</include>
+</includes>
+<variables>
+ <variable>int m_status;</variable>
+</variables>
+<slots>
+ <slot>cancelButton_clicked()</slot>
+ <slot>user1Button_clicked()</slot>
+ <slot>user2Button_clicked()</slot>
+ <slot>user3Button_clicked()</slot>
+</slots>
+<functions>
+ <function specifier="non virtual" returnType="int">status()</function>
+</functions>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <amantia@kde.org>
+
+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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>LoadEntityDlgS</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>LoadEntityDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>452</width>
+ <height>116</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Source DTD:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Target DTEP:</string>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="0" column="1">
+ <property name="name">
+ <cstring>sourceDTDRequester</cstring>
+ </property>
+ <property name="filter">
+ <string>*.dtd|DTD Definitions</string>
+ <comment>DTD Definitions</comment>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>targetDTEPCombo</cstring>
+ </property>
+ </widget>
+ <spacer row="2" column="1">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qdom.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qlineedit.h>
+#include <qtextedit.h>
+#include <qtextstream.h>
+#include <qtimer.h>
+
+//kde includes
+#include <kcombobox.h>
+#include <kdebug.h>
+#include <kdialogbase.h>
+#include <kglobal.h>
+#include <kinputdialog.h>
+#include <klistbox.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+
+//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<QString, Abbreviation> 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<QString, QString>::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("<qt>There is already an abbreviation group called <b>%1</b>. Choose an unique name for the new group.</qt>").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("<qt>Select a DTEP from the list before using <b>Remove</b>.</qt>"), 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("<qt>Do you really want to remove the <b>%1</b> template?</qt>").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 = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n";
+ QString s2;
+ QDomDocument doc;
+ doc.setContent(s);
+ QDomNode firstNode = doc.firstChild();
+ Abbreviation abbrev;
+ QMap<QString, Abbreviation>::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<QString,QString>::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("<qt>Cannot open the file <b>%1</b> for writing.\nModified abbreviations will be lost when you quit Quanta.</qt>").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 <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 ABBREVIATION_H
+#define ABBREVIATION_H
+
+#include <qmap.h>
+#include <qstringlist.h>
+
+#include <abbreviations.h>
+
+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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>AbbreviationDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2003 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>AbbreviationDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Abbreviations</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="1" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>addDTEPButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="2" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>removeDTEPButton</cstring>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="0" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>newGroupButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;New...</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Group:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>groupCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Valid for:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>dtepList</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>groupCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QTextEdit" row="10" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>codeEdit</cstring>
+ </property>
+ <property name="textFormat">
+ <enum>PlainText</enum>
+ </property>
+ </widget>
+ <widget class="KListView" row="5" column="0" rowspan="4" colspan="2">
+ <column>
+ <property name="text">
+ <string>Template</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Description</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>templatesList</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="resizeMode">
+ <enum>LastColumn</enum>
+ </property>
+ <property name="fullWidth">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>addButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add...</string>
+ </property>
+ </widget>
+ <spacer row="8" column="3">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="6" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>removeButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Remove</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="7" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>editButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Edit...</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="9" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="text">
+ <string>Expands to:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>codeEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Templates:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>templatesList</cstring>
+ </property>
+ </widget>
+ <widget class="KListBox" row="1" column="1" rowspan="3" colspan="1">
+ <property name="name">
+ <cstring>dtepList</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="selectionMode">
+ <enum>Extended</enum>
+ </property>
+ </widget>
+ <spacer row="3" column="3" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>templatesList</sender>
+ <signal>selectionChanged(QListViewItem*)</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotTemplateSelectionChanged(QListViewItem*)</slot>
+ </connection>
+ <connection>
+ <sender>addButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotAddTemplate()</slot>
+ </connection>
+ <connection>
+ <sender>removeButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotRemoveTemplate()</slot>
+ </connection>
+ <connection>
+ <sender>editButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotEditTemplate()</slot>
+ </connection>
+ <connection>
+ <sender>groupCombo</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotGroupChanged(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>newGroupButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotNewGroup()</slot>
+ </connection>
+ <connection>
+ <sender>addDTEPButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotAddDTEP()</slot>
+ </connection>
+ <connection>
+ <sender>removeDTEPButton</sender>
+ <signal>clicked()</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotRemoveDTEP()</slot>
+ </connection>
+ <connection>
+ <sender>templatesList</sender>
+ <signal>doubleClicked(QListViewItem*)</signal>
+ <receiver>AbbreviationDlgS</receiver>
+ <slot>slotEditTemplate()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>templatesList</tabstop>
+ <tabstop>groupCombo</tabstop>
+ <tabstop>newGroupButton</tabstop>
+ <tabstop>dtepList</tabstop>
+ <tabstop>addDTEPButton</tabstop>
+ <tabstop>removeDTEPButton</tabstop>
+ <tabstop>addButton</tabstop>
+ <tabstop>removeButton</tabstop>
+ <tabstop>editButton</tabstop>
+ <tabstop>codeEdit</tabstop>
+</tabstops>
+<slots>
+ <slot>slotTemplateSelectionChanged(QListViewItem*)</slot>
+ <slot>dtdCombo_activated(const QString&amp;)</slot>
+ <slot>slotGroupChanged(const QString&amp;)</slot>
+ <slot>slotAddTemplate()</slot>
+ <slot>slotRemoveTemplate()</slot>
+ <slot>templatesList_currentChanged(QListViewItem*)</slot>
+ <slot>slotEditTemplate()</slot>
+ <slot>slotAddDTEP()</slot>
+ <slot>slotRemoveDTEP()</slot>
+ <slot>slotNewGroup()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+ <includehint>klistbox.h</includehint>
+</includehints>
+</UI>
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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>CodeTemplateDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2003 by Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>CodeTemplateDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>72</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>400</width>
+ <height>70</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Add Code Template</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Template:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>templateEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Description:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>descriptionEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>templateEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>descriptionEdit</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>templateEdit</tabstop>
+ <tabstop>descriptionEdit</tabstop>
+</tabstops>
+<slots>
+ <slot>accept()</slot>
+ <slot>reject()</slot>
+ <slot>pushButton4_clicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <pdima@mail.univ.kiev.ua>
+ (C) 2002 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+#include "filemasks.h"
+#include "filemasks.moc"
+// qt includes
+#include <qlineedit.h>
+#include <qpushbutton.h>
+
+//kde includes
+#include <kmimetype.h>
+
+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 <pdima@mail.univ.kiev.ua>
+ (C) 2002 Andras Mantia <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 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>FileMasksS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>FileMasksS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>571</width>
+ <height>571</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>encodingCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <property name="name">
+ <cstring>defaultDTDCombo</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>New files will have the extension and highlighting according to this setting</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>GroupBoxPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="title">
+ <string>Mimetypes</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineMarkup</cstring>
+ </property>
+ <property name="alignment">
+ <set>AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineImage</cstring>
+ </property>
+ <property name="alignment">
+ <set>AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="4" column="2">
+ <property name="name">
+ <cstring>buttonDefault</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Reset to Default</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel4_2</cstring>
+ </property>
+ <property name="text">
+ <string>Te&amp;xts:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineText</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Markups:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineMarkup</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Images:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineImage</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineText</cstring>
+ </property>
+ <property name="alignment">
+ <set>AlignLeft</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Scripts:</string>
+ </property>
+ <property name="scaledContents">
+ <bool>false</bool>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineScript</cstring>
+ </property>
+ </widget>
+ <spacer row="4" column="1">
+ <property name="name">
+ <cstring>Spacer2_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>153</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineScript</cstring>
+ </property>
+ <property name="alignment">
+ <set>AlignLeft</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Default character &amp;encoding:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignLeft</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>encodingCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Default &amp;DTD:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>defaultDTDCombo</cstring>
+ </property>
+ </widget>
+ <spacer row="6" column="0">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>50</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QButtonGroup" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonGroup7</cstring>
+ </property>
+ <property name="title">
+ <string>Startup Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>reloadFiles</cstring>
+ </property>
+ <property name="text">
+ <string>L&amp;oad last-opened files</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>showSplash</cstring>
+ </property>
+ <property name="text">
+ <string>S&amp;how splashscreen</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>reloadProject</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Load last-opened project</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>tlAutoSave</cstring>
+ </property>
+ <property name="text">
+ <string>Create backups every</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox">
+ <property name="name">
+ <cstring>sbAutoSave</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30000</number>
+ </property>
+ <property name="minValue">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>15</number>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>minutes</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>showDTDSelectDialog</cstring>
+ </property>
+ <property name="text">
+ <string>Show the DTD selection dialog when loading files with &amp;unknown DTD</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>lineMarkup</tabstop>
+ <tabstop>lineScript</tabstop>
+ <tabstop>lineImage</tabstop>
+ <tabstop>lineText</tabstop>
+ <tabstop>buttonDefault</tabstop>
+ <tabstop>encodingCombo</tabstop>
+ <tabstop>defaultDTDCombo</tabstop>
+ <tabstop>showDTDSelectDialog</tabstop>
+ <tabstop>sbAutoSave</tabstop>
+ <tabstop>showSplash</tabstop>
+ <tabstop>reloadProject</tabstop>
+ <tabstop>reloadFiles</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <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. *
+ * *
+ ***************************************************************************/
+
+#include "parseroptions.h"
+#include "parseroptions.moc"
+#include <qcombobox.h>
+#include <qspinbox.h>
+
+#include <klocale.h>
+#include <kconfig.h>
+
+/*
+ * 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 <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 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ParserOptionsUI</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2002 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ParserOptionsUI</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>470</width>
+ <height>413</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>Structure Tree Look &amp;&amp; Feel</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QSpinBox" row="3" column="2">
+ <property name="name">
+ <cstring>refreshFrequency</cstring>
+ </property>
+ <property name="minValue">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Use 0 to disable the automatic refresh of structure tree</string>
+ </property>
+ </widget>
+ <spacer row="4" column="1">
+ <property name="name">
+ <cstring>Spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>122</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>instantUpdate</cstring>
+ </property>
+ <property name="text">
+ <string>Instant update</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Update the structure tree after every keystroke</string>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>122</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>showClosingTags</cstring>
+ </property>
+ <property name="text">
+ <string>Show closing tags</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>showEmptyNodes</cstring>
+ </property>
+ <property name="text">
+ <string>Show empt&amp;y nodes and groups</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="4" column="2">
+ <property name="name">
+ <cstring>spinExpand</cstring>
+ </property>
+ <property name="value">
+ <number>4</number>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Set to 0 in order to expand the whole tree</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel1_5</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh frequency (in seconds):</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Expand tree when reparse to level:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QGroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Clicks on Structure Tree Items</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Update the structure tree after every keystroke</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QComboBox" row="3" column="1">
+ <item>
+ <property name="text">
+ <string>Select Tag Area</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nothing</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboDoubleClick</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Find Tag</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Find Tag &amp; Open Tree</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboLBM</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Left button:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>Popup Menu</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboRBM</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel1_4</cstring>
+ </property>
+ <property name="text">
+ <string>Double click:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Middle button:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Right button:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Find Tag &amp; Open Tree</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Find Tag</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Go to End of Tag</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Select Tag Area</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Nothing</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboMBM</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>instantUpdate</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>refreshFrequency</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>comboLBM</tabstop>
+ <tabstop>comboMBM</tabstop>
+ <tabstop>comboRBM</tabstop>
+ <tabstop>comboDoubleClick</tabstop>
+ <tabstop>showEmptyNodes</tabstop>
+ <tabstop>showClosingTags</tabstop>
+ <tabstop>instantUpdate</tabstop>
+ <tabstop>refreshFrequency</tabstop>
+ <tabstop>spinExpand</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002, 2004 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+#include "previewoptions.h"
+#include "previewoptions.moc"
+// qt includes
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+// kde includes
+#include <klocale.h>
+#include <kmessagebox.h>
+
+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 <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002, 2004 Andras Mantia <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 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>PreviewOptionsS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>PreviewOptionsS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>498</width>
+ <height>512</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>350</width>
+ <height>220</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>resetLayout</cstring>
+ </property>
+ <property name="text">
+ <string>Reset window layout to the default on the next startup</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>showHidden</cstring>
+ </property>
+ <property name="text">
+ <string>Show hidden files in files tree</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>saveLocalTrees</cstring>
+ </property>
+ <property name="text">
+ <string>Save tree status for local trees</string>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>buttonGroup3</cstring>
+ </property>
+ <property name="title">
+ <string>Close Buttons on Tabs</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioShowCloseButtons</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Always show</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioNoCloseButtons</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Do not show</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>radioDelayedCloseButtons</cstring>
+ </property>
+ <property name="text">
+ <string>Show dela&amp;yed</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="0" column="1">
+ <property name="name">
+ <cstring>buttonGroup3_2</cstring>
+ </property>
+ <property name="title">
+ <string>Documentation</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioNewDocTab</cstring>
+ </property>
+ <property name="text">
+ <string>New tab</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioSeparateDocView</cstring>
+ </property>
+ <property name="text">
+ <string>Separate toolview</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="1">
+ <property name="name">
+ <cstring>buttonGroup4</cstring>
+ </property>
+ <property name="title">
+ <string>Toolview Tabs</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioIconText</cstring>
+ </property>
+ <property name="text">
+ <string>Icon and text</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>radioText</cstring>
+ </property>
+ <property name="text">
+ <string>Text</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioIcon</cstring>
+ </property>
+ <property name="text">
+ <string>Icon</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>Preview</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioToolview</cstring>
+ </property>
+ <property name="text">
+ <string>Separate toolview</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioEditor</cstring>
+ </property>
+ <property name="text">
+ <string>Editor area</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="6" column="0">
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QButtonGroup" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>&amp;Warning Messages</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>warnBinaryOpening</cstring>
+ </property>
+ <property name="text">
+ <string>Warn about opening binar&amp;y/unknown files</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>warnEventActions</cstring>
+ </property>
+ <property name="text">
+ <string>Warn when executing &amp;actions associated with events</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>warnAll</cstring>
+ </property>
+ <property name="text">
+ <string>Show all warning messages</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>radioEditor</tabstop>
+ <tabstop>radioNewDocTab</tabstop>
+ <tabstop>radioShowCloseButtons</tabstop>
+ <tabstop>radioIconText</tabstop>
+ <tabstop>resetLayout</tabstop>
+ <tabstop>showHidden</tabstop>
+ <tabstop>saveLocalTrees</tabstop>
+ <tabstop>warnBinaryOpening</tabstop>
+ <tabstop>warnEventActions</tabstop>
+ <tabstop>warnAll</tabstop>
+ <tabstop>radioToolview</tabstop>
+ <tabstop>radioNoCloseButtons</tabstop>
+ <tabstop>radioDelayedCloseButtons</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>StyleOptionsS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>StyleOptionsS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>410</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>410</width>
+ <height>250</height>
+ </size>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Attribute quotation:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>Double Quotes</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Single Quotes</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>attributeQuotation</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Tag case:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Attribute case:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>Default Case</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Lower Case</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Upper Case</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>attributeCase</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>optionalTagAutoClose</cstring>
+ </property>
+ <property name="text">
+ <string>Auto-close o&amp;ptional tags</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>Default Case</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Lower Case</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Upper Case</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>tagCase</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>tagAutoClose</cstring>
+ </property>
+ <property name="text">
+ <string>Auto-close &amp;non single and non optional tags</string>
+ </property>
+ </widget>
+ <spacer row="8" column="0">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>tagUpdateClosing</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Update opening/closing tag automatically</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>useAutoCompletion</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Use &amp;auto-completion</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>replaceAccented</cstring>
+ </property>
+ <property name="text">
+ <string>Automatic &amp;replacement of the accented characters</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>If this option is turned on the accented characters, like &lt;b&gt;&amp;#225;&lt;/b&gt;, will be automatically replaced by their unicode style notation, for the above case with &lt;b&gt;&amp;#038;#225;&lt;/b&gt;.&lt;br&gt;
+We suggest to leave this option off and use an unicode or locale encoding for your documents.</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>tagCase</tabstop>
+ <tabstop>attributeCase</tabstop>
+ <tabstop>attributeQuotation</tabstop>
+ <tabstop>optionalTagAutoClose</tabstop>
+ <tabstop>tagAutoClose</tabstop>
+ <tabstop>useAutoCompletion</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <qfile.h>
+#include <qpushbutton.h>
+#include <qtextstream.h>
+#include <qregexp.h>
+
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <klistbox.h>
+#include <klineedit.h>
+
+#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 <qstringlist.h>
+#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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>SpecialCharDialogS</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>SpecialCharDialogS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>409</width>
+ <height>303</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Insert Special Character</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Insert Code</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonChar</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Insert C&amp;har</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>112</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout3</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Filter:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>FilterLineEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit">
+ <property name="name">
+ <cstring>FilterLineEdit</cstring>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="KListBox" row="1" column="0">
+ <property name="name">
+ <cstring>CharsListBox</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<tabstops>
+ <tabstop>FilterLineEdit</tabstop>
+ <tabstop>CharsListBox</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonChar</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klineedit.h</includehint>
+ <includehint>klistbox.h</includehint>
+</includehints>
+</UI>
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 <espensa@online.no>
+// 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
+// <mweilguni@sime.com>
+//
+
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <qdrawutil.h>
+#include <qevent.h>
+#include <qfile.h>
+#include <qimage.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <klineedit.h>
+#include <qvalidator.h>
+#include <qpainter.h>
+#include <qpushbutton.h>
+#include <qtimer.h>
+
+#include <kcolordialog.h>
+#include <kconfig.h>
+#include <kglobal.h>
+#include <kglobalsettings.h>
+#include <kiconloader.h>
+#include <klistbox.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kseparator.h>
+#include <kpalette.h>
+#include <kimageeffect.h>
+
+#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
+// <mweilguni@sime.com>
+
+
+#ifndef COLORCOMBO_H
+#define COLORCOMBO_H
+
+#include <qcombobox.h>
+#include <kdialogbase.h>
+#include <qframe.h>
+#include <qpixmap.h>
+#include <kcolordialog.h>
+#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 <qdict.h>
+#include <qlineedit.h>
+
+CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name)
+ :CoreWidgetDlgS(parent,name), TagWidget(parent,name)
+{
+}
+
+CoreWidgetDlg::~CoreWidgetDlg(){
+}
+
+void CoreWidgetDlg::readAttributes( QDict<QString> *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<QString> *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 <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. *
+ * (at your option) any later version. *
+ ***************************************************************************/
+
+#include "listdlg.h"
+
+//kde include
+#include <klistbox.h>
+#include <klocale.h>
+
+//qt includes
+#include <qpushbutton.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+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 <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. *
+ * (at your option) any later version. *
+ ***************************************************************************/
+
+#ifndef LISTDLG_H
+#define LISTDLG_H
+
+#include <kdialogbase.h>
+
+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 <qimage.h>
+
+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 <qwidget.h>
+#include <qframe.h>
+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 <pdima@users.sourceforge.net,yshurik@linuxfan.com>
+ (C) 2004 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+
+//kde includes
+#include <dcopref.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klineedit.h>
+
+//qt includes
+#include <qdom.h>
+#include <qtextstream.h>
+
+//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; i<combo->count(); 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 <pdima@users.sourceforge.net,yshurik@linuxfan.com>
+ (C) 2004 Andras Mantia <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 TAGATTR_H
+#define TAGATTR_H
+
+//qt includes
+#include <qstring.h>
+#include <qcheckbox.h>
+#include <qcombobox.h>
+#include <qdom.h>
+
+//kde includes
+#include <klineedit.h>
+#include <kurl.h>
+
+//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 <pdima@mail.univ.kiev.ua>
+ (C) 2002-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// include qt headers
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qevent.h>
+
+// include kde headers
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <kconfig.h>
+#include <kurl.h>
+#include <kstdguiitem.h>
+#include <kdebug.h>
+
+#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<QString>(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 = "<!DOCTYPE TAGS>\n<TAGS>\n";
+ docString += QString("<tag name=\"%1\">\n").arg(dtdTag->name());
+ docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes());
+ docString += "</tag>\n</TAGS>\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<Tagxml>();
+ 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 = "<!DOCTYPE TAGS>\n<TAGS>\n";
+ docString += QString("<tag name=\"Page%1\">\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 << "<attr name=\"" << el.attribute("name") << "\" type=\"" << el.attribute("type", "input");
+ str << "\" source=\"" << el.attribute("source");
+ str << "\" interface=\"" << el.attribute("interface");
+ str << "\" method=\"" << el.attribute("method");
+ str << "\" arguments=\"" << el.attribute("arguments");
+ str << "\">" << endl;
+ str << " <text>" << el.attribute("name") << "</text>" << endl;
+ str << " <textlocation col=\"0\" row=\"" << row << "\" />" << endl;
+ str << " <location col=\"1\" row=\"" << row << "\" />" << 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 << "</attr>" << endl;
+ row++;
+ }
+
+ }
+ docString += s;
+ addPage = true;
+ }
+ }
+ commonFile.close();
+ }
+ }
+
+ docString += "</tag>\n</TAGS>\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<QString> format*/
+QDict<QString> * TagDialog::getAttributes()
+{
+ return dict;
+}
+
+
+/** Return all the attributes in one string*/
+QString TagDialog::getAttributeString()
+{
+ QDictIterator<QString> 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("</")+QuantaCommon::tagCase(dtdTag->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<QString> 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<Tagxml*>(mainDlg))
+ static_cast<Tagxml*>(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 <pdima@mail.univ.kiev.ua>
+ (C) 2002-2003 by Andras Mantia <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 TAGDIALOG_H
+#define TAGDIALOG_H
+
+#include <qwidget.h>
+#include <qtabdialog.h>
+#include <qdict.h>
+#include <qstrlist.h>
+
+#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 : <a></a>
+ false: <a>
+ </a>
+
+ */
+ 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<QString> format*/
+ QDict<QString> * 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<QString> *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<Tagxml> *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 <qspinbox.h>
+#include <qimage.h>
+//kde includes
+#include <kapplication.h>
+#include <klocale.h>
+#include <kio/netaccess.h>
+#include <kfiledialog.h>
+#include <kurl.h>
+
+//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<QString> *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<QString> *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 <qwidget.h>
+#include <qlabel.h>
+#include <klineedit.h>
+#include <qpushbutton.h>
+#include <qcombobox.h>
+//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<QString> *d );
+ void writeAttributes( QDict<QString> *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 <klocale.h>
+#include <kurl.h>
+#include <knumvalidator.h>
+#include <kiconloader.h>
+
+#include <qlayout.h>
+#include <qspinbox.h>
+
+#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 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>TagMail</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>TagMail</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>477</width>
+ <height>254</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>AddressLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Email address:</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="4">
+ <property name="name">
+ <cstring>buttonAddressSelect</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>lineEmail</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>lineSubject</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>SubjectLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Subject:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TitleLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ </widget>
+ <widget class="QTextEdit" row="2" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>titleEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="3" column="2">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="3" column="3" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <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. *
+ * (at your option) any later version. *
+ ***************************************************************************/
+
+
+#include "tagmaildlg.h"
+#include "listdlg.h"
+#include "resource.h"
+#include "quantacommon.h"
+
+//kde includes
+#include <kapplication.h>
+#include <kdialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kabc/stdaddressbook.h>
+
+//qt includes
+#include <qlineedit.h>
+#include <kpushbutton.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+
+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 <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. *
+ * (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 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>TagMisc</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ ***************************************************************************/
+</comment>
+<author>(C) 2001, 2003 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>TagMisc</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>350</width>
+ <height>61</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>350</width>
+ <height>60</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Misc. Tag</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>elementName</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Element name:</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>addClosingTag</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add closing tag</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>elementName</tabstop>
+ <tabstop>addClosingTag</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <montel@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. *
+ * *
+ ***************************************************************************/
+
+#include "tagmiscdlg.h"
+#include "tagmisc.h"
+#include <klocale.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+
+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 <montel@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 TAGMISCDLG_H
+#define TAGMISCDLG_H
+
+#include <kdialogbase.h>
+
+
+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 <qbuttongroup.h>
+#include <qlabel.h>
+#include <qspinbox.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qgroupbox.h>
+
+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 <qwidget.h>
+
+#include <qdialog.h>
+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 <kapplication.h>
+#include <klocale.h>
+#include <qbuttongroup.h>
+#include "tagquicklistdlg.h"
+#include <qspinbox.h>
+#include <qlabel.h>
+#include <kpushbutton.h>
+#include <qradiobutton.h>
+#include <kstdguiitem.h>
+
+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 <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. *
+ * *
+ ***************************************************************************/
+
+// QT files
+#include <qcombobox.h>
+#include <klineedit.h>
+#include <qstring.h>
+#include <qspinbox.h>
+#include <qcheckbox.h>
+
+// KDE files
+#include <kcolorbutton.h>
+#include <kurl.h>
+
+// 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 <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 TAGWIDGET_H
+#define TAGWIDGET_H
+
+#include <qwidget.h>
+#include <qdict.h>
+
+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<QString> *) {};
+ virtual void writeAttributes(QDict<QString> *) {};
+ 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<QString> *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 <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "tagxml.h"
+#include "tagattr.h"
+#include <klineedit.h>
+#include <kdebug.h>
+#include <klocale.h>
+
+#include <qcheckbox.h>
+#include <qlayout.h>
+#include <qlabel.h>
+#include <qtooltip.h>
+#include <qwhatsthis.h>
+
+#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<QString> *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_check *>(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 <input disabled="false">, 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_file *>(attr))
+ {
+// value = KURL::encode_string(value);
+ d->replace(name, new QString(value));
+ } else {
+ value.replace(QRegExp("&(?!amp;)"), "&amp;");
+ d->replace(name, new QString(value) );
+ }
+ }
+
+
+ attr = attributes.next();
+ }
+
+}
+
+void Tagxml::writeAttributes( QDict<QString> *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("&amp;","&");
+ if ( dynamic_cast<Attr_check *>(attr) ) // checkbox
+ value = "checked";
+ else
+ if ( dynamic_cast<Attr_file *>(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 <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2003, 2004 by Andras Mantia <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 TAGXML_H
+#define TAGXML_H
+
+#include <qwidget.h>
+#include <qdom.h>
+#include <qptrlist.h>
+
+#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<Attr> attributes;
+
+ void readAttributes( QDict<QString> *d);
+ void writeAttributes( QDict<QString> *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 <amantia@kde.org>, (C) 2005
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include <qdict.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qheader.h>
+#include <qmap.h>
+#include <qregexp.h>
+#include <qstringlist.h>
+#include <qtextstream.h>
+#include <qtimer.h>
+
+#include <kdebug.h>
+#include <kio/netaccess.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kurl.h>
+
+#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<QString, QString>& 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<uint, QPair<QString, QString> > &a_annotations)
+{
+ m_annotatedFileItems.clear();
+ m_fileNames.clear();
+ m_lines.clear();
+ m_yourFileItems.clear();
+ m_yourFileNames.clear();
+ m_yourLines.clear();
+
+ bool modified = false;
+ QMap<uint, QPair<QString, QString> > 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<uint, QPair<QString, QString> >::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<KListView*> (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<KListView*> (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<uint, QPair<QString, QString> > 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("<qt>There are annotations addressed for you.<br> To view them select the <i>For You</i> tab in the <i>Annotations</i> toolview.</qt>"), 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 <amantia@kde.org>, (C) 2005
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef ANNOTATIONOUTPUT_H
+#define ANNOTATIONOUTPUT_H
+
+#include <kurl.h>
+#include <ktabwidget.h>
+
+/**
+@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<uint, QPair<QString, QString> > &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<QString, QString>& 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<KListViewItem> m_annotatedFileItems;
+ QMap<QListViewItem*, QString> m_fileNames;
+ QMap<QListViewItem*, uint> m_lines;
+ uint m_yourAnnotationsNum;
+
+ KListView *m_yourAnnotations;
+ QDict<KListViewItem> m_yourFileItems;
+ QMap<QListViewItem*, QString> m_yourFileNames;
+ QMap<QListViewItem*, uint> 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 <dima@kde.org>
+ (C) 2002-2005 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "messageitem.h"
+#include <qregexp.h>
+#include <klocale.h>
+
+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 <dima@kde.org>
+ (C) 2002-2005 Andras Mantia <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 MESSAGEITEM_H
+#define MESSAGEITEM_H
+
+#include <qlistbox.h>
+
+/**
+ 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 <pdima@mail.univ.kiev.ua>
+ (C) 2003-2005 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// KDE includes
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kfiledialog.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kiconloader.h>
+
+// Qt includes
+#include <qclipboard.h>
+#include <qfile.h>
+#include <qtextstream.h>
+
+#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<MessageItem*>( 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<MessageItem*>(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; i<count(); i++)
+ p_content.append(text(i) + "\n");
+ return p_content;
+}
+
+void MessageOutput::copyContent()
+{
+ kapp->clipboard()->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("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
+ .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ return;
+
+ QFile file(url.path());
+ if (!file.open(IO_WriteOnly)) {
+ KMessageBox::error(0, i18n("<qt>Cannot save log file<br><b>%1</b></qt>")
+ .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 <pdima@mail.univ.kiev.ua>
+ (C) 2002-2005 Andras Mantia <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 MESSAGEOUTPUT_H
+#define MESSAGEOUTPUT_H
+
+#include <qlistbox.h>
+
+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 <jphanley@buffalo.edu>
+ (C) 2002, 2003 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qregexp.h>
+#include <qstringlist.h>
+#include <qdom.h>
+
+#include <klocale.h>
+#include <kurl.h>
+#include <kdebug.h>
+#include <kio/netaccess.h>
+#include <kmessagebox.h>
+#include <ktempfile.h>
+
+#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 << "<!DOCTYPE TAGS>" << endl
+ << "<TAGS>" << endl
+ << "<tag name=\"" << tag << "\">" << endl << endl;
+
+ AttributeList *attributes = getTagAttributes(tag);
+ stream << QuantaCommon::xmlFromAttributes(attributes);
+
+ stream << "</tag>" << endl
+ << "</TAGS>" << 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("<qt>Cannot download the DTD from <b>%1</b>.</qt>").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("<!ENTITY") && line.endsWith(">"))
+ {
+ parseDTDEntity(line);
+ }
+ else
+ if (line.startsWith("<!ELEMENT") && line.endsWith(">"))
+ {
+ parseDTDElement(line);
+ }
+ else
+ if (line.startsWith("<!ATTLIST") && line.endsWith(">"))
+ {
+ 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("<!--");
+ end = value.find("-->",begin+2);
+ while (begin != -1 && end != -1) {
+ value.remove(begin, end-begin+3);
+ begin = value.find("<!--");
+ end = 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 <jphanley@buffalo.edu>
+ (C) 2002, 2003 Andras Mantia <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 DTD_H
+#define DTD_H
+
+//qt includes
+#include <qdict.h>
+
+//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<QString> entities;
+ QDict<QString> elements;
+ QStringList tags;
+ QDict<AttributeList> 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 <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qcheckbox.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qregexp.h>
+#include <qstring.h>
+
+//kde includes
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kdialogbase.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kurl.h>
+#include <kio/netaccess.h>
+
+//other includes
+#ifdef LIBXML_2_5
+#include <libxml/hash.h>
+#endif
+
+#include <libxml/parser.h>
+#include <libxml/valid.h>
+
+//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("<qt>Cannot download the DTD from <b>%1</b>.</qt>").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 += "<br>" + s;
+ s = QString::fromLatin1(errorPtr->str2);
+ if (!s.isEmpty())
+ errorStr += "<br>" + s;
+ s = QString::fromLatin1(errorPtr->str2);
+ if (!s.isEmpty())
+ errorStr += "<br>" + s;
+ errorStr += QString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2);
+ xmlResetError(errorPtr);
+ }
+#endif
+ KMessageBox::error(0, i18n("<qt>Error while parsing the DTD.<br>The error message is:<br><i>%1</i></qt>").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("<!doctype", false), "");
+ m_doctype = m_doctype.left(m_doctype.findRev(">"));
+ 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
+ DTD::entityStream << "<!DOCTYPE TAGS>" << endl
+ << "<TAGS>" << endl;
+ xmlHashScan((xmlEntitiesTablePtr)DTD::dtd_ptr->entities, (xmlHashScanner)saveEntity, 0);
+ DTD::entityStream << "</TAGS>" << endl;
+ file.close();
+ } else
+ {
+ KMessageBox::error(0L, i18n("<qt>Cannot create the <br><b>%1</b> file.<br>Check that you have write permission in the parent folder.</qt>")
+ .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","<!-- -->,<?xml ?>,<!DOCTYPE >");
+// 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
+ stream << "<!DOCTYPE TAGS>" << endl
+ << "<TAGS>" << endl
+ << "<tag name=\"" << elemName << "\">" << 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 << "<children>" << endl;
+ for( int i = 0; i < childNum; i++ )
+ {
+ stream << " <child name=\"" << QString((const char*)list_ptr[i]) << "\"";
+ xmlElementPtr child_ptr = xmlGetDtdElementDesc(DTD::dtd_ptr, list_ptr[i]);
+ if (child_ptr && child_ptr->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 << "</children>" << endl;
+ stream << endl;
+ }
+ /*
+ xmlElementContentPtr content_ptr = el_ptr->content;
+ if (content_ptr)
+ {
+ stream << "<children>" << endl;
+ while (content_ptr)
+ {
+ if (!QString((const char*)content_ptr->name).isEmpty())
+ {
+ stream << " <child name=\"" << QString((const char*)content_ptr->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 << "</children>" << endl;
+ } */
+ }
+ stream << "</tag>" << endl
+ << "</TAGS>" << endl;
+ file.close();
+ }
+ }
+}
+
+void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf)
+{
+ Q_UNUSED(buf);
+ if (entity)
+ {
+ QString name = QString((const char*)entity->name);
+ DTD::entityStream << "<tag name=\"" << name << "\" type=\"entity\" />" << 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 <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 DTDPARSER_H
+#define DTDPARSER_H
+
+//qt includes
+#include <qdict.h>
+
+//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<Attribute> 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 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>DTEPCreationDlg</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2003 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>DTEPCreationDlg</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>500</width>
+ <height>285</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>500</width>
+ <height>200</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>DTD - &gt; DTEP Conversion</string>
+ </property>
+ <property name="sizeGripEnabled" stdset="0">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>nickName</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="4" column="1">
+ <property name="name">
+ <cstring>dtdURL</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Name: </string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Nickname:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>!DOCTYPE definition line:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>directory</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="1">
+ <property name="name">
+ <cstring>doctype</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>dtdName</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>DTD URL:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Target directory name:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Default extension:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="5" column="1">
+ <property name="name">
+ <cstring>defaultExtension</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>caseSensitive</cstring>
+ </property>
+ <property name="text">
+ <string>Case-sensitive tags and attributes</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>fineTune</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Fine-tune the DTEP after conversion</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>directory</tabstop>
+ <tabstop>dtdName</tabstop>
+ <tabstop>nickName</tabstop>
+ <tabstop>doctype</tabstop>
+ <tabstop>dtdURL</tabstop>
+ <tabstop>defaultExtension</tabstop>
+ <tabstop>caseSensitive</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
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 <pdima@mail.univ.kiev.ua>
+ (C) 2001-2003 Andras Mantia <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 <qlistview.h>
+#include <qdom.h>
+
+#include <kdebug.h>
+
+#include "node.h"
+#include "tag.h"
+#include "qtag.h"
+#include "quantacommon.h"
+#include "structtreetag.h"
+#include "kafkacommon.h"
+
+QMap<Node*, int> 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<GroupElement*> 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<QListViewItem*> listItem;
+ for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem)
+ {
+ static_cast<StructTreeTag*>(*listItem)->node = 0L;
+ static_cast<StructTreeTag*>(*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 <pdima@mail.univ.kiev.ua>
+ (C) 2001-2004 Andras Mantia <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 NODE_H
+#define NODE_H
+
+#include <qptrlist.h>
+#include <qvaluelist.h>
+#include <qmap.h>
+#include <dom/dom_node.h>
+
+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; ///<is part of this group
+ };
+
+typedef QValueList<GroupElement*> GroupElementList;
+typedef QMap<QString, GroupElementList> 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<QListViewItem *> listItems; ///<points to the listview items which represents this node in the structure tree
+ QListViewItem *mainListItem; ///< the main listview item (from under the root node) associated with this node
+ bool closesPrevious; //this node "closes" the tag from previous node
+ bool opened;
+ bool removeAll; //set to false if you don't want to remove the "next" and "child" when deleting the node.
+ bool insideSpecial; //true if the node is part of a special area
+ bool specialInsideXml; //< true if the node is a special area defined inside a tag, like the PHP in <a href="<? echo $a ?>">
+ QString fileName; //the node is in this file. If empty, it's in the current document
+ QValueList<GroupElement*> 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 <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qeventloop.h>
+#include <qstring.h>
+#include <qpoint.h>
+#include <qregexp.h>
+#include <qcstring.h>
+#include <qstringlist.h>
+#include <qstrlist.h>
+#include <qdatetime.h>
+#include <qfile.h>
+#include <qtextcodec.h>
+#include <qvaluelist.h>
+#include <qvaluestack.h>
+
+//standard library includes
+#include <stdio.h>
+#include <ctype.h>
+//#include <iostream.h>
+
+//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 <kapplication.h>
+#include <kdebug.h>
+#include <kdirwatch.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <ktexteditor/document.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/encodinginterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+
+extern GroupElementMapList globalGroupMap;
+static const QChar space(' ');
+
+extern int NN;
+extern QMap<Node*, int> 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.: <a href="<? foo ?>""></a><input size="<? foo ?>" >
+ {
+ 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 <script type=... >
+ if (m_dtd->specialTags.contains(tag->name.lower()) && !tag->single)
+ {
+ //TODO: handle goUp here
+ Node *node = new Node(parentNode);
+ nodeNum++;
+ node->tag = tag;
+ node->insideSpecial = true;
+ if (currentNode && currentNode != parentNode)
+ {
+ currentNode->next = node;
+ node->prev = currentNode;
+ } else
+ {
+ if (parentNode)
+ parentNode->child = node;
+ }
+ if (!rootNode)
+ rootNode = node;
+ //find the DTD that needs to be used for the special area
+ QString tmpStr = m_dtd->specialTags[tag->name.lower()];
+ int defPos = tmpStr.find('[');
+ QString defValue;
+ if (defPos != 0)
+ {
+ defValue = tmpStr.mid(defPos+1, tmpStr.findRev(']')-defPos-1).stripWhiteSpace();
+ tmpStr = tmpStr.left(defPos);
+ }
+ QString s = tag->attributeValue(tmpStr);
+ if (s.isEmpty())
+ s = defValue;
+ const DTDStruct *dtd = DTDs::ref()->find(s);
+ if (!dtd)
+ dtd = m_dtd;
+ //a trick here: replace the node's DTD with this one //Note: with the new SAParser, the top level nodes must be Tag::ScriptTag-s!
+ // const DTDStruct *savedDTD = node->tag->dtd;
+ node->tag->setDtd(dtd);
+ node->tag->type = Tag::ScriptTag;
+ //now parse the special area
+ area.bLine = area.eLine;
+ area.bCol = area.eCol + 1;
+ area.eLine = endLine;
+ area.eCol = endCol;
+ currentNode = m_saParser->parseArea(area, "", "</"+tag->name+"\\s*>", node, false, true);
+ //restore & set the new variables
+ // node->tag->dtd = savedDTD;
+ line = m_saParser->lastParsedLine();
+ textLine = ParserCommon::getLine(write, line, endLine, endCol);
+ col = m_saParser->lastParsedColumn();
+ continue;
+ }
+
+ qTag = 0L;
+ goUp = ( parentNode &&
+ ( (tag->type == Tag::XmlTagEnd && QuantaCommon::closesTag(parentNode->tag, tag)
+ ) ||
+ parentNode->tag->single )
+ );
+ if (parentNode && !goUp)
+ {
+ qTag = QuantaCommon::tagFromDTD(m_dtd, parentNode->tag->name);
+ if ( qTag )
+ {
+ QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper();
+ searchFor.remove('/');
+ if ( qTag->stoppingTags.contains(searchFor))
+ {
+ parentNode->tag->closingMissing = true; //parent is single...
+ goUp = true;
+ }
+ }
+ }
+ }
+
+ col++;
+ if (nodeFound)
+ {
+ //first create a text/empty node between the current position and the last node
+ Node *savedParentNode = parentNode;
+ currentNode = ParserCommon::createTextNode(write, currentNode, tagStartLine, tagStartPos, parentNode);
+ if (savedParentNode != parentNode)
+ goUp = false;
+ if (!rootNode)
+ rootNode = currentNode;
+
+ Node *node = 0L;
+ if (goUp)
+ {
+ //handle cases like <ul><li></ul>
+ if (tag->type == Tag::XmlTagEnd && !QuantaCommon::closesTag(parentNode->tag, tag))
+ {
+ while ( parentNode->parent &&
+ QuantaCommon::closesTag(parentNode->parent->tag, tag)
+ )
+ {
+ parentNode = parentNode->parent;
+ }
+ } else
+ if (qTag && tag->type != Tag::XmlTagEnd)
+ {
+ //handle the case when a tag is a stopping tag for parent, and grandparent and so on.
+ Node *n = parentNode;
+ QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper();
+ while (qTag && n)
+ {
+ qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name);
+ if ( qTag )
+ {
+ if ( qTag->stoppingTags.contains(searchFor) )
+ {
+ n->tag->closingMissing = true; //parent is single...
+ if (n->parent)
+ parentNode = n;
+ n = n->parent;
+ } else
+ {
+ break;
+ }
+ }
+ }
+ }
+
+ node = new Node(parentNode->parent);
+ nodeNum++;
+ node->prev = parentNode;
+ parentNode->next = node;
+ parentNode = parentNode->parent;
+ node->closesPrevious = true;
+ } else
+ {
+ node = new Node(parentNode);
+ nodeNum++;
+ if (currentNode && currentNode != parentNode)
+ {
+ currentNode->next = node;
+ node->prev = currentNode;
+ } else
+ {
+ if (parentNode)
+ {
+ if (!parentNode->child)
+ parentNode->child = node;
+ else
+ {
+ Node *n = parentNode->child;
+ while (n->next)
+ n = n->next;
+ n->next = node;
+ node->prev = n;
+ }
+ }
+ }
+ }
+ if (!tag->single)
+ parentNode = node;
+
+ node->tag = tag;
+ if (tag->type == Tag::NeedsParsing)
+ {
+ if (tag->name.lower().startsWith("comment"))
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24000) << "COMMENT!" << endl;
+#endif
+ node->tag->type = Tag::Comment;
+ }
+ }
+ else if (tag->type == Tag::XmlTag)
+ {
+ parseForXMLGroup(node);
+ //search for scripts inside the XML tag
+ parseScriptInsideTag(node);
+ }
+
+ currentNode = node;
+ if (!rootNode)
+ rootNode = node;
+ } else
+ {
+ line++;
+ col = 0;
+ textLine = ParserCommon::getLine(write, line, endLine, endCol);
+ //kdDebug(24000) << "Line " << line << endl;
+ }
+
+ }
+ }
+
+ int el = 0;
+ int ec = -1;
+ if (currentNode)
+ {
+ currentNode->tag->endPos(el, ec);
+ }
+
+ if (m_dtd->family == Script)
+ {
+ if (ec == -1)
+ ec = 0;
+ AreaStruct area(el, ec, endLine, endCol);
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << "Calling cleanGroups from Parser::parseArea" << endl;
+#endif
+ cleanGroups();
+ m_saParser->setParsingEnabled(true);
+ currentNode = m_saParser->parseArea(area, "", "", parentNode, true, true); //TODO: don't parse in detail here
+ m_saParser->setParsingEnabled(false);
+ el = m_saParser->lastParsedLine();
+ ec = m_saParser->lastParsedColumn();
+ } else
+ if (endLine == maxLines && endCol == write->editIf->lineLength(maxLines) - 1)
+ {
+ //create a text node from the last tag until the end of file
+ if (el == endLine && ec == endCol)
+ {
+ el = endLine + 1;
+ ec = 0;
+ } else
+ {
+ el = endLine;
+ ec = endCol + 1;
+ }
+ currentNode = ParserCommon::createTextNode(write, currentNode, el, ec, parentNode);
+ } else
+ if (el != endLine || ec != endCol)
+ {
+ if (currentNode && currentNode->tag->type == Tag::ScriptTag)
+ {
+ parentNode = currentNode;
+ currentNode = 0L;
+ }
+ currentNode = ParserCommon::createTextNode(write, currentNode, endLine, endCol, parentNode);
+ }
+ if (!rootNode)
+ rootNode = currentNode;
+ *lastNode = currentNode;
+ return rootNode;
+}
+
+/** Parse the whole text from Document w and build the internal structure tree
+ from Nodes */
+Node *Parser::parse(Document *w, bool force)
+{
+ QTime t;
+ t.start();
+ QuantaView *view = ViewManager::ref()->activeView();
+ //If VPL is loaded, there shouldn't be any rebuild
+ if(view && view->hadLastFocus() == QuantaView::VPLFocus && !force)
+ return m_node;
+
+ if(!m_parsingEnabled && !force)
+ return baseNode;
+
+ bool saParserEnabled = m_saParser->parsingEnabled();
+ m_saParser->setParsingEnabled(false);
+ m_saParser->init(0L, w);
+ // clearGroups();
+ if (baseNode)
+ {
+ kdDebug(24000) << "Node objects before delete = " << NN << " ; list count = " << nodes.count() << endl;
+ //kdDebug(24000) << "baseNode before delete = " << baseNode << endl;
+ //ParserCommon::coutTree(m_node, 2);
+ Node::deleteNode(baseNode);
+ baseNode = 0L;
+ kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl;
+/* QMap<Node*, int> nList = nodes;
+ for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+ Node::deleteNode(*it);
+ kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl; */
+ }
+ m_node = 0L;
+
+ Node *lastNode;
+ write = w;
+ m_dtd = w->defaultDTD();
+ w->resetDTEPs();
+ maxLines = w->editIf->numLines() - 1;
+ parsingEnabled = true;
+ nodeNum = 0;
+ if (maxLines >= 0)
+ m_node = parseArea(0, 0, maxLines, w->editIf->lineLength(maxLines) - 1, &lastNode);
+ kdDebug(24000) << "Parsing time ("<< maxLines << " lines): " << t.elapsed() << " ms\n";
+ if (!m_node)
+ {
+ m_node = ParserCommon::createTextNode(w, 0L, maxLines, w->editIf->lineLength(maxLines), 0L);
+ }
+ m_parsingNeeded = false;
+
+// treeSize = 0;
+// kdDebug(24000) << "Basenode : " << m_node << endl;
+// ParserCommon::coutTree(m_node, 2);
+// kdDebug(24000) << "Size of tree: " << treeSize << endl;
+
+//FIXME: What is the use of two pointer to the same Node???
+ baseNode = m_node;
+ kdDebug(24000) << "NN after parse = " << NN << "baseNode : " << baseNode << endl;
+ m_saParser->init(m_node, w);
+
+ //We need to reload Kafka to refresh the DOM::Node->Node links.
+ //FIXME: make a function which only update the DOM::Node->Node links.
+ if (view)
+ view->reloadVPLView(true);
+
+ emit nodeTreeChanged();
+ if (saParserEnabled)
+ QTimer::singleShot(0, this, SLOT(slotParseInDetail()));
+ return m_node;
+}
+
+
+
+
+/** No descriptions */
+const DTDStruct * Parser::currentDTD(int line, int col)
+{
+ const DTDStruct *dtd = m_dtd;
+ Node *node = nodeAt(line, col, false, true);
+ if (node)
+ {
+ dtd = node->tag->dtd();
+ }
+
+ return dtd;
+}
+
+/** Returns the node for position (line, column). As more than one node can
+contain the same area, it return the "deepest" node. */
+Node *Parser::nodeAt(int line, int col, bool findDeepest, bool exact)
+{
+ if (!write)
+ return 0L;
+ if (!baseNode)
+ baseNode = parse(write, true); //FIXME: this most likely hides a bug: new documents are not parsed
+
+ Node *node = m_node;
+ int bl, bc, el, ec;
+ int result;
+
+ while (node)
+ {
+ node->tag->beginPos(bl, bc);
+ bc++;
+ Node *n = node->nextNotChild();
+ if (n && n->tag)
+ {
+ n->tag->beginPos(el, ec);
+ } else
+ {
+ el = write->editIf->numLines();
+ ec = 0;
+ }
+ result = QuantaCommon::isBetween(line, col, bl, bc, el, ec);
+ if ( result == 0)
+ {
+ if (node->child)
+ {
+ node = node->child;
+ } else
+ {
+ if (node->parent)
+ {
+ int parentEl, parentEc;
+ node->parent->tag->endPos(parentEl, parentEc);
+ if (!exact && QuantaCommon::isBetween(line, col, bl, bc, parentEl, parentEc) == 0)
+ {
+ node = node->parent;
+ }
+ }
+ break; //we found the node
+ }
+ } else
+ if (result == -1)
+ {
+ if (node->parent)
+ node = node->parent;
+ break; //we found the node
+ } else
+ {
+ node = node->next;
+ }
+ }
+
+ bc = ec = el = bl = 0;
+ if (node)
+ {
+ node->tag->beginPos(bl, bc);
+ node->tag->endPos(el, ec);
+ }
+ if (node && node->tag->type == Tag::Empty &&
+ (findDeepest || (bl == el && ec < bc)) )
+ {
+ if (node->parent)
+ {
+ node = node->parent;
+ } else
+ if (node->prev)
+ {
+ node = node->prev;
+ }
+ } else
+ if (node && (el < line || (el == line && ec + 1 < col)))
+ {
+ Node *n = node->nextSibling();
+ if (n /*&& n->nextSibling()*/) //don't set it to the last, always empty node
+ node = n;
+ }
+ return node;
+}
+void Parser::logReparse(NodeModifsSet *modifs, Document *w)
+{
+
+ NodeModif *modif;
+ if (baseNode)
+ {
+ Node *n = baseNode;
+ while (n)
+ {
+ n->detachNode();
+ n = n->nextSibling();
+ }
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeTreeRemoved);
+ modif->setNode(baseNode);
+ modifs->addNodeModif(modif);
+ baseNode = 0L;
+ }
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeTreeAdded);
+ modifs->addNodeModif(modif);
+ w->docUndoRedo->addNewModifsSet(modifs, undoRedo::SourceModif);
+}
+
+bool Parser::invalidArea(Document *w, AreaStruct &area, Node **firstNode, Node **lastNode)
+{
+ oldMaxLines = maxLines;
+ maxLines = w->editIf->numLines() - 1;
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = nodeAt(line, col, false);
+ int bl, bc, el, ec;
+ QString text;
+ QString tagStr;
+ area.bLine = area.bCol = 0;
+ area.eLine = maxLines;
+ area.eCol = w->editIf->lineLength(maxLines) - 1;
+ if (area.eCol < 0)
+ area.eCol = 0;
+ if (node)
+ node->tag->beginPos(area.bLine, area.bCol);
+
+ Node *startNode = node;
+ //find the first unchanged (non empty) node backwards and store it as firstNode
+ *firstNode = 0L;
+ while (node)
+ {
+ node->tag->beginPos(bl, bc);
+ node->tag->endPos(el, ec);
+ if (node->tag->type != Tag::Empty
+ && !node->insideSpecial && node->tag->validXMLTag //TODO:remove when script reparsing is supported
+ )
+ {
+ text = w->text(bl, bc, el, ec);
+ tagStr = node->tag->tagStr();
+ if (tagStr == text)
+ {
+ *firstNode = node;
+ //firstNode might not be the first unchanged Node e.g. text Nodes
+ while (*firstNode)
+ {
+ if((*firstNode)->tag->type != Tag::Text)
+ break;
+ (*firstNode)->tag->endPos(el, ec);
+ text = w->text(el, ec + 1, el, ec + 1);
+ if (text == "<")
+ break;
+ else// a character has been added at the end of the text : this node is modified
+ *firstNode = (*firstNode)->previousSibling();
+ }
+ break;
+ } else
+ {
+ node = node->previousSibling(); //the tag content is different
+ }
+ } else
+ {
+ node = node->previousSibling(); //the tag is empty, ignore it
+ }
+ }
+ //find the first unchanged (non empty) node forward and store it as lastNode
+ //move the nodes if they were shifted
+ bool moveNodes = false; //do we need to move the nodes?
+ int lineDiff = maxLines - oldMaxLines; //lines are shifted with this amount
+ node = startNode;
+ *lastNode = 0L;
+ while (node)
+ {
+ node->tag->beginPos(bl, bc);
+ node->tag->endPos(el, ec);
+ if (!moveNodes)
+ {
+ if (node->tag->type != Tag::Empty
+ && !node->insideSpecial && node->tag->validXMLTag //TODO:remove when script reparsing is supported
+ )
+ {
+ text = w->text(bl + lineDiff, bc, el + lineDiff, ec);
+ tagStr = node->tag->tagStr();
+ if (tagStr == text)
+ {
+ if (!(*lastNode))
+ *lastNode = node;
+
+ if (lineDiff != 0)
+ {
+ moveNodes = true;
+ node->tag->setTagPosition(bl + lineDiff, bc, el + lineDiff, ec);
+ } else
+ {
+ break; //lastNode found
+ }
+ }
+ }
+ } else
+ {
+ node->tag->setTagPosition(bl + lineDiff, bc, el + lineDiff, ec);
+ }
+ node = node->nextSibling();
+ }
+
+ if (*firstNode)
+ node = (*firstNode)->nextSibling(); //the first changed node
+ else
+ return false;
+ if (node)
+ node->tag->beginPos(area.bLine, area.bCol);
+ if (*lastNode)
+ {
+ (*lastNode)->tag->beginPos(area.eLine, area.eCol);
+ if (area.eCol > 0)
+ area.eCol--;
+ }
+ return true;
+}
+
+void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs)
+{
+ Node *nextNode, *child, *parent, *next, *prev;
+ int i, j;
+ Node *node = firstNode;
+ bool closesPrevious = false;
+ NodeModif *modif;
+
+ //delete all the nodes between the firstNode and lastNode
+ while (node && node != lastNode )
+ {
+ nextNode = node->nextSibling();
+ node->removeAll = false;
+ child = node->child;
+ parent = node->parent;
+ next = node->next;
+ prev = node->prev;
+ closesPrevious = node->closesPrevious;
+ if (nextNode && nextNode->prev == node)
+ {
+ nextNode->prev = prev;
+ }
+ if (nextNode && nextNode->parent == node)
+ {
+ nextNode->parent = parent;
+ }
+ if (next)
+ next->prev = prev;
+ if (prev && prev->next == node)
+ {
+ prev->next = next;
+ }
+ if (next && next->closesPrevious)
+ next->closesPrevious = false;
+
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(kafkaCommon::getLocation(node));
+ if (prev && prev->next == node)
+ prev->next = 0L;
+ if(parent && parent->child == node)
+ parent->child = 0L;
+ node->parent = 0L;
+ node->next = 0L;
+ node->prev = 0L;
+
+ //delete node;
+ node->detachNode();
+ modif->setNode(node);
+
+ node = 0L;
+ i = 0;
+ j = 0;
+ if (!closesPrevious)
+ {
+ //move the children up one level
+ Node *n = child;
+ Node *m = child;
+ while (n)
+ {
+ m = n;
+ n->parent = parent;
+ n = n->next;
+ i++;
+ }
+ //connect the first child to the tree (after prev, or as the first child of the parent)
+ if (prev && child)
+ {
+ prev->next = child;
+ child->prev = prev;
+ if (next) //the last child is just before the next
+ {
+ m->next = next;
+ next->prev = m;
+ }
+ } else
+ {
+ if (!child) //when there is no child, connect the next as the first child of the parent
+ child = next;
+ else
+ if (next)
+ {
+ n = child;
+ while (n->next)
+ n = n->next;
+ n->next = next;
+ next->prev = n;
+ }
+ if (parent && !parent->child)
+ {
+ parent->child = child;
+ }
+ }
+ } else
+ {
+ //change the parent of children, so the prev will be the new parent
+ if (child)
+ {
+ Node *n = child;
+ Node *m = child;
+ while (n)
+ {
+ m = n;
+ n->parent = prev;
+ n = n->next;
+ i++;
+ }
+ if (prev->child)
+ {
+ n = prev;
+ while (n->child)
+ {
+ n = n->child;
+ while (n->next)
+ n = n->next;
+ }
+ n->next = child;
+ child->prev = n;
+ } else
+ {
+ prev->child = child;
+ }
+ }
+ //move down the nodes starting with next one level and append to the list of children of prev
+ if (next)
+ {
+ if (prev->child) //if the previous node has a child, append the next node after the last child
+ {
+ Node *n = prev;
+ while (n->child)
+ {
+ n = n->child;
+ while (n->next)
+ n = n->next;
+ }
+ next->prev = n;
+ n->next = next;
+ } else // else append it as the first child of the previous
+ {
+ prev->child = next;
+ next->prev = 0L;
+ }
+ //all the nodes after the previous are going UNDER the previous, as the one closing node was deleted
+ //and the tree starting with next is moved under prev (see the above lines)
+ prev->next = 0L;
+ Node *n = next;
+ while (n)
+ {
+ n->parent = prev;
+ n = n->next;
+ j++;
+ }
+
+ }
+ }
+
+ modif->setChildrenMovedUp(i);
+ modif->setNeighboursMovedDown(j);
+ modifs->addNodeModif(modif);
+
+ node = nextNode;
+
+ // kdDebug(24000)<< "Node removed!" << endl;
+// ParserCommon::coutTree(m_node, 2);
+ }
+// ParserCommon::coutTree(m_node, 2);
+}
+
+Node *Parser::rebuild(Document *w)
+{
+ kdDebug(24000) << "Rebuild started. " << endl;
+ QTime t;
+ t.start();
+ bool saParserEnabled = m_saParser->parsingEnabled();
+
+ //If VPL is loaded, there shouldn't be any rebuild
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ return m_node;
+
+ NodeModifsSet *modifs = new NodeModifsSet();
+ NodeModif *modif;
+
+// kdDebug(24000)<< "Node *Parser::rebuild()" << endl;
+ modifs->setIsModifiedAfter(w->isModified());
+
+ //**kdDebug(24000)<< "************* Begin User Modification *****************" << endl;
+ //debug!
+ //ParserCommon::coutTree(m_node, 2);//*/
+ if (w != write || !m_node) //the document has changed or the top node does not exists => parse completely
+ {
+ logReparse(modifs, w);
+ return parse(w);
+ } else
+ {
+ m_saParser->setParsingEnabled(false);
+ m_saParser->init(0L, w);
+ parsingEnabled = true;
+ QString text;
+ QString tagStr;
+
+ Node *firstNode = 0L;
+ Node *lastNode = 0L;
+ Node *node = 0L;
+
+ AreaStruct area(0, 0, 0, 0);
+ if ( !invalidArea(w, area, &firstNode, &lastNode) ||
+ (area.eLine < area.bLine || (area.eLine == area.bLine && area.eCol <= area.bCol)) //something strange has happened, like moving text with D&D inside the editor
+ )
+ {
+ logReparse(modifs, w);
+ m_saParser->setParsingEnabled(saParserEnabled);
+ Node *n = parse(w, true);
+ return n;
+ }
+
+ kdDebug(24000) << QString("Invalid area: %1,%2,%3,%4").arg(area.bLine).arg(area.bCol).arg(area.eLine).arg(area.eCol) << "\n";
+
+// kdDebug(24000) << "lastNode1: " << lastNode << " " << lastNode->tag << endl;
+ deleteNodes(firstNode->nextSibling(), lastNode, modifs);
+// kdDebug(24000) << "lastNode2: " << lastNode << " " << lastNode->tag << endl;
+
+ firstNode->child = 0L;
+ Node *lastInserted = 0L;
+ //this makes sure that the first found node it put right after the firstNode
+ if (firstNode->next && firstNode->next == lastNode)
+ {
+ firstNode->next->prev = 0L;
+ firstNode->next = 0L;
+ }
+ node = parseArea(area.bLine, area.bCol, area.eLine, area.eCol, &lastInserted, firstNode);
+
+ Node *swapNode = firstNode->nextSibling();
+ Node *p = (lastInserted)?lastInserted->nextSibling():lastInserted;
+ while(swapNode != p)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeAdded);
+ modif->setLocation(kafkaCommon::getLocation(swapNode));
+ modifs->addNodeModif(modif);
+ swapNode = swapNode->nextSibling();
+ }
+ //another stange case: the parsed area contains a special area without end
+ if (!node)
+ {
+ if (lastNode)
+ {
+ if (lastNode->prev )
+ lastNode->prev->next = 0L;
+ if (lastNode->parent && lastNode->parent->child == lastNode)
+ lastNode->parent->child = 0L;
+ }
+ Node::deleteNode(lastNode);
+ nodeNum--;
+ lastNode = 0L;
+ logReparse(modifs, w);
+ m_saParser->setParsingEnabled(saParserEnabled);
+ return parse(w);
+ }
+// kdDebug(24000) << "lastNode3: " << lastNode << " " << lastNode->tag << endl;
+ bool goUp;
+ if (lastNode && lastInserted)
+ {
+// kdDebug(24000) << "lastNode4: " << lastNode << " " << lastNode->tag << endl;
+ //merge the nodes if they are both of type Text or Empty
+ if ( (lastInserted->tag->type == Tag::Empty || lastInserted->tag->type == Tag::Text) &&
+ (lastNode->tag->type == Tag::Empty || lastNode->tag->type == Tag::Text))
+ {
+ if (lastNode->prev)
+ lastNode->prev->next = 0L;
+ lastNode->prev = lastInserted->prev;
+ if (lastInserted->prev)
+ lastInserted->prev->next = lastNode;
+ lastNode->parent = lastInserted->parent;
+ lastInserted->tag->beginPos(area.bLine, area.bCol);
+ lastNode->tag->endPos(area.eLine, area.eCol);
+ Tag *_tag = new Tag(*(lastNode->tag));
+ lastNode->tag->setTagPosition(area);
+ QString s = write->text(area);
+ lastNode->tag->setStr(s);
+ if (!s.simplifyWhiteSpace().isEmpty())
+ {
+ lastNode->tag->type = Tag::Text;
+ } else
+ {
+ lastNode->tag->type = Tag::Empty;
+ }
+ if (lastInserted->parent && lastInserted->parent->child == lastInserted)
+ //lastInserted->parent->child = lastInserted->next; lastInserted has no next!
+ lastInserted->parent->child = lastNode;
+
+ //here, lastNode is at the pos of lastInserted.
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(kafkaCommon::getLocation(lastNode));
+
+ if(lastInserted->prev)
+ lastInserted->prev->next = 0L;
+ if(lastInserted->parent && lastInserted->parent->child == lastInserted)
+ lastInserted->parent->child = 0L;
+ lastInserted->prev = 0L;
+ lastInserted->next = 0L;
+ lastInserted->parent = 0L;
+ lastInserted->child = 0L;
+// delete lastInserted;
+
+ lastInserted->detachNode();
+ modif->setNode(lastInserted);
+ modifs->addNodeModif(modif);
+
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setLocation(kafkaCommon::getLocation(lastNode));
+ modif->setTag(_tag);
+ modifs->addNodeModif(modif);
+
+ lastInserted = lastNode;
+ lastNode = lastNode->nextNotChild();
+ }
+
+ node = lastInserted;
+
+// kdDebug(24000) << "lastNode5: " << lastNode << " " << lastNode->tag << endl;
+ QTag *qTag = 0L;
+ while (node && lastNode)
+ {
+// kdDebug(24000) << "lastNode6: " << lastNode << " " << lastNode->tag << endl;
+ qTag = 0L;
+ goUp = ( node->parent &&
+ ( (lastNode->tag->type == Tag::XmlTagEnd && QuantaCommon::closesTag(node->parent->tag, lastNode->tag) ) ||
+ node->parent->tag->single )
+ );
+ if (node->parent && !goUp)
+ {
+ qTag = QuantaCommon::tagFromDTD(m_dtd, node->parent->tag->name);
+ if ( qTag )
+ {
+ QString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper();
+ searchFor.remove('/');
+ if ( qTag->stoppingTags.contains( searchFor ) )
+ {
+ node->parent->tag->closingMissing = true; //parent is single...
+ goUp = true;
+ }
+ }
+ }
+ if (goUp &&
+ ( (m_dtd->caseSensitive && node->tag->name == node->parent->tag->name) ||
+ (!m_dtd->caseSensitive && node->tag->name.lower() == node->parent->tag->name.lower())) )
+ goUp = false; //it can happen that the tag closes the previous and not the parent
+
+ if (goUp) //lastnode closes the node->parent
+ {
+ //handle cases like <ul><li></ul>
+ if (lastNode->tag->type == Tag::XmlTagEnd &&
+ !QuantaCommon::closesTag(node->parent->tag, lastNode->tag))
+ {
+ while ( node->parent->parent &&
+ QuantaCommon::closesTag(node->parent->parent->tag, lastNode->tag)
+ )
+ {
+ node = node->parent;
+ }
+ } else
+ if (qTag && lastNode->tag->type != Tag::XmlTagEnd)
+ {
+ //handle the case when a tag is a stopping tag for parent, and grandparent and so on. I'm not sure it's needed here, but anyway...
+ Node *n = node->parent;
+ QString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper();
+ while (qTag && n)
+ {
+ qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name);
+ if ( qTag )
+ {
+ if ( qTag->stoppingTags.contains(searchFor) )
+ {
+ n->tag->closingMissing = true; //parent is single...
+ if (n->parent)
+ node = n;
+ n = n->parent;
+ } else
+ {
+ break;
+ }
+ }
+ }
+ }
+ if (lastNode->prev && lastNode->prev->next == lastNode)
+ lastNode->prev->next = 0L;
+ if (lastNode->parent && lastNode->parent->child == lastNode)
+ lastNode->parent->child = 0L;
+ if (node->parent)
+ node->parent->next = lastNode;
+ lastNode->prev = node->parent;
+ if (node->parent)
+ lastNode->parent = node->parent->parent;
+ else
+ lastNode->parent = 0L;
+ node->next = 0L;
+ lastNode->closesPrevious = true;
+ } else
+ {
+ if (lastNode->prev && lastNode->prev->next == lastNode)
+ lastNode->prev->next = 0L;
+ node->next = lastNode;
+ lastNode->prev = node;
+ lastNode->parent = node->parent;
+// kdDebug(24000) << "lastNode7: " << lastNode << " " << lastNode->tag << endl;
+ }
+ node = lastNode;
+ lastNode = lastNode->nextNotChild();
+ //For some reason this can happen, the lastNode can point to an invalid place.
+ //To avoid crashes, forget the rebuild and do a full parse instead.
+ if (!nodes.contains(lastNode))
+ {
+ kdDebug(24000) << "Lastnode is invalid, do a full reparse!" << endl;
+ logReparse(modifs, w);
+ m_saParser->setParsingEnabled(saParserEnabled);
+ Node *n = parse(w, true);
+ return n;
+ }
+/* if (lastNode)
+ QString s = lastNode->tag->tagStr();*/
+ }
+ }
+/* kdDebug(24000)<< "END"<< endl;
+ ParserCommon::coutTree(baseNode, 2);
+ kdDebug(24000)<< "************* End User Modification *****************" << endl;*/
+
+ w->docUndoRedo->addNewModifsSet(modifs, undoRedo::SourceModif);
+ }
+ kdDebug(24000) << "Rebuild: " << t.elapsed() << " ms; baseNode=" << baseNode << "\n";
+
+// ParserCommon::verifyTree(m_node);
+/* treeSize = 0;
+ ParserCommon::coutTree(m_node, 2);
+ kdDebug(24000) << "Size of tree: " << treeSize << endl;*/
+
+ m_saParser->init(m_node, w);
+ if (saParserEnabled)
+ QTimer::singleShot(0, this, SLOT(slotParseInDetail()));
+ emit nodeTreeChanged();
+ m_parsingNeeded = false;
+ return m_node;
+}
+
+void Parser::clearGroups()
+{
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << "clearGroups " << endl;
+#endif
+ GroupElementMapList::Iterator it;
+ GroupElementList::Iterator elementIt;
+ GroupElementList *list;
+ int count = 0;
+ for (it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it)
+ {
+ list = & it.data();
+ //Clear the group element list and also remove the group tag which
+ //was created in parseForXMLGroup/parseForScriptGroup methods.
+ elementIt = list->begin();
+ while (elementIt != list->end())
+ {
+ GroupElement *groupElement = (*elementIt);
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "GroupElement deleted: " <<groupElement << " "<< groupElement->tag->area().bLine << " " << groupElement->tag->area().bCol << " "<< groupElement->tag->area().eLine << " "<< groupElement->tag->area().eCol << " " << groupElement->tag->tagStr() << " " << groupElement->type << endl;
+#endif
+ //kdDebug(24000) << "usertagcount: " << groupElement->tag->write()->userTagList.count() << endl;
+ groupElement->tag->write()->userTagList.remove(groupElement->tag->name.lower());
+ if (!groupElement->deleted)
+ {
+ Node *n = groupElement->node;
+ n->m_groupElements.clear();
+ }
+ groupElement->group = 0L;
+ delete groupElement->tag;
+ groupElement->tag = 0L;
+ elementIt = list->erase(elementIt);
+ delete groupElement;
+ groupElement = 0L;
+ count++;
+ }
+ }
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << count << " GroupElement deleted (clearGroups)." << endl;
+#endif
+ globalGroupMap.clear();
+ clearIncludedGroupElements();
+
+ ParserCommon::includedFiles.clear();
+ ParserCommon::includedFilesDTD.clear();
+ delete ParserCommon::includeWatch;
+ ParserCommon::includeWatch = new KDirWatch();
+ connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&)));
+ m_parseIncludedFiles = true;
+}
+
+void Parser::cleanGroups()
+{
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << "cleanGroups " << endl;
+#endif
+ GroupElementMapList::Iterator it;
+ GroupElementList::Iterator elementIt;
+ GroupElementList *list;
+ int count = 0;
+ for (it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it)
+ {
+ list = & it.data();
+ //Clear the group element list and also remove the group tag which
+ //was created in parseForXMLGroup/parseForScriptGroup methods.
+ elementIt = list->begin();
+ while (elementIt != list->end())
+ {
+ GroupElement *groupElement = (*elementIt);
+ if (groupElement->deleted)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "GroupElement deleted: " <<groupElement << " "<< groupElement->tag->area().bLine << " " << groupElement->tag->area().bCol << " "<< groupElement->tag->area().eLine << " "<< groupElement->tag->area().eCol << " " << groupElement->tag->tagStr() << " " << groupElement->type << endl;
+#endif
+ groupElement->tag->write()->userTagList.remove(groupElement->tag->name.lower());
+ groupElement->group = 0L;
+ delete groupElement->tag;
+ groupElement->tag = 0L;
+ elementIt = list->erase(elementIt);
+ delete groupElement;
+ groupElement = 0L;
+ count++;
+ } else
+ {
+ ++elementIt;
+ }
+ }
+ }
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << count << " GroupElement deleted (cleanGroups)." << endl;
+#endif
+ if (m_parseIncludedFiles)
+ {
+ delete ParserCommon::includeWatch;
+ ParserCommon::includeWatch = new KDirWatch();
+ connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&)));
+ parseIncludedFiles();
+ }
+}
+
+void Parser::clearIncludedGroupElements()
+{
+ uint listCount;
+ IncludedGroupElementsMap::Iterator includedMapIt;
+ for (includedMapIt = includedMap.begin(); includedMapIt != includedMap.end(); ++includedMapIt)
+ {
+ IncludedGroupElements::Iterator elementsIt;
+ for (elementsIt = includedMapIt.data().begin(); elementsIt != includedMapIt.data().end(); ++elementsIt)
+ {
+ GroupElementMapList::Iterator it;
+ for (it = elementsIt.data().begin(); it != elementsIt.data().end(); ++it)
+ {
+ listCount = it.data().count();
+ for (uint i = 0 ; i < listCount; i++)
+ {
+ GroupElement *groupElement = it.data()[i];
+ groupElement->node->tag->write()->userTagList.remove(groupElement->node->tag->name.lower());
+ Node::deleteNode(it.data()[i]->node);
+ delete it.data()[i];
+ }
+ }
+ }
+ }
+ includedMap.clear();
+}
+
+void Parser::parseIncludedFiles()
+{
+#ifdef DEBUG_PARSER
+ kdDebug(24000) << "parseIncludedFiles" << endl;
+#endif
+ clearIncludedGroupElements();
+ uint listCount;
+ if (write->url().isLocalFile())
+ {
+ listCount = ParserCommon::includedFiles.count();
+ for (uint i = 0; i < listCount; i++)
+ {
+ parseIncludedFile(ParserCommon::includedFiles[i], ParserCommon::includedFilesDTD.at(i));
+ }
+ if (listCount > 0)
+ m_parseIncludedFiles = false;
+ }
+ emit rebuildStructureTree(true);
+}
+
+//structure used to temporary store the position of the groupelements in the searchFor
+//included file as a string
+struct GroupElementPosition{
+ GroupElement *element;
+ int startPos;
+ int endPos;
+};
+
+void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
+{
+#ifdef DEBUG_PARSER
+ kdDebug(24000) << "parseIncludedFile: " << fileName << endl;
+#endif
+ StructTreeGroup group;
+ QString content;
+ QFile file(fileName);
+ if (file.open(IO_ReadOnly))
+ {
+ IncludedGroupElements *elements = &includedMap[fileName];
+ QTextStream str(&file);
+ QString encoding;
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(write->doc());
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+ if (encoding.isEmpty())
+ encoding = "utf8"; //final fallback
+ str.setCodec(QTextCodec::codecForName(encoding));
+ content = str.read();
+ file.close();
+ if (dtd->specialAreas.count())
+ {
+ int areaPos = 0;
+ int lastAreaPos = 0;
+ QString foundStr;
+ QString specialEndStr;
+ while (areaPos != -1)
+ {
+ areaPos = content.find(dtd->specialAreaStartRx, lastAreaPos);
+ if (areaPos != -1)
+ {
+ foundStr = dtd->specialAreaStartRx.cap();
+ specialEndStr = dtd->specialAreas[foundStr];
+ int areaPos2 = content.find(specialEndStr, areaPos);
+ if (areaPos2 == -1)
+ {
+ areaPos2 = content.length();
+ foundStr = content.mid(areaPos, areaPos2 - areaPos + 1);
+ areaPos = -1;
+ } else
+ {
+ foundStr = content.mid(areaPos, areaPos2 - areaPos + 1);
+ lastAreaPos = areaPos2 + 1;
+ }
+ QuantaCommon::removeCommentsAndQuotes(foundStr, dtd);
+
+ //gather the starting position of structures
+ QValueList<uint> structPositions;
+ int structPos = 0;
+ while (structPos !=-1)
+ {
+ structPos = foundStr.find(dtd->structBeginStr, structPos);
+ if (structPos != -1)
+ {
+ structPositions.append(structPos);
+ structPos += dtd->structBeginStr.length();
+ }
+ }
+
+ QValueList<GroupElementPosition> gPositions;
+ //go through the list of found structures and search for groups
+ int structStartPosition = 0; //from where to start the group search. This is before the structure begin position
+ QString savedStr = foundStr;
+ for (uint i = 0; i < structPositions.count(); i++)
+ {
+ foundStr = savedStr;
+ uint structBeginPos = structPositions[i];
+ structPos = structBeginPos;
+ int openNum = 1;
+ int pos = structPos + dtd->structBeginStr.length();
+ //find the corresponding structure closing string
+ while (openNum !=0 && pos != -1)
+ {
+ pos = dtd->structRx.search(foundStr, pos);
+ if (pos != -1)
+ {
+ if (dtd->structRx.cap() == dtd->structBeginStr)
+ openNum++;
+ else
+ openNum--;
+ pos++;
+ }
+ }
+ if (pos == -1)
+ pos = foundStr.length();
+ int structEndPos = pos;
+ foundStr = foundStr.left(pos);
+ QString spaces;
+ spaces.fill(' ', pos - structPos + 1);
+ foundStr.replace(structPos, pos - structPos + 1, spaces);
+
+ //FIXME: This code replaces the content between ( ) with
+ //empty spaces. This is quite PHP (or functions) //specific, and it's done in order to not find variables
+ //declared as function arguments. A generic way is needed
+ //to exclude unwanted areas.
+ int openBracketPos = foundStr.findRev(dtd->structKeywordsRx, structPos);
+ openBracketPos = foundStr.find('(', openBracketPos);
+ openNum = 1;
+ if (openBracketPos != -1)
+ {
+ openBracketPos++;
+ int closeBracketPos = openBracketPos;
+ while (closeBracketPos < structPos && openNum !=0)
+ {
+ if (foundStr[closeBracketPos] == '(')
+ openNum++;
+ if (foundStr[closeBracketPos] == ')')
+ openNum--;
+ closeBracketPos++;
+ }
+ closeBracketPos--;
+ spaces.fill(' ', closeBracketPos - openBracketPos);
+ foundStr.replace(openBracketPos, closeBracketPos - openBracketPos, spaces);
+ }
+
+ //now check which groups are present in this area
+ structPos = pos + 1;
+ QValueList<StructTreeGroup>::ConstIterator it;
+ for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it)
+ {
+ group = *it;
+ if (!group.hasDefinitionRx)
+ continue;
+ int pos = structStartPosition;
+ while (pos != -1)
+ {
+ pos = group.definitionRx.search(foundStr, pos);
+ if (pos != -1)
+ {
+ int l;
+ QString ss = group.definitionRx.cap();
+ if (group.definitionRx.pos(1) > pos)
+ {
+ pos = group.definitionRx.pos(1);
+ l = group.definitionRx.cap(1).length();
+ ss = group.definitionRx.cap(1);
+ }
+ else
+ {
+ l = group.definitionRx.cap().length();
+ }
+ QString s = content.mid(areaPos + pos, l);
+ pos += l;
+ if (!(*elements)[group.name].contains(s))
+ {
+ Tag *tag = new Tag();
+ tag->name = s;
+ tag->setDtd(dtd);
+ tag->setWrite(write);
+ QString s2 = content.left(areaPos + pos);
+ int newLineNum = s2.contains('\n');
+ int tmpCol = s2.length() - s2.findRev('\n') - 1;
+ tag->setTagPosition(newLineNum, tmpCol - s.length(), newLineNum, tmpCol);
+ Node *node = new Node(0L);
+ node->tag = tag;
+ node->fileName = fileName;
+ GroupElement *groupElement = new GroupElement;
+ groupElement->node = node;
+ groupElement->parentNode = 0L;
+ int minPos = areaPos + pos + 1;
+ for (QValueList<GroupElementPosition>::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt)
+ {
+ GroupElementPosition gPos = (*gPosIt);
+ if ( (areaPos + pos > gPos.startPos) && (areaPos + pos < gPos.endPos) && (gPos.startPos < minPos))
+ {
+ groupElement->parentNode = gPos.element->node;
+ minPos = gPos.startPos;
+ }
+ }
+ GroupElementList *groupElementList = &(*elements)[group.name][s];
+ groupElementList->append(groupElement);
+
+ GroupElementPosition gPos;
+ gPos.startPos = areaPos + pos;
+ gPos.endPos = structEndPos;
+ gPos.element = groupElement;
+ gPositions.append(gPos);
+
+ if (group.appendToTags)
+ {
+ QTag *qTag = new QTag();
+ qTag->setName(s.left(s.find('(')));
+ qTag->className = "";
+ if (groupElement->parentNode)
+ qTag->className = groupElement->parentNode->tag->name;
+ write->userTagList.replace(s.lower(), qTag);
+ }
+ }
+ }
+ }
+ } //for
+ structStartPosition = structBeginPos + 1;
+ }
+ } //if (areaPos != -1)
+ }// while (areaPos != -1)
+ }
+ }
+}
+
+void Parser::slotIncludedFileChanged(const QString& fileName)
+{
+ int pos = ParserCommon::includedFiles.findIndex(fileName);
+ if (pos != -1)
+ {
+ const DTDStruct *dtd = ParserCommon::includedFilesDTD.at(pos);
+ if (dtd)
+ {
+ IncludedGroupElements::Iterator elementsIt;
+ for (elementsIt = includedMap[fileName].begin(); elementsIt != includedMap[fileName].end(); ++elementsIt)
+ {
+ GroupElementMapList::Iterator it;
+ for (it = elementsIt.data().begin(); it != elementsIt.data().end(); ++it)
+ {
+ uint listCount = it.data().count();
+ for (uint i = 0 ; i < listCount; i++)
+ {
+ Node::deleteNode(it.data()[i]->node);
+ delete it.data()[i];
+ }
+ }
+ }
+ includedMap[fileName].clear();
+ parseIncludedFile(fileName, dtd);
+ }
+ }
+}
+
+
+void Parser::parseForXMLGroup(Node *node)
+{
+ xmlGroupIt = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
+ if (xmlGroupIt != node->tag->dtd()->xmlStructTreeGroups.end())
+ {
+ XMLStructGroup group = xmlGroupIt.data();
+ Tag *newTag = new Tag(*node->tag);
+ QString title = "";
+ QStringList::Iterator it;
+ for (it = group.attributes.begin(); it != group.attributes.end(); ++it)
+ {
+ if (newTag->hasAttribute(*it))
+ {
+ title.append(newTag->attributeValue(*it).left(100));
+ title.append(" | ");
+ }
+ }
+ title = title.left(title.length()-3);
+ title.remove('\n');
+ newTag->name = title;
+
+ GroupElement *groupElement = new GroupElement;
+ groupElement->deleted = false;
+ groupElement->tag = newTag;
+ groupElement->node = node;
+ groupElement->parentNode = 0L;
+ groupElement->global = true;
+ groupElement->group = const_cast<XMLStructGroup*>(&(xmlGroupIt.data()));
+ node->m_groupElements.append(groupElement);
+ GroupElementList* groupElementList = & (globalGroupMap[group.name + "|" + title]);
+ groupElementList->append(groupElement);
+ }
+}
+
+
+bool Parser::parseScriptInsideTag(Node *startNode)
+{
+ bool found = false;
+ const DTDStruct *dtd = startNode->tag->dtd();
+ if (dtd->specialAreas.count())
+ {
+ QString foundText;
+ QString s;
+ QString specialEndStr;
+ QString text = startNode->tag->tagStr();
+
+ int pos = 0;
+ int col = startNode->tag->structBeginStr.length();
+ int bl, bc, el, ec;
+ int node_bl, node_bc, node_el, node_ec;
+ int n;
+ startNode->tag->beginPos(node_bl, node_bc);
+ startNode->tag->endPos(node_el, node_ec);
+ Node *currentNode = 0L;
+
+ while (pos != -1)
+ {
+ pos = text.find(dtd->specialAreaStartRx, col);
+ if (pos != -1)
+ {
+ foundText = dtd->specialAreaStartRx.cap();
+ //Calculate the beginning coordinates
+ s = text.left(pos);
+ n = s.contains('\n');
+ bl = node_bl + n;
+ if (n > 0)
+ {
+ bc = pos - s.findRev('\n') - 1;
+ } else
+ {
+ bc = node_bc + pos;
+ }
+ //What is the closing string?
+ specialEndStr = dtd->specialAreas[foundText];
+
+ el = bl;
+ ec = bc + foundText.length() - 1;
+ AreaStruct area(bl, bc, el, ec);
+ currentNode = ParserCommon::createScriptTagNode(write, area, foundText, dtd, startNode, currentNode);
+ currentNode->specialInsideXml = true;
+
+ found = true;
+ AreaStruct area2(bl, bc, node_el, node_ec);
+ int lastLine, lastCol;
+ m_saParser->setSpecialInsideXml(true);
+ currentNode = m_saParser->parseArea(area2, foundText, "", currentNode, true, true);
+ m_saParser->setSpecialInsideXml(false);
+ lastLine = m_saParser->lastParsedLine();
+ lastCol = m_saParser->lastParsedColumn();
+ col = write->text(node_bl, node_bc, lastLine, lastCol).length();
+ int firstSpecialAttrIndex = startNode->tag->attributeIndexAtPos(bl, bc);
+ if (firstSpecialAttrIndex != -1)
+ {
+ int lastSpecialAttrIndex = startNode->tag->attributeIndexAtPos(lastLine, lastCol);
+ for (int i = firstSpecialAttrIndex; i <= lastSpecialAttrIndex; i++)
+ {
+ startNode->tag->setAttributeSpecial(i, true);
+ }
+ }
+ }
+ }
+ }
+ return found;
+}
+
+void Parser::slotParseInDetail()
+{
+ m_saParser->parseInDetail(false);
+}
+
+void Parser::synchParseInDetail()
+{
+ m_saParser->parseInDetail(true);
+}
+
+void Parser::setSAParserEnabled(bool enabled)
+{
+ m_saParser->setParsingEnabled(enabled);
+ //kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled
+}
+
+#include "parser.moc"
diff --git a/quanta/parsers/parser.h b/quanta/parsers/parser.h
new file mode 100644
index 00000000..db797df0
--- /dev/null
+++ b/quanta/parsers/parser.h
@@ -0,0 +1,160 @@
+/***************************************************************************
+ parser.h - description
+ -------------------
+ begin : Sun Sep 1 2002
+ copyright : (C) 2002, 2003, 2004 by Andras Mantia <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 PARSER_H
+#define PARSER_H
+
+#include <qobject.h>
+#include <qdict.h>
+#include <qstringlist.h>
+#include <qmap.h>
+#include <qguardedptr.h>
+
+#include <qvaluestack.h>
+
+#include "node.h"
+#include "tag.h"
+#include "qtag.h"
+
+/**
+ *@author Andras Mantia
+ */
+
+class Document;
+class KDirWatch;
+class QRegExp;
+class NodeModifsSet;
+class SAParser;
+
+typedef QMap<QString, GroupElementMapList> IncludedGroupElements;
+typedef QMap<QString, IncludedGroupElements> IncludedGroupElementsMap;
+
+
+class Parser: public QObject {
+
+Q_OBJECT
+
+public:
+ Parser();
+ ~Parser();
+
+ /** Parse a string, using as start position sLine, sCol. */
+ Node *parseArea(int startLine, int startCol, int endLine, int endCol, Node **lastNode, Node *a_node = 0L);
+
+ /** Parse the whole text from Document w and build the internal structure tree
+ from Nodes. Set force to true if you want to avoid the possible checks. */
+ Node *parse(Document *w, bool force = false);
+
+ /** Returns the node for position (line, column). As more than one node can
+ contain the same area, it return the "deepest" node. */
+ Node *nodeAt(int line, int col, bool findDeepest = true, bool exact = false);
+
+ /** Rebuild the nodes */
+ Node *rebuild(Document *w);
+ /** No descriptions */
+ const DTDStruct * currentDTD(int line, int col);
+ /** Remove the found groups from the memeber variables */
+ void clearGroups();
+ void parseIncludedFiles();
+
+ /** Enable/Disable parsing. */
+ void setSAParserEnabled(bool enabled);
+ void setParsingEnabled(bool enabled) {m_parsingEnabled = enabled;}
+ bool isParsingEnabled() {return m_parsingEnabled;}
+ void setParsingNeeded(bool needed) {m_parsingNeeded = needed;}
+ bool parsingNeeded() {return m_parsingNeeded;}
+ /**
+ * This function is ESSENTIAL : when one modify baseNode, one MUST use
+ * this function to set the internal parser RootNode pointer to the same Node as
+ * baseNode. If one forget, some strange sigserv errors concerning inexisting tags
+ * (Node->tag == 0) will occurs.
+ * Crash errors of Parser::nodeAt is a good sign of a missing setRootNode
+ */
+ void setRootNode(Node* node) {m_node = node;} //TODO: check if m_saParser should be updated or not!
+ void synchParseInDetail();
+
+ IncludedGroupElementsMap includedMap;
+ bool parsingEnabled;
+ bool m_treeReparsed;
+
+public slots:
+ void slotParseInDetail();
+ /** Remove the found groups from the memeber variables */
+ void cleanGroups();
+
+private slots:
+ void slotIncludedFileChanged(const QString& fileName);
+
+signals:
+ void nodeTreeChanged();
+ void rebuildStructureTree(bool);
+
+private:
+ Node* m_node; //the internal Node pointer
+ QString m_dtdName; //the DTD name of write
+ const DTDStruct* m_dtd; //the dtd used for main parsing
+ QGuardedPtr<Document> write; //pointer to the parsed document
+ int maxLines; // how many lines are in the current document
+ int oldMaxLines;
+ int treeSize;
+ QMap<QString, XMLStructGroup>::ConstIterator xmlGroupIt;
+ bool m_parsingEnabled;
+ bool m_parsingNeeded;
+
+ /** Clears the group elements found in the included files */
+ void clearIncludedGroupElements();
+ void parseIncludedFile(const QString &fileName, const DTDStruct *dtd);
+ /** Searches for scripts inside the text from startNode. It looks only for the
+ script begin/and delimiters, and not for the <script> or other special tags.
+ Useful when parsing for script inside the xml tags.
+ Returns: true if a script area is found, false if the parsed text does not
+ contain any scripts. */
+ bool parseScriptInsideTag(Node *startNode);
+
+ /** Parses the node for XML groups (specific tags)*/
+ void parseForXMLGroup(Node *node);
+ /** Determines the area that should be reparsed.
+ w: the document we are working on
+ area: the invalid areas
+ firstNode: the first unchanged node before the current position
+ lastNode: the first unchanged node after the current position
+ Returns: true if an area was found, false otherwise => require full parsing
+ */
+ bool invalidArea(Document *w, AreaStruct &area, Node **firstNode, Node **lastNode);
+
+ /** Deletes all the nodes between the firstNode and lastNode and keeps the tree's consistency.
+ modifs is the class recording these changes for the undo/redo system, cf undoredo.h */
+ void deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs);
+
+ /**
+ * This function must be called before reparsing : it log in the undo/redo system
+ * that the whole Node tree is reloaded.
+ * @param modifs This class record all the changes made.
+ * @param w modifs will be inserted in w's undoredo list.
+ */
+ void logReparse(NodeModifsSet *modifs, Document *w);
+
+
+ SAParser *m_saParser; //the special area parser object
+
+ /** Maybe we should move to a separate, special area parsing class */
+ Node* specialAreaParsingDone(int &lastLine, int &lastCol);
+
+ bool m_parseIncludedFiles;
+};
+
+
+
+#endif
diff --git a/quanta/parsers/parsercommon.cpp b/quanta/parsers/parsercommon.cpp
new file mode 100644
index 00000000..3283ed52
--- /dev/null
+++ b/quanta/parsers/parsercommon.cpp
@@ -0,0 +1,256 @@
+/***************************************************************************
+ parsercommon.cpp - description
+ -------------------
+ begin : Wed Feb 11 2004
+ copyright : (C) 2004 Andras Mantia <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 <qstring.h>
+
+//kde includes
+#include <kdebug.h>
+#include <klocale.h>
+#include <ktexteditor/editinterface.h>
+
+//own includes
+#include "parsercommon.h"
+#include "node.h"
+#include "document.h"
+#include "qtag.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "dtds.h"
+
+class KDirWatch;
+
+int nodeNum; //for memory debugging - remove if not needed
+
+namespace ParserCommon {
+ QStringList includedFiles;
+ QPtrList<const DTDStruct> includedFilesDTD;
+ KDirWatch *includeWatch;
+
+ //common methods.
+QString getLine(Document *write, int line, int endLine, int endCol)
+{
+ QString textLine = write->editIf->textLine(line);
+ if (line == endLine)
+ {
+ if (endCol >0)
+ textLine.truncate(endCol + 1);
+ else
+ textLine = "";
+ }
+ return textLine;
+}
+
+void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node)
+{
+ QString tagStr = write->text(area);
+ QString cleanStr = node->tag->cleanStr;
+ node->tag->setStr(node->tag->tagStr() + tagStr);
+ if (node->tag->type == Tag::Empty)
+ {
+ QString s = tagStr;
+ if (s.simplifyWhiteSpace().isEmpty())
+ {
+ node->tag->type = Tag::Empty;
+ } else
+ {
+ node->tag->type = Tag::Text;
+ }
+ }
+ QString cleanedTagStr = tagStr;
+ QuantaCommon::removeCommentsAndQuotes(cleanedTagStr, node->tag->dtd());
+ node->tag->cleanStr = cleanStr + cleanedTagStr;
+ int bLine, bCol;
+ node->tag->beginPos(bLine, bCol);
+ node->tag->setTagPosition(bLine, bCol, area.eLine, area.eCol);
+}
+
+Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *parentNode)
+{
+ Tag *textTag = 0L;
+ Node *textNode = 0L;
+ int bLine = 0;
+ int bCol = 0;
+ const DTDStruct *dtd = write->defaultDTD();
+ if (node)
+ {
+ node->tag->endPos(bLine, bCol);
+ } else
+ if (parentNode)
+ parentNode->tag->endPos(bLine, bCol);
+ if (parentNode)
+ dtd = parentNode->tag->dtd();
+ eCol--;
+ if (bLine == 0 && bCol == 0)
+ bCol = -1;
+ if ( !(bLine == eLine && bCol == eCol) )
+ {
+ AreaStruct area(bLine, bCol + 1, eLine, eCol);
+ textTag = new Tag(area, write, dtd);
+ QString s = textTag->tagStr();
+ textTag->single = true;
+ if (s.simplifyWhiteSpace().isEmpty())
+ {
+ textTag->type = Tag::Empty;
+ } else
+ {
+ textTag->type = Tag::Text;
+ }
+
+ if (parentNode && parentNode->tag->single)
+ {
+ textNode = new Node(parentNode->parent);
+ nodeNum++;
+ textNode->prev = parentNode;
+ parentNode->next = textNode;
+ parentNode = parentNode->parent;
+ } else
+ {
+ if ( node &&
+ (node->tag->type == Tag::Empty ||
+ node->tag->type == Tag::Text) ) //merge two consquent text or empty nodes
+ {
+ AreaStruct area(bLine, bCol, eLine, eCol);
+ appendAreaToTextNode(write, area, node);
+ delete textTag;
+ textTag = 0L;
+ } else
+ {
+ textNode = new Node(parentNode);
+ nodeNum++;
+ if (node && node != parentNode)
+ {
+ node->next = textNode;
+ textNode->prev = node;
+ } else
+ {
+ if (parentNode)
+ {
+ Node *n = parentNode->child;
+ while (n && n->next)
+ n = n->next;
+ if (!n)
+ parentNode->child = textNode;
+ else
+ {
+ n->next = textNode;
+ textNode->prev = n;
+ }
+ }
+ }
+ }
+ }
+ if (textTag)
+ {
+ textNode->tag = textTag;
+ node = textNode;
+ }
+ }
+ return node;
+}
+
+Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString &areaName,
+ const DTDStruct *dtd, Node *parentNode, Node *currentNode)
+{
+ Tag *tag = new Tag();
+ tag->setTagPosition(area);
+ tag->setStr(areaName);
+ tag->setWrite(write);
+ const DTDStruct *d = DTDs::ref()->find(dtd->specialAreaNames[areaName]);
+ if (d)
+ tag->setDtd(d);
+ else
+ tag->setDtd(dtd);
+ tag->name = i18n("%1 block").arg(dtd->specialAreaNames[areaName].upper());
+ tag->type = Tag::ScriptTag;
+ tag->validXMLTag = false;
+
+ Node *node = new Node(parentNode);
+ nodeNum++;
+ node->tag = tag;
+ node->insideSpecial = true;
+ if (parentNode)
+ {
+ if (!parentNode->child)
+ parentNode->child = node;
+ else
+ {
+ Node *n = parentNode->child;
+ while (n->next)
+ n = n->next;
+ n->next = node;
+ node->prev = n;
+ }
+ } else
+ if (currentNode)
+ {
+ node->prev = currentNode;
+ currentNode->next = node;
+ }
+ return node;
+}
+
+void coutTree(Node *node, int indent)
+{
+ QString output;
+ int bLine, bCol, eLine, eCol;
+ if (!node)
+ kdDebug(24000)<< "undoRedo::coutTree() - bad node!" << endl;
+ while (node)
+ {
+ output = "";
+ output.fill('.', indent);
+ node->tag->beginPos(bLine, bCol);
+ node->tag->endPos(eLine, eCol);
+ if (node->tag->type != Tag::Text)
+ output += node->tag->name.replace('\n'," ");
+ else
+ output+= node->tag->tagStr().replace('\n'," ");
+ kdDebug(24000) << output <<" (" << node->tag->type << ") at pos " <<
+ bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->parent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << " Tag:" << node->tag << endl;
+ /* for(j = 0; j < node->tag->attrCount(); j++)
+ {
+ kdDebug(24000)<< " attr" << j << " " <<
+ node->tag->getAttribute(j).nameLine << ":" <<
+ node->tag->getAttribute(j).nameCol << " - " <<
+ node->tag->getAttribute(j).valueLine << ":" <<
+ node->tag->getAttribute(j).valueCol << endl;
+ }
+*/
+ if (node->child)
+ coutTree(node->child, indent + 4);
+ node = node->next;
+ }
+}
+
+void verifyTree(Node *node)
+{
+ QString output;
+ int bLine, bCol, eLine, eCol;
+ while (node)
+ {
+ if (!node->tag)
+ {
+ kdDebug(24000) << "Bad node: " << node << endl;
+ kdDebug(24000) << "Parent: " << node->parent << " " << node->parent->tag->tagStr() << endl;
+ }
+ if (node->child)
+ verifyTree(node->child);
+ node = node->next;
+ }
+}
+
+}
diff --git a/quanta/parsers/parsercommon.h b/quanta/parsers/parsercommon.h
new file mode 100644
index 00000000..7a7677ec
--- /dev/null
+++ b/quanta/parsers/parsercommon.h
@@ -0,0 +1,59 @@
+/***************************************************************************
+ parsercommon.h - description
+ -------------------
+ begin : Wed Feb 11 2004
+ copyright : (C) 2004 Andras Mantia <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 PARSERCOMMON_H
+#define PARSERCOMMON_H
+
+//qt includes
+#include <qptrlist.h>
+#include <qstringlist.h>
+
+//own includes
+#include "tag.h"
+
+class Document;
+struct DTDStruct;
+class Node;
+class KDirWatch;
+
+namespace ParserCommon{
+ extern QStringList includedFiles;
+ extern QPtrList<const DTDStruct> includedFilesDTD;
+ extern KDirWatch *includeWatch;
+
+ //this methods may go in a common class as well
+ QString getLine(Document *write, int line, int endLine, int endCol);
+ /** Appends a text area to a text node. */
+ void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node);
+ /** Creates a text/empty node between node and the provided position */
+ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *parentNode);
+ /** Creates a head node for special areas.
+ area: the area belonging to this node
+ areaName: the special area name (type)
+ dtd: the parent DTD
+ parentNode: the parent of the node
+ currentNode: the last child of the parent, if it exists
+ */
+ Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString &areaName,
+ const DTDStruct *dtd, Node *parentNode, Node *currentNode);
+
+/** Print the doc structure tree to the standard output.
+ Only for debugging purposes. */
+ void coutTree(Node *node, int indent);
+ void verifyTree(Node *node);
+}
+
+#endif
diff --git a/quanta/parsers/qtag.cpp b/quanta/parsers/qtag.cpp
new file mode 100644
index 00000000..77031eee
--- /dev/null
+++ b/quanta/parsers/qtag.cpp
@@ -0,0 +1,260 @@
+/***************************************************************************
+ qtag.cpp - description
+ -------------------
+ begin : Thu Aug 15 2002
+ copyright : (C) 2002 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "qtag.h"
+#include "node.h"
+#include "tag.h"
+#include <kdebug.h>
+
+QTag::QTag()
+{
+ attrs.setAutoDelete(true);
+ single = false;
+ optional = false;
+ type = "xmltag";
+ parentDTD = 0L;
+}
+
+QTag::QTag( QTag &t)
+{
+ tagName = t.tagName;
+ single = t.single;
+ optional = t.optional;
+ m_fileName = t.m_fileName;
+ parentDTD = t.parentDTD;
+ type = t.type;
+ returnType = t.returnType;
+ comment = t.comment;
+ commonGroups = t.commonGroups;
+ stoppingTags = t.stoppingTags;
+ childTags = t.childTags;
+ className = t.className;
+
+ for (int i=0; i < t.attributeCount(); i++)
+ {
+ addAttribute(t.attributeAt(i));
+ }
+}
+
+QTag::~QTag()
+{
+}
+
+/** Add an attribute to the tag. */
+void QTag::addAttribute(Attribute* attr)
+{
+ if (attr)
+ {
+ Attribute* a = attribute(attr->name);
+ bool createNew = !a;
+ if (createNew)
+ a = new Attribute;
+ a->name = attr->name;
+ a->type = attr->type;
+ QStringList::ConstIterator end = attr->values.constEnd();
+ for ( QStringList::ConstIterator it = attr->values.constBegin(); it != end; ++it )
+ {
+ a->values.append(*it);
+ }
+ a->defaultValue = attr->defaultValue;
+ a->status = attr->status;
+ a->source = attr->source;
+ a->method = attr->method;
+ a->interface = attr->interface;
+ a->arguments = attr->arguments;
+ if (createNew)
+ attrs.append(a);
+ }
+}
+/** Returns the number of attributes for the tag. */
+int QTag::attributeCount()
+{
+ return attrs.count();
+}
+/** Returns the attribute at index. */
+Attribute* QTag::attributeAt(int index)
+{
+ return attrs.at(index);
+}
+
+/** Returns true if the attribute exists */
+bool QTag::isAttribute(const QString &attrName)
+{
+ Attribute *a;
+ int i;
+ AttributeList *groupAttrs;
+
+ //Check in the QTag specific attributes
+ for(a = attrs.first(); a; a = attrs.next())
+ {
+ if(a->name == attrName)
+ return true;
+ }
+ //Check in the common attributes
+ for(i = 0; i < (signed)commonGroups.count(); i++)
+ {
+ groupAttrs = parentDTD->commonAttrs->find(commonGroups[i]);
+ if(groupAttrs)
+ {
+ for(a = groupAttrs->first(); a; a = groupAttrs->next())
+ {
+ if(a->name == attrName)
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+/** No descriptions */
+void QTag::setSingle(bool isSingle)
+{
+ single = isSingle;
+}
+/** No descriptions */
+void QTag::setOptional(bool isOptional)
+{
+ optional = isOptional;
+}
+/** No descriptions */
+void QTag::setName(const QString& theName)
+{
+ tagName = theName;
+}
+/** No descriptions */
+QString QTag::name(bool doNotConvert)
+{
+ if (doNotConvert || !parentDTD || parentDTD->caseSensitive)
+ return tagName;
+ else
+ return tagName.upper();
+}
+/** No descriptions */
+bool QTag::isSingle()
+{
+ return single;
+}
+/** No descriptions */
+bool QTag::isOptional()
+{
+ return optional;
+}
+/** No descriptions */
+void QTag::setFileName(const QString& fileName)
+{
+ m_fileName = fileName;
+}
+
+/** No descriptions */
+QString QTag::fileName()
+{
+ return m_fileName;
+}
+
+QTag QTag::operator = (QTag &t)
+{
+ tagName = t.tagName;
+ single = t.single;
+ optional = t.optional;
+ m_fileName = t.m_fileName;
+ parentDTD = t.parentDTD;
+ type = t.type;
+ returnType = t.returnType;
+ comment = t.comment;
+ commonGroups = t.commonGroups;
+ stoppingTags = t.stoppingTags;
+ className = t.className;
+
+ for (int i=0; i < t.attributeCount(); i++)
+ {
+ addAttribute(t.attributeAt(i));
+ }
+
+ return *this;
+}
+
+/** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */
+Attribute* QTag::attribute(const QString& name)
+{
+ Attribute *attr = 0L;
+ for (uint i = 0; i < attrs.count(); i++)
+ {
+ if (attrs.at(i)->name == name)
+ {
+ attr = attrs.at(i);
+ break;
+ }
+ }
+
+ return attr;
+}
+
+bool QTag::isChild(const QString& tag, bool trueIfNoChildsDefined)
+{
+ QString tagName = tag;
+ tagName = parentDTD->caseSensitive ? tagName : tagName.upper();
+ if(trueIfNoChildsDefined)
+ return (childTags.isEmpty() || childTags.contains(tagName));
+ else
+ return (!childTags.isEmpty() && childTags.contains(tagName));
+}
+
+bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesAsText)
+{
+ QString nodeName;
+
+ if(!node)
+ return false;
+ else if(node->tag->type == Tag::Text)
+ {
+ if(trueIfNoChildsDefined)
+ return(childTags.isEmpty() || childTags.contains("#text") || childTags.contains("#TEXT"));
+ else
+ return(!childTags.isEmpty() && (childTags.contains("#text") || childTags.contains("#TEXT")));
+ }
+ else if(node->tag->type == Tag::Empty && !treatEmptyNodesAsText)
+ return true;
+ else if(node->tag->type == Tag::Empty && treatEmptyNodesAsText)
+ {
+ if(trueIfNoChildsDefined)
+ return(childTags.isEmpty() || childTags.contains("#text") || childTags.contains("#TEXT"));
+ else
+ return(!childTags.isEmpty() && (childTags.contains("#text") || childTags.contains("#TEXT")));
+ }
+ else if(node->tag->type == Tag::XmlTagEnd)
+ {
+ nodeName = node->tag->name;
+ if(nodeName.left(1) == "/")
+ nodeName = nodeName.mid(1);
+ return isChild(nodeName, trueIfNoChildsDefined);
+ }
+ else if(node->tag->type == Tag::ScriptTag)
+ //FIXME: It might depend of scripts...
+ return true;
+ else
+ return isChild(node->tag->name, trueIfNoChildsDefined);
+}
+
+QPtrList<QTag> QTag::parents()
+{
+ QPtrList<QTag> qTagList;
+ QDictIterator<QTag> it((*parentDTD->tagsList));
+ for(; it.current(); ++it)
+ {
+ if(it.current()->isChild(name()))
+ qTagList.append(it.current());
+ }
+ return qTagList;
+}
diff --git a/quanta/parsers/qtag.h b/quanta/parsers/qtag.h
new file mode 100644
index 00000000..6c38c334
--- /dev/null
+++ b/quanta/parsers/qtag.h
@@ -0,0 +1,283 @@
+/***************************************************************************
+ qtag.h - description
+ -------------------
+ begin : Thu Aug 15 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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 QTAG_H
+#define QTAG_H
+
+
+/**Quanta style tag (XML tag or code tag), as they are defined in the DTD. Contains
+ all the possible attributes and the possible values for the attributes. Do not
+ confund with the Tag class, which can change as the user types other attributes and
+ changes their values.
+
+ *@author Andras Mantia
+ */
+//qt includes
+#include <qdict.h>
+#include <qmap.h>
+#include <qptrlist.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+
+//app includes
+
+class QTag;
+class Node;
+
+//an attribute of a tag looks like:
+typedef struct Attribute{
+ QString name;
+ QString type; //"input", "check", "list"
+ QStringList values; //the possible values it can have
+ QString defaultValue; //the default value
+ QString status; // "optional", "required","implied"
+ QString source;
+ QString interface;
+ QString method;
+ QString arguments;
+ };
+
+class XMLStructGroup {
+ public:
+ QString name; ///<the name of the group
+ QString noName; ///<the text when there are no elements in the group
+ QString icon; ///<the icon of the group
+ QStringList attributes; ///<the attributes of the above tag to be displayed
+ bool hasFileName; ///<the group contains filename(s)
+ QRegExp fileNameRx; ///<delete the matches of this regexp to obtain a filename (eg. linked, included file name)
+ bool appendToTags; ///<true if the group elements must be used as normal tags in autocompletion
+ QString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the parent name. Makes sense only if appentToTags is true
+};
+
+
+//the groups in structure tree are defined with the help of:
+class StructTreeGroup:public XMLStructGroup {
+ public:
+ QRegExp definitionRx; //regular expression to help us find the group element definition - for pseudo DTDs
+ QRegExp usageRx; //regexp to find the usage of a group element in the document
+ bool hasDefinitionRx; //true if searchRx should be used
+ bool isMinimalDefinitionRx; // true if the searchRx should be non-greedy
+ QRegExp typeRx; //regular expression to help us find the group element type from the definition string - for pseudo DTDs
+ int tagType; //the tag type for which this is valid
+ QRegExp autoCompleteAfterRx; //holds the char after the autocompletion box should be shown for this group elements. Null, if autocompletion shouldn't be used
+ QRegExp removeFromAutoCompleteWordRx;
+ bool parseFile; //parse the files belonging to this group
+};
+
+
+typedef QPtrList<Attribute> AttributeList;
+typedef QDict<AttributeList> AttributeListDict;
+
+typedef QDict<QTag> QTagList;
+
+enum DTDFamily{Unknown = 0, Xml, Script};
+
+#define MAX_STRUCTGROUPSCOUNT 10
+
+//an internal representation of a DTD
+typedef struct DTDStruct
+ {
+ QString name; ///< DTD name
+ QString nickName; ///< DTD nickname
+ bool loaded; ///< true = DTD is complet in memory
+ QString url; ///< the url of the DTD definition file
+ QString doctypeStr; ///< the string that appears right after !doctype
+ QString inheritsTagsFrom; ///< Inherited DTD name
+ QString defaultExtension; ///< default extension when creating new files
+ QStringList mimeTypes;
+ bool caseSensitive; ///< the tags&attributes in DTD are case sensitive or not
+ int family; ///< xml, script type
+ bool toplevel; ///< true if the DTD can be the main DTD of a document. Always true for XML like DTD's
+ QString documentation; ///< the name of the documentation package
+ QTagList* tagsList; ///< the list of all defined tags in the DTD
+ QString fileName; ///< the DTD decription.rc with path
+ AttributeListDict* commonAttrs; ///< the attributes of the common groups
+
+ QString booleanAttributes; ///< simple or extended <tag booleanAttr> or <tag booleanAttr="1">
+ QString booleanTrue; ///< "true" or "1" or whatever
+ QString booleanFalse; ///< "false" or "0" or whatever
+ QString singleTagStyle; ///< "xml" or "html" (<tag/> or <tag>)
+ QString defaultAttrType; ///< "input", "string" or whatever
+
+/****************** FOR THE NEW PARSER **********************/
+
+/* Special, not to be parsed areas. It is the area of the nested DTD's
+ (script, css) and special areas like comments. Special areas can be in form:
+ <begin_str end_str> or they can be inside special tags, like
+ <special_tag> </special_tag>.
+*/
+
+/* The starting and closing strings of a special area. For PHP the special areas
+ are <? ?> and <* *>, so the entries are (<?,?>),(<*,*>).
+*/
+ QMap<QString, QString> specialAreas;
+
+/* To which DTD this special area belongs. It may be a non-dtd name, like
+ "comment", which is treated as a special case.
+ Entries are in for of (<?,php) or (<!--,comment).
+*/
+ QMap<QString, QString> specialAreaNames;
+
+/* A regular expression which matches the starting strings of all the
+ possible special areas.
+*/
+ mutable QRegExp specialAreaStartRx;
+
+/* For each special tag name, holds an attribute name. This attribute is used to
+ figure out the DTD which is valid in the special tag area.
+ E.g for the <script language="php">, the entry is "script"->"language".
+ Special tags are skipped during parsing and parsed later according to
+ their DTD definition.
+*/
+ QMap<QString, QString> specialTags;
+
+/* A list of DTDs that can be present inside the DTD.
+ For each DTD specified here the definitionAreaBegin/definitionAreaEnd is
+ copied to specialAreaBegin/specialAreaEnd (and the specialAreaStartRx is
+ updated) and the definitionTags are added to the specialTags.
+ Basically this means that we use the DTD definitions when building
+ the special area and tag definitions.
+*/
+ QStringList insideDTDs;
+
+/* The definition tags for this DTD in the same for as the above. */
+ QMap<QString, QString> definitionTags;
+
+/* The beginning and end string of the definition areas for this DTD.
+ It is stored in (area_begin_str,area_end_str) pairs. E.g (<?,?>)
+*/
+ QMap<QString, QString> definitionAreas;
+
+/* Start/end pairs for comments. Eg. (//,\n); (<!--,-->) */
+ QMap<QString, QString> comments;
+
+/* Regular expression to match the start of the comments (//, <!--)*/
+ mutable QRegExp commentsStartRx;
+
+/* How does a structure starts in this DTD. Eg. "{" or "begin".*/
+ QString structBeginStr;
+/* How does a structure ends in this DTD. Eg. "}" or "end".*/
+ QString structEndStr;
+/* A regular expression to match the structe begin or end. */
+ mutable QRegExp structRx;
+/* Regular expression to match the possible keywords that can appear before
+ a structure, like "function", "for", etc. */
+ mutable QRegExp structKeywordsRx;
+/* Regular expression containing the keywords that indicate that the groups
+defined in the structure after the keyword have local scope */
+ mutable QRegExp localScopeKeywordsRx;
+
+/* A list of structure tree groups definition */
+ mutable QValueList<StructTreeGroup> structTreeGroups;
+ QMap<QString, XMLStructGroup> xmlStructTreeGroups;
+
+/****************** END FOR THE NEW PARSER **********************/
+ QStringList toolbars;
+
+/* True if foo-foo2 should be considered as one word. False (default) otherwise. */
+ bool minusAllowedInWord;
+
+ mutable QChar tagAutoCompleteAfter;
+ bool requestSpaceBeforeTagAutoCompletion;
+ QChar attrAutoCompleteAfter;
+ QChar attributeSeparator;
+ QChar tagSeparator;
+
+ /* Script language related items */
+ int variableGroupIndex; ///< the index of the structure tree group holding the variables. -1 if there is no such group.
+ int functionGroupIndex; ///< the index of the structure tree group holding the functions. -1 if there is no such group.
+ int classGroupIndex; ///< the index of the structure tree group holding the classes. -1 if there is no such group.
+ int objectGroupIndex; ///< the index of the structure tree group holding the classes. -1 if there is no such group.
+ mutable QRegExp memberAutoCompleteAfter; ///< the regular expression after which a list with the existing member methods and variables for a class should be shown. Makes sense only if the language supports classes.
+ QMap<QString, QString> classInheritance; ///<stores the inheritance tree
+
+ };
+
+class QTag {
+public:
+ QTag();
+ QTag( QTag&);
+ ~QTag();
+ QTag operator = ( QTag& );
+ /** Add an attribute to the tag. */
+ void addAttribute(Attribute* attr);
+ /** Returns the number of attributes for the tag. */
+ int attributeCount();
+ /** Returns the attribute at index. */
+ Attribute* attributeAt(int index);
+ AttributeList *attributes() { return &attrs;}
+ /** Returns true if the attribute exists */
+ bool isAttribute(const QString &attrName);
+ /** No descriptions */
+ void setSingle(bool isSingle);
+ /** No descriptions */
+ void setOptional(bool isOptional);
+ /** No descriptions */
+ void setName(const QString& theName);
+ /** No descriptions */
+ QString name(bool doNotConvert = false);
+ /** No descriptions */
+ bool isSingle();
+ /** No descriptions */
+ bool isOptional();
+
+ /**
+ * This property is used to determine the scope of a tag action.
+ * For example, if the user is in the midle of a word and press the bold button,
+ * the scope is a "word", i.e., the whole word will be affected by the action.
+ * Instead, if center is pressed, all surrounding inline nodes will be affected by the new tag.
+ */
+ QString const& scope() const {return m_scope;}
+ void setScope(QString const& scope) {m_scope = scope;}
+
+ /** Returns true if tag is a possible child of this tag, or if
+ there are no children defined and if trueIfNoChildsDefined is set to true. */
+ bool isChild(const QString& tag, bool trueIfNoChildsDefined = true);
+ //prefer using this variant, it handle Text, Empty, XmlTagEnd nodes!
+ bool isChild(Node *node, bool trueIfNoChildsDefined = true, bool treatEmptyNodesAsText = false);
+ /*** Returns the list of parent of this tag. */
+ QPtrList<QTag> parents();
+
+ /** No descriptions */
+ QString fileName();
+ /** No descriptions */
+ void setFileName(const QString& fileName);
+ /** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */
+ Attribute* attribute(const QString& name);
+
+ /** The tag belongs to this DTD */
+ const DTDStruct *parentDTD;
+ /** The tag has the attributes of the above common groups */
+ QStringList commonGroups;
+ QStringList stoppingTags;
+ QMap<QString, bool> childTags; ///<list of the possible child tags. If the value is true, the child is mandatory
+ QString type; ///<function, class, xmltag, etc.
+ QString returnType; ///<useful is type="function"; may be int, string or whatever
+ QString className; ///< the name of the class where the tag belongs to. Used only for script DTEP tags
+ QString comment; ///< comment associated to the tag. Will appear as a tooltip in the autocompletion box. Useful for specifying version information (eg. since PHP5)
+
+protected: // Protected attributes
+ /** List of the possible attributes */
+ AttributeList attrs;
+ bool single;
+ bool optional;
+ QString tagName;
+ QString m_scope;
+ /** The path to the tag file. Null if there is no tag file for the tag. */
+ QString m_fileName;
+};
+
+
+#endif
diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp
new file mode 100644
index 00000000..77698a45
--- /dev/null
+++ b/quanta/parsers/sagroupparser.cpp
@@ -0,0 +1,311 @@
+/***************************************************************************
+ sagroupparser.cpp - description
+ -------------------
+ begin : Wed Feb 11 2004
+ copyright : (C) 2004 Andras Mantia <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 <qtimer.h>
+#include <qvaluelist.h>
+
+//kde includes
+#include <kdebug.h>
+#include <kdirwatch.h>
+#include <kurl.h>
+
+//own includes
+#include "sagroupparser.h"
+#include "saparser.h"
+#include "document.h"
+#include "node.h"
+#include "parsercommon.h"
+#include "qextfileinfo.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "tag.h"
+
+extern GroupElementMapList globalGroupMap;
+
+SAGroupParser::SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup)
+{
+ g_node = startNode;
+ g_endNode = endNode;
+ m_synchronous = synchronous;
+ m_lastGroupParsed = paringLastGroup;
+ m_parsingLastNode = parsingLastNode;
+ m_parent = parent;
+ m_write = write;
+ m_count = 0;
+ m_parseForGroupTimer = new QTimer(this);
+ connect(m_parseForGroupTimer, SIGNAL(timeout()), this, SLOT(slotParseForScriptGroup()));
+}
+
+void SAGroupParser::slotParseForScriptGroup()
+{
+#ifdef DEBUG_PARSER
+ //kdDebug(24001) << "slotParseForScriptGroup. Synch: " << m_synchronous << endl;
+#endif
+ if ((m_parent && !m_parent->parsingEnabled()) || (!baseNode && !m_synchronous))
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "slotParseForScriptGroup aborted. Synch: " << m_synchronous << endl;
+#endif
+ return;
+ }
+
+ if (g_node && g_node != g_endNode )
+ {
+ if (g_node->tag && (g_node->tag->type == Tag::Text || g_node->tag->type == Tag::ScriptStructureBegin))
+ parseForScriptGroup(g_node);
+ g_node = g_node->nextSibling();
+ if (m_synchronous)
+ {
+ slotParseForScriptGroup();
+ return;
+ }
+ else
+ {
+#ifdef DEBUG_PARSER
+ //kdDebug(24001) << "Calling slotParseForScriptGroup from slotParseForScriptGroup." << endl;
+#endif
+ m_parseForGroupTimer->start(0, true);
+ }
+ } else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "slotParseForScriptGroup done." << endl;
+#endif
+ if (m_lastGroupParsed && m_parsingLastNode && !m_synchronous)
+ {
+ if (m_lastGroupParsed)
+ {
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << "Calling cleanGroups from SAGroupParser::slotParseForScriptGroup" << endl;
+ kdDebug(24001) << m_count << " GroupElement created." << endl;
+#endif
+ emit cleanGroups();
+ m_lastGroupParsed = false;
+ }
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Emitting rebuildStructureTree from slotParseForScriptGroup." << endl;
+#endif
+ emit rebuildStructureTree(true);
+ }
+ }
+}
+
+void SAGroupParser::parseForScriptGroup(Node *node)
+{
+#ifdef DEBUG_PARSER
+ QTime t;
+ t.start();
+#endif
+
+ int bl, bc, el, ec;
+ int pos;
+ QString title;
+ QString tmpStr;
+ StructTreeGroup group;
+ GroupElement *groupElement;
+ GroupElementList* groupElementList;
+ KURL baseURL = QExtFileInfo::path(m_write->url());
+ QString str = node->tag->cleanStr;
+ QString tagStr = node->tag->tagStr();
+ const DTDStruct* dtd = node->tag->dtd();
+ node->tag->beginPos(bl, bc);
+ QValueList<StructTreeGroup>::ConstIterator it;
+ for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it)
+ {
+ group = *it;
+ if (!group.hasDefinitionRx ||
+ node->tag->type == Tag::XmlTag ||
+ node->tag->type == Tag::XmlTagEnd ||
+ node->tag->type == Tag::Comment ||
+ node->tag->type == Tag::Empty ||
+ ( group.tagType != Tag::Text && node->tag->type != group.tagType)
+ )
+ continue;
+ pos = 0;
+ group.definitionRx.setMinimal(group.isMinimalDefinitionRx);
+ while (pos != -1)
+ {
+ pos = group.definitionRx.search(str, pos);
+ if (pos != -1) //the Node is part of this group
+ {
+ title = tagStr.mid(pos, group.definitionRx.matchedLength());
+ node->tag->beginPos(bl, bc);
+ tmpStr = tagStr.left(pos);
+ int newLines = tmpStr.contains('\n');
+ bl += newLines;
+ int l = tmpStr.findRev('\n'); //the last EOL
+ bc = (l == -1) ? bc + pos : pos - l - 1;
+ newLines = title.contains('\n');
+ l = title.length();
+ el = bl + newLines;
+ ec = (newLines > 0) ? l - title.findRev('\n') : bc + l - 1;
+ pos += l;
+ AreaStruct area(bl, bc, el, ec);
+ //get the list of elements which are present in this group and
+ //have the same title. For example get the list of all group
+ //element which are variable and the matched string was "$i"
+ int cap1Pos = str.find(group.definitionRx.cap(1));
+ QString s = tagStr.mid(cap1Pos, group.definitionRx.cap(1).length());
+ groupElementList = & (globalGroupMap[group.name + "|" + s]);
+ //Create a new tag which point to the exact location of the matched string.
+ //For example when the group defined PHP variables it
+ //points to "$i" in a node which originally contained "print $i + 1"
+ Tag *newTag = new Tag(*node->tag);
+ newTag->setTagPosition(area);
+ newTag->setStr(title);
+ newTag->name = s;
+
+ groupElement = new GroupElement;
+ groupElement->deleted = false;
+ groupElement->tag = newTag;
+ groupElement->node = node;
+ groupElement->group = const_cast<StructTreeGroup*>(&(*it));
+ //Find out if the current node is inside a script structure or not.
+ //This is used to define local/global scope of the group elements.
+ Node *tmpNode = node;
+ while (tmpNode && tmpNode->tag->dtd() == dtd && tmpNode->tag->type != Tag::ScriptStructureBegin)
+ {
+ tmpNode = tmpNode->parent;
+ }
+ if (tmpNode && tmpNode->tag->type == Tag::ScriptStructureBegin)
+ {
+ groupElement->parentNode = tmpNode;
+ } else
+ {
+ groupElement->parentNode = 0L;
+ }
+ groupElement->global = true;
+ tmpNode = node->parent;
+ while (tmpNode && tmpNode->tag->dtd() == dtd)
+ {
+ if ( tmpNode->tag->type == Tag::ScriptStructureBegin && tmpNode->tag->dtd()->localScopeKeywordsRx.search(tmpNode->tag->cleanStr) != -1)
+ {
+ groupElement->global = false;
+ groupElement->parentNode = tmpNode;
+ break;
+ }
+ tmpNode = tmpNode->parent;
+ }
+
+ if (group.appendToTags)
+ {
+ QTag *qTag = new QTag();
+ // The location of the first open bracket '(', also the end of the tag name
+ int nameEnd = s.find('(');
+ qTag->setName(s.left(nameEnd));
+ qTag->className = "";
+ if (groupElement->parentNode)
+ {
+ for (GroupElementList::ConstIterator it2 = groupElement->parentNode->m_groupElements.constBegin(); it2 != groupElement->parentNode->m_groupElements.constEnd(); ++it2)
+ {
+ if ((*it2)->group->name == group.parentGroup)
+ {
+ qTag->className = (*it2)->tag->name;
+ break;
+ }
+ }
+ }
+ // Test for variable or function Type by checking for an opening bracket "(" used by functions
+ // and store the type in the QTag type variable.
+ bool isArgument=false;
+ if (nameEnd == -1)
+ {
+ qTag->type="variable";
+ // If this tag is a class function argument, it should not belong to the class, so we need to remove it
+ if(qTag->className.length() != 0 && tagStr.contains('(') && tagStr.contains(')'))
+ {
+ // First we want to determine the whole line the tag is on
+ QString tagWholeLineStr = tagStr;
+ // Remove lines before target line
+ while(tagWholeLineStr.length() > 0) // this stops infinit looping in case something goes wrong!
+ {
+ int firstNewline = tagWholeLineStr.find('\n');
+ if(firstNewline == -1) //no new lines so we must be on the last
+ break;
+ QString checkLineStr = tagWholeLineStr.mid(firstNewline+1,tagWholeLineStr.length());
+ if(checkLineStr.contains(s))
+ tagWholeLineStr = checkLineStr;
+ else
+ break;
+ }
+ // Remove lines after target line - essentially same as above
+ while(tagWholeLineStr.length() > 0)
+ {
+ int lastNewLine = tagWholeLineStr.findRev('\n');
+ if(lastNewLine == -1)
+ break;
+ QString checkLineStr = tagWholeLineStr.mid(0,lastNewLine);
+ if(checkLineStr.contains(s))
+ tagWholeLineStr = checkLineStr;
+ else
+ break;
+ }
+ // Now we are left with the current line, lets check if the variable is inside parentheses
+ int lineOpenParenth=tagWholeLineStr.find('(');
+ if(lineOpenParenth != -1)
+ {
+ int lineCloseParenth=tagWholeLineStr.find(')');
+ if(lineCloseParenth != -1)
+ {
+ int lineNameLocation=tagWholeLineStr.find(s);
+ if(lineNameLocation > lineOpenParenth || lineNameLocation < lineCloseParenth) // Write the current tag to the list
+ isArgument=true;
+ }
+ }
+ }
+ }
+ else
+ {
+ qTag->type="function";
+ }
+ if(!isArgument)
+ m_write->userTagList.replace(s.lower(), qTag);
+ }
+
+
+ if (!group.typeRx.pattern().isEmpty() && group.typeRx.search(title) != -1)
+ groupElement->type = group.typeRx.cap(1);
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "GroupElement created: " <<groupElement << " "<< groupElement->tag->area().bLine << " " << groupElement->tag->area().bCol << " "<< groupElement->tag->area().eLine << " "<< groupElement->tag->area().eCol << " " << groupElement->tag->tagStr() << " " << groupElement->type << endl;
+#endif
+ //store the pointer to the group element list where this node was put
+ //used to clear the corresponding entry from the group element lists
+ //when the node is deleted (eg. $i was deleted, so it should be deleted
+ //from the "variables | $i" group element list as well)
+ node->m_groupElements.append(groupElement);
+ groupElementList->append(groupElement);
+ m_count++;
+ //if a filename may be present in the title, extract it
+ if (group.hasFileName && group.parseFile)
+ {
+ s.remove(group.fileNameRx);
+ KURL url;
+ QuantaCommon::setUrl(url, s.stripWhiteSpace());
+ url = QExtFileInfo::toAbsolute(url, baseURL);
+ ParserCommon::includedFiles += url.path();
+ ParserCommon::includedFilesDTD.append(dtd);
+ ParserCommon::includeWatch->addFile(url.path());
+ }
+ }
+ }
+ }
+#ifdef DEBUG_PARSER
+ if (t.elapsed() > 10)
+ kdDebug(24001) << "Done: " << t.elapsed() << endl;
+#endif
+}
+
+#include "sagroupparser.moc"
diff --git a/quanta/parsers/sagroupparser.h b/quanta/parsers/sagroupparser.h
new file mode 100644
index 00000000..1f2f184c
--- /dev/null
+++ b/quanta/parsers/sagroupparser.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ sagroupparser.h - description
+ -------------------
+ begin : Wed Feb 11 2004
+ copyright : (C) 2004 Andras Mantia <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 SAGROUPPARSER_H
+#define SAGROUPPARSER_H
+
+//qt includes
+#include <qobject.h>
+
+//forward definitions
+class QTimer;
+class Document;
+class Node;
+class SAParser;
+
+/**
+ This class is used to parse for special area (script) groups in the node tree.
+ */
+class SAGroupParser : public QObject
+{
+Q_OBJECT
+public:
+ public:
+ SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup);
+ ~SAGroupParser() {};
+
+ QTimer *m_parseForGroupTimer;
+
+ public slots:
+ void slotParseForScriptGroup();
+
+ signals:
+ void rebuildStructureTree(bool);
+ void cleanGroups();
+ void parsingDone(SAGroupParser*);
+
+ private:
+ void parseForScriptGroup(Node *node);
+
+ bool m_lastGroupParsed;
+ bool m_parsingLastNode;
+ bool m_synchronous;
+ SAParser *m_parent;
+ Node* g_node;
+ Node* g_endNode;
+ Document *m_write;
+ int m_count;
+};
+
+#endif
diff --git a/quanta/parsers/saparser.cpp b/quanta/parsers/saparser.cpp
new file mode 100644
index 00000000..230ddbe0
--- /dev/null
+++ b/quanta/parsers/saparser.cpp
@@ -0,0 +1,986 @@
+/***************************************************************************
+ saparser.cpp - description
+ -------------------
+ begin : Wed Feb 11 2004
+ copyright : (C) 2004 Andras Mantia <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 <qtimer.h>
+
+//kde includes
+#include <kdebug.h>
+#include <ktexteditor/editinterface.h>
+
+//own includes
+#include "saparser.h"
+#include "sagroupparser.h"
+#include "document.h"
+#include "dtds.h"
+#include "node.h"
+#include "parsercommon.h"
+#include "qtag.h"
+#include "quantacommon.h"
+#include "resource.h"
+
+//#define DEBUG_PARSER
+
+SAParser::SAParser()
+{
+ m_write = 0L;
+ m_baseNode = 0L;
+ m_currentNode = 0L;
+ m_quotesRx = QRegExp("\"|'");
+ m_specialInsideXml = false;
+ m_parsingEnabled = true;
+ m_synchronous = true;
+ m_parseOneLineTimer = new QTimer(this);
+ connect(m_parseOneLineTimer, SIGNAL(timeout()), this, SLOT(slotParseOneLine()));
+ m_parseInDetailTimer = new QTimer(this);
+ connect(m_parseInDetailTimer, SIGNAL(timeout()), this, SLOT(slotParseNodeInDetail()));
+}
+
+SAParser::~SAParser()
+{
+}
+
+void SAParser::init(Node *node, Document* write)
+{
+ m_baseNode = node;
+ m_write = write;
+ m_dtd = write->defaultDTD();
+}
+
+
+bool SAParser::slotParseOneLine()
+{
+ if ((!m_parsingEnabled || !baseNode) && !m_synchronous)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "slotParseOneLine - interrupted" << endl;
+#endif
+ return false;
+ }
+ if (s_line <= s_endLine)
+ {
+ s_contextFound = false;
+ switch (s_currentContext.type)
+ {
+ case Group:
+ case Text: {
+ int areaEndPos = -1;
+ int quotedStringPos = -1;
+ int commentPos = -1;
+ int groupKeywordPos = -1;
+ if (s_searchContent || (s_parentNode && s_parentNode->tag->dtd()->family == Xml))
+ {
+ //search for different s_contexts
+ if (s_searchContent) //search for quoted strings, comments, groups only in non-comment special areas
+ {
+ quotedStringPos = s_textLine.find(m_quotesRx, s_col); //quoted strings
+ s_searchedString = s_textLine.left(quotedStringPos);
+ commentPos = s_searchedString.find(s_dtd->commentsStartRx, s_col); //comments
+ s_searchedString = s_textLine.left(commentPos);
+ if (s_fullParse)
+ groupKeywordPos = s_searchedString.find(s_dtd->structRx, s_col); //groups, like { }
+ } else
+ s_searchedString = s_textLine;
+ int specialAreaPos = -1;
+ if (s_searchForSpecialAreas) //special area inside special area
+ {
+ s_searchedString = s_textLine.left(groupKeywordPos);
+ specialAreaPos = s_searchedString.find(s_dtd->specialAreaStartRx, s_col);
+ }
+ if (s_searchForAreaEnd) //the end of the special area
+ {
+ s_searchedString = s_textLine.left(specialAreaPos);
+ areaEndPos = s_searchedString.find(s_areaEndString, s_col);
+ } else
+ if (s_searchForForcedAreaEnd) //the end of the special area if a forcing string was specified
+ {
+ s_searchedString = s_textLine.left(specialAreaPos);
+ areaEndPos = s_searchedString.find(s_forcedAreaRx, s_col);
+ if (areaEndPos != -1)
+ s_areaEndString = s_forcedAreaRx.cap();
+ }
+ //check which s_context was found first
+ if (quotedStringPos != -1) //is it a quoted string?
+ {
+ if ( (quotedStringPos < commentPos || commentPos == -1) &&
+ (quotedStringPos < groupKeywordPos || groupKeywordPos == -1) &&
+ (quotedStringPos < specialAreaPos || specialAreaPos == -1) &&
+ (quotedStringPos < areaEndPos || areaEndPos == -1) )
+ {
+ s_context.type = QuotedString;
+ s_context.area.bCol = quotedStringPos;
+ s_context.startString = s_textLine.mid(quotedStringPos, 1);
+ s_contextFound = true;
+ }
+ }
+ if (!s_contextFound && commentPos != -1) //is it a comment?
+ {
+ if ( (commentPos < groupKeywordPos || groupKeywordPos == -1) &&
+ (commentPos < specialAreaPos || specialAreaPos == -1) &&
+ (commentPos < areaEndPos || areaEndPos == -1) )
+ {
+ s_context.type = Comment;
+ s_context.area.bCol = commentPos;
+ s_context.startString = s_dtd->commentsStartRx.cap();
+ s_contextFound = true;
+ }
+ }
+ if (!s_contextFound && groupKeywordPos != -1) //is it a group structure?
+ {
+ if ( (groupKeywordPos < specialAreaPos || specialAreaPos == -1) &&
+ (groupKeywordPos < areaEndPos || areaEndPos == -1) )
+ {
+ QString foundText = s_dtd->structRx.cap();
+ if (foundText == s_dtd->structBeginStr)
+ {
+ s_context.type = Group;
+ s_context.area.bCol = groupKeywordPos;
+ s_context.startString = foundText;
+ //create a text node until the struct. beginning
+ s_currentContext.area.eLine = s_line;
+ s_currentContext.area.eCol = groupKeywordPos + foundText.length() - 1;
+ if (s_currentNode &&
+ (s_currentNode->tag->type == Tag::Text ||
+ s_currentNode->tag->type == Tag::Empty) )
+ ParserCommon::appendAreaToTextNode(m_write, s_currentContext.area, s_currentNode);
+ else
+ s_currentNode = ParserCommon::createTextNode(m_write, s_currentNode, s_line, s_currentContext.area.eCol + 1, s_currentContext.parentNode);
+
+ s_currentNode->tag->type = Tag::ScriptStructureBegin;
+ s_currentNode->tag->single = false;
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ s_currentContext.lastNode = s_currentNode;
+
+ s_contextStack.push(s_currentContext);
+ s_currentContext.parentNode = s_currentNode;
+ s_col = s_context.area.bCol + s_context.startString.length();
+ s_currentContext.area.bLine = s_line;
+ s_currentContext.area.bCol = s_col;
+ s_currentContext.type = Group;
+ if (m_synchronous)
+ //slotParseOneLine();
+ return true;
+ else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseOneLine from parseArea (opening group struct)." << endl;
+#endif
+ m_parseOneLineTimer->start(0, true);
+ }
+ return true;
+ } else //it's a closing group structure element (like "}")
+ {
+ if (s_currentContext.type != Group)
+ {
+ s_col = groupKeywordPos + foundText.length();
+ if (m_synchronous)
+ //slotParseOneLine();
+ return true;
+ else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseOneLine from parseArea (closing group struct)." << endl;
+#endif
+ m_parseOneLineTimer->start(0, true);
+ }
+ return true;
+ }
+ s_currentContext.area.eLine = s_line;
+ s_currentContext.area.eCol = groupKeywordPos - 1;
+ //kdDebug(24000) << QString("Group Struct s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+
+ if (s_currentNode &&
+ (s_currentNode->tag->type == Tag::Text ||
+ s_currentNode->tag->type == Tag::Empty) )
+ ParserCommon::appendAreaToTextNode(m_write, s_currentContext.area, s_currentNode);
+ else
+ s_currentNode = ParserCommon::createTextNode(m_write, s_currentNode, s_line, groupKeywordPos, s_currentContext.parentNode);
+ if (s_currentNode)
+ {
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ }
+ s_previousContext = s_contextStack.pop();
+ s_currentContext.parentNode = s_previousContext.parentNode;
+ s_currentContext.lastNode = s_previousContext.lastNode;
+ s_currentContext.type = s_previousContext.type;
+ s_currentContext.area.bLine = s_line;
+ s_currentContext.area.bCol = groupKeywordPos + foundText.length();
+ s_currentContext.area.eLine = s_currentContext.area.eCol = -1;
+ s_currentContext.startString = s_previousContext.startString;
+ s_col = s_currentContext.area.bCol;
+
+ Tag *tag = new Tag();
+ tag->name = foundText;
+ tag->setStr(foundText);
+ tag->setWrite(m_write);
+ tag->setTagPosition(s_line, groupKeywordPos, s_line, s_col - 1);
+ tag->setDtd(s_dtd);
+ tag->type = Tag::ScriptStructureEnd;
+ tag->single = true;
+ Node *node = new Node(s_currentContext.parentNode);
+ nodeNum++;
+ node->tag = tag;
+ node->insideSpecial = true;
+ node->specialInsideXml = m_specialInsideXml;
+ if (s_currentContext.parentNode && !s_currentContext.parentNode->child)
+ {
+ s_currentContext.parentNode->child = node;
+ }
+ else if (s_currentContext.lastNode)
+ {
+ node->prev = s_currentContext.lastNode;
+ s_currentContext.lastNode->next = node;
+ }
+ s_currentNode = node;
+
+ if (m_synchronous)
+ return true;
+ else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseOneLine from parseArea (group structure)." << endl;
+#endif
+ m_parseOneLineTimer->start(0, true);
+ }
+ return true;
+ }
+ }
+ }
+ if (!s_contextFound && specialAreaPos != -1) //is it a special area?
+ {
+ if (specialAreaPos < areaEndPos || areaEndPos == -1)
+ {
+ QString foundText = s_dtd->specialAreaStartRx.cap();
+ s_currentContext.area.eLine = s_line;
+ s_currentContext.area.eCol = specialAreaPos - 1;
+ if (s_fullParse)
+ {
+ if ( s_currentNode &&
+ (s_currentNode->tag->type == Tag::Text ||
+ s_currentNode->tag->type == Tag::Empty) )
+ ParserCommon::appendAreaToTextNode(m_write, s_currentContext.area, s_currentNode);
+ else
+ s_currentNode = ParserCommon::createTextNode(m_write, s_currentNode, s_line, specialAreaPos, s_currentContext.parentNode);
+ if (s_currentNode)
+ {
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ }
+ }
+ //create a toplevel node for the included special area
+ AreaStruct area(s_line, specialAreaPos, s_line, specialAreaPos + foundText.length() - 1);
+ Node *node = ParserCommon::createScriptTagNode(m_write, area, foundText, s_dtd, s_currentContext.parentNode, s_currentNode);
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Parsing a nested area." << endl;
+#endif
+ AreaStruct area2(s_line, specialAreaPos, s_endLine, s_endCol);
+ SAParser *p = new SAParser();
+ p->init(m_baseNode, m_write);
+ s_currentNode = p->parseArea(area2, foundText, "", node, s_fullParse, true);
+ s_line = p->lastParsedLine();
+ s_col = p->lastParsedColumn();
+ delete p;
+ s_currentContext.area.bLine = s_line;
+ s_currentContext.area.bCol = s_col + 1;
+ s_textLine = ParserCommon::getLine(m_write, s_line, s_endLine, s_endCol);
+ s_col++;
+ if (m_synchronous)
+ {
+ return true;
+ }
+ else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseOneLine from slotParseOneLine (nested area)." << endl;
+#endif
+ m_parseOneLineTimer->start(0, true);
+ return true;
+ }
+ }
+ }
+ } else //when we look only for the area end string
+ if (s_searchForAreaEnd)
+ {
+ areaEndPos = s_textLine.find(s_areaEndString, s_col);
+ } else
+ if (s_searchForForcedAreaEnd)
+ {
+ areaEndPos = s_textLine.find(s_forcedAreaRx, s_col);
+ if (areaEndPos != -1)
+ s_areaEndString = s_forcedAreaRx.cap();
+ }
+
+ if (!s_contextFound && areaEndPos != -1) //did we find the end of the special area?
+ {
+ m_lastParsedLine = s_line;
+ m_lastParsedCol = areaEndPos + s_areaEndString.length() - 1;
+
+ s_currentContext.area.eLine = s_line;
+ s_currentContext.area.eCol = areaEndPos - 1;
+ //Always create a node between the opening and closing special area nodes.
+ //This fixes the "commnet loss" bug when editing in VPL and autocompletion
+ //for simple special areas like <? a ?>
+ if (s_fullParse || !s_parentNode->child)
+ {
+ if ( s_currentNode &&
+ (s_currentNode->tag->type == Tag::Text ||
+ s_currentNode->tag->type == Tag::Empty) )
+ ParserCommon::appendAreaToTextNode(m_write, s_currentContext.area, s_currentNode);
+ else
+ {
+ s_currentNode = ParserCommon::createTextNode(m_write, s_currentNode, s_line, areaEndPos, s_parentNode);
+ }
+ if (s_currentNode)
+ {
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ }
+ }
+ //kdDebug(24000) << QString("Special area %1 ends at %2, %3").arg(s_dtd->name).arg(s_line).arg(lastCol) << endl;
+
+ //create a closing node for the special area
+ Tag *tag = new Tag();
+ tag->setTagPosition(s_line, areaEndPos, s_line, m_lastParsedCol);
+ tag->parse(s_areaEndString, m_write);
+ tag->setDtd(s_dtd);
+ tag->type = Tag::XmlTagEnd;
+ tag->validXMLTag = false; //FIXME: this is more or less a workaround. We should introduce and handle Tag::ScriptTagEnd
+ tag->single = true;
+ //at this point s_parentNode = the opening node of the special area (eg. <?)
+ //and it should always exist
+ Node *node = new Node(s_parentNode->parent);
+ nodeNum++;
+ s_parentNode->next = node;
+ node->prev = s_parentNode;
+ node->tag = tag;
+ node->closesPrevious = true;
+
+ if (s_fullParse)
+ {
+ Node *g_node, *g_endNode;
+ g_node = s_parentNode->child;
+ /* g_endNode = s_currentNode;
+ if (g_node && g_node == g_endNode)
+ g_endNode = s_parentNode->next;*/
+ g_endNode = node;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseForScriptGroup from slotParseOneLine." << endl;
+#endif
+// slotParseForScriptGroup();
+ if (!m_synchronous)
+ {
+ bool parsingLastNode = true;
+ Node *n = g_endNode;
+ while (n)
+ {
+ n = n->nextSibling();
+ if (n && n->insideSpecial)
+ {
+ parsingLastNode = false;
+ break;
+ }
+ }
+ SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, g_endNode, m_synchronous, parsingLastNode, true);
+ connect(groupParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
+ connect(groupParser, SIGNAL(cleanGroups()), SIGNAL(cleanGroups()));
+ connect(groupParser, SIGNAL(parsingDone(SAGroupParser*)), SLOT(slotGroupParsingDone(SAGroupParser*)));
+ groupParser->slotParseForScriptGroup();
+ m_groupParsers.append(groupParser);
+ }
+ }
+
+ m_lastParsedNode = node;
+ s_useReturnVars = true;
+ if (!m_synchronous)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling parsingDone from slotParseOneLine (area end found)." << endl;
+#endif
+ m_lastParsedNode = parsingDone();
+ }
+ return false; //parsing finished
+ }
+ if (s_contextFound)
+ {
+ s_context.area.bLine = s_line;
+ s_context.area.eLine = s_context.area.eCol = -1;
+ s_context.parentNode = s_currentContext.parentNode;
+ s_currentContext.area.eLine = s_context.area.bLine;
+ s_currentContext.area.eCol = s_context.area.bCol - 1;
+ // s_currentContext.parentNode = s_parentNode;
+ s_contextStack.push(s_currentContext);
+ if (s_fullParse)
+ {
+ if (s_currentNode &&
+ (s_currentNode->tag->type == Tag::Text || s_currentNode->tag->type == Tag::Empty) )
+ {
+ ParserCommon::appendAreaToTextNode(m_write, s_currentContext.area, s_currentNode);
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ } else
+ if (s_currentContext.area.bLine < s_currentContext.area.eLine ||
+ (s_currentContext.area.bLine == s_currentContext.area.eLine &&
+ s_currentContext.area.bCol < s_currentContext.area.eCol))
+ {
+ //create a tag from the s_currentContext
+ Tag *tag = new Tag(s_currentContext.area, m_write, s_dtd);
+ QString tagStr = tag->tagStr();
+ tag->cleanStr = tagStr;
+ QuantaCommon::removeCommentsAndQuotes(tag->cleanStr, s_dtd);
+ if (tagStr.simplifyWhiteSpace().isEmpty())
+ {
+ tag->type = Tag::Empty;
+ } else
+ {
+ tag->type = Tag::Text;
+ }
+ tag->single = true;
+ //create a node with the above tag
+ Node *node = new Node(s_currentContext.parentNode);
+ nodeNum++;
+ node->tag = tag;
+ node->insideSpecial = true;
+ node->specialInsideXml = m_specialInsideXml;
+ if (s_currentContext.parentNode && !s_currentContext.parentNode->child)
+ {
+ s_currentContext.parentNode->child = node;
+ }
+ else if (s_currentNode)
+ {
+ node->prev = s_currentNode;
+ s_currentNode->next = node;
+ }
+ s_currentNode = node;
+ }
+ }
+ //kdDebug(24000) << QString("%1 s_context: %2, %3, %4, %5").arg(s_currentContext.type).arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+
+ s_currentContext = s_context;
+ s_col = s_context.area.bCol + s_context.startString.length();
+ } else
+ {
+ s_line++;
+ s_col = 0;
+ s_textLine = ParserCommon::getLine(m_write, s_line, s_endLine, s_endCol);
+ }
+ break;
+ }
+ case QuotedString:
+ {
+ int pos = -1;
+ int p = s_col;
+ int l = s_textLine.length();
+ while (p < l)
+ {
+ p = s_textLine.find(s_currentContext.startString, p);
+ if (p != -1)
+ {
+ if (p >= 0)
+ {
+ int i = p - 1;
+ int slahNum = 0;
+ while (i > 0 && s_textLine[i] == '\\')
+ {
+ slahNum++;
+ i--;
+ }
+ if (p == 0 || (slahNum % 2 == 0))
+ {
+ pos = p;
+ break;
+ }
+ }
+ } else
+ break;
+ p++;
+ }
+ if (pos != -1)
+ {
+ // if (pos != 0) pos++;
+ s_currentContext.area.eLine = s_line;
+ s_currentContext.area.eCol = pos;
+ //kdDebug(24000) << QString("Quoted String s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ if (s_fullParse)
+ {
+ if ( s_currentNode &&
+ (s_currentNode->tag->type == Tag::Text ||
+ s_currentNode->tag->type == Tag::Empty) )
+ ParserCommon::appendAreaToTextNode(m_write, s_currentContext.area, s_currentNode);
+ else
+ s_currentNode = ParserCommon::createTextNode(m_write, 0L, s_line, pos, s_currentContext.parentNode);
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ }
+ s_previousContext = s_contextStack.pop();
+ s_currentContext.parentNode = s_previousContext.parentNode;
+ s_currentContext.type = s_previousContext.type;
+ s_currentContext.area.bLine = s_line;
+ s_currentContext.area.bCol = pos + 1;
+ s_currentContext.area.eLine = s_currentContext.area.eCol = -1;
+ s_currentContext.startString = s_previousContext.startString;
+ s_col = pos + 1;
+ } else
+ {
+ s_line++;
+ s_col = 0;
+ s_textLine = ParserCommon::getLine(m_write, s_line, s_endLine, s_endCol);
+ }
+ break;
+ }
+ case Comment:
+ {
+ int pos = s_textLine.find(s_dtd->comments[s_currentContext.startString], s_col);
+ if (pos == -1 && s_dtd->comments[s_currentContext.startString] == "\n")
+ {
+ int pos2 = s_textLine.find(s_areaEndString, s_col);
+ if (pos2 != -1)
+ {
+ pos = pos2 - 1;
+ } else
+ {
+ pos = s_textLine.length();
+ }
+ }
+ if (pos != -1)
+ {
+ s_currentContext.area.eLine = s_line;
+ s_currentContext.area.eCol = pos + s_dtd->comments[s_currentContext.startString].length() - 1;
+ s_currentContext.type = s_previousContext.type;
+ //kdDebug(24000) << QString("Comment s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+
+ if (s_fullParse)
+ {
+ //create a tag with the comment
+ Tag *tag = new Tag(s_currentContext.area, m_write, s_dtd);
+ tag->type = Tag::Comment;
+ tag->single = true;
+ //create a node with the above tag
+ Node *node = new Node(s_currentContext.parentNode);
+ nodeNum++;
+ node->tag = tag;
+ node->insideSpecial = true;
+ node->specialInsideXml = m_specialInsideXml;
+ if (s_currentNode && s_currentNode != node->parent)
+ {
+ s_currentNode->next = node;
+ node->prev = s_currentNode;
+ } else
+ if (node->parent && !node->parent->child)
+ node->parent->child = node;
+ s_currentNode = node;
+ }
+ s_previousContext = s_contextStack.pop();
+ s_currentContext.parentNode = s_previousContext.parentNode;
+ s_currentContext.type = s_previousContext.type;
+ s_currentContext.area.bLine = s_line;
+ s_currentContext.area.bCol = s_currentContext.area.eCol + 1;
+ s_currentContext.area.eLine = s_currentContext.area.eCol = -1;
+ s_currentContext.startString = s_previousContext.startString;
+ s_col = s_currentContext.area.bCol;
+ } else
+ {
+ s_line++;
+ s_col = 0;
+ s_textLine = ParserCommon::getLine(m_write, s_line, s_endLine, s_endCol);
+ }
+ break;
+ }
+ default:
+ {
+ s_line++;
+ s_col = 0;
+ s_textLine = ParserCommon::getLine(m_write, s_line, s_endLine, s_endCol);
+ }
+ }
+ if (m_synchronous)
+ {
+ //slotParseOneLine();
+ }
+ else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseOneLine from slotParseOneLine." << endl;
+#endif
+ m_parseOneLineTimer->start(0, true);
+ }
+ } else
+ {
+ if (!m_synchronous)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling parsingDone from slotParseOneLine." << endl;
+#endif
+ parsingDone();
+ }
+ return false; //parsing finished
+ }
+ return true;
+}
+
+Node* SAParser::parseArea(const AreaStruct &specialArea,
+ const QString &areaStartString,
+ const QString &forcedAreaEndString,
+ Node *parentNode,
+ bool fullParse, bool synchronous)
+{
+ m_synchronous = synchronous;
+ s_parentNode = parentNode;
+ s_fullParse = fullParse;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "parseArea full: " << s_fullParse << " synch: " << m_synchronous <<endl;
+#endif
+
+ int s_startLine = specialArea.bLine;
+ int s_startCol = specialArea.bCol;
+ s_endLine = specialArea.eLine;
+ s_endCol = specialArea.eCol;
+ //kdDebug(24000) << QString("Starting to parse at %1, %2 for %3").arg(s_startLine).arg(s_startCol).arg(areaStartString) << endl;
+
+ s_searchForAreaEnd = false;
+ s_searchForForcedAreaEnd = false;
+ s_dtd = 0L;
+ if (s_parentNode && !areaStartString.isEmpty())
+ {
+ const DTDStruct *parentDTD = m_dtd;
+ if (s_parentNode->parent)
+ parentDTD = s_parentNode->parent->tag->dtd();
+ s_dtd = DTDs::ref()->find(parentDTD->specialAreaNames[areaStartString]);
+ s_areaEndString = parentDTD->specialAreas[areaStartString];
+ s_searchForAreaEnd = true;
+ }
+ if (!forcedAreaEndString.isEmpty())
+ {
+ s_forcedAreaRx.setPattern(forcedAreaEndString);
+ s_forcedAreaRx.setCaseSensitive(m_dtd->caseSensitive);
+ s_searchForForcedAreaEnd = true;
+ s_searchForAreaEnd = false;
+ if (s_parentNode)
+ s_dtd = s_parentNode->tag->dtd();
+ }
+ s_searchContent = true;
+ if (s_parentNode && s_parentNode->tag->type == Tag::Comment)
+ s_searchContent = false;
+ if (!s_dtd)
+ {
+ if (s_parentNode)
+ s_dtd = s_parentNode->tag->dtd(); //fallback, usually when the special area is a comment
+ else
+ s_dtd = m_dtd; //fallback when there is no s_parentNode
+ }
+ m_write->addDTEP(s_dtd->name);
+ s_searchForSpecialAreas = (s_dtd->specialAreas.count() > 0);
+ if (s_parentNode && s_parentNode->tag->type == Tag::Comment)
+ s_searchForSpecialAreas = false;
+ s_col = s_startCol + areaStartString.length();
+ s_line = s_startLine;
+ s_textLine = m_write->text(s_startLine, 0, s_startLine, m_write->editIf->lineLength(s_startLine));
+ if (s_line == s_endLine)
+ {
+ if (s_endCol > 0)
+ s_textLine.truncate(s_endCol + 1);
+ else
+ s_textLine = "";
+ }
+
+ s_previousContext.type = Unknown;
+ s_currentContext.type = Text;
+ s_currentContext.area.bLine = s_line;
+ s_currentContext.area.bCol = s_col;
+ s_currentContext.area.eLine = s_currentContext.area.eCol = -1;
+ s_currentContext.parentNode = s_parentNode;
+ s_currentNode = s_parentNode;
+ m_lastParsedNode = 0L;
+ s_useReturnVars = false;
+ if (s_line <= s_endLine)
+ {
+ if (m_synchronous)
+ {
+ while (slotParseOneLine()); //actually this parses the whole area, as synchronous == true
+ if (s_useReturnVars) //this is true if the special area end was found
+ {
+ return m_lastParsedNode;
+ }
+ }
+ else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseOneLine from parseArea." << endl;
+#endif
+ m_parseOneLineTimer->start(0, true);
+ return 0L;
+ }
+ }
+ if (m_synchronous) //if the special area end was not found and we are in synchronous mode
+ {
+ s_next = 0L;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling parsingDone from parseArea." << endl;
+#endif
+ s_currentNode = parsingDone();
+ return s_currentNode;
+ }
+ return 0L;
+}
+
+Node *SAParser::parsingDone()
+{
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "parsingDone. Use return values:" << s_useReturnVars << endl;
+#endif
+ if (s_useReturnVars)
+ {
+ if (s_fullParse)
+ {
+ Node *n = m_lastParsedNode;
+ if (m_useNext)
+ {
+// kdDebug(24000) << "m_lastParsedNode: " << m_lastParsedNode << " " << m_lastParsedNode->tag->tagStr() << endl;
+ n->next = s_next;
+ if (s_next)
+ {
+ s_next->prev = n;
+ }
+ n->prev = s_parentNode;
+ }
+ m_currentNode = n->nextSibling();
+ if (m_currentNode)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseNodeInDetail from parsingDone (use return values)" << endl;
+#endif
+ m_parseInDetailTimer->start(0, true);
+ return m_lastParsedNode;
+ }
+ else
+ {
+ m_parsingEnabled = true;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Emitting rebuildStructureTree from parsingDone (use return values). Enable parsing." << endl;
+#endif
+ emit rebuildStructureTree(false);
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << "Calling cleanGroups from SAParser::parsingDone" << endl;
+#endif
+ emit cleanGroups();
+ }
+ }
+ m_currentNode = 0L;
+ return m_lastParsedNode;
+ }
+ if (!s_currentNode)
+ {
+ s_currentNode = ParserCommon::createTextNode(m_write, s_parentNode, s_endLine, s_endCol, s_parentNode);
+ if (s_currentNode)
+ {
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ }
+ }
+ else if (s_parentNode && !s_parentNode->next)
+ {
+ s_currentNode = ParserCommon::createTextNode(m_write, s_currentNode, s_endLine, s_endCol, s_parentNode);
+ s_currentNode->insideSpecial = true;
+ s_currentNode->specialInsideXml = m_specialInsideXml;
+ }
+ if (s_fullParse)
+ {
+ Node *n;
+ if (s_parentNode)
+ {
+ n = s_parentNode;//->child;
+ } else
+ {
+ n = s_currentNode;
+ while (n && n->prev)
+ n = n->prev;
+ s_currentNode = n;
+ }
+ Node *g_node = n;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseForScriptGroup from parsingDone. Synch:" << m_synchronous << endl;
+#endif
+ //parse for groups only when doing aynchronous detailed parsing
+ if (!m_synchronous)
+ {
+ SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, 0L, m_synchronous, true /*last node*/, true);
+ connect(groupParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
+ connect(groupParser, SIGNAL(cleanGroups()), SIGNAL(cleanGroups()));
+ connect(groupParser, SIGNAL(parsingDone(SAGroupParser*)), SLOT(slotGroupParsingDone(SAGroupParser*)));
+ groupParser->slotParseForScriptGroup();
+ m_groupParsers.append(groupParser);
+ }
+ }
+
+ m_lastParsedLine = s_endLine;
+ m_lastParsedCol = s_endCol + 1;
+
+ if (s_fullParse && m_currentNode)
+ {
+ if (m_useNext && s_currentNode)
+ {
+// kdDebug(24000) << "s_currentNode: " << s_currentNode << endl;
+ Node *n = s_currentNode;
+ n->next = s_next;
+ if (s_next)
+ s_next->prev = n;
+ }
+ m_currentNode = m_currentNode->nextSibling();
+ if (m_currentNode)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseNodeInDetail from parsingDone." << endl;
+#endif
+ m_parseInDetailTimer->start(0, true);
+ emit rebuildStructureTree(false);
+ }
+ else
+ {
+ m_parsingEnabled = true;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Emitting detailedParsingDone from parsingDone. Enable parsing." << endl;
+#endif
+ emit rebuildStructureTree(false);
+ }
+ }
+ m_currentNode = 0L;
+ return s_currentNode;
+}
+
+void SAParser::parseInDetail(bool synchronous)
+{
+// synchronous = true; //for testing. Uncomment to test the parser in synchronous mode
+// return; //for testing. Uncomment to disable the detailed parser
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "parseInDetail. Enabled: " << m_parsingEnabled << endl;
+#endif
+ if (!m_parsingEnabled)
+ {
+ m_currentNode = m_baseNode;
+ m_parsingEnabled = true;
+ m_synchronous = synchronous;
+ if (m_currentNode)
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling slotParseNodeInDetail from parseInDetail." << endl;
+#endif
+ slotParseNodeInDetail();
+ }
+ }
+}
+
+void SAParser::slotParseNodeInDetail()
+{
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "slotParseNodeInDetail. Enabled: " << m_parsingEnabled << " Synch: " << m_synchronous << endl; //this is really heavy debug information, enable only when really needed
+#endif
+ if (m_currentNode && m_parsingEnabled && baseNode)
+ {
+ if (m_currentNode->insideSpecial &&
+ m_currentNode->tag->type != Tag::Comment &&
+ m_currentNode->tag->type != Tag::Text &&
+ m_currentNode->tag->type != Tag::Empty)
+ {
+ Node::deleteNode(m_currentNode->child);
+ m_currentNode->child = 0L;
+ AreaStruct area(m_currentNode->tag->area());
+ s_next = 0L;
+ m_useNext = false;
+ //FIXME: Find out why can the tag become 0L
+ if (m_currentNode->next && m_currentNode->next->tag)
+ {
+ AreaStruct area2(m_currentNode->next->tag->area());
+ area.eLine = area2.eLine;
+ area.eCol = area2.eCol + 1;
+ s_next = m_currentNode->next->next;
+ if (m_currentNode->next->closesPrevious)
+ {
+ m_currentNode->next->removeAll = false;
+ Node *secondNext = m_currentNode->next->next;
+ if (secondNext)
+ secondNext->prev = m_currentNode;
+ Node::deleteNode(m_currentNode->next);
+ m_currentNode->next = secondNext;
+ m_useNext = true;
+ }
+ } else
+ {
+ area.eLine = m_write->editIf->numLines() - 1;
+ area.eCol = m_write->editIf->lineLength(area.eLine);
+ }
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Calling parseArea from slotParseNodeInDetail." << endl;
+#endif
+ QString areaStartString = m_currentNode->tag->tagStr();
+ if (m_currentNode->tag->dtd()->specialAreaNames[areaStartString].isEmpty())
+ {
+ AreaStruct area2(m_currentNode->tag->area());
+ area.bLine = area2.eLine;
+ area.bCol = area2.eCol + 1;
+ parseArea(area, "", "</"+m_currentNode->tag->name+"\\s*>", m_currentNode, true, m_synchronous);
+ }
+ else
+ parseArea(area, m_currentNode->tag->tagStr(), "", m_currentNode, true, m_synchronous);
+ } else
+ {
+// Node *node = m_currentNode;
+ m_currentNode = m_currentNode->nextSibling();
+ if (m_currentNode)
+ {
+#ifdef DEBUG_PARSER
+// kdDebug(24001) << "Calling slotParseNodeInDetail from slotParseNodeInDetail." << endl; //this is really heavy debug information, enable only when really needed
+#endif
+ m_parseInDetailTimer->start(0, true);
+ } else
+ {
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Emitting rebuildStructureTree from slotParseNodeInDetail." << endl;
+#endif
+ emit rebuildStructureTree(false);
+ }
+ }
+ }
+}
+
+
+void SAParser::setParsingEnabled(bool enabled)
+{
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Parsing enabled: " << enabled << endl;
+#endif
+ m_parsingEnabled = enabled;
+ if (!enabled)
+ {
+ m_parseOneLineTimer->stop();
+ m_parseInDetailTimer->stop();
+ for (QValueList<SAGroupParser*>::Iterator it = m_groupParsers.begin(); it != m_groupParsers.end(); ++it)
+ {
+ (*it)->m_parseForGroupTimer->stop();
+ delete (*it);
+ }
+ m_groupParsers.clear();
+ }
+}
+
+void SAParser::slotGroupParsingDone(SAGroupParser *groupParser)
+{
+ m_groupParsers.remove(groupParser);
+ delete groupParser;
+}
+
+
+#include "saparser.moc"
diff --git a/quanta/parsers/saparser.h b/quanta/parsers/saparser.h
new file mode 100644
index 00000000..50c3dd41
--- /dev/null
+++ b/quanta/parsers/saparser.h
@@ -0,0 +1,150 @@
+/***************************************************************************
+ saparser.h - description
+ -------------------
+ begin : Wed Feb 11 2004
+ copyright : (C) 2004 Andras Mantia <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 SAPARSER_H
+#define SAPARSER_H
+
+//qt includes
+#include <qobject.h>
+#include <qregexp.h>
+#include <qvaluestack.h>
+
+//own includes
+#include "tag.h" //for AreaStruct
+
+//forward definitions
+struct DTDStruct;
+class Document;
+class QString;
+class QStringList;
+class QTimer;
+class KDirWatch;
+class SAGroupParser;
+
+
+/**
+ This class is used to parse a special area (script) in the document.
+*/
+class SAParser: public QObject
+{
+ Q_OBJECT
+
+public:
+ SAParser();
+ virtual ~SAParser();
+
+ void setParsingEnabled(bool enabled);
+ bool parsingEnabled() {return m_parsingEnabled;}
+ Document *write() {return m_write;}
+ void init(Node *node, Document *write);
+/*
+ Parses the document for special areas (eg. scripts).
+ specialArea: the area (start/end position) in the document that may contain the special
+ area. It may end before the end position.
+ areaStartString: the special area starting string
+ forcedAreaEndString: force this as the special area ending string.
+ parentNode: the Node under where the special area goes
+ fullParse: the script node will be fully parsed for groups, structures or so. If false, only the script beginning and end will be determined.
+ synchronous: if true, the function does not return until the parsing is finished, otherwise
+ return immediately.
+ return value: in synchronous case returns the last inserted node, otherwise return 0L.
+*/
+ Node* parseArea(const AreaStruct &specialArea,
+ const QString &areaStartString,
+ const QString &forcedAreaEndString,
+ Node *parentNode,
+ bool fullParse, bool synchronous);
+ /** Returns the line where the last parsing run ended. */
+ int lastParsedLine() {return m_lastParsedLine;}
+ /** Returns the column where the last parsing run ended. */
+ int lastParsedColumn() {return m_lastParsedCol;}
+
+ void parseInDetail(bool synchronous);
+ void setSpecialInsideXml(bool insideXml) {m_specialInsideXml = insideXml;}
+
+public slots:
+ void slotGroupParsingDone(SAGroupParser *groupParser);
+
+private slots:
+ /** Parses one line and calls itself with a singleshot timer to parse the next line. */
+ bool slotParseOneLine();
+ void slotParseNodeInDetail();
+
+signals:
+ void rebuildStructureTree(bool);
+ void cleanGroups();
+
+private:
+ //private methods
+ Node* parsingDone();
+
+ //private structures
+ struct ContextStruct{
+ int type;
+ AreaStruct area;
+ QString startString;
+ Node *parentNode;
+ Node *lastNode;
+ };
+ enum ContextType {
+ Unknown = 0,
+ Text,
+ Comment,
+ QuotedString,
+ Group
+ };
+
+ //private member variables
+ bool m_useNext;
+ bool m_parsingEnabled;
+ bool m_synchronous;
+ Document* m_write;
+ Node* m_baseNode;
+ Node* m_lastParsedNode;
+ Node* m_currentNode; ///< the currently parsed script node for details. Changes only after the whole area between m_currentNode and m_currentNode->next is parsed.
+ int m_lastParsedLine, m_lastParsedCol;
+ const DTDStruct *m_dtd;
+ QRegExp m_quotesRx;
+ bool m_specialInsideXml; //< true if the special area is defined inside a tag, like the PHP in <a href="<? echo $a ?>">
+
+ bool s_contextFound;
+ ContextStruct s_currentContext;
+ Node *s_parentNode;
+ bool s_searchContent;
+ QString s_searchedString;
+ QString s_textLine;
+ int s_line, s_col;
+ int s_endLine, s_endCol;
+ bool s_fullParse;
+ QString s_areaEndString;
+ bool s_searchForAreaEnd;
+ bool s_searchForForcedAreaEnd;
+ QRegExp s_forcedAreaRx;
+ const DTDStruct *s_dtd;
+ bool s_searchForSpecialAreas;
+ ContextStruct s_context;
+ QValueStack<ContextStruct> s_contextStack;
+ ContextStruct s_previousContext;
+ Node *s_currentNode; ///< the current detailed node while parsing for details
+ Node *s_returnNode;
+ bool s_useReturnVars;
+ Node *s_next;
+ QValueList<SAGroupParser*> m_groupParsers;
+ QTimer *m_parseOneLineTimer;
+ QTimer *m_parseInDetailTimer;
+};
+
+#endif
diff --git a/quanta/parsers/tag.cpp b/quanta/parsers/tag.cpp
new file mode 100644
index 00000000..8a1921db
--- /dev/null
+++ b/quanta/parsers/tag.cpp
@@ -0,0 +1,672 @@
+/***************************************************************************
+ tag.cpp - description
+ -------------------
+ begin : Sun Sep 1 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <ctype.h>
+
+#include <qdict.h>
+#include <qstring.h>
+#include <qcstring.h>
+#include <qdom.h>
+
+#include <kdebug.h>
+
+#include "tag.h"
+#include "document.h"
+#include "quantacommon.h"
+#include "resource.h"
+
+#include "parser.h"
+#include "node.h"
+
+
+void TagAttr::save(QDomElement& element) const
+{
+ element.setAttribute("name", name); // QString
+ element.setAttribute("value", value); // QString
+ element.setAttribute("nameLine", nameLine); // int
+ element.setAttribute("nameCol", nameCol); // int
+ element.setAttribute("valueLine", valueLine); // int
+ element.setAttribute("valueCol", valueCol); // int
+ element.setAttribute("quoted", quoted); // bool
+ element.setAttribute("special", special); // bool
+}
+
+bool TagAttr::load(QDomElement const& element)
+{
+ name = element.attribute("name");
+ value = element.attribute("value");
+ nameLine = QString(element.attribute("nameLine")).toInt();
+ nameCol = QString(element.attribute("nameCol")).toInt();
+ valueLine = QString(element.attribute("valueLine")).toInt();
+ valueCol = QString(element.attribute("valueCol")).toInt();
+ quoted = QString(element.attribute("quoted")).toInt();
+ special = QString(element.attribute("special")).toInt();
+
+ return true;
+}
+
+
+Tag::Tag()
+{
+ init();
+}
+
+Tag::Tag(const AreaStruct &area, Document *write, const DTDStruct *dtd, bool doParse)
+{
+ init();
+ QString s = write->text(area);
+ m_area = area;
+ m_dtd = dtd;
+ if (doParse)
+ {
+ parse(s, write);
+ } else
+ {
+ m_write = write;
+ m_tagStr = s;
+ cleanStr = s;
+ }
+}
+
+Tag::Tag( const Tag &t)
+{
+ name = t.name;
+ nameSpace = t.nameSpace;
+ m_dtd = t.m_dtd;
+ single = t.single;
+ closingMissing = t.closingMissing;
+ m_area = t.m_area;
+ m_tagStr = t.m_tagStr;
+ cleanStr = t.cleanStr;
+ m_write = t.m_write;
+ type = t.type;
+ structBeginStr = t.structBeginStr;
+ m_nameLine = t.m_nameLine;
+ m_nameCol = t.m_nameCol;
+ attrs = t.attrs;
+ validXMLTag = t.validXMLTag;
+ m_cleanStrBuilt = t.m_cleanStrBuilt;
+ m_indentationDone = t.m_indentationDone;
+ m_notInTree = t.m_notInTree;
+}
+
+Tag::~Tag()
+{
+ attrs.clear();
+}
+
+void Tag::init()
+{
+ name = "";
+ m_dtd = 0L;
+ m_write = 0L;
+ type = Unknown;
+ single = false;
+ closingMissing = false;
+ structBeginStr = "";
+ cleanStr = "";
+ m_nameLine = -1;
+ m_nameCol = -1;
+ validXMLTag = true;
+ m_cleanStrBuilt = true;
+ m_indentationDone = true;
+ m_notInTree = false;
+}
+
+void Tag::save(QDomElement& element) const
+{
+ element.setAttribute("name", name); // QString
+ element.setAttribute("nameSpace", nameSpace); // QString
+ element.setAttribute("cleanStr", cleanStr); // QString
+ element.setAttribute("type", type); // int
+ element.setAttribute("single", single); // bool
+ element.setAttribute("closingMissing", closingMissing); // bool
+ element.setAttribute("structBeginStr", structBeginStr); // QString
+ element.setAttribute("validXMLTag", validXMLTag); // bool
+ element.setAttribute("cleanStrBuilt", m_cleanStrBuilt); // bool
+ element.setAttribute("indentationDone", m_indentationDone); // bool
+ element.setAttribute("notInTree", m_notInTree); // bool
+ element.setAttribute("nameLine", m_nameLine); // int
+ element.setAttribute("nameCol", m_nameCol); // int
+
+ QValueList<TagAttr>::const_iterator it;
+ for (it = attrs.begin(); it != attrs.end(); ++it)
+ {
+ QDomElement child_element = element.ownerDocument().createElement("tagAttr");
+ element.appendChild(child_element);
+ (*it).save(child_element);
+ }
+
+ element.setAttribute("tagStr", m_tagStr); // QString
+}
+
+bool Tag::load(QDomElement const& element)
+{
+ name = element.attribute("name"); // QString
+ nameSpace = element.attribute("nameSpace"); // QString
+ cleanStr = element.attribute("cleanStr"); // QString
+ type = QString(element.attribute("type")).toInt(); // int
+ single = QString(element.attribute("single")).toInt(); // bool
+ closingMissing = QString(element.attribute("closingMissing")).toInt(); // bool
+ structBeginStr = element.attribute("structBeginStr"); // QString
+ validXMLTag = QString(element.attribute("validXMLTag")).toInt(); // bool
+ m_cleanStrBuilt = QString(element.attribute("cleanStrBuilt")).toInt(); // bool
+ m_indentationDone = QString(element.attribute("indentationDone")).toInt(); // bool
+ m_notInTree = QString(element.attribute("notInTree")).toInt(); // bool
+ m_nameLine = QString(element.attribute("nameLine")).toInt(); // int
+ m_nameCol = QString(element.attribute("nameCol")).toInt(); // int
+
+ 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() == "tagAttr")
+ {
+ TagAttr tag_attr;
+ tag_attr.load(e);
+ addAttribute(tag_attr);
+ }
+ }
+ }
+
+ m_tagStr = element.attribute("tagStr"); // QString
+
+ return true;
+}
+
+void Tag::parse(const QString &p_tagStr, Document *p_write)
+{
+ attrs.clear();
+ m_tagStr = p_tagStr;
+ uint strLength = m_tagStr.length();
+ cleanStr = m_tagStr;
+ m_write = p_write;
+ if (!m_tagStr.startsWith("<"))
+ {
+ type = Text;
+ return;
+ }
+ m_nameLine = m_area.bLine;
+ m_nameCol = m_area.bCol + 1;
+ uint pos = 1;
+ while (pos < strLength &&
+ !m_tagStr[pos].isSpace() && m_tagStr[pos] != '>' && m_tagStr[pos] != '<' && m_tagStr[pos] != '\n')
+ {
+ pos++;
+ }
+ name = m_tagStr.mid(1, pos - 1);
+ int nameSpacePos = name.find(':');
+ if (nameSpacePos != -1)
+ {
+ nameSpace = name.left(nameSpacePos);
+ name = name.mid(++nameSpacePos);
+ m_nameCol += nameSpacePos;
+ }
+ QString attrStr;
+ TagAttr attr;
+ attr.special = false; //by default non of the attributes are special
+ while (pos < strLength && m_tagStr[pos].isSpace())
+ pos++;
+ int sPos = pos;
+ int valueStartPos = 0;
+ while (pos < strLength)
+ {
+ //find the attribute name
+ while (pos < strLength &&
+ !m_tagStr[pos].isSpace() && m_tagStr[pos] != '=')
+ {
+ pos++;
+ }
+ attr.name = m_tagStr.mid(sPos, pos - sPos);
+ if (attr.name.endsWith(">") && pos == strLength)
+ {
+ attr.name = attr.name.left(attr.name.length() - 1).lower();
+ if (!attr.name.stripWhiteSpace().isEmpty())
+ {
+ attr.nameLine = m_tagStr.left(sPos).contains('\n') + m_area.bLine;
+ if (attr.nameLine == m_area.bLine)
+ attr.nameCol = sPos + m_area.bCol;
+ else
+ attr.nameCol = m_tagStr.left(sPos).section('\n',-1).length();
+ attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : QString("checked");
+ attr.valueCol = attr.nameCol;
+ attr.valueLine = attr.nameLine;
+ attr.quoted = false;
+ attrs.append(attr);
+ }
+ break;
+ }
+ if (m_dtd && !m_dtd->caseSensitive)
+ attr.name = attr.name.lower();
+ attr.nameLine = m_tagStr.left(sPos).contains('\n') + m_area.bLine;
+ if (attr.nameLine == m_area.bLine)
+ attr.nameCol = sPos + m_area.bCol;
+ else
+ attr.nameCol = m_tagStr.left(sPos).section('\n',-1).length();
+
+ while (pos < m_tagStr.length() && m_tagStr[pos].isSpace())
+ pos++;
+ //if the attribute is just listed and there is no value specified,
+ //treate it as a "true" boolean
+ if (m_tagStr[pos] != '=' || pos == strLength)
+ {
+ attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : QString("checked");
+ attr.valueCol = attr.nameCol;
+ attr.valueLine = attr.nameLine;
+ attr.quoted = false;
+ pos--;
+ } else
+ {
+ pos++;
+ while (pos < strLength && m_tagStr[pos].isSpace())
+ pos++;
+ if (m_tagStr[pos] == '\'' || m_tagStr[pos] == '"')
+ {
+ attr.quoted = true;
+ valueStartPos = pos + 1;
+ QChar quotation = m_tagStr[pos];
+ pos += 1;
+ while (pos < strLength &&
+ (m_tagStr[pos] != quotation ||
+ (m_tagStr[pos] == quotation &&
+ (m_tagStr[pos-1] == '\\' || isInsideScript(m_tagStr.mid(valueStartPos, pos - valueStartPos)) ) )))
+ {
+ pos++;
+ }
+ attr.value = m_tagStr.mid(valueStartPos, pos - valueStartPos);
+ } else
+ {
+ attr.quoted = false;
+ valueStartPos = pos;
+ while (pos < strLength && !m_tagStr[pos].isSpace())
+ pos++;
+ if (pos == strLength)
+ pos--;
+ attr.value = m_tagStr.mid(valueStartPos, pos - valueStartPos);
+ }
+ attr.valueLine = m_tagStr.left(valueStartPos).contains('\n') + m_area.bLine;
+ if (attr.valueLine == m_area.bLine)
+ attr.valueCol = valueStartPos + m_area.bCol;
+ else
+ attr.valueCol = m_tagStr.left(valueStartPos).section('\n',-1).length();
+ }
+
+ attrs.append(attr);
+ //go to the first non-space char. This is where the next attribute name starts
+ pos++;
+ while (pos < strLength && m_tagStr[pos].isSpace())
+ pos++;
+ sPos = pos++;
+ }
+
+ //add the tag to the document usertag list if it's not present in the dtd
+ if (m_tagStr.startsWith("<") && m_tagStr.endsWith(">") && m_dtd)
+ {
+ //QString tagName = (m_parsingDTD->caseSensitive) ? name : name.upper();
+ QString tagName = name.lower();
+ //add the new xml tags to the userTagList
+ if ( !QuantaCommon::isKnownTag(m_dtd->name, tagName) &&
+ name[0] != '/' )
+ {
+ QTag *newTag = m_write->userTagList.find(tagName);
+ bool insertNew = !newTag;
+ if (insertNew)
+ {
+ newTag = new QTag();
+ newTag->setName(name);
+ newTag->parentDTD = m_dtd;
+ }
+ for (int i = 0; i >attrCount(); i++)
+ {
+ Attribute *attr = new Attribute;
+ attr->name = attribute(i);
+ attr->values.append(attributeValue(i));
+ newTag->addAttribute(attr);
+ delete attr;
+ }
+ if (insertNew)
+ {
+ m_write->userTagList.replace(tagName, newTag);
+ }
+ }
+ }
+}
+
+
+QString Tag::attribute(int index)
+{
+ QString attr="";
+ if ( index != -1 && index < (int)attrs.count() )
+ {
+ attr = attrs[index].name;
+ }
+ return attr;
+}
+
+QString Tag::attributeValue(int index)
+{
+ QString val = "";
+ if ( index != -1 && index < (int)attrs.count() )
+ {
+ val = attrs[index].value;
+ }
+ return val;
+}
+
+QString Tag::attributeValue(const QString &attr, bool ignoreCase)
+{
+ QString val = "";
+ for (uint i = 0 ; i < attrs.count(); i++)
+ {
+
+ if ( attr == attrs[i].name ||
+ ((!m_dtd->caseSensitive || ignoreCase) && attrs[i].name.lower() == attr.lower()))
+ {
+ val = attrs[i].value;
+ break;
+ }
+ }
+ return val;
+}
+
+/** Check if this tag has the attr attribute defined */
+bool Tag::hasAttribute(const QString &attr, bool ignoreCase)
+{
+ for (uint i = 0; i < attrs.count(); i++)
+ {
+ if ( attrs[i].name == attr ||
+ ((!m_dtd->caseSensitive || ignoreCase) && attrs[i].name.lower() == attr.lower()))
+ return true;
+ }
+ return false;
+}
+
+void Tag::setAttributePosition(int index, int bLineName, int bColName, int bLineValue, int bColValue)
+{
+ TagAttr attr;
+ attr = attrs[index];
+ attr.nameLine = bLineName;
+ attr.nameCol = bColName;
+ attr.valueLine = bLineValue;
+ attr.valueCol = bColValue;
+ attrs.remove(attrs.at(index));
+ //attrs.append(attr);
+ attrs.insert(attrs.at(index) ,attr);
+}
+
+/** Set the coordinates of tag inside the document */
+void Tag::setTagPosition(int bLine, int bCol, int eLine, int eCol)
+{
+ m_area.bLine = bLine;
+ m_area.bCol = bCol;
+ m_area.eLine = eLine;
+ m_area.eCol = eCol;
+}
+
+/** Set the coordinates of tag inside the document, but using an AreaStruct as argument */
+void Tag::setTagPosition(const AreaStruct &area)
+{
+ m_area = area;
+}
+
+/** Return the index of attr. */
+int Tag::attributeIndex(const QString &attr)
+{
+ int index = -1;
+ uint i = 0;
+ do{
+ if (attrs[i].name == attr ||
+ (!m_dtd->caseSensitive && attrs[i].name == attr.lower()))
+ index = i;
+ i++;
+ } while (index == -1 && i < attrs.count());
+ return index;
+}
+/** Returns the index of attribute at (line,col). */
+int Tag::attributeIndexAtPos(int line, int col)
+{
+ int index = -1;
+ uint i = 0;
+ do
+ {
+ if (attrs[i].nameLine == line)
+ {
+ if (attrs[i].nameCol <= col &&
+ (int) (attrs[i].nameCol + attrs[i].name.length()) >=col)
+ {
+ index = i;
+ }
+ }
+ i++;
+ } while (i < attrs.count() && index == -1);
+ return index;
+}
+
+/** Returns the index of attributevalue at (line,col). */
+int Tag::valueIndexAtPos(int line, int col)
+{
+ int index = -1;
+ uint i = 0;
+ do
+ {
+ if (attrs[i].valueLine == line &&
+ (attrs[i].valueLine != attrs[i].nameLine || attrs[i].valueCol != attrs[i].nameCol))
+ {
+ if (attrs[i].valueCol <= col &&
+ (int) (attrs[i].valueCol + attrs[i].value.length()) >=col)
+ {
+ index = i;
+ }
+ }
+ i++;
+ } while (i < attrs.count() && index == -1);
+ return index;
+}
+
+void Tag::namePos(int &line, int &col)
+{
+ line = m_nameLine;
+ col = m_nameCol;
+}
+
+void Tag::setStr(const QString &p_tagStr)
+{
+ m_tagStr = p_tagStr; cleanStr = m_tagStr;
+}
+
+int Tag::size()
+{
+ int l = sizeof(name) + 8*sizeof(int) + 2*sizeof(bool);
+ l += sizeof(cleanStr) + sizeof(m_tagStr);
+ l += sizeof(structBeginStr) + sizeof(attrs);
+ l += sizeof(m_dtd) + sizeof(m_write);
+
+ return l;
+}
+
+void Tag::attributeNamePos(int index, int &line, int &col)
+{
+ line = -1;
+ col = -1;
+ if ( index != -1 && index < (int)attrs.count() )
+ {
+ line = attrs[index].nameLine;
+ col = attrs[index].nameCol;
+ }
+}
+
+void Tag::attributeValuePos(int index, int &line, int &col)
+{
+ line = -1;
+ col = -1;
+ if ( index != -1 && index < (int)attrs.count() )
+ {
+ line = attrs[index].valueLine;
+ col = attrs[index].valueCol;
+ }
+}
+
+bool Tag::editAttribute(const QString& attrName, const QString& attrValue)
+{
+ TagAttr attr;
+
+ for (uint i = 0 ; i < attrs.count(); i++)
+ {
+ if ( attrName == attrs[i].name ||
+ (!m_dtd->caseSensitive && attrs[i].name.lower() == attrName.lower()))
+ {
+ if(attr.value == attrValue)
+ return false;
+
+ attr = attrs[i];
+ attr.value = attrValue;
+ attrs.remove(attrs.at(i));
+ attrs.append(attr);
+ return true;
+ }
+ }
+ //attrName not found, creating the attr, if attrValue not empty
+ if(!attrValue.isEmpty())
+ {
+ attr.name = attrName;
+ attr.value = attrValue;
+ attr.quoted = true;
+ attrs.append(attr);
+ return true;
+ }
+
+ return false;
+}
+
+void Tag::deleteAttribute(const QString& attrName)
+{
+ for (uint i = 0 ; i < attrs.count(); i++)
+ {
+ if ( attrName == attrs[i].name ||
+ (!m_dtd->caseSensitive && attrs[i].name.lower() == attrName.lower()))
+ {
+ attrs.remove(attrs.at(i));
+ }
+ }
+}
+
+void Tag::modifyAttributes(QDict<QString> *attrDict)
+{
+ QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name);
+ QDictIterator<QString> it(*attrDict);
+ QString attribute;
+ QString value;
+ while ( it.current() )
+ {
+ attribute = it.currentKey();
+ value = *(it.current());
+ if (qTag && qTag->parentDTD->singleTagStyle == "xml" && attribute=="/")
+ {
+ ++it;
+ continue;
+ }
+ editAttribute(attribute, value);
+ ++it;
+ }
+ for (uint i = 0 ; i < attrs.count(); i++)
+ {
+ if ( !attrDict->find(attrs[i].name) )
+ {
+ attrs.remove(attrs.at(i));
+ }
+ }
+}
+
+QString Tag::toString()
+{
+ QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name);
+ QValueList<TagAttr>::Iterator it;
+ TagAttr attr;
+ QString attrString;
+ QString tagString;
+ for (it = attrs.begin(); it != attrs.end(); ++it)
+ {
+ attr = *it;
+ attrString = " ";
+ if (attr.value.isEmpty() || attr.name == "/")
+ {
+ attrString.append(attr.name);
+ } else
+ {
+ attrString.append(attr.name + "=");
+ if (!attr.value.startsWith("\\\"") && !attr.value.startsWith("\\\'"))
+ attrString.append(qConfig.attrValueQuotation);
+ attrString.append(attr.value);
+ if (!attr.value.endsWith("\\\"") && !attr.value.endsWith("\\\'"))
+ attrString.append(qConfig.attrValueQuotation);
+ }
+ tagString.prepend(attrString);
+ }
+ attrString = "<";
+ if (!nameSpace.isEmpty())
+ attrString += nameSpace + ":";
+ attrString.append(QuantaCommon::tagCase(name));
+ tagString.prepend(attrString);
+
+ if (attrs.isEmpty() && qTag && qTag->parentDTD->singleTagStyle == "xml" &&
+ (qTag->isSingle() ||
+ (!qConfig.closeOptionalTags && qTag->isOptional()) || single)
+ )
+ {
+ tagString.append(" /");
+ }
+ tagString.append(">");
+
+ return tagString;
+}
+
+bool Tag::isClosingTag()
+{
+ return (name[0] == '/' || nameSpace[0] == '/');
+}
+
+void Tag::setAttributeSpecial(int index, bool special)
+{
+ if ( index != -1 && index < (int)attrs.count() )
+ {
+ attrs[index].special = special;
+ }
+}
+
+void Tag::setDtd(const DTDStruct *dtd)
+{
+ m_dtd = dtd;
+}
+
+bool Tag::isInsideScript(const QString &str)
+{
+ if (!m_dtd)
+ return false; //happens when the DTD is not known yet, e.g in Document::findDTDName
+
+ //This detects if the last char from str is inside a script area or not, to
+ //treat cases like <a href="<? echo "foo" ?>"> correctly
+ //TODO: speed up if you can...
+ if (str.find(m_dtd->specialAreaStartRx) != -1)
+ {
+ QString foundString = m_dtd->specialAreaStartRx.cap();
+ if (str.find(m_dtd->specialAreas[foundString]) == -1)
+ {
+ return true;
+ }
+ }
+ return false;
+}
diff --git a/quanta/parsers/tag.h b/quanta/parsers/tag.h
new file mode 100644
index 00000000..de2c0a7b
--- /dev/null
+++ b/quanta/parsers/tag.h
@@ -0,0 +1,212 @@
+/***************************************************************************
+ tag.h - description
+ -------------------
+ begin : Sun Sep 1 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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 TAG_H
+#define TAG_H
+
+#include <qstring.h>
+#include <qdict.h>
+#include <qvaluelist.h>
+class QDomElement;
+
+#include "qtag.h"
+
+/**
+ This is the a tag inside the document. It contains only the attributes and values as
+ they are typed. It is used to build up the internal represantation of the document in
+ a structure tree (build up from Node objects, which have pointers to Tag-s). A Tag is
+ not necessary a valid and known DTD tag with valid attributes and values. It can be
+ the parsed version of EXACTLY <foo foo_attr="foo"> in any XML like DTD.
+
+ *@author Andras Mantia
+ */
+
+class Document;
+
+struct TagAttr {
+ TagAttr() {nameLine = nameCol = valueLine = valueCol = 0; quoted = true; special = false;}
+
+ /** For Kafka copy/paste */
+ void save(QDomElement& element) const;
+ bool load(QDomElement const& element);
+
+ QString name; //attr name
+ QString value; //attr value
+ int nameLine, nameCol; //where the attr name begins
+ int valueLine, valueCol;//where the attr value begins
+ bool quoted; //quote or not the attribute
+ bool special; //true if the attribute is not a real one, instead it's only part
+ //of a special area that's present in the tag. Example:
+ //Tag: <a <? echo $a ?> href="x">, <?, echo, $a and ?> are special attributes
+ //This is important, otherwise they would be wrongly treated as booleans.
+};
+
+struct AreaStruct{
+ AreaStruct() {bLine = bCol = eLine = eCol = -1;}
+ AreaStruct(int bl, int bc, int el, int ec) {bLine = bl; bCol = bc; eLine = el; eCol = ec;}
+ AreaStruct(const AreaStruct& area) {bLine = area.bLine; bCol = area.bCol; eLine = area.eLine; eCol = area.eCol;}
+ int bLine;
+ int bCol;
+ int eLine;
+ int eCol;
+};
+
+
+class Tag {
+public:
+ Tag();
+ Tag(const Tag&);
+ Tag(const AreaStruct &area, Document *write, const DTDStruct *dtd = 0L, bool doParse = false);
+ ~Tag();
+ Tag operator = ( const Tag& );
+
+ /** For Kafka copy/paste */
+ void save(QDomElement& element) const;
+ bool load(QDomElement const& element);
+
+ /** Parse the p_tagStr in p_write and build up the tag's attributes and values */
+ void parse (const QString &p_tagStr, Document *p_write);
+ /** Return the attribute at index*/
+ QString attribute(int index);
+ /** Return the attribute value at index*/
+ QString attributeValue(int index);
+ /** Return the value of attr*/
+ QString attributeValue(const QString &attr, bool ignoreCase = false);
+ /** Add an attribute */
+ void addAttribute(TagAttr attr) {attrs.append(attr);}
+ /** Get the attribute number index */
+ TagAttr getAttribute(uint index) const {return attrs[index];}
+ /** Remove the attribute number index */
+ void deleteAttribute(uint index) {attrs.remove(attrs.at(index));}
+ /** Insert a new Attribute, even if it already exists. Prefer using editAttribute.
+ Return true if something was mdofied. */
+ bool editAttribute(const QString& attrName, const QString& attrValue);
+ /** Delete the attribute attrName */
+ void deleteAttribute(const QString& attrName);
+ /** Returns the quotation status of the attribute */
+ bool isQuotedAttribute(int index) const {return attrs[index].quoted;}
+ /** Check if this tag has the attr attribute defined */
+ bool hasAttribute(const QString &attr, bool ignoreCase = false);
+ /** set the coordinates of a tag attribute */
+ void setAttributePosition(int index, int bLineName, int bColName, int bLineValue, int bColValue);
+ /** Set the coordinates of tag inside the document */
+ void setTagPosition(int bLine, int bCol, int eLine, int eCol);
+ /** Set the coordinates of tag inside the document, but using an AreaStruct as argument */
+ void setTagPosition(const AreaStruct &area);
+ /** Where the tag begins in the document */
+ void beginPos(int &bLine, int &bCol) const {bLine = m_area.bLine; bCol = m_area.bCol;}
+ /** Where the tag ends in the document */
+ void endPos(int &eLine, int &eCol) const {eLine = m_area.eLine; eCol = m_area.eCol;}
+ /** Return the tag area */
+ AreaStruct area() const {return m_area;}
+ /** Where the attr at index begins in the document */
+ void attributeNamePos(int index, int &line, int &col);
+ /** Where the attr value at index begins in the document */
+ void attributeValuePos(int index, int &line, int &col);
+ /** Set the internal string which is parsed */
+ void setStr(const QString &p_tagStr);
+ /** Get the tag in string format */
+ QString tagStr() const {return m_tagStr;};
+ /** Get the document where the tag lies */
+ Document *write() {return m_write;}
+ /** Set the document where the tag lies */
+ void setWrite(Document *p_write) {m_write = p_write;}
+ /** Returns the index of attribute at (line,col). */
+ int attributeIndexAtPos(int line, int col);
+ /** Returns the index of attributevalue at (line,col). */
+ int valueIndexAtPos(int line, int col);
+ /** Return the index of attr. */
+ int attributeIndex(const QString &attr);
+
+ void namePos(int &line, int &col);
+ int attrCount() const {return attrs.count();}
+ /** modify the attributes of tag according to the attrDict*/
+ void modifyAttributes(QDict<QString> *attrDict);
+ /** returns the tag as a string */
+ QString toString();
+ /** returns true if the tag is a closing tag (name or namespace starts with "/") */
+ bool isClosingTag();
+ /** Sets the special flag of attribute at index*/
+ void setAttributeSpecial(int index, bool special);
+
+ int size();
+ const DTDStruct* dtd() {return m_dtd;}
+ void setDtd(const DTDStruct *dtd);
+
+ enum TokenType {
+ Unknown = 0,
+ XmlTag, //1 Represent a Tag e.g. <tag>, <tag />
+ XmlTagEnd, //2 Represent a closing tag e.g. <tag/>
+ Text, //3 Represent a portion of text. There can't be two adjacent Texts.
+ Comment, //4 Represent a XML comment : "<!--", "-->" is a XmlTagEnd (not sure, please correct).
+ CSS, //5
+ ScriptTag, //6 Represent a Script e.g. "<?php", "?>" is a XmlTagEnd (not sure, please correct).
+ ScriptStructureBegin, //7
+ ScriptStructureEnd, //8
+ LocalVariable, //9
+ GlobalVariable, //10
+ NeedsParsing = 500,
+ Empty, //501
+ Skip = 1000 }; // types of token
+
+ //TODO: write setting/retrieving methods for the below attributes, and add
+ //them the m_ prefix
+ QString name;
+ QString nameSpace;
+ QString cleanStr;
+ int type; //one of the TokenType
+ bool single; // tags like <tag />
+ bool closingMissing; //closing tag is optional and missing
+ QString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">)
+ bool validXMLTag; //false if the closing ">" was not found
+
+ bool cleanStrBuilt() {return m_cleanStrBuilt;}
+ void setCleanStrBuilt(bool cleanStrBuilt) {m_cleanStrBuilt = cleanStrBuilt;}
+ bool indentationDone() {return m_indentationDone;}
+ void setIndentationDone(bool indentationDone) {m_indentationDone = indentationDone;}
+ bool notInTree() {return m_notInTree;}
+ void setNotInTree(bool notInTree) {m_notInTree = notInTree;}
+
+private:
+ //specifies if we need to build the clean tag string from the attrs
+ // or the text without entities. This "clean" string will be inserted in the source view.
+ // if true, the markup is already generated.
+ // if false, it is not, we need to generate it.
+ bool m_cleanStrBuilt;
+
+ //Specify if the indentation has been applied to this Node : added spaces to text and empty Nodes,
+ // added empty Node around for other Node.
+ bool m_indentationDone;
+
+ // specifies if this tag is just conencted to a DOM::Node but isn't part of the Node tree.
+ bool m_notInTree;
+
+
+ void init();
+ /** Verifies if the last char from @param str is inside a script area or not */
+ bool isInsideScript(const QString& str);
+
+ AreaStruct m_area; //where the tag is in the doc
+ int m_nameLine;//where the tag name begins
+ int m_nameCol;
+ const DTDStruct* m_dtd; //the tag belongs to this DTD
+
+ QValueList<TagAttr> attrs; //attributes in a tag
+ QString m_tagStr; //the tag in string format (as it is in the document)
+ Document *m_write; //the document
+};
+
+
+#endif
diff --git a/quanta/parts/Makefile.am b/quanta/parts/Makefile.am
new file mode 100644
index 00000000..7bd9336f
--- /dev/null
+++ b/quanta/parts/Makefile.am
@@ -0,0 +1,8 @@
+#This line is required for KDevelop
+#kdevelop: KAFKA_SUBDIR=kafka
+
+if BUILD_WYSIWYG
+ KAFKA_SUBDIR=kafka
+endif
+SUBDIRS = preview $(KAFKA_SUBDIR)
+
diff --git a/quanta/parts/kafka/ChangeLog b/quanta/parts/kafka/ChangeLog
new file mode 100644
index 00000000..98727e7b
--- /dev/null
+++ b/quanta/parts/kafka/ChangeLog
@@ -0,0 +1,25 @@
+2003-03-15 Nicolas Deschildre <nicolasdchd@ifrance.com>
+ * kafkaHTMLPart moved to Quanta
+
+2003-03-15 Nicolas Deschildre <nicolasdchd@ifrance.com>
+ * kafkahtmlpart [h|cpp] : added delete support, up/down navigation,
+ cursor now always visible, improved backspace
+ * added domtreeview [h|cpp] : for debugging purposes
+
+2003-02-15 Nicolas Deschildre <nicolasdchd@ifrance.com>
+ * kafkahtmlpart [cpp] : added backspace support
+
+2003-02-14 Nicolas Deschildre <nicolasdchd@ifrance.com>
+ * kafkahtmlpart [h|cpp] : added half cursor, text insertion support, and
+ left/right navigation
+
+2001-12-21 Joseph Wenninger <jowenn@kde.org>
+ * kafkapropertyeditor.[h|cpp} : the editor allows now painting of custom cells
+
+2001-12-21 Joseph Wenninger <jowenn@kde.org>
+ * kafkapropertyeditor.[h|cpp] : second example plugin implementation TextLine
+ access functions implemented
+
+2001-12-20 Joseph Wenninger <jowenn@kde.org>
+ * added test subdirectory :for test of the library
+ * added kafkapropertyeditor.[h|cpp] :not useful (means not really working), just a preview)
diff --git a/quanta/parts/kafka/DESIGN b/quanta/parts/kafka/DESIGN
new file mode 100644
index 00000000..d983309f
--- /dev/null
+++ b/quanta/parts/kafka/DESIGN
@@ -0,0 +1,131 @@
+17/02/2004
+
+This file is intented to provide some informations about the internal design of VPL as well as all its oddities ;-)
+
+Summary:
+1- A bit of history.
+2- Some definitions.
+3- A quick overview of the Quanta/KHTML stuff interacting with VPL.
+4- Basic design and interaction with Quanta.
+5- VPL Classes
+6- Synchronizations
+7- TODO
+
+If you find an error (shouldn't be so hard ;-), could you report me please?
+
+1) History
+In early 2003, I was looking for a good HTML WYSIWYG editor, and I didn't find what I wanted! So I decided to code one. After a quick search, I've found a dead project, Kafka, in kdenonbeta, which was supposed to become an full-featured WYSIWYG editor based on khtml. But at this time (2000-2001 I think) khtml wasn't ready. So it was abandonned.
+Meanwhile khtml have been greatly improved, partially thanks to the Apple Safari merging. Then I started to hack kafka a bit, adding basic cursor navigation, insertion/deletion, and so on... But I quickly realised that it would be too hard and too long for me alone to come to a decent editor. So I was looking to join an existing project, and I choose Quanta+, basically because it was (and still is, in my humble opinion) the best HTML editor in the KDE environment.
+It seemed I came to Quanta+ exactly at the best time: they were considering to add WYSIWYG capabilities! So for now one year, I've been coded VPL during my free time, and I am not far from a stable status.
+
+
+2) Some definitions
+First let us quickly define some things in order to better understand the next parts.
+
+* XML (http://www.w3.org/XML/): Defined by the W3C (http://www.w3.org/), it is widely used as the next generation way to exchange and store data. Many file formats are based on it, e.g. OpenOffice files, Quanta's data files, and recent HTML files. Just open one of quanta .tag file to see what it looks like (quanta/data/dtep/**/**.tag).
+
+* SGML (more infos here: http://www.w3.org/MarkUp/SGML/): The ancestor of XML, is less strict, but looks like XML. The old HTML file formats are based on him.
+
+* DTD : Document Type Definition, define how a XML file should look like e.g. which elements are allowed in one. For example when we speak of HTML, we usually speak of the HTML DTD, which tells us what elements exists (A/IMG/TABLE/...) and how to use them (TBODY inside TABLE,...).
+
+* HTML (http://www.w3.org/MarkUp/): Hey, we all know what it is!! Yep, but for some people (/me looking at myself one year ago), it only exists one sort of HTML. In fact, the current version of HTML is 4.01, and it exists three versions of HTML DTD: HTML transitional, HTML strict and HTML frameset. HTML transitional includes all the elements plus the deprecated ones, HTML strict includes all the elements minus the deprecated ones and the HTML frameset includes all the elements necessary to build some frames. These HTML DTDs are using SGML, that is why there are not recommended. Instead the following DTDs are recommended:
+
+* XHTML (http://www.w3.org/TR/xhtml1/): We have the XHTML 1.0 Transitional/Strict/Frameset DTDs which are basically the same thing that the HTML Transitional/Strict/Frameset DTDs but it is using XML. And finally we have XHTML 1.1, and the upcoming XHTML 2.0.
+
+* CSS (http://www.w3.org/Style/CSS/): It is a way to add style (e.g. fonts, color,...) to a web page. It was created in order to separate the contents (the information) from the style.
+
+* DOM (http://www.w3.org/DOM/) is a sort of "treeview" of a XML/SGML file. E.g. <html><body>text<img href="boo"> </body></html> has for DOM representation:
+HTML
+ *-- BODY
+ *-- #text (text)
+ *-- IMG
+ *-- attribute (name:href, value:boo)
+
+* DTEP : (stands for Document Type Editing Package) It is Quanta's way to store the DTD information (and also includes supplemental elements like toolbars and more - see the .tag files in quanta/data/dtep). Why not use the DTD file directly? Because it doesn't contains all we want (no descriptions) and are written in a very odd way (just take a look... You will get sick soon :)
+
+
+
+3) A quick overview of the Quanta/KHTML stuff interacting with VPL.
+First, the most important thing: the parser. Defined in the quanta/parser/ directory, it is composed of the Node class, the Tag class, the Parser class and the QTag class. The parser reads and parses (Parser::parse) or rebuilds from an already parsed document (Parser::rebuild) a Node Tree, which is basically a DOM like representation of the document, but even closing Tags and empty text are represented (as well as server side scripting elements like PHP.) In fact, everything is put in the tree so that we can get back the original SGML/XML file from the tree. From now, I call it the Node tree. For example <html><body>text<img href="boo"> </body></html> has for Node tree:
+HTML
+ *-- BODY
+ *-- #text (text)
+ *-- IMG (attr1 name:href, value:boo)
+ *-- Empty text ( )
+ *-- /BODY
+/HTML
+The Node class handle the pointers to the parent, next, previous and first child Node. *Each* Node has a valid pointer to a Tag. The Tag takes care to remember all the information concerning the Tag itself, like the attributes, the type, etc...)
+One QTag per Element is created from the .tag files when Quanta is started. Each QTag contains all the DTD information about the Tag. E.g. the "IMG" Qtag says that it is a single Tag, and what are its attributes. You can get a QTag with QuantaCommon::tagFromDTD, but don't delete the QTag!
+
+Now to khtml. The class KHTMLPart is the HTML renderer widget of konqueror. It internally works with a Node Tree (another? Yep!) but these Nodes are real DOM::Nodes. (From now, I will call it the DOM::Node tree) Each of the DOM Nodes is khtml-internally linked to a rendering Node i.e. a change made to one DOM::Node will update the HTML rendering cf /path/to/kde/include/dom/*.h and also in the kdelibs cvs module, cf the nice kdelibs/khtml/DESIGN.html. WARNING about DOM::Nodes, they are just interfaces!!
+
+
+
+4) Basic design and interaction with Quanta.
+Now we will enter VPL itself. VPL stands for Visual Page Layout, but you may as well call it WYSIWYG (What you See Is What You Get). (Eric's note: Except of course that HTML only suggests layout as opposed to a desktop publishing program unless you use absolute CSS very carefully. So WYSIWYG really is a ficticious misnomer with HTML.) ;-)
+First have in mind that when editing a HTML file in Quanta, the Node Tree is always up to date. Loading a new file/switching tabs calls Parser::parse, and typing a letter calls Parser::rebuild. Then we can see the VPL design as this:
+
+Source (XML file) <=> Node tree <=> DOM::Node tree.
+
+Then when a change is made to the source file, Parser::rebuild is called and synchronize (not really, we will see this later) the corresponding DOM::Node. In the opposite, when a DOM::Node is modified, the corresponding Node is synchronized, and the source file is modified. Of course, it is a little more complicated, but let's see this later.
+
+
+5) VPL classes.
+VPL has several classes, but note sometimes it is not really object oriented, but I will clean up soon.
+
+* KafkaWidget(kafkahtmlpart.[h|cpp]): Derived from KHTMLPart, it uses the caret mode implemented by Leo Savernik in khtml (that means we don't have to care about cursor navigation). It handles every keypress in order to edit the widget (backspace/delete/return/<insertion of a letter>) and modify only the DOM::Node tree (not the Node tree).
+
+* KafkaDocument(wkafkapart.[h|cpp]): It takes care to load the DOM::Node tree from the Node tree, and when a change is made to the DOM::Node tree, it apply it in the Node tree. It basically takes care of the synchronization of the trees.
+
+* kafkaCommon(kafkacommon.[h|cpp]): A lot of useful functions, some need to be moved... Everything for Node modification, Node tree modification, DOM::Node tree, DOM::Node modification is here.
+
+* undoRedo(undoredo.[h|cpp]): Not functional yet, but it is intended to provide undo/redo functionality to both VPL and Quanta. But you are invited to use its structures. See section ? for more informations.
+
+* kNodeAttrs(nodeproperties.[h|cpp]): We can easily put a link to a DOM::Node from a Node in the Node class, but the opposite is impossible (we can't derive them). So we have a link DOM::Node => kNodeAttrs => Node (thanks to a QPtrDict). And we also have some informations about the way to handle this node when editing VPL. (Be careful, one Node can be linked against several Nodes. See after.)
+
+* NodeEnhancer(nodeenhancer.[h|cpp]): It is an interface class. Its aim it to "transform" or "enhance" DOM::Nodes when DOM::Nodes are synchronized from Nodes. Sometimes it is to add some style (e.g. adding a red dotted border to FORM elements) but sometimes it is essential (e.g. KHTML won't accept a TABLE without a TBODY even if it is DTD valid, so we had to manually add a TBODY. It explain why some Nodes can point to more than 1 Nodes.)
+
+* HTMLEnhancer(htmlenhancer.[h|cpp]): Derived from NodeEnhancer, it apply transformations for HTML files.
+
+* htmlDocumentProperties(htmldocumentproperties.[h|cpp]): A simple quick start dialog, which needs some work.
+
+
+6) Synchronizations
+So basically, we have the following design:
+In whatever views, changes are made. These changes are directly applied to the Node tree. But we will wait xxx ms before an update of the opposite view (configurable).
+In fact, it will *reload* the opposite view. Since the beginning, I wanted to update only the modified Nodes (UndoRedo's job) but I did some bad work and almost everything is commented now.
+
+So we are coming back to UndoRedo. Even if it is still not working, we should use it. You may have noticed that every function which modifies the Node tree has a strange parameter, a NodeModifsSet.
+In fact, when you start modifying the Node tree, everything must be recorded. It has two aims:
+* To provide undo/redo capabilities.
+* To know which Nodes have been modified and thus when synchronizing a view from another, to update only the modified Nodes.
+
+Finally an important boolean which needs to be mentioned: Tag::cleanStrBuilt
+This boolean specifies if the string stored in Tag::tagStr() is valid. In fact, when a change is made to a DOM::Node and a Node is being modified, only its members are modified (the attrs, the name, the type), but the tag string is not rebuilt (to save some CPU).
+When reloading the source view, every tag with the Tag::cleanStrBuilt set to false has its string rebuilt.
+For text Nodes, if:
+Tag::cleanStrBuilt == false, the text contains no entities e.g. "boo a" as seen in the VPL view.
+Tag::cleanStrBuilt == true, the text is parsed e.g. "boo &nbsp;a" as seen in the source view.
+
+Question: Why not (internally) directly modify the source view in dialogs (e.g. reading and modifying the HTML markup)?
+Answer: Because it will limit this dialog to the source view only! When editing the document in whatever view: VPL, source but also others like the node treeview we have at the upper left, the only thing always in synchronization is the Node tree!! A change made in the source calls Parser::rebuild, a change in VPL update the Node tree.
+So a dialog working on Nodes is nicer, because it will update the Node tree, and each view will be able to update itself from the Node Tree. For the moment, the only dialog working this way is the Document Properties Dialog. The Table editor dialog, for example, doesn't work in VPL because it is based on the source view.
+
+Question: But when a change is made in VPL, why not directly updating the source?
+Answer: Because we will end up with a very unresponsive VPL! Updating two Nodes tree and a source view require a bit of CPU!
+
+7)TODO
+* Implement some missing things: copy/paste, bad cursor behaviour,...
+* Port the quanta dialogs (table editor,...) so that they can work in VPL
+* Make VPL a KPart
+* Make undo/redo works
+* Put a error system
+* Make VPL works for non-HTML DTDs!
+* Visual PHP edition (??)
+* Complete this file ;-)
+
+You can tell me what needs to be more explained!
+
+HAPPY HACKING!
+
+Nicolas Deschildre
diff --git a/quanta/parts/kafka/Makefile.am b/quanta/parts/kafka/Makefile.am
new file mode 100644
index 00000000..3b300dcb
--- /dev/null
+++ b/quanta/parts/kafka/Makefile.am
@@ -0,0 +1,25 @@
+SUBDIRS = . pics
+
+KDE_CXXFLAGS = $(USE_EXCEPTIONS)
+noinst_LTLIBRARIES = libkafkalibrary.la
+
+libkafkalibrary_la_SOURCES = htmlenhancer.cpp domtreeview.cpp kafkacommon.cpp \
+ kafkahtmlpart.cpp nodeproperties.cpp wkafkapart.cpp undoredo.cpp kafkasyncoptionsui.ui \
+ htmldocumentpropertiesui.ui kafkasyncoptions.cpp htmldocumentproperties.cpp cursors.cpp \
+ kafkadragobject.cpp
+
+libkafkalibrary_la_METASOURCES = AUTO
+libkafkalibrary_la_LDFLAGS = $(all_libraries)
+libkafkalibrary_la_LIBADD = $(LIB_KHTML)
+
+kafkapartdir = $(kde_datadir)/kafkapart
+kafkapart_DATA = entities
+
+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)/quanta/treeviews \
+ -I$(top_srcdir)/lib \
+ $(all_includes)
+noinst_HEADERS = kafkadragobject.h
diff --git a/quanta/parts/kafka/configure.in.in b/quanta/parts/kafka/configure.in.in
new file mode 100644
index 00000000..967fc332
--- /dev/null
+++ b/quanta/parts/kafka/configure.in.in
@@ -0,0 +1,42 @@
+build_vpl="yes"
+
+#build_vpl="no"
+AC_DEFUN([QUANTA_CHECK_VPL],
+[
+ AC_MSG_CHECKING(whether VPL can be compiled)
+ AC_CACHE_VAL(ac_cv_vpl_setup,
+ [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$KDE_INCLUDES $QT_INCLUDES"
+
+ AC_TRY_LINK([
+ #include <kdeversion.h>
+ ],
+ [
+ #if KDE_VERSION < ((3<<16) | (1<<8) | (90))
+ KDE_choke me
+ #endif
+ ],
+ ac_cv_vpl_setup=yes,
+ ac_cv_vpl_setup=no
+ )
+ CXXFLAGS="$save_CXXFLAGS"
+ AC_LANG_RESTORE
+ ])
+
+ if test "$ac_cv_vpl_setup" = "yes"; then
+ build_vpl="yes"
+ CXXFLAGS="$CXXFLAGS -DBUILD_KAFKAPART"
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+])
+
+#QUANTA_CHECK_VPL
+
+AM_CONDITIONAL(BUILD_WYSIWYG, test "$build_vpl" = "yes")
+
diff --git a/quanta/parts/kafka/cursors.cpp b/quanta/parts/kafka/cursors.cpp
new file mode 100644
index 00000000..c70d6f78
--- /dev/null
+++ b/quanta/parts/kafka/cursors.cpp
@@ -0,0 +1,103 @@
+/***************************************************************************
+ cursor.cpp
+ -------------------
+
+ copyright : (C) 2004 - Nicolas Deschildre
+ email : ndeschildre@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 "wkafkapart.h"
+#include "kafkacommon.h"
+#include "viewmanager.h"
+
+#include "cursors.h"
+
+
+NodeSelectionInd::NodeSelectionInd()
+ : m_cursorOffset(-1), m_cursorOffsetEndSel(-1), m_cursorAtSelectionStart(true)
+{
+}
+
+NodeSelectionInd::NodeSelectionInd(Node* cursor_node, int cursor_offset)
+ : m_cursorOffset(cursor_offset), m_cursorOffsetEndSel(-1), m_cursorAtSelectionStart(true)
+{
+ setCursorNode(kafkaCommon::getLocation(cursor_node));
+}
+
+NodeSelectionInd::NodeSelectionInd(Node* start_node, int start_offset, Node* end_node, int end_offset)
+ : m_cursorOffset(end_offset), m_cursorOffsetEndSel(end_offset), m_cursorAtSelectionStart(false)
+{
+ setCursorNode(kafkaCommon::getLocation(start_node));
+ setCursorOffset(start_offset);
+ setCursorNodeEndSel(kafkaCommon::getLocation(end_node));
+ setCursorOffsetEndSel(end_offset);
+}
+
+NodeSelectionInd::~NodeSelectionInd()
+{
+}
+
+bool NodeSelectionInd::operator==(const NodeSelectionInd & nodeSelection)
+{
+ return (m_cursorNode == nodeSelection.m_cursorNode && m_cursorNodeEndSel == nodeSelection.m_cursorNodeEndSel &&
+ m_cursorOffset == nodeSelection.m_cursorOffset && m_cursorOffsetEndSel == nodeSelection.m_cursorOffsetEndSel &&
+ m_cursorAtSelectionStart == nodeSelection.m_cursorAtSelectionStart);
+}
+
+void NodeSelectionInd::operator=(const NodeSelectionInd & nodeSelection)
+{
+ m_cursorNode = nodeSelection.m_cursorNode;
+ m_cursorNodeEndSel = nodeSelection.m_cursorNodeEndSel;
+ m_cursorOffset = nodeSelection.m_cursorOffset;
+ m_cursorOffsetEndSel = nodeSelection.m_cursorOffsetEndSel;
+ m_cursorAtSelectionStart = nodeSelection.m_cursorAtSelectionStart;
+}
+
+void NodeSelectionInd::fillWithVPLCursorSelection()
+{
+ KafkaDocument *kafkaDoc;
+ DOM::Node domNode, domNodeEndSel;
+ long domOffset, domOffsetEndSel;
+ Node *node = 0L;
+ Node *nodeEndSel = 0L;
+ long offset, offsetEndSel;
+
+ kafkaDoc = KafkaDocument::ref();
+ kafkaDoc->getKafkaWidget()->getCurrentNode(domNode, domOffset);
+ kafkaDoc->translateKafkaIntoNodeCursorPosition(domNode, domOffset, &node, offset);
+ m_cursorNode = kafkaCommon::getLocation(node);
+ m_cursorOffset = offset;
+
+ if(kafkaDoc->getKafkaWidget()->hasSelection())
+ {
+ kafkaDoc->getKafkaWidget()->selection(domNode, domOffset, domNodeEndSel, domOffsetEndSel);
+ KafkaDocument::ref()->translateKafkaIntoNodeCursorPosition(domNodeEndSel, domOffsetEndSel,
+ &nodeEndSel, offsetEndSel);
+ m_cursorNodeEndSel = kafkaCommon::getLocation(nodeEndSel);
+ m_cursorOffsetEndSel = offsetEndSel;
+
+ m_cursorAtSelectionStart = !(m_cursorOffsetEndSel == m_cursorOffset && m_cursorNodeEndSel == m_cursorNode);
+
+ if(!m_cursorAtSelectionStart)
+ {
+ KafkaDocument::ref()->translateKafkaIntoNodeCursorPosition(domNode, domOffset, &node, offset);
+ m_cursorNode = kafkaCommon::getLocation(node);
+ m_cursorOffset = offset;
+ }
+ }
+}
+
+bool NodeSelectionInd::hasSelection() const
+{
+ return KafkaDocument::ref()->getKafkaWidget()->hasSelection();
+}
diff --git a/quanta/parts/kafka/cursors.h b/quanta/parts/kafka/cursors.h
new file mode 100644
index 00000000..22eea7b1
--- /dev/null
+++ b/quanta/parts/kafka/cursors.h
@@ -0,0 +1,150 @@
+/***************************************************************************
+ cursor.h
+ -------------------
+
+ copyright : (C) 2004 - Nicolas Deschildre
+ email : ndeschildre@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 CURSORS_H
+ #define CURSORS_H
+
+ /**
+ * This represents a Node selection : StartNode and StartOffset, endNode and endOffset.
+ * IT can also only hold the cursor. If so, cursorNodeEndSel() will be empty.
+ * TODO: selection support
+ */
+ class NodeSelection
+ {
+ public:
+ NodeSelection(Node* node = 0L, int offset = 0){m_cursorNode = node; m_cursorOffset = offset;}
+ ~NodeSelection(){}
+
+ /**
+ * @return Return the Node when the selection start (and where the cursor is if
+ * m_cursorAtSelectionStart).
+ */
+ Node* cursorNode(){return m_cursorNode;}
+ void setCursorNode(Node* node){m_cursorNode = node;}
+
+ /**
+ * @return Returns the offset of the cursor where the selection begin (and where the cursor is if
+ * m_cursorAtSelectionStart)
+ */
+ int cursorOffset(){return m_cursorOffset;}
+ void setCursorOffset(int offset){m_cursorOffset = offset;}
+
+ private:
+ Node* m_cursorNode, *m_cursorNodeEndSel;
+ int m_cursorOffset, m_cursorOffsetEndSel;
+ bool m_cursorAtSelectionStart;
+ };
+
+ /**
+ * This represents a Node selection : startNode and startOffset, endNode and endOffset.
+ * The difference with NodeSelection is that it don't store the Node address of startNode
+ * and endNode, but it store the Node position of the Node tree e.g. it is the first child
+ * of the second child of the rootNode...
+ * It can also only hold the cursor. If so, cursorNodeEndSel() will be empty.
+ */
+class NodeSelectionInd
+{
+public:
+ NodeSelectionInd();
+ NodeSelectionInd(Node* cursor_node, int cursor_offset);
+ NodeSelectionInd(Node* start_node, int start_offset, Node* end_node, int end_offset);
+ ~NodeSelectionInd();
+
+ /**
+ * Compare nodeselection to the current instance.
+ */
+ bool operator==(const NodeSelectionInd & nodeSelection);
+
+ void operator=(const NodeSelectionInd & nodeSelection);
+
+ /**
+ * Take the current VPL cursor selection coordinates, if not speficied otherwise, translate
+ * them into Node cursor coordinates and store them.
+ */
+ void fillWithVPLCursorSelection();
+
+ bool hasSelection() const;
+
+ /**---------------------------------- GET/SET --------------------------------------------*/
+
+ /**
+ * @return Returns the location of the Node where the selection begin (and where the cursor is if
+ * m_cursorAtSelectionStart).
+ */
+ QValueList<int>& cursorNode() {return m_cursorNode;}
+
+ /**
+ * @param cursorNode Set the location of the Node where the selection begin (and where the cursor is if
+ * m_cursorAtSelectionStart)
+ */
+ void setCursorNode(QValueList<int> cursorNode) {m_cursorNode = cursorNode;}
+
+ /**
+ * @return Returns the offset of the cursor where the selection begin (and where the cursor is if
+ * m_cursorAtSelectionStart)
+ */
+ int cursorOffset() {return m_cursorOffset;}
+
+ /**
+ * @param cursorOffset Set the offset of the cursor where the selection begin (and where the cursor is if
+ * m_cursorAtSelectionStart)
+ */
+ void setCursorOffset(int cursorOffset) {m_cursorOffset = cursorOffset;}
+
+ /**
+ * @return Returns true if the cursor is at the beginning of the selection. Otherwise, it is
+ * at the end of the selection.
+ */
+ bool cursorAtSelectionStart() {return m_cursorAtSelectionStart;}
+
+ /**
+ * @param cursorAtSelectionStart Set if the cursor is at the beginning of the selection.
+ */
+ void setCursorAtSelectionStart(bool cursorAtSelectionStart) {m_cursorAtSelectionStart = cursorAtSelectionStart;}
+
+ /**
+ * @return Returns the location of the end selection Node where the
+ * selection ends.
+ * Empty if this instance only carry the cursor coordinates.
+ */
+ QValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
+
+ /**
+ * @param cursorNodeEndSel Set the location of the end selection Node where the
+ * selection ends.
+ */
+ void setCursorNodeEndSel(QValueList<int> cursorNodeEndSel)
+ {m_cursorNodeEndSel = cursorNodeEndSel;}
+
+ /**
+ * @return Returns the offset of the cursor in the Node of the end of the selection.
+ */
+ int cursorOffsetEndSel() {return m_cursorOffsetEndSel;}
+
+ /**
+ * @param cursorOffsetEndSel Set the offset of the cursor in the Node of the end of the selection
+ */
+ void setCursorOffsetEndSel(int cursorOffsetEndSel)
+ {m_cursorOffsetEndSel = cursorOffsetEndSel;}
+
+private:
+ QValueList<int> m_cursorNode, m_cursorNodeEndSel;
+ int m_cursorOffset, m_cursorOffsetEndSel;
+ bool m_cursorAtSelectionStart;
+};
+
+#endif
diff --git a/quanta/parts/kafka/domtreeview.cpp b/quanta/parts/kafka/domtreeview.cpp
new file mode 100644
index 00000000..14fe17d2
--- /dev/null
+++ b/quanta/parts/kafka/domtreeview.cpp
@@ -0,0 +1,157 @@
+/***************************************************************************
+ domtreeview.cpp
+ -------------------
+
+ copyright : (C) 2001 - The Kafka Team
+ email : kde-kafka@master.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. *
+ * *
+ ***************************************************************************/
+
+#include "kafkacommon.h"
+#ifdef HEAVY_DEBUG
+
+#include <kdebug.h>
+#include <khtml_part.h>
+#include <klocale.h>
+#include <qstring.h>
+#include <qlayout.h>
+#include <dom/dom_text.h>
+
+#include "domtreeview.moc"
+
+DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
+{
+ setCaption(name);
+ setRootIsDecorated(true);
+ addColumn(i18n( "Name" ));
+ addColumn(i18n( "Value (limited to 20 char)" ));
+ addColumn(i18n( "Length" ));
+ addColumn(i18n( "ID" ));
+ addColumn("");
+ setSorting(-1);
+ part = currentpart;
+ connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
+ connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
+ m_nodedict.setAutoDelete(true);
+ title = "";
+ titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+}
+
+DOMTreeView::~DOMTreeView()
+{
+ disconnect(part);
+}
+
+void DOMTreeView::setTitle(const QString &str)
+{
+ title = str;
+ titleItem->setText(1, title);
+}
+
+void DOMTreeView::showTree(const DOM::Node &pNode)
+{
+
+// if(pNode.isNull() || document != pNode.ownerDocument())
+// {
+ clear();
+ m_itemdict.clear();
+ m_nodedict.clear();
+ if(pNode.isNull())
+ return;
+ if(pNode.firstChild() == 0)
+ return;
+ else if(pNode.ownerDocument().isNull())
+ {
+ document = pNode.ownerDocument();
+ recursive(0, pNode);
+ }
+ else
+ {
+ document = pNode.ownerDocument();
+ recursive(0, pNode.ownerDocument());
+ }
+ titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+// }
+ setCurrentItem(m_itemdict[pNode.handle()]);
+ ensureItemVisible(m_itemdict[pNode.handle()]);
+}
+
+void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
+{
+ QListViewItem *cur_item;
+ int len;
+ if(pNode.ownerDocument() != document)
+ {
+ QString val = node.nodeValue().string();
+ if ( val.length() > 20 )
+ val.truncate( 20 );
+ cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), val);
+ document = pNode.ownerDocument();
+ }
+ else {
+ QString val = node.nodeValue().string();
+ if ( val.length() > 20 )
+ val.truncate( 20 );
+ if(node.nodeType() == DOM::Node::TEXT_NODE)
+ len = (static_cast<DOM::CharacterData>(node)).length();
+ else
+ len = 0;
+ cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, QString::number(len), QString::number(node.elementId()) );
+ unsigned long i;
+ QListViewItem *tmp = new QListViewItem(cur_item, "properties");
+ for(i = 0; i < node.attributes().length(); i++)
+ {
+ new QListViewItem(tmp, node.attributes().item(i).nodeName().string(),
+ node.attributes().item(i).nodeValue().string());
+ }
+ }
+
+ if(node.handle())
+ {
+ m_itemdict.insert(node.handle(), cur_item);
+ m_nodedict.insert(cur_item, new DOM::Node(node));
+ }
+
+ DOM::Node cur_child = node.lastChild();
+ while(!cur_child.isNull())
+ {
+ recursive(node, cur_child);
+ cur_child = cur_child.previousSibling();
+ }
+}
+
+void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
+{
+ DOM::Node *handle = m_nodedict[cur_item];
+ if(handle) {
+ emit part->setActiveNode(*handle);
+ //kdDebug() << handle->toHTML() << endl;
+ }
+}
+
+KafkaDOMTreeDialog::KafkaDOMTreeDialog(QWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
+ : QDialog(parent, name, modal, fl)
+{
+ setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ DialogLayout = new QGridLayout( this, 1, 1, 11, 6, "DialogLayout");
+ domview = new DOMTreeView(this, part, name);
+ domview->setTitle(i18n( "Debugging KafkaWidget DOM Tree " ));
+ DialogLayout->addWidget(domview, 1,1);
+
+}
+
+KafkaDOMTreeDialog::~KafkaDOMTreeDialog()
+{
+
+}
+
+#endif
+
diff --git a/quanta/parts/kafka/domtreeview.h b/quanta/parts/kafka/domtreeview.h
new file mode 100644
index 00000000..4e2a560f
--- /dev/null
+++ b/quanta/parts/kafka/domtreeview.h
@@ -0,0 +1,77 @@
+/***************************************************************************
+ domtreeview.cpp
+ -------------------
+
+ copyright : (C) 2001 - The Kafka Team
+ email : kde-kafka@master.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 DOMTREEVIEW_H
+#define DOMTREEVIEW_H
+
+#include "kafkacommon.h"
+
+#ifdef HEAVY_DEBUG
+#include <klistview.h>
+#include <kdebug.h>
+#include <qlistview.h>
+#include <qptrdict.h>
+#include <dom/dom_core.h>
+#include <qdialog.h>
+
+class QString;
+class QGridLayout;
+
+/**
+ * This class is very useful to see the DOM tree in a KListView
+ */
+
+class DOMTreeView : public KListView
+{
+ Q_OBJECT
+ public:
+ DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
+ ~DOMTreeView();
+ void setTitle(const QString &str);
+ void recursive(const DOM::Node &pNode, const DOM::Node &node);
+
+ signals:
+ void sigNodeClicked(const DOM::Node &);
+
+ public slots:
+ void showTree(const DOM::Node &pNode);
+
+ protected slots:
+ void slotItemClicked(QListViewItem *);
+
+ private:
+ QString title;
+ QListViewItem *titleItem;
+ QPtrDict<QListViewItem> m_itemdict;
+ QPtrDict<DOM::Node> m_nodedict;
+ DOM::Node document;
+ KHTMLPart *part;
+
+};
+
+class KafkaDOMTreeDialog : public QDialog
+{
+ Q_OBJECT
+public:
+ KafkaDOMTreeDialog(QWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~KafkaDOMTreeDialog();
+ DOMTreeView *domview;
+ QGridLayout *DialogLayout;
+};
+
+#endif
+#endif
diff --git a/quanta/parts/kafka/entities b/quanta/parts/kafka/entities
new file mode 100644
index 00000000..a13cc1db
--- /dev/null
+++ b/quanta/parts/kafka/entities
@@ -0,0 +1,112 @@
+--Markup/Internationalization--
+ (&nbsp;)
+" (&quot;)
+& (&amp;)
+< (&lt;)
+> (&gt;)
+# (&#035;)
+$ (&#036;)
+% (&#037;)
+' (&#039;)
+//Å’ (&OElig;)
+//Å“ (oelig;)
+//Å  (&Scaron;)
+//Å¡ (&scaron;)
+//Ÿ (&Yuml;)
+€ (&euro;)
+--ISO 8859-1 Character Entities--
+¡ (&iexcl;)
+¢ (&cent;)
+£ (&pound;)
+¤ (&curren;)
+Â¥ (&yen;)
+¦ (&brvbar;)
+§ (&sect;)
+¨ (&uml;)
+© (&copy;)
+ª (&ordf;)
+« (&laquo;)
+¬ (&not;)
+­ (&shy;)
+® (&reg;)
+¯ (&macr;)
+° (&deg;)
+± (&plusmn;)
+² (&sup2;)
+³ (&sup3;)
+´ (&acute;)
+µ (&micro;)
+¶ (&para;)
+· (&middot;)
+¸ (&cedil;)
+¹ (&sup1;)
+º (&ordm;)
+» (&raquo;)
+¼ (&frac14;)
+½ (&frac12;)
+¾ (&frac34;)
+¿ (&iquest;)
+À (&Agrave;)
+Ã (&Aacute;)
+Â (&Acirc;)
+Ã (&Atilde;)
+Ä (&Auml;)
+Ã… (&Aring;)
+Æ (&AElig;)
+Ç (&Ccedil;)
+È (&Egrave;)
+É (&Eacute;)
+Ê (&Ecirc;)
+Ë (&Euml;)
+Ì (&Igrave;)
+Ã (&Iacute;)
+ÃŽ (&Icirc;)
+Ã (&Iuml;)
+Ã (&ETH;)
+Ñ (&Ntilde;)
+Ã’ (&Ograve;)
+Ó (&Oacute;)
+Ô (&Ocirc;)
+Õ (&Otilde;)
+Ö (&Ouml;)
+× (&times;)
+Ø (&Oslash;)
+Ù (&Ugrave;)
+Ú (&Uacute;)
+Û (&Ucirc;)
+Ü (&Uuml;)
+Ã (&Yacute;)
+Þ (&THORN;)
+ß (&szlig;)
+à (&agrave;)
+á (&aacute;)
+â (&acirc;)
+ã (&atilde;)
+ä (&auml;)
+Ã¥ (&aring;)
+æ (&aelig;)
+ç (&ccedil;)
+è (&egrave;)
+é (&eacute;)
+ê (&ecirc;)
+ë (&euml;)
+ì (&igrave;)
+í (&iacute;)
+î (&icirc;)
+ï (&iuml;)
+ð (&eth;)
+ñ (&ntilde;)
+ò (&ograve;)
+ó (&oacute;)
+ô (&ocirc;)
+õ (&otilde;)
+ö (&ouml;)
+÷ (&divide;)
+ø (&oslash;)
+ù (&ugrave;)
+ú (&uacute;)
+û (&ucirc;)
+ü (&uuml;)
+ý (&yacute;)
+þ (&thorn;)
+//ÿ (&yuml;)
diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp
new file mode 100644
index 00000000..0099f313
--- /dev/null
+++ b/quanta/parts/kafka/htmldocumentproperties.cpp
@@ -0,0 +1,748 @@
+/***************************************************************************
+ htmldocumentproperties.cpp
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 <kiconloader.h>
+#include <klineedit.h>
+#include <klistview.h>
+#include <kpushbutton.h>
+#include <kurlrequester.h>
+#include <kurl.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kdebug.h>
+
+#include "node.h"
+#include "tag.h"
+#include "qtag.h"
+#include "resource.h"
+#include "quanta.h"
+#include "quantacommon.h"
+#include "quantaview.h"
+#include "document.h"
+#include "tagattributetree.h"
+#include "qextfileinfo.h"
+#include "kafkacommon.h"
+#include "wkafkapart.h"
+#include "undoredo.h"
+#include "cursors.h"
+#include "htmldocumentproperties.h"
+
+#include "viewmanager.h"
+
+htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
+ bool modal, WFlags fl) :
+ htmlDocumentPropertiesui(parent, name, modal, fl), titleNode( 0L ), htmlNode( 0L ),
+ headNode( 0L ), linkNode( 0L ), bodyNode( 0L), doctypeNode( 0L ), CSSNode ( 0L ),
+ xmlNode( 0L ), titleDirty(false), linkDirty(false)
+{
+ Node *node;
+ QString text, nodeName;
+ bool b;
+ int index;
+ KURL url, baseURL;
+
+ m_forceInsertionOfBasicNodes = forceInsertionOfBasicNodes;
+
+ //set the "autodefault" property
+ metaItemsAdd->setAutoDefault(false);
+ metaItemsDelete->setAutoDefault(false);
+ cssRulesAdd->setAutoDefault(false);
+ cssRulesEdit->setAutoDefault(false);
+ cssRulesDelete->setAutoDefault(false);
+ cssStylesheet->button()->setAutoDefault(false);
+ cancel->setAutoDefault(false);
+ ok->setAutoDefault(true);
+
+ //set the taborder and disable focus for some widgets.
+ currentDTD->setFocusPolicy(QWidget::NoFocus);
+ QWidget::setTabOrder(title, metaItems);
+ QWidget::setTabOrder(metaItems, metaItemsAdd);
+ QWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
+ QWidget::setTabOrder(metaItemsDelete, cssRules);
+ QWidget::setTabOrder(cssRules, cssRulesAdd);
+ QWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
+ QWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
+ QWidget::setTabOrder(cssRulesDelete, cssStylesheet);
+ QWidget::setTabOrder(cssStylesheet, ok);
+ QWidget::setTabOrder(ok, cancel);
+
+ //set the current DTD name
+ currentDTD->setText(ViewManager::ref()->activeDocument()->defaultDTD()->nickName);
+
+ //set the metaItems DualEditableTree
+ metaItems->addColumn(i18n("Name"));
+ metaItems->addColumn(i18n("Content"));
+ metaItems->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ metaItems->setLineWidth( 2 );
+ metaItems->setSorting(0, true);
+
+
+ //set the cssRules KListView
+ //cssRules->setEditable(false);
+ cssRules->addColumn(i18n("Selector"));
+ cssRules->addColumn(i18n("Rule"));
+ cssRules->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ cssRules->setLineWidth( 2 );
+ //cssRules->setFocusPolicy(QWidget::ClickFocus);
+ cssRules->setSorting(-1);
+
+ //search for the head, html, title Node
+ if(baseNode)
+ {
+ node = baseNode;
+ while(node)
+ {
+ nodeName = node->tag->name.lower();
+ if(nodeName == "?xml" || nodeName.contains("xml pi block"))
+ xmlNode = node;
+ if(nodeName == "html")
+ htmlNode = node;
+ if(nodeName == "head")
+ headNode = node;
+ if(nodeName == "body")
+ bodyNode = node;
+ if(nodeName == "!doctype" || nodeName.contains("dtd block"))
+ doctypeNode = node;
+ if(nodeName == "title")
+ titleNode = node;
+ if(nodeName == "link")
+ linkNode = node;
+ if(nodeName == "meta")
+ loadMetaNode(node);
+ if(nodeName == "style")
+ loadCSS(node);
+ node = node->next;
+ }
+ //support for old Node organization
+ if(doctypeNode)
+ {
+ node = doctypeNode->child;
+ while(node)
+ {
+ nodeName = node->tag->name.lower();
+ if(nodeName == "html")
+ htmlNode = node;
+ if(nodeName == "head")
+ headNode = node;
+ if(nodeName == "body")
+ bodyNode = node;
+ if(nodeName == "title")
+ titleNode = node;
+ if(nodeName == "link")
+ linkNode = node;
+ if(nodeName == "meta")
+ loadMetaNode(node);
+ if(nodeName == "style")
+ loadCSS(node);
+ node = node->next;
+ }
+ }
+ if(htmlNode)
+ {
+ node = htmlNode->child;
+ while(node)
+ {
+ nodeName = node->tag->name.lower();
+ if(nodeName == "head")
+ headNode = node;
+ if(nodeName == "body")
+ bodyNode = node;
+ if(nodeName == "title")
+ titleNode = node;
+ if(nodeName == "link")
+ linkNode = node;
+ if(nodeName == "meta")
+ loadMetaNode(node);
+ if(nodeName == "style")
+ loadCSS(node);
+ node = node->next;
+ }
+ }
+ if(headNode)
+ {
+ node = headNode->child;
+ while(node)
+ {
+ nodeName = node->tag->name.lower();
+ if(nodeName == "title")
+ titleNode = node;
+ if(nodeName == "link")
+ linkNode = node;
+ if(nodeName == "meta")
+ loadMetaNode(node);
+ if(nodeName == "style")
+ loadCSS(node);
+ node = node->next;
+ }
+ }
+ }
+
+ //set the current title
+ if(titleNode)
+ {
+ node = titleNode->child;
+ b = false;
+ while(node)
+ {
+ text += node->tag->tagStr();
+ node = kafkaCommon::getNextNode(node, b, titleNode);
+ }
+ title->setText(KafkaDocument::ref()->getDecodedText(text));
+ }
+
+ //set the link
+ if(linkNode)
+ {
+ index = linkNode->tag->attributeIndex("rel");
+ if(index != -1)
+ {
+ if(linkNode->tag->attributeValue(index).lower() == "stylesheet")
+ {
+ index = linkNode->tag->attributeIndex("href");
+ if(index != -1)
+ {
+ cssStylesheet->setMode(KFile::File | KFile::ExistingOnly );
+ baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory());
+ QuantaCommon::setUrl(url, linkNode->tag->attributeValue(index));
+ url = QExtFileInfo::toAbsolute(url, baseURL);
+ cssStylesheet->setURL(url.url());
+ }
+ }
+ }
+ }
+
+ ok->setIconSet(SmallIconSet("button_ok"));
+ cancel->setIconSet(SmallIconSet("button_cancel"));
+
+ //connect buttons
+ connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
+ connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
+ connect(cssRulesAdd, SIGNAL(clicked()), this, SLOT(newCSSRule()));
+ connect(cssRulesEdit, SIGNAL(clicked()), this, SLOT(editCSSRule()));
+ connect (cssRulesDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentCSSRule()));
+ connect(metaItemsAdd, SIGNAL(clicked()), this, SLOT(newMetaItem()));
+ connect(metaItemsDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentMetaItem()));
+ connect(title, SIGNAL(textChanged(const QString &)), this, SLOT(titleChanged(const QString &)));
+ connect(metaItems, SIGNAL(itemModified( QListViewItem * )),
+ this, SLOT(metaChanged(QListViewItem * )));
+ connect(cssRules, SIGNAL(itemModified( QListViewItem * )),
+ this, SLOT(CSSChanged(QListViewItem * )));
+ connect(cssStylesheet, SIGNAL(textChanged(const QString &)),
+ this, SLOT(linkChanged( const QString& )));
+}
+
+htmlDocumentProperties::~htmlDocumentProperties()
+{
+
+}
+
+void htmlDocumentProperties::loadMetaNode(Node *node)
+{
+ int index;
+ QString name, content;
+ NodeLinkedViewItem *item;
+
+ index = node->tag->attributeIndex("name");
+ if(index != -1)
+ name = node->tag->attributeValue(index);
+ index = node->tag->attributeIndex("http-equiv");
+ if(index != -1)
+ name = node->tag->attributeValue(index);
+ index = node->tag->attributeIndex("content");
+ if(index != -1)
+ content = node->tag->attributeValue(index);
+ item = new NodeLinkedViewItem(metaItems, name, content);
+ item->node = node;
+ metaList.append(item);
+
+ metaItems->sort();
+}
+
+void htmlDocumentProperties::loadCSS(Node *node)
+{
+ NodeLinkedViewItem *item;
+ QString selector;
+
+ CSSNode = node;
+ node = node->child;
+ while(node)
+ {
+ if(node->tag->type == Tag::ScriptStructureBegin)
+ {
+ selector = node->tag->tagStr();
+ selector = selector.left((uint)selector.find("{")).stripWhiteSpace();
+ if(node->child)
+ item = new NodeLinkedViewItem(cssRules, selector,
+ node->child->tag->tagStr().replace('\n'," "));
+ else
+ item = new NodeLinkedViewItem(cssRules, selector, "");
+ item->node = node;
+ item->moveItem(cssRules->lastChild());
+ CSSList.append(item);
+ }
+ node = node->next;
+ }
+}
+
+void htmlDocumentProperties::newMetaItem()
+{
+ NodeLinkedViewItem *item;
+ item = new NodeLinkedViewItem(metaItems, "", "");
+ item->node = 0L;
+ metaList.append(item);
+
+ if(metaItems->lastItem())
+ item->moveItem(metaItems->lastItem());
+}
+
+void htmlDocumentProperties::deleteCurrentMetaItem()
+{
+ if(metaItems->currentItem())
+ {
+ QListViewItem *item = metaItems->currentItem();
+ (static_cast<NodeLinkedViewItem *>(item))->deleted = true;
+ (static_cast<NodeLinkedViewItem *>(item))->dirty = true;
+ (static_cast<AttributeItem *>(item))->hideEditor(0);
+ (static_cast<AttributeItem *>(item))->hideEditor(1);
+ metaItems->takeItem(metaItems->currentItem());
+ }
+}
+
+void htmlDocumentProperties::newCSSRule()
+{
+ NodeLinkedViewItem *item;
+ item = new NodeLinkedViewItem(cssRules, "", "");
+ item->node = 0L;
+ CSSList.append(item);
+
+ if(cssRules->lastItem())
+ item->moveItem(cssRules->lastItem());
+}
+
+void htmlDocumentProperties::editCSSRule()
+{
+//Make this using the big CSS dialog, need parsing!!
+ KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."));
+}
+
+void htmlDocumentProperties::deleteCurrentCSSRule()
+{
+ if(cssRules->currentItem())
+ {
+ QListViewItem *item = cssRules->currentItem();
+ (static_cast<NodeLinkedViewItem *>(item))->deleted = true;
+ (static_cast<NodeLinkedViewItem *>(item))->dirty = true;
+ (static_cast<AttributeItem *>(item))->hideEditor(0);
+ (static_cast<AttributeItem *>(item))->hideEditor(1);
+ cssRules->takeItem(cssRules->currentItem());
+ }
+}
+
+
+void htmlDocumentProperties::titleChanged(const QString &)
+{
+ titleDirty = true;
+}
+
+void htmlDocumentProperties::metaChanged(QListViewItem * item)
+{
+ if(item)
+ (static_cast<NodeLinkedViewItem *>(item))->dirty = true;
+}
+
+void htmlDocumentProperties::CSSChanged(QListViewItem * item)
+{
+ if(item)
+ (static_cast<NodeLinkedViewItem *>(item))->dirty = true;
+}
+
+void htmlDocumentProperties::linkChanged( const QString& )
+{
+ linkDirty = true;
+}
+
+
+void htmlDocumentProperties::accept()
+{
+ Node *node, *nodeNext;
+ NodeLinkedViewItem *item;
+ TagAttr attr;
+ NodeModifsSet *modifs = new NodeModifsSet();
+ KURL url, baseURL;
+ QString finalURL;
+ NodeSelection *cursorPos;
+ bool goUp;
+ //TODO:see for !doctype
+
+ QuantaView *view = ViewManager::ref()->activeView();
+ //set the TITLE if necessary.
+ if(titleDirty)
+ {
+ if(!titleNode)
+ {
+ addBasicNodes(modifs);
+ //create title
+ titleNode = kafkaCommon::createAndInsertNode("title", "", Tag::XmlTag,
+ view->document(), headNode, 0L, 0L, modifs);
+ }
+ node = titleNode->child;
+ if(node && (node->next || node->tag->type != Tag::Text))
+ {
+ while(node)
+ {
+ nodeNext = node->next;
+ kafkaCommon::extractAndDeleteNode(node, modifs, true, false);
+ node = nodeNext;
+ }
+ }
+ if(!titleNode->child)
+ {
+ //create text!
+ node = kafkaCommon::createAndInsertNode("", title->text(),Tag::Text,
+ view->document(), titleNode, 0L, 0L, modifs);
+ }
+ else
+ titleNode->child->tag->setStr(KafkaDocument::ref()->getEncodedText(title->text()));
+ }
+
+ //set the METAs if necessary
+ if(metaItems->currentItem())
+ (static_cast<NodeLinkedViewItem *>(metaItems->currentItem()))->dirty = true;
+ item = metaList.first();
+ while(item)
+ {
+ if((static_cast<NodeLinkedViewItem *>(item))->dirty)
+ {
+ if((static_cast<NodeLinkedViewItem *>(item))->deleted)
+ {
+ if((static_cast<NodeLinkedViewItem *>(item))->node)
+ {
+ //delete the meta
+ kafkaCommon::extractAndDeleteNode(
+ (static_cast<NodeLinkedViewItem *>(item))->node, modifs);
+ }
+ }
+ else
+ {
+ if(!(static_cast<NodeLinkedViewItem *>(item))->node)
+ {
+ if(!(static_cast<AttributeItem *>(item))->editorText(0).isEmpty() ||
+ !(static_cast<AttributeItem *>(item))->editorText(1).isEmpty())
+ {
+ addBasicNodes(modifs);
+ //create the meta!!
+ node = kafkaCommon::createAndInsertNode("meta", "",Tag::XmlTag,
+ view->document(), headNode, 0L, 0L, modifs);
+ }
+ else
+ node = 0L;
+ }
+ else
+ node = (static_cast<NodeLinkedViewItem *>(item))->node;
+ if(node)
+ {
+ if(node->tag->hasAttribute("name"))
+ node->tag->editAttribute("name", (static_cast<AttributeItem *>(item))->editorText(0));
+ else
+ node->tag->editAttribute("http-equiv", (static_cast<AttributeItem *>(item))->editorText(0));
+ node->tag->editAttribute("content", (static_cast<AttributeItem *>(item))->editorText(1));
+ node->tag->setCleanStrBuilt(false);
+ }
+ }
+ }
+ item = metaList.next();
+ }
+
+ //set the CSSs rules if necessary
+ if(cssRules->currentItem())
+ (static_cast<NodeLinkedViewItem *>(cssRules->currentItem()))->dirty = true;
+ item = CSSList.first();
+ while(item)
+ {
+ if((static_cast<NodeLinkedViewItem *>(item))->dirty)
+ {
+ if((static_cast<NodeLinkedViewItem *>(item))->deleted)
+ {
+ if((static_cast<NodeLinkedViewItem *>(item))->node)
+ {
+ //Delete the CSS Node
+ node = (static_cast<NodeLinkedViewItem *>(item))->node;
+ if(node->next && node->next->tag->type == Tag::ScriptStructureEnd)
+ kafkaCommon::extractAndDeleteNode(node->next, modifs);
+ kafkaCommon::extractAndDeleteNode(node, modifs);
+ }
+ }
+ else
+ {
+ if(!(static_cast<NodeLinkedViewItem *>(item))->node)
+ {
+ if(!(static_cast<AttributeItem *>(item))->editorText(0).isEmpty() ||
+ !(static_cast<AttributeItem *>(item))->editorText(1).isEmpty())
+ {
+ addBasicNodes(modifs);
+ addBasicCssNodes(modifs);
+ //create the CSS Nodes!
+ node = kafkaCommon::createAndInsertNode(
+ (static_cast<AttributeItem *>(item))->editorText(0),
+ (static_cast<AttributeItem *>(item))->editorText(0) + "{",
+ Tag::ScriptStructureBegin, view->document(),
+ CSSNode, 0L, 0L, modifs);
+ (void)kafkaCommon::createAndInsertNode("#text", "",Tag::Text,
+ view->document(), node, 0L, 0L, modifs);
+ nodeNext = kafkaCommon::createAndInsertNode("", "}",Tag::ScriptStructureEnd,
+ view->document(), CSSNode, 0L, 0L, modifs);
+ }
+ else
+ node = 0L;
+ }
+ else
+ node = (static_cast<NodeLinkedViewItem *>(item))->node;
+ if(node && node->child)
+ {
+ node->tag->name = (static_cast<AttributeItem *>(item))->editorText(0);
+ node->tag->setStr((static_cast<AttributeItem *>(item))->editorText(0) + "{");
+ node->child->tag->setStr((static_cast<AttributeItem *>(item))->editorText(1));
+ }
+ }
+ }
+ item = CSSList.next();
+ }
+
+ //set the LINK, if necessary
+ if(linkDirty)
+ {
+ if(!linkNode)
+ {
+ //create LINK
+ addBasicNodes(modifs);
+ linkNode = kafkaCommon::createAndInsertNode("link", "",Tag::XmlTag, view->document(),
+ headNode, 0L, 0L, modifs);
+ }
+ //modify it!
+ QuantaCommon::setUrl(url, cssStylesheet->url());
+ baseURL = view->document()->url();
+ baseURL.setPath(baseURL.directory());
+ url = QExtFileInfo::toRelative(url, baseURL);
+ finalURL = url.url();
+ if (url.protocol() == view->document()->url().protocol())
+ finalURL.remove(0, url.protocol().length() + 1);
+ if(linkNode->tag->attributeValue("rel").lower() != "stylesheet")
+ linkNode->tag->editAttribute("rel", "stylesheet");
+ linkNode->tag->editAttribute("href", finalURL);
+ linkNode->tag->setCleanStrBuilt(false);
+ }
+
+ if(m_forceInsertionOfBasicNodes)
+ addBasicNodes(modifs);
+
+ //Set the cursor at the beginning of the document.
+ goUp = false;
+ node = kafkaCommon::getNextNode(bodyNode, goUp, bodyNode);
+ while(node && node->tag->type != Tag::Text)
+ node = kafkaCommon::getNextNode(node, goUp, bodyNode);
+ cursorPos = new NodeSelection();
+ cursorPos->setCursorNode(node?node:bodyNode);
+ cursorPos->setCursorOffset(0);
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, cursorPos);
+
+ delete cursorPos;
+
+ //view->reloadBothViews();
+
+ done(0);
+}
+
+void htmlDocumentProperties::reject()
+{
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ if(m_forceInsertionOfBasicNodes)
+ addBasicNodes(modifs);
+
+ ViewManager::ref()->activeDocument()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+ done(0);
+}
+
+void htmlDocumentProperties::addBasicCssNodes(NodeModifsSet *modifs)
+{
+ if(CSSNode || !htmlNode || !headNode)
+ return;
+ //TODO:quick hack, modify createAndInsertNode
+ CSSNode = kafkaCommon::createAndInsertNode("style", "", Tag::XmlTag, ViewManager::ref()->activeDocument(),
+ headNode, 0L, 0L, modifs);
+}
+
+void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
+{
+ Node *allTheNodes, *lastHeadChild, *lastBodyChild, *lastHtmlChild;
+ Node *n, *nextNode;
+ bool htmlNodeCreated = false, bodyNodeCreated = false;
+ QTag *qHead, *qBody;
+ QString tagName;
+
+ if(headNode)
+ return;
+
+ QuantaView *view = ViewManager::ref()->activeView();
+
+ if(!xmlNode && view->document()->defaultDTD()->name.contains("XHTML", false))
+ {
+ //if the xml node is not present and the current DTD is a xhtml like, create it.
+ allTheNodes = baseNode;
+ baseNode = 0L;
+ xmlNode = kafkaCommon::createXmlDeclarationNode(view->document(),
+ quantaApp->defaultEncoding());
+ nextNode = xmlNode->next;
+ xmlNode = kafkaCommon::insertNode(xmlNode, 0L, 0L, modifs);
+ kafkaCommon::insertNode(nextNode, 0L, 0L, modifs);
+ xmlNode->next->next = allTheNodes;
+ }
+
+ if(!doctypeNode)
+ {
+ //if the !doctype node is not present, create it
+ if(!view->document()->defaultDTD()->name.contains("XHTML", false))
+ {
+ allTheNodes = baseNode;
+ baseNode = 0L;
+ }
+ else
+ {
+ allTheNodes = xmlNode->next->next;
+ xmlNode->next->next = 0L;
+ }
+ doctypeNode = kafkaCommon::createDoctypeNode(view->document());
+ nextNode = doctypeNode->next;
+ doctypeNode = kafkaCommon::insertNode(doctypeNode, 0L, 0L, modifs);
+ kafkaCommon::insertNode(nextNode, 0L, 0L, modifs);
+ doctypeNode->next->next = allTheNodes;
+ }
+
+ if(!htmlNode && !headNode)
+ {
+ //if the HTML node is not present, create it
+ allTheNodes = doctypeNode->next->next;
+ doctypeNode->next->next = 0L;
+ htmlNode = kafkaCommon::createAndInsertNode("html", "", Tag::XmlTag,
+ view->document(), 0L, 0L, 0L, modifs);
+
+ //TODO: hardcoded
+ //If it is XML, it add the namespace.
+ if(view->document()->defaultDTD()->name.contains("XHTML", false))
+ htmlNode->tag->editAttribute("xmlns", "http://www.w3.org/1999/xhtml");
+
+ htmlNode->child = allTheNodes;
+ while(allTheNodes)
+ {
+ allTheNodes->parent = htmlNode;
+ allTheNodes = allTheNodes->next;
+ }
+ htmlNodeCreated = true;
+ }
+
+ //Create the HEAD Node.
+ allTheNodes = htmlNode->child;
+ htmlNode->child = 0L;
+ headNode = kafkaCommon::createAndInsertNode("head", "", Tag::XmlTag, view->document(),
+ htmlNode, 0L, 0L, modifs);
+
+ if(!bodyNode && htmlNodeCreated)
+ {
+ //let's create BODY to take all the Nodes which can't be in the newly created HTML
+ bodyNode = kafkaCommon::createAndInsertNode("body", "", Tag::XmlTag,
+ view->document(), htmlNode, 0L, 0L, modifs);
+ bodyNodeCreated = true;
+ }
+
+ //we now move the necessary Nodes to HEAD (and to BODY if htmlNodeCreated)
+ qHead = QuantaCommon::tagFromDTD(view->document()->defaultDTD(), "head");
+ qBody = QuantaCommon::tagFromDTD(view->document()->defaultDTD(), "body");
+ lastHeadChild = 0L;
+ lastBodyChild = 0L;
+ lastHtmlChild = htmlNode->child;
+ while(lastHtmlChild && lastHtmlChild->next)
+ lastHtmlChild = lastHtmlChild->next;
+ while(allTheNodes)
+ {
+ n = allTheNodes->next;
+ if(qHead->isChild(allTheNodes))
+ {
+ /*//TODO:LOG this into the modif!!
+ allTheNodes->parent = headNode;
+ if(lastHeadChild)
+ {
+ lastHeadChild->next = allTheNodes;
+ allTheNodes->prev = lastHeadChild;
+ }
+ else
+ {
+ headNode->child = allTheNodes;
+ }
+ lastHeadChild = allTheNodes;*/
+ kafkaCommon::moveNode(allTheNodes, headNode, 0L, modifs);
+ }
+ else if(bodyNodeCreated && htmlNodeCreated && qBody->isChild(allTheNodes))
+ {
+ //TODO:log!!
+ /**allTheNodes->parent = bodyNode;
+ if(lastBodyChild)
+ {
+ lastBodyChild->next = allTheNodes;
+ allTheNodes->prev = lastBodyChild;
+ }
+ else
+ {
+ bodyNode->child = allTheNodes;
+ }
+ lastBodyChild = allTheNodes;*/
+ kafkaCommon::moveNode(allTheNodes, bodyNode, 0L, modifs);
+ }
+ else
+ {
+ //TODO:log? no.
+ /**allTheNodes->parent = htmlNode;
+ lastHtmlChild->next = allTheNodes;
+ allTheNodes->prev = lastHtmlChild;
+ lastHtmlChild = allTheNodes;*/
+ kafkaCommon::moveNode(allTheNodes, htmlNode, 0L, modifs);
+ }
+ /**n = allTheNodes->next;
+ if(allTheNodes->next)
+ allTheNodes->next->prev = 0L;
+ allTheNodes->next = 0L;
+ allTheNodes = n;*/
+ allTheNodes = n;
+ }
+}
+
+NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2)
+: AttributeItem(listView, title, title2, 0L)
+{
+ node = 0L;
+ dirty = false;
+ deleted = false;
+}
+
+NodeLinkedViewItem::~NodeLinkedViewItem()
+{
+
+}
+
+#include "htmldocumentproperties.moc"
diff --git a/quanta/parts/kafka/htmldocumentproperties.h b/quanta/parts/kafka/htmldocumentproperties.h
new file mode 100644
index 00000000..62a64659
--- /dev/null
+++ b/quanta/parts/kafka/htmldocumentproperties.h
@@ -0,0 +1,91 @@
+/***************************************************************************
+ htmldocumentproperties.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 HTMLDOCUMENTPROPERTIES_H
+#define HTMLDOCUMENTPROPERTIES_H
+
+class Node;
+class NodeModifsSet;
+class AttributeItem;
+class EditableTree;
+
+#include <qptrlist.h>
+
+#include "tagattributeitems.h"
+#include "htmldocumentpropertiesui.h"
+
+class NodeLinkedViewItem : public AttributeItem
+{
+public:
+ NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2);
+ virtual ~NodeLinkedViewItem();
+
+ Node *node;
+ bool dirty, deleted;
+};
+
+/**
+ * The HTML Document properties dialog.
+ * TODO: Use KDialogBase so it looks more consistent with the rest of the dialogs
+ */
+class htmlDocumentProperties : public htmlDocumentPropertiesui
+{
+ Q_OBJECT
+public:
+ /**
+ * @param forceInsertionOfBasicNodes Force the insertion of the basic Nodes (HTML, BODY, HEAD, ...) if pressing OK
+ * without having made any changes.
+ */
+ htmlDocumentProperties( QWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
+ const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ~htmlDocumentProperties();
+
+protected slots:
+ virtual void aboutToClose() {}
+
+private slots:
+ virtual void accept();
+ virtual void reject();
+ virtual void newMetaItem();
+ virtual void deleteCurrentMetaItem();
+ virtual void newCSSRule();
+ virtual void editCSSRule();
+ virtual void deleteCurrentCSSRule();
+
+ virtual void titleChanged(const QString &);
+ virtual void metaChanged(QListViewItem * );
+ virtual void CSSChanged(QListViewItem * );
+ virtual void linkChanged( const QString& );
+
+private:
+ /**
+ * If we want to add a new Node, we must first create the basics (if necessary) i.e. html, body
+ * head nodes, and moving if necessary all the existing Nodes.
+ * @param modifs The changes are logged for the undo/redo system.
+ */
+ void addBasicNodes(NodeModifsSet *modifs);
+ //must be called after addBasicnodes
+ void addBasicCssNodes(NodeModifsSet *modifs);
+ void loadMetaNode(Node *node);
+ void loadCSS(Node *node);
+
+ QPtrList<NodeLinkedViewItem> CSSList, metaList;
+ Node *titleNode, *htmlNode, *headNode, *linkNode, *bodyNode, *doctypeNode, *CSSNode, *xmlNode;
+ bool titleDirty, linkDirty, m_forceInsertionOfBasicNodes;
+};
+
+#endif
diff --git a/quanta/parts/kafka/htmldocumentpropertiesui.ui b/quanta/parts/kafka/htmldocumentpropertiesui.ui
new file mode 100644
index 00000000..0834a6bd
--- /dev/null
+++ b/quanta/parts/kafka/htmldocumentpropertiesui.ui
@@ -0,0 +1,456 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>htmlDocumentPropertiesui</class>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>htmlDocumentPropertiesui</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>479</width>
+ <height>423</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Document Properties</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QListView" row="0" column="0">
+ <column>
+ <property name="text">
+ <string>Column 1</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <item>
+ <property name="text">
+ <string>New Item</string>
+ </property>
+ <property name="pixmap">
+ <pixmap></pixmap>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>listView1</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="Line" row="9" column="0" rowspan="2" colspan="7">
+ <property name="name">
+ <cstring>line1</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Current DTD: </string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Title: </string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Link CSS stylesheet:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Meta items:</string>
+ </property>
+ </widget>
+ <spacer row="3" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>86</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>CSS rules:</string>
+ </property>
+ </widget>
+ <spacer row="6" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>84</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="11" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>226</width>
+ <height>21</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="10" column="3" rowspan="2" colspan="2">
+ <property name="name">
+ <cstring>ok</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ </widget>
+ <spacer row="11" column="5">
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>41</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="DualEditableTree" row="5" column="1" rowspan="2" colspan="6">
+ <property name="name">
+ <cstring>cssRules</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="DualEditableTree" row="2" column="1" rowspan="2" colspan="6">
+ <property name="name">
+ <cstring>metaItems</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KURLRequester" row="8" column="1" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>cssStylesheet</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="7" column="1">
+ <property name="name">
+ <cstring>cssRulesAdd</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>metaItemsAdd</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="4" column="2" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>metaItemsDelete</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="7" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>cssRulesEdit</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Edit</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="7" column="4" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>cssRulesDelete</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="10" column="6" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>cancel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>title</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>250</width>
+ <height>0</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>currentDTD</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>250</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>DualEditableTree</class>
+ <header location="local">../../treeviews/tagattributetree.h</header>
+ <sizehint>
+ <width>250</width>
+ <height>100</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
+ </image>
+</images>
+<tabstops>
+ <tabstop>currentDTD</tabstop>
+ <tabstop>title</tabstop>
+ <tabstop>metaItemsAdd</tabstop>
+ <tabstop>metaItemsDelete</tabstop>
+ <tabstop>cssRulesAdd</tabstop>
+ <tabstop>cssRulesEdit</tabstop>
+ <tabstop>cssRulesDelete</tabstop>
+ <tabstop>cssStylesheet</tabstop>
+ <tabstop>listView1</tabstop>
+ <tabstop>ok</tabstop>
+ <tabstop>cancel</tabstop>
+</tabstops>
+<slots>
+ <slot access="protected" specifier="pure virtual">newMetaItem()</slot>
+ <slot access="protected" specifier="pure virtual">deleteCurrentMetaItem()</slot>
+ <slot access="protected" specifier="pure virtual">newCSSRule()</slot>
+ <slot access="protected" specifier="pure virtual">editCSSRule()</slot>
+ <slot access="protected" specifier="pure virtual">deleteCurrentCSSRule()</slot>
+ <slot access="protected" specifier="pure virtual">titleChanged(const QString &amp;)</slot>
+ <slot access="protected" specifier="pure virtual">metaChanged(QListViewItem * )</slot>
+ <slot access="protected" specifier="pure virtual">CSSChanged(QListViewItem * )</slot>
+ <slot access="protected" specifier="pure virtual">linkChanged( const QString&amp; )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp
new file mode 100644
index 00000000..257ad239
--- /dev/null
+++ b/quanta/parts/kafka/htmlenhancer.cpp
@@ -0,0 +1,392 @@
+/***************************************************************************
+ htmltranslator.cpp
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 <dom/dom_node.h>
+#include <dom/dom_string.h>
+#include <dom/dom_exception.h>
+#include <kdebug.h>
+#include <kstandarddirs.h>
+#include <kconfig.h>
+
+#include "quantacommon.h"
+#include "document.h"
+#include "tag.h"
+#include "node.h"
+#include "wkafkapart.h"
+#include "nodeproperties.h"
+#include "kafkacommon.h"
+#include "qextfileinfo.h"
+#include "viewmanager.h"
+
+#include "htmlenhancer.h"
+
+HTMLEnhancer::HTMLEnhancer(KafkaDocument *_wkafkapart)
+ : NodeEnhancer()
+{
+ m_showIconForScripts = true;
+ m_wkafkapart = _wkafkapart;
+ m_stddirs = new KStandardDirs();
+}
+
+HTMLEnhancer::~HTMLEnhancer()
+{
+ delete m_stddirs;
+}
+
+bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode)
+{
+ DOM::Node domNode, domNode2, attr, *ptDomNode;
+ bool tbody, goUp;
+ Node *n;
+ QString script, filename, text, oldName;
+ KURL url, baseURL;
+ int oldType;
+
+ //FIRST update the src attr with the baseURL
+ if(node->rootNode())
+ {
+ domNode = node->rootNode()->attributes().getNamedItem("src");
+ if(!domNode.isNull())
+ {
+ baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory());
+ QuantaCommon::setUrl(url, domNode.nodeValue().string());
+ url = QExtFileInfo::toAbsolute(url, baseURL);
+ domNode.setNodeValue(url.url());
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "HTMLTranslator::translateNode() - new src : " << url.url() << endl;
+#endif
+ }
+ }
+
+ //THEN update the href attr of the LINK node with the baseURL
+ if(node->tag->name.lower() == "link" && node->rootNode())
+ {
+ domNode = node->rootNode()->attributes().getNamedItem("href");
+ if(!domNode.isNull())
+ {
+ baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory());
+ QuantaCommon::setUrl(url, domNode.nodeValue().string());
+ url = QExtFileInfo::toAbsolute(url, baseURL);
+ domNode.setNodeValue(url.url());
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "HTMLTranslator::translateNode() - new href : " << url.url() << endl;
+#endif
+ }
+ }
+
+ //THEN if it is the style element, add a DOM::Node::TEXT_NODE child gathering all the CSS
+ //by default, the parser parse it as a script, which can't be translated in DOM::Nodes.
+ if((node->tag->type == Tag::XmlTag && node->tag->name.lower() == "style") ||
+ (node->tag->type == Tag::ScriptTag && node->tag->name.lower().contains("style") != 0))
+ {
+ //If the style Node doesn't exists, create it
+ if(!node->rootNode())
+ {
+ oldType = node->tag->type;
+ node->tag->type = Tag::XmlTag;
+ oldName = node->tag->name;
+ node->tag->name = "style";
+ m_wkafkapart->buildKafkaNodeFromNode(node);
+ node->tag->type = oldType;
+ node->tag->name = oldName;
+ }
+
+ if(node->rootNode())
+ {
+ domNode = *node->rootNode();
+ n = node->child;
+ text = "";
+ goUp = false;
+ while(n)
+ {
+ text += n->tag->tagStr();
+ n = kafkaCommon::getNextNode(n, goUp, node);
+ }
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "HTMLTranslator::translateNode() - CSS code : " << text << endl;
+#endif
+ domNode2 = kafkaCommon::createTextDomNode(text, m_wkafkapart->getKafkaWidget()->document());
+ if(!kafkaCommon::insertDomNode(domNode2, domNode))
+ return false;
+ m_wkafkapart->connectDomNodeToQuantaNode(domNode2, node);
+ }
+ }
+
+ QTag* qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(),
+ parentDNode.nodeName().string());
+
+ //THEN replace, if asked, scripts by a little icon.
+ if(node->tag->type == Tag::ScriptTag && m_showIconForScripts && qTag->isChild("IMG", false))
+ {
+ script = node->tag->name.left(node->tag->name.find("block", 0, false) - 1).lower();
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "HTMLTranslator::translateNode() - BLOCK:" << script << ":" << endl;
+#endif
+ filename = m_stddirs->findResource("data", "kafkapart/pics/" + script + ".png" );
+ if(!filename.isEmpty())
+ {
+ //FIXME DTD!
+ domNode = kafkaCommon::createDomNode("IMG", m_wkafkapart->defaultDTD(),
+ m_wkafkapart->getKafkaWidget()->document());
+
+ kafkaCommon::editDomNodeAttribute(domNode, "IMG", m_wkafkapart->defaultDTD(), "src",
+ filename, m_wkafkapart->getKafkaWidget()->document());
+
+ //Add a tooltip indicating the content of the script
+ n = node->child;
+ text = "";
+ goUp = false;
+ while(n && n != node)
+ {
+ text += n->tag->tagStr();
+ n = kafkaCommon::getNextNode(n, goUp, node);
+ }
+ //if(text == "")
+ // text = i18n("Empty")
+ kafkaCommon::editDomNodeAttribute(domNode, "img", m_wkafkapart->defaultDTD(),
+ "title", text, m_wkafkapart->getKafkaWidget()->document());
+
+ if(!kafkaCommon::insertDomNode(domNode, parentDNode, nextDNode))
+ return false;
+ m_wkafkapart->connectDomNodeToQuantaNode(domNode, node);
+ }
+ }
+
+ //THEN if it is a comment, add a little icon ;o)
+ if(node->tag->type == Tag::Comment && m_showIconForScripts && qTag->isChild("IMG", false))
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "HTMLTranslator::translateNode() - Comment" << endl;
+#endif
+
+ filename = m_stddirs->findResource("data", "kafkapart/pics/comment.png" );
+ if(!filename.isEmpty())
+ {
+ //FIXME DTD!
+ domNode = kafkaCommon::createDomNode("IMG", m_wkafkapart->defaultDTD(),
+ m_wkafkapart->getKafkaWidget()->document());
+ kafkaCommon::editDomNodeAttribute(domNode, "IMG", m_wkafkapart->defaultDTD(), "src",
+ filename, m_wkafkapart->getKafkaWidget()->document());
+
+ //Add a tooltip indicating the content of the script
+ n = node->child;
+ text = "";
+ goUp = false;
+ while(n && n != node)
+ {
+ text += n->tag->tagStr();
+ n = kafkaCommon::getNextNode(n, goUp, node);
+ }
+ //if(text == "")
+ // text = i18n("Empty")
+ kafkaCommon::editDomNodeAttribute(domNode, "img", m_wkafkapart->defaultDTD(),
+ "title", text, m_wkafkapart->getKafkaWidget()->document());
+
+ if(!kafkaCommon::insertDomNode(domNode, parentDNode, nextDNode))
+ return false;
+ m_wkafkapart->connectDomNodeToQuantaNode(domNode, node);
+ }
+ }
+
+ //THEN add a TBODY tag if necessary
+ if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "table")
+ {
+ tbody = false;
+ n = node->child;
+ while(n)
+ {
+ if(n->tag->name.lower() == "tbody")
+ tbody = true;
+ n = n->next;
+ }
+ if(!tbody)
+ {
+ domNode = kafkaCommon::createDomNode("TBODY", m_wkafkapart->defaultDTD(),
+ m_wkafkapart->getKafkaWidget()->htmlDocument());
+ if(!kafkaCommon::insertDomNode(domNode, *node->rootNode()))
+ return false;
+ m_wkafkapart->connectDomNodeToQuantaNode(domNode, node);
+ ptDomNode = new DOM::Node(domNode);
+ node->setLeafNode(ptDomNode);
+ }
+ }
+
+ //THEN add a red dotted border to FORM tags.
+ if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "form")
+ {
+ kafkaCommon::editDomNodeAttribute(*node->rootNode(), node, "style", "border: 1px dotted red",
+ m_wkafkapart->getKafkaWidget()->document());
+ }
+
+ // THEN add a tooltip indicating the content of the name attribute
+ if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "input")
+ {
+ domNode = *(node->rootNode());
+ QString text = node->tag->attributeValue("name");
+ kafkaCommon::editDomNodeAttribute(domNode, "input", m_wkafkapart->defaultDTD(),
+ "title", text, m_wkafkapart->getKafkaWidget()->document());
+ }
+
+ //THEN add a blue dotted border to DL, OL, UL tags
+ if(node->rootNode())
+ {
+ text = node->rootNode()->nodeName().string().lower();
+ if(text == "dl" || text == "ol" || text == "ul")
+ {
+ kafkaCommon::editDomNodeAttribute(*node->rootNode(), node, "style", "border: 1px dotted blue",
+ m_wkafkapart->getKafkaWidget()->document());
+ }
+ }
+
+ //THEN add a minimal border for borderless tables
+ //TODO: make it configurable, and look if CSS hasn't defined a border first
+ if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "table")
+ {
+ attr = node->rootNode()->attributes().getNamedItem("border");
+ if(attr.isNull() || (!attr.isNull() && attr.nodeValue().string() == "0"))
+ {
+ kafkaCommon::editDomNodeAttribute(*node->rootNode(), node, "border", "1",
+ m_wkafkapart->getKafkaWidget()->document());
+ }
+ }
+
+ //THEN add a blue dotted border to DIV tags
+ if(node->rootNode())
+ {
+ text = node->rootNode()->nodeName().string().lower();
+ if(text == "div")
+ {
+ kafkaCommon::editDomNodeAttribute(*node->rootNode(), node, "style", "border: 1px dotted green",
+ m_wkafkapart->getKafkaWidget()->document());
+ }
+ }
+
+ return true;
+}
+
+void HTMLEnhancer::postEnhanceNode(DOM::Node domNode)
+{
+ DOM::Node textNode;
+ kNodeAttrs *props;
+ QTag *qTag;
+ bool isInline;
+
+ if(domNode.isNull())
+ return;
+
+ //If domNode is a Block and there is no text around, and if domNode's parent can handle
+ //text or a P tag, add an empty text DOM::Node
+ // so that the user can access this area.
+ qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(),
+ domNode.nodeName().string());
+ isInline = kafkaCommon::isInline(domNode.nodeName().string());
+ if(domNode.nodeType() == DOM::Node::ELEMENT_NODE &&
+ (!isInline || (isInline && qTag && qTag->isSingle())))
+ {
+ qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getNode(domNode.parentNode()));
+
+ if((domNode.nextSibling().isNull() ||
+ (!domNode.nextSibling().isNull() &&
+ domNode.nextSibling().nodeType() == DOM::Node::ELEMENT_NODE &&
+ !kafkaCommon::isInline(domNode.nextSibling().nodeName().string())))
+ && qTag && (qTag->isChild("#text", false) || qTag->isChild("p", false)) &&
+ domNode.nodeName().string().lower() != "p")
+ {
+ textNode = kafkaCommon::createTextDomNode("",
+ m_wkafkapart->getKafkaWidget()->document());
+ props = m_wkafkapart->connectDomNodeToQuantaNode(textNode, 0L);
+ props->setIsLinkedToNode(false);
+ props->setSpecialBehavior(kNodeAttrs::emptyTextSurroundingBlockElementAtTheRight);
+ kafkaCommon::insertDomNode(textNode, domNode.parentNode(),
+ domNode.nextSibling());
+ }
+
+ if((domNode.previousSibling().isNull() || (!domNode.previousSibling().isNull() &&
+ domNode.previousSibling().nodeType() == DOM::Node::ELEMENT_NODE &&
+ !kafkaCommon::isInline(domNode.previousSibling().nodeName().string())))
+ && qTag && (qTag->isChild("#text", false) || qTag->isChild("p", false)) &&
+ domNode.nodeName().string().lower() != "p")
+ {
+ textNode = kafkaCommon::createTextDomNode("",
+ m_wkafkapart->getKafkaWidget()->document());
+ props = m_wkafkapart->connectDomNodeToQuantaNode(textNode, 0L);
+ props->setIsLinkedToNode(false);
+ props->setSpecialBehavior(kNodeAttrs::emptyTextSurroundingBlockElementAtTheLeft);
+ kafkaCommon::insertDomNode(textNode, domNode.parentNode(),
+ domNode);
+ }
+ }
+
+ //If domNode is an childless element, and if it can handle Text or a P tag,
+ //add an empty text DOM::Node so that the
+ //user can access this area.
+ qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getNode(domNode));
+ if(domNode.nodeType() == DOM::Node::ELEMENT_NODE &&
+ !domNode.hasChildNodes() && qTag && (qTag->isChild("#text", false) ||
+ qTag->isChild("p", false)))
+ {
+ textNode = kafkaCommon::createTextDomNode("",
+ m_wkafkapart->getKafkaWidget()->document());
+ props = m_wkafkapart->connectDomNodeToQuantaNode(textNode, 0L);
+ props->setIsLinkedToNode(false);
+ props->setSpecialBehavior(kNodeAttrs::emptyTextAsChildOfAChildlessElement);
+ kafkaCommon::insertDomNode(textNode, domNode);
+ }
+}
+
+void HTMLEnhancer::postUnenhanceNode(DOM::Node domNode)
+{
+ DOM::Node child, next;
+ kNodeAttrs *attrs;
+
+ if(domNode.isNull())
+ return;
+
+ //Try to remove the EmptyTextAsChildOfAChildlessElement Node first if present
+ if(domNode.hasChildNodes())
+ {
+ child = domNode.firstChild();
+ while(!child.isNull())
+ {
+ attrs = m_wkafkapart->getAttrs(child);
+ next = child.nextSibling();
+ if(attrs && attrs->specialBehavior() == kNodeAttrs::emptyTextAsChildOfAChildlessElement)
+ kafkaCommon::removeDomNode(child);
+ child = next;
+ }
+ }
+
+ //Then try to remove the emptyTextSurroundingBlockElement* Nodes if present.
+ if(!domNode.previousSibling().isNull())
+ {
+ attrs = m_wkafkapart->getAttrs(domNode.previousSibling());
+ if(attrs && attrs->specialBehavior() == kNodeAttrs::emptyTextSurroundingBlockElementAtTheLeft)
+ kafkaCommon::removeDomNode(domNode.previousSibling());
+ }
+ if(!domNode.nextSibling().isNull())
+ {
+ attrs = m_wkafkapart->getAttrs(domNode.nextSibling());
+ if(attrs && attrs->specialBehavior() == kNodeAttrs::emptyTextSurroundingBlockElementAtTheRight)
+ kafkaCommon::removeDomNode(domNode.nextSibling());
+ }
+}
+
+void HTMLEnhancer::readConfig(KConfig *m_config)
+{
+ m_config->setGroup("HTML Enhancer");
+ m_showIconForScripts = m_config->readBoolEntry("Show Scripts Icons", true);
+}
diff --git a/quanta/parts/kafka/htmlenhancer.h b/quanta/parts/kafka/htmlenhancer.h
new file mode 100644
index 00000000..29ebe82f
--- /dev/null
+++ b/quanta/parts/kafka/htmlenhancer.h
@@ -0,0 +1,105 @@
+/***************************************************************************
+ htmlenhancer.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 HTMLENHANCER_H
+#define HTMLENHANCER_H
+
+#include <kurl.h>
+
+#include "nodeenhancer.h"
+
+class KConfig;
+class Node;
+class KafkaDocument;
+class KStandardDirs;
+
+/**
+ * This class takes care of the following tasks for [X]HTML DTDs :
+ * - Add a TBODY DOM::Node to TABLE DOM::Node if necessary.
+ * - Update the src attr of the DOM::Node.
+ * - Display an little icon for scripts.
+ * - Load the CSS informations into the DOM tree.
+ * - Add a colourfull border to FORM, OL, DL, UL
+ */
+
+class HTMLEnhancer : public NodeEnhancer
+{
+public:
+ HTMLEnhancer(KafkaDocument *_wkafkapart);
+ virtual ~HTMLEnhancer();
+
+ /**
+ * This function modify the DOM::Node of the node.
+ * The DOM::Node must be built before calling this
+ * function.
+ * @param node The Node we want to enhance.
+ * @param parentDNode the parent DOM::Node of the root DOM::Node of node.
+ * @param nextDNode the DOM::Node next to the root DOM::Node of node.
+ */
+ virtual bool enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode);
+
+ /**
+ * This functions is called once the whole DOM::Node tree is built. It will add empty
+ * TEXT DOM::Node around block element or inside element when necessary
+ * so that the user can access every single part of kafka with the cursor.
+ * @param domNode The node we want to add these empty text around.
+ */
+ virtual void postEnhanceNode(DOM::Node domNode);
+
+ /**
+ * This function do the opposite of postEnhanceNode. Usefull to remove the
+ * extra Text DOM::Nodes when deleting a DOM::Node.
+ */
+ virtual void postUnenhanceNode(DOM::Node domNode);
+
+ /**
+ * Read the config.
+ * @m_config The config to read.
+ */
+ void readConfig(KConfig *m_config);
+
+ /**
+ * Set the base URL of the current document to update src attrs.
+ * @param baseURL The base URL of the current Document.
+ */
+ void setBaseURL(KURL baseURL) {m_baseURL = baseURL;}
+
+ /**
+ * Get the current base URL.
+ * @return Returns the current base URL.
+ */
+ KURL baseURL() {return m_baseURL;}
+
+ /**
+ * @return Specifies if we should show icons for scripts.
+ */
+ bool showIconsForScripts() {return m_showIconForScripts;}
+
+ /**
+ * Set if we should these little icons.
+ * @param showIcons Should we show these icons?
+ */
+ void showIconsForScripts(bool showIcons) {m_showIconForScripts = showIcons;}
+
+private:
+ KURL m_baseURL;
+ bool m_showIconForScripts;
+ KafkaDocument *m_wkafkapart;
+ KStandardDirs *m_stddirs;
+};
+
+#endif
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
new file mode 100644
index 00000000..fe147bc7
--- /dev/null
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -0,0 +1,4257 @@
+/***************************************************************************
+ kafkacommon.cpp
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 <qptrdict.h>
+
+#include <kdebug.h>
+#include <dom/dom_exception.h>
+#include <dom/dom_doc.h>
+#include <dom/dom_element.h>
+#include <dom/dom_text.h>
+
+#include "node.h"
+#include "tag.h"
+#include "document.h"
+#include "resource.h"
+#include "quantacommon.h"
+
+#include "kafkacommon.h"
+#include "wkafkapart.h"
+#include "undoredo.h"
+#include "cursors.h"
+
+#include <cassert>
+
+Node *kafkaCommon::getNextNode(Node *node, bool &goUp, Node *endNode)
+{
+ //goto next node, my favorite part :)
+ if(!node || node == endNode)
+ return 0L;
+ if(goUp)
+ {
+ if(node->next)
+ {
+ goUp = false;
+ if(node->next == endNode)
+ return 0L;
+ return node->next;
+ }
+ else
+ {
+ if(node->parent == endNode)
+ return 0L;
+ return getNextNode(node->parent, goUp);
+ }
+ }
+ else
+ {
+ if(node->child)
+ {
+ if(node->child == endNode)
+ return 0L;
+ return node->child;
+ }
+ else if(node->next)
+ {
+ if(node->next == endNode)
+ return 0L;
+ return node->next;
+ }
+ else
+ {
+ goUp = true;
+ if(node->parent == endNode)
+ return 0L;
+ return getNextNode(node->parent, goUp);
+ }
+ }
+}
+
+Node* kafkaCommon::getNextNodeNE(Node *node, bool &goUp, Node *endNode)
+{
+ Node *n = node;
+ n = getNextNode(n, goUp, endNode);
+ while(n && n->tag->type == Tag::Empty)
+ n = getNextNode(n, goUp, endNode);
+ return n;
+}
+
+Node* kafkaCommon::getPrevNode(Node *node, Node *endNode)
+{
+ Node *n = node;
+
+ if(!node)
+ return 0L;
+
+ if(n->prev && n->prev->child)
+ {
+ n = n->prev;
+ if(n == endNode)
+ return 0L;
+ while(n->child)
+ {
+ n = n->child;
+ while(n && n->next)
+ n = n->next;
+ if(n == endNode)
+ return 0L;
+ }
+ }
+ else if(n->prev)
+ {
+ n = n->prev;
+ if(n == endNode)
+ return 0L;
+ }
+ else
+ {
+ n = n->parent;
+ if(n == endNode)
+ return 0L;
+ }
+ return n;
+}
+
+Node* kafkaCommon::getPrevNodeNE(Node *node, Node *endNode)
+{
+ Node *n = node;
+ n = getPrevNode(node, endNode);
+ while(n && n->tag->type == Tag::Empty)
+ n = getPrevNode(n, endNode);
+ return n;
+}
+
+Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+{
+ // look for commonParent
+ Node* commonParent = 0;
+ Node* commonParentStartChild = 0, *commonParentEndChild = 0;
+ int locOffset = 1;
+ QValueList<int> startNodeLocation = getLocation(startNode);
+ QValueList<int> endNodeLocation = getLocation(endNode);
+ QValueList<int>::iterator itStart = startNodeLocation.begin();
+ QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
+ (*itStart) == (*itEnd))
+ {
+ commonParent = getNodeFromSubLocation(startNodeLocation, locOffset, nodeSubtree);
+ itStart++;
+ itEnd++;
+ locOffset++;
+ }
+
+ //look for commonParentStartChild and commonParentEndChild
+ if(itStart != startNodeLocation.end())
+ commonParentStartChild = getNodeFromSubLocation(startNodeLocation, locOffset, nodeSubtree);
+ else
+ commonParentStartChild = commonParent;
+
+ if(itEnd != endNodeLocation.end())
+ commonParentEndChild = getNodeFromSubLocation(endNodeLocation, locOffset, nodeSubtree);
+ else
+ commonParentEndChild = commonParent;
+
+ //If commonParent isn't inline, move commonParent to the closest non inline node
+ if(commonParent && (commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
+ {
+ Node* oldCommonParent = commonParent;
+ commonParent = commonParent->parent;
+ commonParentStartChild = oldCommonParent;
+ commonParentEndChild = oldCommonParent;
+ }
+ //startNode or endNode can't be the commonParent.
+ else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
+ commonParent = commonParent->parent;
+
+ commonParentStartChildLocation = getLocation(commonParentStartChild);
+ commonParentEndChildLocation = getLocation(commonParentEndChild);
+
+ return commonParent;
+}
+
+Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+{
+ // look for commonParent
+ Node* commonParent = 0;
+ Node* commonParentStartChild = 0, *commonParentEndChild = 0;
+ int locOffset = 1;
+ QValueList<int> startNodeLocation = getLocation(startNode);
+ QValueList<int> endNodeLocation = getLocation(endNode);
+ QValueList<int>::iterator itStart = startNodeLocation.begin();
+ QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
+ (*itStart) == (*itEnd))
+ {
+ commonParent = getNodeFromSubLocation(startNodeLocation, locOffset, nodeSubtree);
+ itStart++;
+ itEnd++;
+ locOffset++;
+ }
+
+ //look for commonParentStartChild and commonParentEndChild
+ if(itStart != startNodeLocation.end())
+ commonParentStartChild = getNodeFromSubLocation(startNodeLocation, locOffset, nodeSubtree);
+ else
+ commonParentStartChild = commonParent;
+
+ if(itEnd != endNodeLocation.end())
+ commonParentEndChild = getNodeFromSubLocation(endNodeLocation, locOffset, nodeSubtree);
+ else
+ commonParentEndChild = commonParent;
+
+ //If commonParent isn't inline, move commonParent to the closest non inline node
+ if(commonParent && (isInline(commonParent->tag->name) ||
+ commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
+ {
+ Node* oldCommonParent = commonParent;
+ commonParent = commonParent->parent;
+ while(commonParent && isInline(commonParent->tag->name))
+ {
+ oldCommonParent = commonParent;
+ commonParent = commonParent->parent;
+ }
+ commonParentStartChild = oldCommonParent;
+ commonParentEndChild = oldCommonParent;
+ }
+ //startNode or endNode can't be the commonParent.
+ else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
+ commonParent = commonParent->parent;
+
+ commonParentStartChildLocation = getLocation(commonParentStartChild);
+ commonParentEndChildLocation = getLocation(commonParentEndChild);
+
+ return commonParent;
+}
+
+DOM::Node kafkaCommon::getNextDomNode(DOM::Node node, bool &goUp, bool returnParentNode, DOM::Node endNode)
+{
+ if(node.isNull())
+ return 0L;
+ if(node.hasChildNodes() && !goUp)
+ {
+ if(endNode == node.firstChild())
+ return 0L;
+ else
+ return node.firstChild();
+ }
+ else if(!node.nextSibling().isNull())
+ {
+ goUp = false;
+ if(endNode == node.nextSibling())
+ return 0L;
+ else
+ return node.nextSibling();
+ }
+ else
+ {
+ goUp = true;
+ if(node.parentNode().isNull() || endNode == node.parentNode())
+ return 0L;
+ if(returnParentNode)
+ return node.parentNode();
+ else
+ return getNextDomNode(node.parentNode(), goUp, returnParentNode, endNode);
+ }
+}
+
+DOM::Node kafkaCommon::getPrevDomNode(DOM::Node node, DOM::Node endNode)
+{
+ DOM::Node n = node;
+
+ if(node.isNull())
+ return 0L;
+
+ if(!n.previousSibling().isNull() && !n.previousSibling().firstChild().isNull())
+ {
+ n = n.previousSibling();
+ if(n == endNode)
+ return 0L;
+ while(!n.firstChild().isNull())
+ {
+ n = n.firstChild();
+ while(!n.isNull() && !n.nextSibling().isNull())
+ n = n.nextSibling();
+ if(n == endNode)
+ return 0L;
+ }
+ }
+ else if(!n.previousSibling().isNull())
+ {
+ n = n.previousSibling();
+ if(n == endNode)
+ return 0L;
+ }
+ else
+ {
+ n = n.parentNode();
+ if(n == endNode)
+ return 0L;
+ }
+ return n;
+}
+
+Node* kafkaCommon::getCorrectStartNode(Node* startNode, int& start_offset)
+{
+ Node* start_node = startNode;
+
+ while(start_node && (start_node->tag->type != Tag::Text || (uint)start_offset == start_node->tag->tagStr().length()))
+ {
+ start_node = start_node->nextSibling();
+ if(start_node->tag->type == Tag::Text || start_node->tag->type == Tag::Empty)
+ {
+ start_offset = 0;
+ break;
+ }
+ }
+
+ return start_node;
+}
+
+Node* kafkaCommon::getCorrectEndNode(Node* endNode, int& end_offset)
+{
+ Node* end_node = endNode;
+
+ while(end_node && (end_node->tag->type != Tag::Text || end_offset == 0))
+ {
+ end_node = end_node->previousSibling();
+ if(end_node && end_node->tag->type == Tag::Text)
+ {
+ end_offset = end_node->tag->tagStr().length();
+ break;
+ }
+ }
+
+ return end_node;
+}
+
+Node* kafkaCommon::getCommonParentChild(Node* node, Node* commonParent)
+{
+ assert(node && commonParent);
+
+ Node* aux = commonParent->child;
+ assert(aux);
+
+ while(aux && aux != node)
+ {
+ if(aux->hasForChild(node))
+ return aux;
+ aux = aux->nextSibling();
+ }
+ return aux;
+}
+
+
+void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, NodeModifsSet* modifs, bool inlineNodeIndentation)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::applyIndentation()" << endl;
+#endif
+
+ Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
+ int nonInlineDepth = 0, nonInlineDepth2 = 0, i;
+ bool b = false;
+ QString indentation1, indentation2, text;
+
+ if(!node)
+ return;
+
+ prev = node->previousSibling();
+ next = node->nextSibling();
+ prevNE = getPrevNodeNE(node);
+ nextNE = getNextNodeNE(node, b);
+ realPrevNE = node->prevNE();
+ realNextNE = node->nextNE();
+ realPrev = node->prev;
+ realNext = node->next;
+
+ if(inlineNodeIndentation &&
+ !node->prev && getNodeDisplay(node->parent, true) == kafkaCommon::blockDisplay)
+ {
+ AreaStruct node_area = node->tag->area();
+ AreaStruct parent_area = node->parent->tag->area();
+
+ if(node_area.bLine == parent_area.bLine)
+ {
+ node->tag->setIndentationDone(true);
+ return;
+ }
+ }
+
+ //First remove all the indentation
+ if(node->tag->type == Tag::Text)
+ setTagString(node, removeUnnecessaryWhitespaces(node->tag->tagStr()), modifs);
+
+ //compute the "non-inline depth" of the Node and of the next NE (not Empty) Node
+ // i.e. we count how many non-inline parent they have.
+ parent = node->parent;
+ while(parent)
+ {
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ ++nonInlineDepth;
+ parent = parent->parent;
+ }
+
+ //compute the "non-inline depth" of the next non-empty Node.
+ if (nextNE)
+ parent = nextNE->parent;
+ else
+ parent = 0L;
+ while(parent)
+ {
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ ++nonInlineDepth2;
+ parent = parent->parent;
+ }
+
+ parent = node->parent;
+
+ if(!parent || getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ {
+ //prepare the indentation
+ indentation1 = "\n";
+ indentation2 = "\n";
+
+ if(nbOfSpaces == 0) // tabs are used
+ {
+ indentation1 += QString().fill('\t', nbOfTabs * nonInlineDepth);
+ indentation2 += QString().fill('\t', nbOfTabs * nonInlineDepth2);
+ }
+ else // spaces are used
+ {
+ indentation1 += QString().fill(' ', nbOfSpaces * nonInlineDepth);
+ indentation2 += QString().fill(' ', nbOfSpaces * nonInlineDepth2);
+ }
+
+ //test and add indentations if necessary
+ if(!prevNE || (prevNE && getNodeDisplay(node, true) ==
+ kafkaCommon::blockDisplay) ||
+ (prevNE && getNodeDisplay(node, true) == kafkaCommon::inlineDisplay &&
+ getNodeDisplay(prevNE, true) == kafkaCommon::blockDisplay))
+ {
+ if(node->tag->type == Tag::Text && !hasParent(node, "pre"))
+ {
+ setTagStringAndFitsNodes(node, indentation1 + node->tag->tagStr(), modifs);
+ }
+ else if(prev && prev->tag->type == Tag::Empty)
+ {
+ setTagStringAndFitsNodes(prev, indentation1, modifs);
+ }
+ //The indentation is always done at the left because we apply this function "from left to right"
+ else if(prev && prev->tag->type == Tag::Text /** && prev->tag->indentationDone() */)
+ {
+ //Remove the indentation at the right of the text Node
+ text = prev->tag->tagStr();
+ for(i = 0; (unsigned)i < text.length(); ++i)
+ {
+ if(!text[i].isSpace())
+ break;
+ }
+ if(i == 0)
+ prev->tag->setStr(removeUnnecessaryWhitespaces(text));
+ else
+ prev->tag->setStr(text.mid(0, i) + removeUnnecessaryWhitespaces(text, true));
+ setTagStringAndFitsNodes(prev, prev->tag->tagStr() + indentation1, modifs);
+ }
+ }
+
+ if(!nextNE || (nextNE && getNodeDisplay(node, true) ==
+ kafkaCommon::blockDisplay) ||
+ (nextNE && getNodeDisplay(node, true) == kafkaCommon::inlineDisplay &&
+ getNodeDisplay(nextNE, true) == kafkaCommon::blockDisplay))
+ {
+ if(node->tag->type == Tag::Text && !hasParent(node, "pre"))
+ {
+ setTagStringAndFitsNodes(node, node->tag->tagStr() + indentation2, modifs);
+ }
+ else if(next && next->tag->type == Tag::Empty)
+ {
+ setTagStringAndFitsNodes(next, indentation2, modifs);
+ }
+ //If next's cleanStrBuilt is not true, the next node to be processed will be this
+ //one and the indentation spaces will be handled as real spaces.
+ else if(next && next->tag->type == Tag::Text && next->tag->indentationDone())
+ {
+ //Remove the indentation at the left of the text Node
+ text = next->tag->tagStr();
+ for(i = text.length() - 1; i <= 0; i--)
+ {
+ if(!text[i].isSpace())
+ break;
+ }
+ if((unsigned)i == text.length() - 1)
+ next->tag->setStr(removeUnnecessaryWhitespaces(text));
+ else
+ next->tag->setStr(removeUnnecessaryWhitespaces(text, false, true) +
+ text.mid(i + 1));
+ setTagStringAndFitsNodes(next, indentation2 + next->tag->tagStr(), modifs);
+ }
+ }
+ }
+ else
+ {
+ //The parent is inline, so no indentation.
+ //Nothing to do.
+ }
+ node->tag->setIndentationDone(true);
+}
+
+void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::fitIndentationNodes()" << endl;
+#endif
+
+ Node *parent, *child, *node, *emptyNode = 0L, *emptyNode2 = 0L;
+ int nbEmptyNodes = 0, n1Depth, n2Depth;
+ bool lastChild = false, firstChild = false;
+
+ if(!n1 || !n2 || n1 == n2 || n1->tag->type == Tag::Empty || n2->tag->type == Tag::Empty)
+ return;
+
+ n1Depth = nodeDepth(n1);
+ n2Depth = nodeDepth(n2);
+
+ if(n1Depth != n2Depth)
+ {
+ if(n1Depth > n2Depth)
+ {
+ child = n1;
+ parent = n2;
+ }
+ else
+ {
+ child = n2;
+ parent = n1;
+ }
+ if(child->parent->firstChildNE() == child)
+ firstChild = true;
+ if(child->parent->lastChildNE() == child)
+ lastChild = true;
+
+ //counting the Empty Nodes and deleting them to have only one empty node.
+ if(firstChild)
+ {
+ node = child->prev;
+ while(node)
+ {
+ if(node->tag->type == Tag::Empty)
+ nbEmptyNodes++;
+ node = node->prev;
+ }
+ node = child->prev;
+ while(nbEmptyNodes > 1)
+ {
+ extractAndDeleteNode(node, modifs, false, false, false);
+ nbEmptyNodes--;
+ node = child->prev;
+ }
+ if(nbEmptyNodes == 1)
+ emptyNode = child->prev;
+ }
+
+ nbEmptyNodes = 0;
+ if(lastChild)
+ {
+ node = child->next;
+ while(node)
+ {
+ if(node->tag->type == Tag::Empty)
+ nbEmptyNodes++;
+ node = node->next;
+ }
+ node = child->next;
+ while(nbEmptyNodes > 1)
+ {
+ extractAndDeleteNode(node, modifs, false, false, false);
+ nbEmptyNodes--;
+ node = child->next;
+ }
+ if(nbEmptyNodes == 1)
+ emptyNode2 = child->next;
+ }
+
+ //adding/deleting a empty node if necessary
+ if(firstChild)
+ {
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ {
+ if(child->tag->type != Tag::Text && !emptyNode)
+ {
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->parent,
+ child, child, modifs);
+ }
+ }
+ else
+ {
+ if(child->tag->type == Tag::Text && emptyNode)
+ {
+ extractAndDeleteNode(emptyNode, modifs, false, false, false);
+ }
+ }
+ }
+
+ if(lastChild)
+ {
+ if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ {
+ if(child->tag->type != Tag::Text && !emptyNode2)
+ {
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->parent,
+ 0L, 0L, modifs);
+ }
+ }
+ else
+ {
+ if(child->tag->type == Tag::Text && emptyNode2)
+ {
+ extractAndDeleteNode(emptyNode2, modifs, false, false, false);
+ }
+ }
+ }
+ }
+ else
+ {
+ if(n1->next != n2)
+ {
+ //counting the Empty Nodes and deleting them to have only one empty node.
+ node = n1->next;
+ while(node && node != n2)
+ {
+ if(node->tag->type == Tag::Empty)
+ nbEmptyNodes++;
+ node = node->next;
+ }
+ node = n1->next;
+ while(nbEmptyNodes > 1 || (nbEmptyNodes > 0 && n1->getClosingNode() == n2))
+ {
+ extractAndDeleteNode(node, modifs, false, false, false);
+ nbEmptyNodes--;
+ node = n1->next;
+ }
+ if(nbEmptyNodes == 1)
+ emptyNode = n1->next;
+
+ if(n1->getClosingNode() == n2 && n1->child && n1->child->tag->type == Tag::Empty)
+ emptyNode = n1->child;
+ }
+
+ //adding/deleting a empty node if necessary
+ parent = n1->parent;
+ if(!parent || getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ {
+ if(getNodeDisplay(n1, true) == kafkaCommon::blockDisplay &&
+ n1->tag->type != Tag::Text)
+ {
+ if(n2->tag->type == Tag::Text && emptyNode)
+ {
+ extractAndDeleteNode(emptyNode, modifs, false, false, false);
+ }
+ else if(n2->tag->type != Tag::Text && !emptyNode)
+ {
+ if(n1->getClosingNode() == n2)
+ {
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), n1, 0L, 0L, modifs);
+ }
+ else
+ {
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), parent, n2, n2, modifs);
+ }
+ }
+ }
+ else
+ {
+ if((n2->tag->type == Tag::Text ||
+ getNodeDisplay(n2, true) == kafkaCommon::inlineDisplay) &&
+ emptyNode)
+ {
+ extractAndDeleteNode(emptyNode, modifs, false, false, false);
+ }
+ else if(n2->tag->type != Tag::Text &&
+ getNodeDisplay(n2, true) == kafkaCommon::blockDisplay &&
+ n1->tag->type != Tag::Text && !emptyNode)
+ {
+ if(n1->getClosingNode() == n2)
+ {
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), n1, 0L, 0L, modifs);
+ }
+ else
+ {
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), parent, n2, n2, modifs);
+ }
+ }
+ }
+ }
+ else
+ {
+ if(emptyNode)
+ extractAndDeleteNode(emptyNode, modifs, false, false, false);
+ }
+ }
+}
+
+void kafkaCommon::fitsNodesPosition(Node* startNode, int colMovement, int lineMovement, int colEnd, int lineEnd)
+{
+ bool b = false;
+ int j, SNbeginLine, SNbeginCol/**, SNlastLine, SNlastCol*/;
+ int beginLine, beginCol, lastLine, lastCol;
+ Node *node = startNode;
+
+ if(!node)
+ return;
+
+ node->tag->beginPos(SNbeginLine, SNbeginCol);
+ //node->tag->endPos(SNlastLine, SNlastCol);
+
+ while(node)
+ {
+ node->tag->beginPos(beginLine, beginCol);
+ node->tag->endPos(lastLine, lastCol);
+ if(beginLine >= lineEnd && beginCol >= colEnd &&
+ colEnd != -2 && lineEnd != -2)
+ return;
+ if(beginLine == SNbeginLine && lastLine == SNbeginLine)
+ node->tag->setTagPosition(beginLine + lineMovement,
+ beginCol + colMovement, lastLine + lineMovement,
+ lastCol + colMovement);
+ else if(beginLine == SNbeginLine)//&&lastLine != SNbeginLine
+ node->tag->setTagPosition(beginLine + lineMovement,
+ beginCol + colMovement, lastLine + lineMovement,
+ lastCol);
+ else
+ node->tag->setTagPosition(beginLine + lineMovement,
+ beginCol, lastLine + lineMovement, lastCol);
+ for(j = 0; j < node->tag->attrCount(); ++j)
+ {
+ if(node->tag->getAttribute(j).nameLine == SNbeginLine)
+ {
+ node->tag->getAttribute(j).nameLine += lineMovement;
+ node->tag->getAttribute(j).nameCol += colMovement;
+ node->tag->getAttribute(j).valueLine += lineMovement;
+ node->tag->getAttribute(j).valueCol += colMovement;
+ }
+ else
+ {
+ node->tag->getAttribute(j).nameLine += lineMovement;
+ node->tag->getAttribute(j).valueLine += lineMovement;
+ }
+ }
+ node = getNextNode(node, b);
+ }
+}
+
+int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
+{
+ QString nodeName;
+
+ if(!node)
+ return kafkaCommon::errorDisplay;
+
+ if(node->tag->type == Tag::Text)
+ return kafkaCommon::inlineDisplay;
+ else if(node->tag->type == Tag::XmlTag || (node->tag->type == Tag::XmlTagEnd &&
+ closingNodeToo))
+ {
+ //If we areusing a non (X)HTML DTD, make everything blockDisplay by default
+ if(node->tag->dtd() && node->tag->dtd()->name.contains("HTML", false) == 0)
+ return kafkaCommon::blockDisplay;
+
+ nodeName = node->tag->name.lower();
+ if(closingNodeToo && nodeName.startsWith("/"))
+ nodeName = nodeName.mid(1);
+ if(nodeName == "html" || nodeName == "head" || nodeName == "meta" ||
+ nodeName == "link" || nodeName == "style" || nodeName == "option" ||
+ nodeName == "optgroup" || nodeName == "area" || nodeName == "param" ||
+ nodeName == "thead" || nodeName == "tbody" || nodeName == "dt" ||
+ nodeName == "tfoot" || nodeName == "col" || nodeName == "colgroup" ||
+ nodeName == "tr" || nodeName == "td" || nodeName == "th" || nodeName == "caption" ||
+ nodeName == "ins" || nodeName == "legend")
+ //Ok right, but this is only for indentation...
+ //return kafkaCommon::noneDisplay;
+ return kafkaCommon::blockDisplay;
+ else if(nodeName == "body" || nodeName == "p" || nodeName == "div" ||
+ nodeName == "blockquote" || nodeName == "isindex" ||
+ nodeName == "center" || nodeName == "hr" || nodeName == "h1" ||
+ nodeName == "h2" || nodeName == "h3" || nodeName == "h4" || nodeName == "h5" ||
+ nodeName == "h6" || nodeName == "table" ||
+ nodeName == "ul" || nodeName == "menu" || nodeName == "dir" || nodeName == "ol" ||
+ nodeName == "li" || nodeName == "ul" || nodeName == "dd" || nodeName == "dl" ||
+ nodeName == "form" || nodeName == "fieldset" ||
+ nodeName == "pre" || nodeName == "noscript" || nodeName == "noframes" ||
+ nodeName == "frameset" || nodeName == "frame" ||
+ nodeName == "address" || nodeName == "del" || nodeName == "br")
+ return kafkaCommon::blockDisplay;
+ else if(nodeName == "q" || nodeName == "u" || nodeName == "i" || nodeName == "b" ||
+ nodeName == "cite" || nodeName == "em" || nodeName == "var" || nodeName == "em" ||
+ nodeName == "tt" || nodeName == "code" || nodeName == "kbd" || nodeName == "samp" ||
+ nodeName == "big" || nodeName == "small" || nodeName == "s" || nodeName == "strike" ||
+ nodeName == "sub" || nodeName == "sup" || nodeName == "abbr" || nodeName == "title" ||
+ nodeName == "acronym" || nodeName == "a" || nodeName == "bdo" ||
+ nodeName == "font" || nodeName == "#text" || nodeName == "strong" || nodeName == "dfn" ||
+ nodeName == "img" || nodeName == "applet" || nodeName == "object" || nodeName == "basefont" || nodeName == "script" || nodeName == "map" || nodeName == "span" ||
+ nodeName == "iframe" || nodeName == "input" || nodeName == "select" || nodeName == "textarea" ||
+ nodeName == "label" || nodeName == "button" )
+ return kafkaCommon::inlineDisplay;
+ else
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::getNodeType() - ERROR " << nodeName <<
+ " not found" << endl;
+#endif
+
+ return kafkaCommon::noneDisplay;
+ }
+ }
+ return kafkaCommon::errorDisplay;
+}
+
+QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
+ bool removeAllSpacesAtTheLeft, bool removeAllSpacesAtTheRight)
+{
+ /**QString newString;
+ int i;
+
+ if(string.length() == 0)
+ return "";
+
+ newString = string[0];
+ for(i = 1; (unsigned)i < string.length(); ++i)
+ {
+ if(!string[i - 1].isSpace() || !string[i].isSpace())
+ newString += string[i];
+ }
+
+ if(removeAllSpacesAtTheLeft && newString.length() > 0 && newString[0].isSpace())
+ newString = newString.mid(1);
+ if(removeAllSpacesAtTheRight && newString.length() > 0 &&
+ newString[newString.length() - 1].isSpace())
+ newString = newString.mid(0, newString.length() - 1);
+
+ return newString;*/
+ QString newString;
+ bool hasLeftWhiteSpaces, hasRightWhiteSpaces;
+
+ if(string.length() == 0)
+ return QString();
+
+ hasLeftWhiteSpaces = (string[0].isSpace());
+ hasRightWhiteSpaces = (string[string.length() - 1].isSpace());
+
+ newString = string.stripWhiteSpace();
+ if(hasLeftWhiteSpaces && !removeAllSpacesAtTheLeft)
+ newString.insert(0, " ");
+ if(hasRightWhiteSpaces && !removeAllSpacesAtTheRight)
+ newString.insert(newString.length(), " ");
+
+ return newString;
+}
+
+Node* kafkaCommon::createNode(const QString &nodeName, const QString &tagString, int nodeType, Document *doc)
+{
+ Node *node;
+
+ //create the Node.
+ node = new Node(0L);
+
+ //Create the corresponding Tag.
+ node->tag = new Tag();
+ if(doc)
+ node->tag->setDtd(doc->defaultDTD());
+ else
+ node->tag->setDtd(0L);
+ node->tag->setWrite(doc);
+ node->tag->type = nodeType;
+ node->tag->name = QuantaCommon::tagCase(nodeName);
+ if(doc)
+ node->tag->single = QuantaCommon::isSingleTag(doc->defaultDTD()->name, nodeName);
+ else
+ node->tag->single = false;
+ node->tag->setStr(tagString);
+ node->tag->setCleanStrBuilt(false);
+ node->tag->setIndentationDone(false);
+ return node;
+}
+
+void kafkaCommon::restorePastedNode(Node* node, Document* doc)
+{
+ if(doc)
+ node->tag->setDtd(doc->defaultDTD());
+ else
+ node->tag->setDtd(0L);
+
+ node->tag->setWrite(doc);
+
+}
+
+Node *kafkaCommon::createDoctypeNode(Document *doc)
+{
+ Node *node, *child, *closingNode;
+
+ if(!doc)
+ return 0L;
+
+ //Build the script Tag
+ node = kafkaCommon::createNode("DTD block", "", Tag::ScriptTag, doc);
+ closingNode = kafkaCommon::createNode("", "", Tag::XmlTagEnd, doc);
+ node->next = closingNode;
+ closingNode->prev = node;
+
+ //Then build the Script tag which will be child of the above node.
+ child = kafkaCommon::createNode("#text", "DOCTYPE" + doc->defaultDTD()->doctypeStr, Tag::Text, doc);
+ child->tag->setCleanStrBuilt(true);
+ child->insideSpecial = true;
+ insertNode(child, node, 0L, 0L, false);
+
+ return node;
+}
+
+Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const QString &encoding)
+{
+ Node *node, *child, *closingNode;
+ QString text;
+
+ if(!doc)
+ return 0L;
+
+ //build the script Tag
+ node = kafkaCommon::createNode("XML PI block" ,"", Tag::ScriptTag, doc);
+ closingNode = kafkaCommon::createNode("", "", Tag::XmlTagEnd, doc);
+ node->next = closingNode;
+ closingNode->prev = node;
+
+ //Then build the Text tag which will be child of the above node.
+ text = " encoding=\"" + encoding + "\" version=\"1.0\"";
+ child = kafkaCommon::createNode("#text", text, Tag::Text, doc);
+ child->tag->setCleanStrBuilt(true);
+ child->insideSpecial = true;
+ insertNode(child, node, 0L, 0L, false);
+
+ return node;
+}
+
+Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc)
+{
+ QTag *nodeQTag, *oldNodeQTag;
+ bool searchForMandatoryNode;
+ Node *currentParent;
+ QMap<QString, bool>::iterator it;
+
+ if(!node)
+ return 0L;
+
+ nodeQTag = QuantaCommon::tagFromDTD(node);
+ if(!nodeQTag)
+ return false;
+
+ searchForMandatoryNode = true;
+ currentParent = node;
+ while(searchForMandatoryNode)
+ {
+ oldNodeQTag = nodeQTag;
+ for(it = nodeQTag->childTags.begin(); it != nodeQTag->childTags.end(); ++it)
+ {
+ if(it.data())
+ {
+ nodeQTag = QuantaCommon::tagFromDTD(nodeQTag->parentDTD, it.key());
+ if(!nodeQTag)
+ return node;
+ currentParent = createAndInsertNode(nodeQTag->name(), "", Tag::XmlTag, doc,
+ currentParent, 0L, 0L, (NodeModifsSet*)0L);
+ break;
+ }
+ }
+ if(oldNodeQTag == nodeQTag)
+ searchForMandatoryNode = false;
+ }
+
+ return currentParent;
+}
+
+Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling,
+ NodeModifsSet *modifs, bool merge)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::insertNode()" << endl;
+#endif
+
+ NodeModif* modif;
+ Node *n, *closingNode;
+ bool nodeIsFirstChild = false, b;
+
+ if(!node)
+ return 0L;
+
+ //Reset the listviews items pointers for node and its children
+ n = node;
+ b = false;
+ while(n)
+ {
+ /**node->mainListItem = 0L;
+ node->listItems.clear();
+ node->groupElementLists.clear();*/
+ n = getNextNode(n, b);
+ }
+
+ //place the new Node.
+ if(parentNode)
+ n = parentNode->child;
+ else
+ n = baseNode;
+ while(n && n->next)
+ n = n->next;
+
+ if(!parentNode && (!baseNode || (nextSibling && !nextSibling->prev)))
+ {
+ nodeIsFirstChild = true;
+ baseNode = node;
+ parser->setRootNode(baseNode);
+ }
+ if(parentNode && (!parentNode->child || nextSibling == parentNode->child))
+ {
+ nodeIsFirstChild = true;
+ parentNode->child = node;
+ }
+ node->parent = parentNode;
+
+ if(nextSibling && nextSibling->prev)
+ {
+ nextSibling->prev->next = node;
+ node->prev = nextSibling->prev;
+ }
+ else if(n && !nodeIsFirstChild)
+ {
+ n->next = node;
+ node->prev = n;
+ }
+
+ if(nextSibling)
+ nextSibling->prev = node;
+ node->next = nextSibling;
+
+ //log this.
+ if(modifs)
+ {
+ modif = new NodeModif();
+ if(node->child)
+ modif->setType(NodeModif::NodeAndChildsAdded);
+ else
+ modif->setType(NodeModif::NodeAdded);
+ modif->setLocation(getLocation(node));
+ modifs->addNodeModif(modif);
+ }
+
+ //Then try to merge with the siblings
+ if(merge)
+ {
+ if(node->prev)
+ {
+ n = node->prev;
+ if(mergeNodes(node->prev, node, modifs))
+ node = n;
+ }
+ if(node->next)
+ {
+ mergeNodes(node, node->next, modifs);
+ }
+ }
+
+ //update the closesPrevious switch
+ closingNode = node->getClosingNode();
+ if(closingNode)
+ closingNode->closesPrevious = true;
+
+#ifdef HEAVY_DEBUG
+
+ coutTree(baseNode, 2);
+#endif
+
+ return node;
+}
+
+Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling, NodeSelection& cursorHolder,
+ NodeModifsSet *modifs, bool merge)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::insertNode()" << endl;
+#endif
+
+ NodeModif* modif;
+ Node *n, *closingNode;
+ bool nodeIsFirstChild = false, b;
+
+ if(!node)
+ return 0L;
+
+ //Reset the listviews items pointers for node and its children
+ n = node;
+ b = false;
+ while(n)
+ {
+ /**node->mainListItem = 0L;
+ node->listItems.clear();
+ node->groupElementLists.clear();*/
+ n = getNextNode(n, b);
+ }
+
+ //place the new Node.
+ if(parentNode)
+ n = parentNode->child;
+ else
+ n = baseNode;
+ while(n && n->next)
+ n = n->next;
+
+ if(!parentNode && (!baseNode || (nextSibling && !nextSibling->prev)))
+ {
+ nodeIsFirstChild = true;
+ baseNode = node;
+ parser->setRootNode(baseNode);
+ }
+ if(parentNode && (!parentNode->child || nextSibling == parentNode->child))
+ {
+ nodeIsFirstChild = true;
+ parentNode->child = node;
+ }
+ node->parent = parentNode;
+
+ if(nextSibling && nextSibling->prev)
+ {
+ nextSibling->prev->next = node;
+ node->prev = nextSibling->prev;
+ }
+ else if(n && !nodeIsFirstChild)
+ {
+ n->next = node;
+ node->prev = n;
+ }
+
+ if(nextSibling)
+ nextSibling->prev = node;
+ node->next = nextSibling;
+
+ //log this.
+ if(modifs)
+ {
+ modif = new NodeModif();
+ if(node->child)
+ modif->setType(NodeModif::NodeAndChildsAdded);
+ else
+ modif->setType(NodeModif::NodeAdded);
+ modif->setLocation(getLocation(node));
+ modifs->addNodeModif(modif);
+ }
+
+ //Then try to merge with the siblings
+ if(merge)
+ {
+ if(node->prev)
+ {
+ n = node->prev;
+ if(mergeNodes(node->prev, node, cursorHolder, modifs))
+ node = n;
+ }
+ if(node->next)
+ {
+ mergeNodes(node, node->next, cursorHolder, modifs);
+ }
+ }
+
+ //update the closesPrevious switch
+ closingNode = node->getClosingNode();
+ if(closingNode)
+ closingNode->closesPrevious = true;
+
+#ifdef HEAVY_DEBUG
+
+ coutTree(baseNode, 2);
+#endif
+
+ return node;
+}
+
+Node *kafkaCommon::insertNode(Node *newNode, Node *parent, Node *nextSibling, Node *nextEndSibling,
+ NodeModifsSet *modifs, bool merge)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::insertNode()1" << endl;
+#endif
+
+ Node *n, *nodeEnd = 0;
+
+ if(!newNode)
+ return 0L;
+
+ //place the new Node.
+ newNode = insertNode(newNode, parent, nextSibling, modifs, merge);
+
+ if(!newNode->tag->single && newNode->tag->type == Tag::XmlTag)
+ {
+ //create the new closing Node.
+ nodeEnd = createNode("/" + newNode->tag->name, "", Tag::XmlTagEnd, newNode->tag->write());
+ nodeEnd->closesPrevious = true;
+
+ //place the new closing Node.
+ nodeEnd = insertNode(nodeEnd, parent, nextEndSibling, modifs, merge);
+ }
+
+ //If nextSibling != nextEndSibling, move all Nodes between node and nodeEnd as child of node
+ if(nextSibling != nextEndSibling)
+ {
+ n = newNode->next;
+ while(newNode->next && newNode->next != nodeEnd)
+ moveNode(newNode->next, newNode, 0L, modifs);
+ }
+
+ return newNode;
+}
+
+Node* kafkaCommon::insertNode(Node *newNode, Node *parent, Node *startNodeToSurround,
+ Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::insertNode()2" << endl;
+#endif
+
+ if(!newNode || !startNodeToSurround || !endNodeToSurround)
+ return 0L;
+
+ //first split the Nodes.
+ if(splitNode(startNodeToSurround, startOffset, modifs))
+ {
+ if(endNodeToSurround == startNodeToSurround)
+ {
+ endNodeToSurround = endNodeToSurround->next;
+ endOffset -= startOffset;
+ }
+ startNodeToSurround = startNodeToSurround->next;
+ }
+ if(splitNode(endNodeToSurround, endOffset, modifs))
+ endNodeToSurround = endNodeToSurround->next;
+
+ //Then create and insert the new Node.
+ return insertNode(newNode, parent, startNodeToSurround,
+ endNodeToSurround, modifs);
+}
+
+Node* kafkaCommon::insertNodeSubtree(Node *node, Node* parentNode, Node* nextSibling,
+ NodeModifsSet *modifs, bool merge)
+{
+ Node *nextNode, *currentNode;
+
+ if(!node || (node && node->prev))
+ return 0L;
+
+ //insert the node subtree
+ currentNode = node;
+ while(currentNode)
+ {
+ nextNode = currentNode->next;
+ if(currentNode == node)
+ node = insertNode(currentNode, parentNode, nextSibling, nextSibling, modifs, merge);
+ else
+ insertNode(currentNode, parentNode, nextSibling, nextSibling, modifs, merge);
+
+ currentNode = nextNode;
+ }
+
+ return node;
+}
+
+Node* kafkaCommon::insertNodeSubtree(Node *node, Node* parentNode, Node* nextSibling,
+ Node* nextEndSibling, NodeModifsSet *modifs, bool merge)
+{
+ Node *nextNode, *currentNode, *currentParent;
+
+ if(!node || (node && node->prev))
+ return 0L;
+
+ //insert the node subtree.
+ currentNode = node;
+ currentParent = parentNode;
+ while(currentNode)
+ {
+ nextNode = currentNode->child;
+ currentNode->child = 0L;
+
+ //If the closing tag of currentNode is present, let's delete it
+ if(currentNode->next && QuantaCommon::closesTag(currentNode->tag, currentNode->next->tag))
+ delete extractNode(currentNode->next, 0L);
+
+ //insert the node and its closing tag if necessary.
+ if(currentNode == node)
+ {
+ currentParent = insertNode(currentNode, currentParent, nextSibling,
+ nextEndSibling, modifs, merge);
+ node = currentParent;
+ }
+ else
+ currentParent = insertNode(currentNode, currentParent, nextSibling,
+ 0L, modifs, merge);
+
+ currentNode = nextNode;
+ }
+
+ return node;
+}
+
+Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selection,
+ Node **cursorNode, long& cursorOffset, NodeModifsSet *modifs)
+{
+ Q_ASSERT(!selection.hasSelection());
+
+ Node* startNode = 0;
+ if(!(*cursorNode)) // see KafkaDocument::slotPaste()
+ startNode = getNodeFromLocation(selection.cursorNode());
+ else
+ startNode = *cursorNode;
+
+ if(!startNode)
+ {
+ kdError() << "NULL startNode in kafkaCommon::DTDInsertNodeSubtree given by NodeSelectionInd::cursorNode()" << endl;
+ return 0;
+ }
+
+ Node* endNode = 0;
+ if(!cursorNode)
+ return 0;
+ //int startOffset = selection.cursorOffset();
+ int startOffset = cursorOffset;
+
+ /**
+ * TODO : Optionnal for the moment : move the cursor coordinates so that we have good locations.
+ * e.g. <b>boo|</b>baa should be translated to <b>boo</b>|baa
+ */
+
+ if(cursorOffset == (signed)startNode->tag->tagStr().length())
+ {
+ while(startNode && startNode->tag->type != Tag::Text)
+ startNode = startNode->nextSibling();
+ if(!startNode)
+ {
+ insertNodeSubtree(newNode, baseNode->child, 0, modifs, true);
+ return newNode;
+ }
+ else
+ cursorOffset = 0;
+ }
+
+ // look for commonParent
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* commonParent = DTDGetNonInlineCommonParent(startNode, startNode,
+ commonParentStartChildLocation, commonParentEndChildLocation, 0);
+
+ Node* commonParentStartChild = getNodeFromLocation(commonParentStartChildLocation);
+
+ //OK now, we are sure the node can be inserted. Start the work by splitting
+ //startNode if necessary
+ if(cursorOffset != 0)
+ {
+ if(startNode->tag->type == Tag::Text || startNode->tag->type == Tag::Empty)
+ {
+ if(splitNode(startNode, startOffset, modifs))
+ {
+ //</TEMPORARY>
+ if(startNode == commonParentStartChild)
+ commonParentStartChild = commonParentStartChild->nextSibling();
+ endNode = startNode->nextSibling();
+ }
+ else if(startOffset == (signed)startNode->tag->tagStr().length())
+ {
+ //No need to update endNode. If endNode == startNode && startOffset == endOffset,
+ //we'll catch this later.
+ if(startNode == commonParentStartChild)
+ commonParentStartChild = commonParentStartChild->nextSibling();
+ startNode = startNode->nextSibling();
+ }
+ }
+ }
+
+ if(newNode->tag->type == Tag::Text || newNode->tag->type == Tag::Empty)
+ {
+ *cursorNode = newNode;
+ cursorOffset = newNode->tag->tagStr().length();
+ return insertNodeSubtree(newNode, startNode->parent, endNode, modifs);
+ }
+
+ //Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
+ // and the second will be surrounded by the new Node. Same thing for endNode.
+ Node* node = startNode;
+ Node* parentNode = startNode->parent;
+ Node* newParentNode = 0, *child = 0, *next = 0;
+ while(parentNode && commonParent && parentNode != commonParent)
+ {
+ if(true/*node != parentNode->firstChild()*/)
+ {
+ //node is not the first Child of parentNode, we have to duplicate parentNode, and put node and
+ //all its next sibling as child of the new parentNode.
+ /**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode, parentNode, modifs);*/
+ newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ child = parentNode->firstChild();
+ if(cursorOffset != 0)
+ {
+ while(child && (child != endNode) && !child->hasForChild(endNode))
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ child = next;
+ }
+ }
+ else
+ {
+ while(child)
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs, true, true);
+ if(child == startNode || child->hasForChild(startNode))
+ break;
+
+ child = next;
+ }
+ }
+ }
+ //commonParentStartChild = parentNode;
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+
+ if(endNode)
+ {
+ node = endNode;
+ parentNode = endNode->parent;
+ while(parentNode && commonParent && parentNode != commonParent)
+ {
+ if(true/*node != parentNode->firstChild()*/)
+ {
+ //node is not the first Child of parentNode, we have to duplicate parentNode, and put node and
+ //all its next sibling as child of the new parentNode.
+ /**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode, parentNode, modifs);*/
+ newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ child = parentNode->firstChild();
+ while(child /*&& child == endNode*/ &&
+ (child == endNode || child->hasForChild(endNode)/* ||
+ (child->prev && child->prev->hasForChild(endNode) && child->closesPrevious)*/))
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs, true, true);
+ child = next;
+ }
+ }
+ commonParentStartChild = newParentNode;
+ node = parentNode;
+ Node* aux = parentNode;
+ parentNode = parentNode->parent;
+ // Remove node subtree if empty
+ if(!aux->hasChildNodes())
+ extractAndDeleteNode(aux, modifs);
+ }
+ }
+ if(newNode->next && QuantaCommon::closesTag(newNode->tag, newNode->next->tag))
+ delete extractNode(newNode->next, 0L);
+
+ Node* nextSibling = commonParentStartChild;
+ /*
+ if(cursorOffset == 0)
+ nextSibling = nextSibling->SNext();
+ */
+ return insertNodeSubtree(newNode, commonParent, nextSibling/*, nextSibling*/, modifs);
+
+ //mergeInlineNode(commonParent, commonParent->next, cursorNode, cursorOffset, modifs);
+ //return newNode;
+}
+
+Node* kafkaCommon::DTDInsertNodeSubtree(Node* newNode, Node* parentNode, Node* nextSibling,
+ NodeSelection& /*cursorHolder*/, NodeModifsSet *modifs)
+{
+ QTag* nodeQTag = QuantaCommon::tagFromDTD(parentNode);
+ if(!nodeQTag || !nodeQTag->isChild(newNode))
+ return 0;
+ else
+ return insertNodeSubtree(newNode, parentNode, nextSibling, modifs);
+}
+
+bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset, Node *endNode,
+ int endOffset, Document *doc, Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::DTDinsertNode()" << endl;
+#endif
+
+ QValueList<int> startNodeLocation, endNodeLocation;
+ QValueList<int>::iterator itStart, itEnd;
+ Node *commonParent = 0L, *commonParentStartChild, *commonParentEndChild, *parentNode, *node;
+ Node *lastValidStartParent = 0L, *lastValidEndParent = 0L, *newParentNode, *child, *next;
+ Node *oldCommonParent, *lastNewNode, *oldParentNode;
+ QTag *parentNodeQTag = 0, *newNodeQTag, *lastNewNodeQTag;
+ NodeModif modif;
+ int locOffset = 1;
+ bool newNodeIsInline, isAfter;
+
+ if(!startNode || !endNode || !newNode || !doc)
+ {
+ Node::deleteNode(newNode);
+ return false;
+ }
+
+ //FIrst get the mandatory Nodes if necessary, and get the qTag of the first and last Node.
+ lastNewNode = createMandatoryNodeSubtree(newNode, doc);
+ lastNewNodeQTag = QuantaCommon::tagFromDTD(lastNewNode);
+ newNodeQTag = QuantaCommon::tagFromDTD(newNode);
+ if(!newNodeQTag || !lastNewNodeQTag)
+ {
+ Node::deleteNode(newNode);
+ return false;
+ }
+
+ //Then search for the common parent of startNode and endNode (commonParent)
+ //and for the childs of commonParent which are parent of startNode and endNode
+ //(commonParentStartChild && commonParentEndChild)
+ //CommonParent will be the limit (startNode -- commonNode) where Nodes can
+ //be splitted in order to insert the newNode.
+ startNodeLocation = getLocation(startNode);
+ endNodeLocation = getLocation(endNode);
+ itStart = startNodeLocation.begin();
+ itEnd = endNodeLocation.begin();
+ while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
+ (*itStart) == (*itEnd))
+ {
+ commonParent = getNodeFromSubLocation(startNodeLocation, locOffset);
+ itStart++;
+ itEnd++;
+ locOffset++;
+ }
+ //look for commonParentStartChild and commonParentEndChild
+ if(itStart != startNodeLocation.end())
+ commonParentStartChild = getNodeFromSubLocation(startNodeLocation, locOffset);
+ else
+ commonParentStartChild = commonParent;
+ if(itEnd != endNodeLocation.end())
+ commonParentEndChild = getNodeFromSubLocation(endNodeLocation, locOffset);
+ else
+ commonParentEndChild = commonParent;
+ //If newNode isn't inline, move commonParent to the closest non inline node
+ newNodeIsInline = isInline(newNode->tag->name);
+ if(!newNodeIsInline && commonParent && (isInline(commonParent->tag->name) ||
+ commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
+ {
+ oldCommonParent = commonParent;
+ commonParent = commonParent->parent;
+ while(commonParent && isInline(commonParent->tag->name))
+ {
+ oldCommonParent = commonParent;
+ commonParent = commonParent->parent;
+ }
+ commonParentStartChild = oldCommonParent;
+ commonParentEndChild = oldCommonParent;
+ }
+ //startNode or endNode can't be the commonParent.
+ else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
+ commonParent = commonParent->parent;
+
+ //Now look if at least one of the parent Nodes between startNode and commonParent
+ //can have nodeName as child. If so for startNode and endNode, let's find the last
+ //parent Nodes which can have nodeName as child.
+ parentNode = startNode->parent;
+ oldParentNode = startNode;
+ while(parentNode && commonParent && parentNode != commonParent->parent)
+ {
+ parentNodeQTag = QuantaCommon::tagFromDTD(parentNode);
+ if(parentNodeQTag && parentNodeQTag->isChild(newNode) &&
+ lastNewNodeQTag->isChild(oldParentNode))
+ lastValidStartParent = parentNode;
+ else if(newNodeIsInline || !isInline(parentNode->tag->name))
+ break;
+ //else if(!newNodeIsInline && isInline(parentNode)), we continue : BLOCK element can
+ //cut some inline tag in order to be inserted.
+ oldParentNode = parentNode;
+ parentNode = parentNode->parent;
+ }
+ parentNode = endNode->parent;
+ oldParentNode = endNode;
+ while(parentNode && commonParent && parentNode != commonParent->parent)
+ {
+ parentNodeQTag = QuantaCommon::tagFromDTD(parentNode);
+ if(parentNodeQTag && parentNodeQTag->isChild(newNode) &&
+ lastNewNodeQTag->isChild(oldParentNode))
+ lastValidEndParent = parentNode;
+ else if(newNodeIsInline || !isInline(parentNode->tag->name))
+ break;
+ //else if(!newNodeIsInline && isInline(parentNode)), we continue : BLOCK element can
+ //cut some inline tag in order to be inserted.
+ oldParentNode = parentNode;
+ parentNode = parentNode->parent;
+ }
+
+ /**if(!lastValidEndParent || !lastValidStartParent)
+ {
+ Node::deleteNode(newNode);
+ return false;
+ }*/
+
+ //OK now, we are sure the node can be inserted. Start the work by splitting
+ //startNode and endNode if necessary
+ if(startNode->tag->type == Tag::Text || startNode->tag->type == Tag::Empty)
+ {
+ if(splitNode(startNode, startOffset, modifs))
+ {
+ //<TEMPORARY>
+ if(startNode == (*cursorNode) && cursorOffset > startOffset)
+ {
+ (*cursorNode) = (*cursorNode)->nextSibling();
+ cursorOffset -= startOffset;
+ }
+ //</TEMPORARY>
+ if(startNode == commonParentStartChild)
+ commonParentStartChild = commonParentStartChild->nextSibling();
+ if(startNode == endNode)
+ {
+ endNode = endNode->nextSibling();
+ endOffset -= startOffset;
+ }
+ startNode = startNode->nextSibling();
+ startOffset = 0;
+ }
+ else if(startOffset == (signed)startNode->tag->tagStr().length())
+ {
+ //No need to update endNode. If endNode == startNode && startOffset == endOffset,
+ //we'll catch this later.
+ if(startNode == commonParentStartChild)
+ commonParentStartChild = commonParentStartChild->nextSibling();
+ startNode = startNode->nextSibling();
+ }
+ }
+ if(endNode->tag->type == Tag::Text || endNode->tag->type == Tag::Empty)
+ {
+ if(!splitNode(endNode, endOffset, modifs) && endOffset == 0)
+ {
+ //No need to update startNode. If startNode == endNode && startOffset == endOffset,
+ //we'll catch this later.
+ if(endNode == commonParentEndChild)
+ commonParentEndChild = commonParentEndChild->previousSibling();
+ if (endNode->previousSibling())
+ endNode = endNode->previousSibling();
+ }
+ }
+
+ //Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
+ // and the second will be surrounded by the new Node. Same thing for endNode.
+ node = startNode;
+ if (!startNode) //Andras: it can happen.
+ return false;
+ parentNode = startNode->parent;
+ while(lastValidStartParent && parentNode && parentNode != lastValidStartParent)
+ {
+ if(node != parentNode->firstChild())
+ {
+ //node is not the first Child of parentNode, we have to duplicate parentNode, and put node and
+ //all its next sibling as child of the new parentNode.
+ /**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode, parentNode, modifs);*/
+ newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ child = parentNode->firstChild();
+ while(child && child != startNode && !child->hasForChild(startNode))
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ child = next;
+ }
+ }
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+ node = endNode;
+ parentNode = endNode->parent;
+ while(lastValidEndParent && parentNode && parentNode != lastValidEndParent)
+ {
+ if(node != parentNode->lastChild())
+ {
+ //node is not the last Child of parentNode, we have to duplicate parentNode, and put all
+ //the next sibling of node as child of the new parentNode
+ /**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode, parentNode, modifs);*/
+ newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ if(parentNode == commonParentStartChild)
+ commonParentStartChild = newParentNode;
+ if(parentNode == commonParentEndChild)
+ commonParentEndChild = newParentNode;
+ child = parentNode->firstChild();
+ while(child)
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ if(child == endNode || child->hasForChild(endNode))
+ {
+ if(QuantaCommon::closesTag(child->tag, next->tag))
+ moveNode(next, newParentNode, 0L, modifs);
+ break;
+ }
+ child = next;
+ }
+ }
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+
+ //Now if startNode is after endNode, this means that a selectionless insertion is being done.
+ //(This is due to the text splitting)
+ //Let's insert it and return
+ isAfter = (compareNodePosition(startNode, endNode) == kafkaCommon::isAfter);
+ if(isAfter || (startNode == endNode && startOffset == endOffset &&
+ (signed)startNode->tag->tagStr().length() == startOffset))
+ {
+ if(isAfter)
+ parentNodeQTag = QuantaCommon::tagFromDTD(commonParent);
+ else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTag)
+ parentNodeQTag = QuantaCommon::tagFromDTD(startNode);
+ else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTagEnd)
+ parentNodeQTag = QuantaCommon::tagFromDTD(startNode->parent);
+ if(!parentNodeQTag || (parentNodeQTag && parentNodeQTag->isChild(newNode)))
+ {
+ if(isAfter)
+ insertNodeSubtree(newNode, commonParent, commonParentStartChild, modifs);
+ else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTag)
+ insertNodeSubtree(newNode, startNode, 0L, modifs);
+ else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTagEnd)
+ insertNodeSubtree(newNode, startNode->parent, startNode->next, modifs);
+ //<TEMPORARY>
+ (*cursorNode) = lastNewNode;
+ cursorOffset = 0;
+ //</TEMPORARY>
+ return true;
+ }
+ else
+ {
+ Node::deleteNode(newNode);
+ return false;
+ }
+ }
+ else
+ {
+ //Else we apply the recursive function to add the new Node when necessary/possible.
+ bool addingStarted = false;
+ bool examinationStarted = false;
+ bool nodeInserted = false;
+ int level = 0;
+ addNodeRecursively(newNode, lastNewNode,
+ (compareNodePosition(lastValidStartParent, commonParentStartChild) ==
+ kafkaCommon::isAfter)?lastValidStartParent:commonParentStartChild,
+ (compareNodePosition(lastValidEndParent, commonParentEndChild) ==
+ kafkaCommon::isAfter)?lastValidEndParent:commonParentEndChild,
+ startNode, endNode, commonParentStartChild, examinationStarted,
+ addingStarted, nodeInserted, level, modifs);
+
+ //And we merge if necessary some identical inline Nodes.
+ mergeInlineNode(startNode, endNode, cursorNode, cursorOffset, modifs);
+ return nodeInserted;
+ }
+}
+
+bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startOffset,
+ Node *endNode, int endOffset, Document *doc, Node **cursorNode, long &cursorOffset,
+ NodeModifsSet *modifs)
+{
+ int result;
+
+ if(!newNode || !startNode || !endNode || !doc)
+ return false;
+
+ //First try to remove the Nodes. If unsuccessfull, try to insert it.
+ result = DTDExtractNode(newNode->tag->name, doc, startNode, startOffset, endNode, endOffset,
+ cursorNode, cursorOffset, modifs);
+ if(result == kafkaCommon::nothingExtracted || result == kafkaCommon::extractionBadParameters)
+ {
+ return DTDinsertNode(newNode, startNode, startOffset, endNode, endOffset, doc, cursorNode,
+ cursorOffset, modifs);
+ }
+ else
+ return true;
+ //else if result == kafkaCommon::extractionStoppedDueToBadNodes,
+ //what should we do?
+}
+
+Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+ int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs,
+ bool merge)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::createAndInsertNode() - nodeName :" << nodeName <<
+ " - tagStr :" << tagString << " - nodeType :" << nodeType << endl;
+#endif
+
+ Node *node;
+
+ //create the new Node.
+ node = createNode(nodeName, tagString, nodeType, doc);
+
+ //insert the new Node.
+ insertNode(node, parent, nextSibling, modifs, merge);
+
+ return node;
+}
+
+Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+ int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling,
+ NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::createAndInsertNode()2- nodeName :" << nodeName <<
+ " - tagStr :" << tagString << " - nodeType :" << nodeType << endl;
+#endif
+
+ Node *node;
+
+ //create the new Node.
+ node = createNode(nodeName, tagString, nodeType, doc);
+
+ //insert the new Node.
+ insertNode(node, parent, nextSibling, nextEndSibling, modifs);
+
+ return node;
+}
+
+Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+ int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
+ Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::createAndInsertNode()3 - nodeName :" << nodeName <<
+ " - tagStr :" << tagString << " - nodeType :" << nodeType << endl;
+#endif
+
+ Node *node;
+
+ if(!startNodeToSurround || !endNodeToSurround)
+ return 0L;
+
+ //create the new Node.
+ node = createNode(nodeName, tagString, nodeType, doc);
+
+ //insert the new Node.
+ insertNode(node, parent, startNodeToSurround, endNodeToSurround, startOffset, endOffset,
+ modifs);
+
+ return node;
+
+}
+
+bool kafkaCommon::DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString,
+ int nodeType, Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
+ Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "kafkaCommon::DTDcreateAndInsertNode()2 - nodeName : " << nodeName <<
+ " - tagStr" <<tagString << endl;
+#endif
+
+ Node *node;
+
+ if(!startNode || !endNode)
+ return false;
+
+ //create the new Node.
+ node = createNode(nodeName, tagString, nodeType, doc);
+
+ //insert the new Node.
+ return DTDinsertNode(node, startNode, startOffset, endNode, endOffset, doc, cursorNode,
+ cursorOffset, modifs);
+
+}
+
+bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
+ Node *startExaminationNode, Node *endExaminationNode, Node* startNode, Node *endNode,
+ Node* currentNode, bool &examinationStarted, bool &addingStarted, bool &nodeInserted, int level,
+ NodeModifsSet *modifs)
+{
+
+ QTag *leafNodeQTag, *currentNodeParentQTag;
+ Node *startSelection = 0L, *endSelection = 0L, *oldCurrentNode, *copyNewNode;
+ bool selectionInProgress = false, validCurNodeParent = false;
+
+ leafNodeQTag = QuantaCommon::tagFromDTD(leafNode);
+ if(!leafNodeQTag)
+ return false;
+
+ if(currentNode && currentNode->parent)
+ {
+ currentNodeParentQTag = QuantaCommon::tagFromDTD(currentNode->parent);
+ if(currentNodeParentQTag && currentNodeParentQTag->isChild(newNode))
+ validCurNodeParent = true;
+ }
+
+ while(currentNode)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level << "] - currentNode :" <<
+ currentNode->tag->name << "("<< currentNode->tag->type << ")(" << currentNode << ")" << endl;
+#endif
+ //If currentNode is the startExaminationNode, let's start to examine Nodes (=> search the startNode)
+ if(currentNode == startExaminationNode)
+ examinationStarted = true;
+
+ //If currentNode is the startNode, let's start to try to add Nodes.
+ if(currentNode == startNode)
+ addingStarted = true;
+
+ //If the currentNode is text or XmlTag, and if it is DTD valid to insert the node Subtree and
+ //if the examination has started and currentNode doesn't have endExaminationNode as
+ //child, let's start/extend the selection over this node.
+ if((currentNode->tag->type == Tag::XmlTag || currentNode->tag->type == Tag::Text) &&
+ leafNodeQTag->isChild(currentNode) && validCurNodeParent && examinationStarted &&
+ !currentNode->hasForChild(endExaminationNode))
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - Valid Child : " << currentNode->tag->name << endl;
+#endif
+ //extend the selection to this node.
+ if(currentNode->tag->type == Tag::XmlTag && currentNode->getClosingNode())
+ endSelection = currentNode->getClosingNode();
+ else
+ endSelection = currentNode;
+
+ //If this Node is, or has for child startNode, let's start to add newNode
+ if(currentNode->hasForChild(startNode) || currentNode == startNode)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - This Node has the startNode as Child : " << currentNode->tag->name << endl;
+#endif
+
+ addingStarted = true;
+ }
+
+ //If there isn't a previously started selection, let's start it now.
+ if(!selectionInProgress && addingStarted)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - selection started at Node " << currentNode->tag->name << endl;
+#endif
+
+ selectionInProgress = true;
+ startSelection = currentNode;
+ }
+ }
+ else if(currentNode->tag->type == Tag::XmlTag || currentNode->tag->type == Tag::Text)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - Invalid Child : " << currentNode->tag->name << endl;
+#endif
+ //the current Node can't handle newNode as a child, let's stop the selection
+ // here and surround the current selection with newNode
+ endSelection = currentNode->prev;
+ if(selectionInProgress)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - selection ended(2) at Node " << currentNode->tag->name << endl;
+#endif
+
+ selectionInProgress = false;
+ if(addingStarted)
+ {
+ while(startSelection && startSelection->tag->type == Tag::Empty)
+ startSelection = startSelection->next;
+ while(endSelection && endSelection->tag->type == Tag::Empty)
+ endSelection = endSelection->prev;
+ if (startSelection && endSelection)
+ {
+ /**copyNewNode = duplicateNode(newNode);
+ insertNode(copyNewNode, startSelection->parentNode(), startSelection,
+ endSelection->next, modifs);*/
+ copyNewNode = duplicateNodeSubtree(newNode);
+ insertNodeSubtree(copyNewNode, startSelection->parentNode(), startSelection,
+ endSelection->next, modifs);
+ nodeInserted = true;
+ }
+ }
+ }
+
+ //TESTING: If this Node is, or has for child startNode, let's start to add newNode
+ /**if(currentNode->hasForChild(startNode) || currentNode == startNode)
+ {
+ #ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - This Node has the startNode as Child : " << currentNode->tag->name << endl;
+ #endif
+
+ addingStarted = true;
+ }*/
+
+ //Let's try to surround some of the childs of currentNode.
+ if(currentNode->child)
+ {
+ addNodeRecursively(newNode, leafNode, startExaminationNode,
+ endExaminationNode, startNode, endNode, currentNode->child,
+ examinationStarted, addingStarted, nodeInserted, level + 1, modifs);
+ }
+ }
+ //If the currentNode is XmlTagEnd, Empty or whatever but not XmlTag and Text,
+ // we will surround them with newNode if a selection was started.
+ else
+ {
+ if(selectionInProgress)
+ {
+ if((currentNode->tag->type == Tag::XmlTag || currentNode->tag->type == Tag::ScriptTag) &&
+ currentNode->getClosingNode())
+ endSelection = currentNode->getClosingNode();
+ else
+ endSelection = currentNode;
+ }
+ //If this Node is, or has for child startNode, let's start to add newNode
+ if((currentNode->hasForChild(startNode) || currentNode == startNode) &&
+ examinationStarted)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - This Node has the startNode as Child : " << currentNode->tag->name << endl;
+#endif
+
+ addingStarted = true;
+ }
+ }
+
+ //If the current Node is, or has for child endNode, or if currentNode is
+ //endExaminationNode or if examination is stopped, let's stop the current selection.
+ if(currentNode->hasForChild(endNode) || currentNode == endNode ||
+ currentNode == endExaminationNode)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - This Node has the endNode as Child : " << currentNode->tag->name << endl;
+#endif
+
+ addingStarted = false;
+ examinationStarted = false;
+ if(selectionInProgress)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - selection ended at Node " << currentNode->tag->name << endl;
+#endif
+
+ selectionInProgress = false;
+ while(startSelection && startSelection->tag->type == Tag::Empty)
+ startSelection = startSelection->next;
+ while(endSelection && endSelection->tag->type == Tag::Empty)
+ endSelection = endSelection->prev;
+ if (startSelection && endSelection)
+ {
+ /**copyNewNode = duplicateNode(newNode);
+ insertNode(copyNewNode, startSelection->parentNode(), startSelection,
+ endSelection->next, modifs);*/
+ copyNewNode = duplicateNodeSubtree(newNode);
+ insertNodeSubtree(copyNewNode, startSelection->parentNode(), startSelection,
+ endSelection->next, modifs);
+ nodeInserted = true;
+ }
+ }
+ }
+
+ oldCurrentNode = currentNode;
+ currentNode = currentNode->next;
+ }
+
+ if(selectionInProgress)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "kafkaCommon::addNodeRevursively() [" << level <<
+ "] - selection ended(3) at Node " << oldCurrentNode->tag->name << endl;
+#endif
+
+ selectionInProgress = false;
+ endSelection = oldCurrentNode;
+ if(addingStarted)
+ {
+ while(startSelection && startSelection->tag->type == Tag::Empty)
+ startSelection = startSelection->next;
+ while(endSelection && endSelection->tag->type == Tag::Empty)
+ endSelection = endSelection->prev;
+ /**copyNewNode = duplicateNode(newNode);
+ insertNode(copyNewNode, startSelection->parentNode(), startSelection,
+ endSelection->next, modifs);*/
+ copyNewNode = duplicateNodeSubtree(newNode);
+ insertNodeSubtree(copyNewNode, startSelection->parentNode(), startSelection,
+ endSelection->next, modifs);
+ nodeInserted = true;
+ }
+ }
+
+ //The newNode was a template, let's delete it now.
+ if(level == 0)
+ Node::deleteNode(newNode);
+ return true;
+}
+
+Node *kafkaCommon::duplicateNode(Node *node)
+{
+ Node *newNode;
+
+ if(!node)
+ return 0L;
+
+ newNode = new Node(0L);
+ (*newNode) = node;
+ newNode->tag->setCleanStrBuilt(false);
+ newNode->tag->setIndentationDone(false);
+
+ return newNode;
+}
+
+typedef struct boo
+{
+ boo()
+ {
+ m_n1 = m_n2 = 0L;
+ }
+ boo(Node *n1, Node *n2)
+ {
+ m_n1 = n1;
+ m_n2 = n2;
+ }
+ Node *m_n1;
+ Node *m_n2;
+}
+NodeLink;
+
+Node* kafkaCommon::getLastChild(Node* node)
+{
+ assert(node);
+
+ Node* end_node = node->getClosingNode();
+ if(!end_node && node->hasChildNodes())
+ end_node = node->lastChildNE();
+ else if(!end_node)
+ end_node = node;
+
+ assert(end_node);
+
+ return end_node;
+}
+
+Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly)
+{
+ QPtrList<NodeLink> nodeLinkList;
+ bool goUp = false;
+ Node *currentNode, *currentNewNode, *newRootNode = 0, *newNext, *newParent, *newPrev;
+ NodeLink *link;
+ Node* endNode = 0;
+ if(!node)
+ return 0L;
+
+ if(childAndClosingTagOnly)
+ endNode = getLastChild(node);
+
+
+ nodeLinkList.setAutoDelete(true);
+ currentNode = node;
+ while(currentNode)
+ {
+ currentNewNode = duplicateNode(currentNode);
+ nodeLinkList.append(new NodeLink(currentNode, currentNewNode));
+
+ newNext = 0L;
+ newParent = 0L;
+ newPrev = 0L;
+ for(link = nodeLinkList.first(); link; link = nodeLinkList.next())
+ {
+ if(link->m_n1 == currentNode->parent)
+ newParent = link->m_n2;
+ else if(link->m_n1 == currentNode->next)
+ newNext = link->m_n2;
+ else if(link->m_n1 == currentNode->prev)
+ newPrev = link->m_n2;
+ }
+
+ if(!newParent && !newPrev)
+ newRootNode = currentNewNode;
+ else if(!newParent)
+ {
+ //Temporary, insertNode would rely on baseNode which can be dangerous
+ currentNewNode->prev = newPrev;
+ newPrev->next = currentNewNode;
+ }
+ else
+ insertNode(currentNewNode, newParent, newNext, 0L, false);
+
+ if(childAndClosingTagOnly)
+ currentNode = getNextNode(currentNode, goUp, endNode);
+ else
+ currentNode = getNextNode(currentNode, goUp, node);
+ }
+
+ return newRootNode;
+}
+
+Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractChildren,
+ bool extractClosingTag)
+{
+ NodeModif *modif = 0, *modifChild;
+ Node *lastChild, *curNode;
+ Node *parent, *next, *child, *n;
+ //Node *prev;
+ bool isSingle;
+ int type;
+ QString namespaceName, nodeName, caseSensitive;
+ QString closingNamespaceName, closingNodeName, closingCaseSensitive;
+ QValueList<int> location;
+
+ if(!node)
+ return 0L;
+
+ if(!node->child)
+ extractChildren = true;
+
+ parent = node->parent;
+ next = node->next;
+ //prev = node->prev; //Should this be used at all?
+ child = node->child;
+ lastChild = node->lastChild();
+ isSingle = node->tag->single;
+ type = node->tag->type;
+ namespaceName = node->tag->nameSpace;
+ nodeName = node->tag->name;
+ caseSensitive = node->tag->dtd()->caseSensitive;
+
+ //logging
+ if(modifs)
+ {
+ modif = new NodeModif();
+ if(extractChildren)
+ modif->setType(NodeModif::NodeAndChildsRemoved);
+ else
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(getLocation(node));
+
+ //log the children move if we don't extract the children
+ if(!extractChildren)
+ {
+ location = getLocation(node);
+ location.last()++;
+ n = lastChild;
+ while(n)
+ {
+ modifChild = new NodeModif();
+ modifChild->setType(NodeModif::NodeAndChildsMoved);
+ modifChild->setLocation(getLocation(n));
+ modifChild->setFinalLocation(location);
+ modifs->addNodeModif(modifChild);
+ n = n->prev;
+ }
+ }
+ }
+
+ //starting to extract.
+ if(node == baseNode)
+ {
+ if(extractChildren)
+ baseNode = 0L;
+ else
+ baseNode = node->child;
+ parser->setRootNode(baseNode);
+ }
+ if(!extractChildren)
+ {
+ curNode = node->child;
+ while(curNode)
+ {
+ curNode->parent = node->parent;
+ curNode = curNode->next;
+ }
+ }
+ if(node->parent && node->parent->child == node)
+ {
+ if(extractChildren)
+ node->parent->child = node->next;
+ else
+ node->parent->child = node->child;
+ }
+ node->parent = 0L;
+ if(node->prev)
+ {
+ if(extractChildren)
+ node->prev->next = node->next;
+ else
+ {
+ node->prev->next = node->child;
+ node->child->prev = node->prev;
+ }
+ }
+ if(node->next)
+ {
+ if(extractChildren)
+ node->next->prev = node->prev;
+ else
+ {
+ /**lastChild = node->child;
+ while(lastChild->next)
+ lastChild = lastChild->next;*/
+ node->next->prev = lastChild;
+ lastChild->next = node->next;
+ }
+ }
+ node->prev = 0L;
+ node->next = 0L;
+ if(!extractChildren)
+ node->child = 0L;
+
+ if(modifs)
+ {
+ modif->setNode(0/*node*/); // this deletes the node!!???
+ modifs->addNodeModif(modif);
+ }
+
+ //extract the closing Tag
+ if(extractClosingTag && type == Tag::XmlTag && !isSingle && next)
+ {
+ while(next && next->tag->type == Tag::Empty)
+ next = next->next;
+ if(next)
+ {
+ closingNamespaceName = next->tag->nameSpace;
+ closingNodeName = next->tag->name;
+ closingCaseSensitive = next->tag->dtd()->caseSensitive;
+ if(QuantaCommon::closesTag(namespaceName, nodeName, caseSensitive,
+ closingNamespaceName, closingNodeName, closingCaseSensitive))
+ extractNode(next, modifs, false, false);
+ }
+ }
+
+#ifdef HEAVY_DEBUG
+ coutTree(baseNode, 2);
+#endif
+
+ return node;
+}
+
+Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node *endNode, int endOffset,
+ Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs, bool extractInlineParentNodes)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "kafkaCommon::extractNodeSubtree()" << endl;
+#endif
+
+ if(!startNode || !endNode)
+ return 0;
+
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* commonParent = 0;
+
+ NodeSelection cursorHolder;
+ cursorHolder.setCursorNode(*cursorNode);
+ cursorHolder.setCursorOffset(cursorOffset);
+
+ splitStartAndEndNodeSubtree(startNode, startOffset, endNode, endOffset, commonParent,
+ commonParentStartChildLocation, commonParentEndChildLocation,
+ cursorHolder, 0, modifs, extractInlineParentNodes);
+
+ *cursorNode = cursorHolder.cursorNode();
+ cursorOffset = cursorHolder.cursorOffset();
+ Node* commonParentStartChild = getNodeFromLocation(commonParentStartChildLocation);
+ Node* commonParentEndChild = getNodeFromLocation(commonParentEndChildLocation);
+
+ if(startNode == endNode)
+ {
+ Q_ASSERT(startNode->tag->type == Tag::Text || startNode->tag->type == Tag::Empty);
+
+ Node* prev = startNode->prev;
+ Node* next = startNode->next;
+
+ Node* aux = extractNode(startNode, modifs);
+
+ mergeInlineNode(prev, next, cursorNode, cursorOffset, modifs);
+
+ return aux;
+ }
+
+ // now let us extract the subtree
+
+ if(!commonParentEndChild)
+ commonParentEndChild = endNode;
+ extractNodeSubtreeAux(commonParentStartChild, commonParentEndChild, modifs);
+
+ // merge identical nodes
+ Node* commonParentEndChild_next = commonParentEndChild->SNext();
+ mergeInlineNode(commonParent, commonParentEndChild_next, cursorNode, cursorOffset, modifs);
+ mergeInlineNode(commonParentStartChild, commonParentEndChild, cursorNode, cursorOffset, modifs);
+
+#ifdef LIGHT_DEBUG
+ coutTree(commonParentStartChild, 3);
+#endif
+
+ return commonParentStartChild;
+}
+
+Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node *endNode, int endOffset,
+ Node* nodeSubtree, NodeModifsSet* modifs, bool extractInlineParentNodes)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "kafkaCommon::extractNodeSubtree()" << endl;
+#endif
+
+ if(!startNode || !endNode)
+ return 0;
+
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* commonParent = 0;
+ if(extractInlineParentNodes)
+ {
+ commonParent = DTDGetNonInlineCommonParent(startNode, endNode,
+ commonParentStartChildLocation, commonParentEndChildLocation, nodeSubtree);
+ }
+ else
+ {
+ commonParent = DTDGetCommonParent(startNode, endNode,
+ commonParentStartChildLocation, commonParentEndChildLocation, nodeSubtree);
+ }
+ assert(commonParent == nodeSubtree);
+
+ NodeSelection selection;
+ splitStartAndEndNodeSubtree(startNode, startOffset, endNode, endOffset, commonParent,
+ commonParentStartChildLocation, commonParentEndChildLocation,
+ selection, nodeSubtree, modifs);
+
+ Node* cursorNode = selection.cursorNode();
+ long cursorOffset = selection.cursorOffset();
+ Node* commonParentStartChild = getNodeFromLocation(commonParentStartChildLocation, nodeSubtree);
+ Node* commonParentEndChild = getNodeFromLocation(commonParentEndChildLocation, nodeSubtree);
+
+ if(startNode == endNode)
+ {
+ Q_ASSERT(startNode->tag->type == Tag::Text || startNode->tag->type == Tag::Empty);
+ return extractNode(startNode, modifs);
+ }
+
+ // now let us extract the subtree
+ commonParentStartChild = getNodeFromLocation(commonParentStartChildLocation, commonParent);
+ commonParentEndChild = getNodeFromLocation(commonParentEndChildLocation, commonParent);
+
+ if(!commonParentEndChild)
+ commonParentEndChild = endNode;
+ extractNodeSubtreeAux(commonParentStartChild, commonParentEndChild, modifs);
+
+ //merge identical nodes
+/* Node* cursorNode = 0;
+ int cursorOffset = 0;*/
+ Node* commonParentEndChild_next = commonParentEndChild->SNext();
+ mergeInlineNode(commonParent, commonParentEndChild_next, &cursorNode, cursorOffset, modifs);
+ mergeInlineNode(commonParentStartChild, commonParentEndChild, &cursorNode, cursorOffset, modifs);
+
+#ifdef LIGHT_DEBUG
+ coutTree(commonParentStartChild, 3);
+#endif
+
+ return commonParentStartChild;
+}
+
+Node* kafkaCommon::extractNodeSubtreeAux(Node* commonParentStartChild, Node* commonParentEndChild, NodeModifsSet* modifs)
+{
+ Node* node = commonParentStartChild;
+ Node* prev_node = 0;
+ Node* next_node = 0;
+ Node* significant_next_node = 0;
+ Node* node_extracted = 0;
+
+ Node* commonParentEndChild_next = commonParentEndChild->SNext();
+
+ while(node && node != commonParentEndChild_next)
+ {
+ next_node = node->next;
+ significant_next_node = node->SNext();
+ node_extracted = extractNode(node, modifs, true, true);
+ if(node_extracted)
+ {
+ node_extracted->prev = prev_node;
+ if(significant_next_node != commonParentEndChild_next || (next_node && next_node->closesPrevious))
+ node_extracted->next = next_node;
+ if(next_node && next_node->closesPrevious)
+ {
+ next_node->prev = node_extracted;
+ node_extracted->_closingNode = next_node;
+ }
+ }
+ prev_node = node_extracted;
+ node = significant_next_node;
+ }
+
+ return commonParentStartChild;
+}
+
+Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNode, int endOffset, bool extractInlineParentNodes)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "kafkaCommon::getNodeSubtree()" << endl;
+#endif
+
+ if(!startNode || !endNode)
+ return 0;
+
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* commonParent = 0;
+ if(extractInlineParentNodes)
+ commonParent = DTDGetNonInlineCommonParent(startNode, endNode,
+ commonParentStartChildLocation, commonParentEndChildLocation, 0);
+ else
+ commonParent = DTDGetCommonParent(startNode, endNode,
+ commonParentStartChildLocation, commonParentEndChildLocation, 0);
+
+ // get the subtree to operate
+ Node* newStartNode = 0;
+ Node* newEndNode = 0;
+
+ Node* newCommonParent = duplicateNodeSubtree(commonParent, true);
+
+ QValueList<int> const startNodeLocation = getLocation(startNode);
+ QValueList<int> const commonParentLocation = getLocation(commonParent);
+ uint const commonParentDepth = commonParentLocation.size();
+ uint const newStartNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
+ uint const newEndNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
+
+ QValueList<int> newStartNodeLocation, newEndNodeLocation;
+ newStartNodeLocation.push_back(1);
+ newEndNodeLocation.push_back(1);
+
+ for(uint i = 1; i != newStartNodeDepth; ++i)
+ newStartNodeLocation.push_back(startNodeLocation[i + commonParentDepth - 1]);
+
+ QValueList<int> const endNodeLocation = getLocation(endNode);
+ for(uint i = 1; i != newEndNodeDepth; ++i)
+ newEndNodeLocation.push_back(endNodeLocation[i + commonParentDepth - 1]);
+
+ newStartNode = getNodeFromLocation(newStartNodeLocation, newCommonParent);
+ newEndNode = getNodeFromLocation(newEndNodeLocation, newCommonParent);
+
+ return DTDExtractNodeSubtree(newStartNode, startOffset, newEndNode, endOffset, newCommonParent, 0);
+}
+
+Node* kafkaCommon::DTDRemoveSelection(NodeSelectionInd& selection,
+ Node **cursorNode, long& cursorOffset, NodeModifsSet *modifs, bool extractInlineParentNodes)
+{
+ Q_ASSERT(selection.hasSelection());
+
+ int startOffset = selection.cursorOffset();
+ int endOffset = selection.cursorOffsetEndSel();
+ Node* startNode = getNodeFromLocation(selection.cursorNode());
+ Node* endNode = getNodeFromLocation(selection.cursorNodeEndSel());
+
+ return DTDExtractNodeSubtree(startNode, startOffset, endNode, endOffset, cursorNode, cursorOffset, modifs, extractInlineParentNodes);
+}
+
+void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool deleteChildren,
+ bool deleteClosingTag, bool mergeAndFormat)
+{
+ NodeModif modif;
+ Node *curNode, *nodePrev, *nodeNext, *nodeNext2, *n, *n2;
+ QString nodeName, closingNodeName, namespaceName, namespaceName2;
+ bool isSingle, caseSensitive, caseSensitive2;
+
+ if(!node)
+ return;
+
+ isSingle = node->tag->single;
+ nodeName = node->tag->name;
+ namespaceName = node->tag->nameSpace;
+ caseSensitive = node->tag->dtd()->caseSensitive;
+ nodePrev = node->prev;
+ nodeNext = node->next;
+ if(!node->child)
+ deleteChildren = true;
+ node = extractNode(node, modifs, deleteChildren);
+
+ //delete the closing Tag
+ if(!isSingle && deleteClosingTag && nodeNext)
+ {
+ curNode = nodeNext;
+ while(curNode && curNode->tag->type == Tag::Empty)
+ curNode = curNode->next;
+ if(curNode)
+ {
+ closingNodeName = curNode->tag->name;
+ namespaceName2 = curNode->tag->nameSpace;
+ caseSensitive2 = curNode->tag->dtd()->caseSensitive;
+ if(QuantaCommon::closesTag(namespaceName, nodeName, caseSensitive,
+ namespaceName2, closingNodeName, caseSensitive2))
+ {
+ curNode = nodeNext;
+ while(curNode)
+ {
+ nodeNext2 = curNode->next;
+ closingNodeName = curNode->tag->name;
+ namespaceName2 = curNode->tag->nameSpace;
+ caseSensitive2 = curNode->tag->dtd()->caseSensitive;
+ curNode = extractNode(curNode, modifs, deleteChildren);
+ curNode = nodeNext2;
+ if(QuantaCommon::closesTag(namespaceName, nodeName, caseSensitive,
+ namespaceName2, closingNodeName, caseSensitive2))
+ break;
+ }
+ nodeNext = curNode;
+ }
+ }
+ }
+
+ //merge the next and prev Nodes if they are both of type Text or Empty
+ if(mergeAndFormat && nodePrev)
+ {
+ n = nodePrev;
+ n2 = nodePrev->next;
+ while(n && n2 && n2->prev != nodeNext)
+ {
+ if(!mergeNodes(n, n2, modifs))
+ break;
+ n2 = n->next;
+ }
+ }
+}
+
+int kafkaCommon::DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+ int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
+ NodeModifsSet *modifs)
+{
+ QTag *nodeNameQTag, *parentQTag;
+ Node *node, *lastNodeNameStartNode, *lastNodeNameEndNode;
+ Node *parentNode, *newParentNode, *child, *next;
+ bool goUp, nodesRemoved = false, DTDError = false, result;
+ bool startNodeSplitted = false, endNodeSplitted = false;
+
+ if(!doc || !startNode || !endNode)
+ return kafkaCommon::extractionBadParameters;
+
+ //First check that nodeName is really inline and that an area is selected.
+ nodeNameQTag = QuantaCommon::tagFromDTD(doc->defaultDTD(), nodeName);
+ if(!nodeNameQTag)
+ return kafkaCommon::extractionBadParameters;
+ if(!isInline(nodeName))
+ return kafkaCommon::extractionBadParameters;
+ if(startNode->tag->type == Tag::Text && startOffset == (signed)startNode->tag->tagStr().length())
+ {
+ startOffset = 0;
+ while(startNode && startNode->nextSibling())
+ {
+ startNode = startNode->nextSibling();
+ if(startNode == endNode || startNode->tag->type == Tag::Text)
+ break;
+ }
+ }
+ if(startNode == endNode && startOffset == endOffset)
+ return kafkaCommon::extractionBadParameters;
+
+ //Then, process startNode and endNode : look if a nodeName parent is one of
+ //startNode/endNode's inline parents and if it is the case, split the necessary Nodes.
+ //The comparaison is made in lowercase, even in xml : it could be strange, for an user, to have
+ //its nodes not removed because there are in the wrong case.
+ node = startNode;
+ lastNodeNameStartNode = 0L;
+ while(node && (isInline(node->tag->name) || node->tag->type == Tag::Text))
+ {
+ if(node->tag->name.lower() == nodeName.lower())
+ lastNodeNameStartNode = node;
+ node = node->parent;
+ }
+ node = endNode;
+ lastNodeNameEndNode = 0L;
+ while(node && (isInline(node->tag->name) || node->tag->type == Tag::Text))
+ {
+ if(node->tag->name.lower() == nodeName.lower())
+ lastNodeNameEndNode = node;
+ node = node->parent;
+ }
+
+ if(startNode->tag->type == Tag::Text)
+ {
+ if(splitNode(startNode, startOffset, modifs))
+ {
+ startNodeSplitted = true;
+ //<TEMPORARY>
+ if(startNode == (*cursorNode) && cursorOffset > startOffset)
+ {
+ (*cursorNode) = (*cursorNode)->nextSibling();
+ cursorOffset -= startOffset;
+ }
+ //</TEMPORARY>
+ if(startNode == endNode)
+ {
+ endNode = endNode->nextSibling();
+ endOffset -= startOffset;
+ }
+ startNode = startNode->nextSibling();
+ }
+ }
+ if(endNode->tag->type == Tag::Text)
+ {
+ result = splitNode(endNode, endOffset, modifs);
+ if(result)
+ endNodeSplitted = true;
+ else if(!result && endOffset == 0)
+ endNode = endNode->previousSibling();
+ }
+
+ if(lastNodeNameStartNode)
+ {
+ node = startNode;
+ parentNode = startNode->parent;
+ while(parentNode && parentNode != lastNodeNameStartNode->parent)
+ {
+ if(node != parentNode->firstChild())
+ {
+ newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ child = parentNode->firstChild();
+ while(child && child != startNode && !child->hasForChild(startNode))
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ child = next;
+ }
+ }
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+ }
+ if(lastNodeNameEndNode)
+ {
+ node = endNode;
+ parentNode = endNode->parent;
+ while(parentNode && parentNode != lastNodeNameEndNode->parent)
+ {
+ if(node != parentNode->SLastChild())
+ {
+ newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ if(parentNode == lastNodeNameStartNode)
+ lastNodeNameStartNode = newParentNode;
+ child = parentNode->firstChild();
+ while(child)
+ {
+ next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ if(child == endNode || child->hasForChild(endNode))
+ {
+ if(QuantaCommon::closesTag(child->tag, next->tag))
+ moveNode(next, newParentNode, 0L, modifs);
+ break;
+ }
+ child = next;
+ }
+ }
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+ }
+
+ //Now delete the nodeName Nodes when possible from lastNodeNameStartParent to endNode.
+ node = lastNodeNameStartNode?lastNodeNameStartNode:startNode;
+ goUp = false;
+ while(node && !DTDError)
+ {
+ next = getNextNode(node, goUp);
+ if(node->tag->type == Tag::XmlTag && node->tag->name.lower() == nodeName.lower())
+ {
+ parentQTag = QuantaCommon::tagFromDTD(node->parent);
+ if(parentQTag)
+ {
+ child = node->firstChild();
+ while(child)
+ {
+ if(!parentQTag->isChild(child))
+ DTDError = true;
+ child = child->next;
+ }
+ if(!DTDError)
+ {
+ extractNode(node, modifs, false, true);
+ nodesRemoved = true;
+ }
+ }
+ }
+ if(node == endNode)
+ break;
+ node = next;
+ }
+
+ //TODO: merge the unnecessary splitted Nodes.
+ if(endNode && endNodeSplitted)
+ mergeNodes(endNode, endNode->nextSibling(), modifs, true);
+ if(startNode && startNodeSplitted)
+ {
+ node = startNode->previousSibling();
+ result = mergeNodes(startNode->previousSibling(), startNode, modifs, true);
+ startNode = node;
+ //<TEMPORARY>
+ if(result)
+ {
+ (*cursorNode) = node;
+ cursorOffset += startOffset;
+ }
+ //</TEMPORARY>
+ }
+
+ if(DTDError)
+ return kafkaCommon::extractionStoppedDueToBadNodes;
+ else if(!nodesRemoved)
+ return kafkaCommon::nothingExtracted;
+ else
+ {
+ //merge when necessary some text/identical inlines.
+ mergeInlineNode(startNode, endNode, cursorNode, cursorOffset, modifs);
+
+ return kafkaCommon::extractionDone;
+ }
+}
+
+
+void kafkaCommon::moveNode(Node *nodeToMove, Node *newParent, Node *newNextSibling,
+ NodeModifsSet *modifs, bool merge, bool moveClosingNode)
+{
+ NodeModif *modif = 0;
+ Node *newNode, *closingNode;
+ closingNode = nodeToMove->getClosingNode();
+
+ //DON'T log the removal and addition of the same Node!! When spliting the undoRedo stack
+ //it will delete the remove NodeModif and thus the Node inside which is the Node inserted.
+ if(modifs)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeAndChildsMoved);
+ modif->setLocation(getLocation(nodeToMove));
+ }
+
+ //extract the old Node.
+ newNode = extractNode(nodeToMove, 0L, true);
+
+ //insert the new Node.
+ insertNode(newNode, newParent, newNextSibling, 0L, merge);
+ if(modifs)
+ modif->setFinalLocation(getLocation(newNode));
+
+ if(moveClosingNode && closingNode)
+ moveNode(closingNode, newParent, newNextSibling,
+ modifs, merge, false);
+
+ if(modifs)
+ modifs->addNodeModif(modif);
+}
+
+void kafkaCommon::moveNode(Node *nodeToMove, Node *newParent, Node *newNextSibling, NodeSelection& cursorHolder,
+ NodeModifsSet *modifs, bool merge, bool moveClosingNode)
+{
+ NodeModif *modif = 0;
+ Node *newNode, *closingNode;
+ closingNode = nodeToMove->getClosingNode();
+
+ //DON'T log the removal and addition of the same Node!! When spliting the undoRedo stack
+ //it will delete the remove NodeModif and thus the Node inside which is the Node inserted.
+ if(modifs)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeAndChildsMoved);
+ modif->setLocation(getLocation(nodeToMove));
+ }
+
+ //extract the old Node.
+ newNode = extractNode(nodeToMove, 0L, true);
+ cursorHolder.setCursorNode(newNode);
+
+ //insert the new Node.
+ insertNode(newNode, newParent, newNextSibling, cursorHolder, 0L, merge);
+ if(modifs)
+ modif->setFinalLocation(getLocation(newNode));
+
+ if(moveClosingNode && closingNode)
+ moveNode(closingNode, newParent, newNextSibling,
+ modifs, merge, false);
+
+ if(modifs)
+ modifs->addNodeModif(modif);
+}
+
+bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
+{
+ NodeModif *modif;
+ Tag *tag;
+ QString tagStr;
+ Node *node;
+
+ if(!n || (n->tag->type != Tag::Text && n->tag->type != Tag::Empty) || offset <= 0 || offset >=
+ (signed)n->tag->tagStr().length())
+ return false;
+
+ //logging
+ if(modifs)
+ {
+ tag = new Tag(*(n->tag));
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setTag(tag);
+ modif->setLocation(getLocation(n));
+ modifs->addNodeModif(modif);
+ }
+
+ tagStr = n->tag->tagStr();
+ n->tag->setStr(tagStr.left(offset));
+
+ if(n->tag->type == Tag::Text)
+ node = createAndInsertNode("#text", tagStr.right(tagStr.length() - offset), Tag::Text, n->tag->write(),
+ n->parent, n->next, modifs, false);
+ else
+ node = createAndInsertNode("", tagStr.right(tagStr.length() - offset), Tag::Empty, n->tag->write(),
+ n->parent, n->next, modifs, false);
+
+ //Node's string is a part of n's clean string
+ node->tag->setCleanStrBuilt(true);
+ node->tag->setIndentationDone(true);
+ return true;
+}
+
+void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
+ QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs)
+{
+ //Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
+ // and the second will be surrounded by the new Node. Same thing for endNode.
+ Node* node = startNode;
+ Node* parentNode = startNode->parent;
+ Node* commonParentStartChild = 0;
+ while(parentNode && commonParent && parentNode != commonParent)
+ {
+ if(node != parentNode->firstChild())
+ {
+ Node* newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ Node* child = parentNode->firstChild();
+ while(child && child != startNode && !child->hasForChild(startNode))
+ {
+ Node* next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ child = next;
+ }
+ }
+ commonParentStartChild = parentNode;
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+
+ if(commonParentStartChild)
+ commonParentStartChildLocation = getLocation(commonParentStartChild);
+}
+
+void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation,
+ bool subTree, NodeModifsSet* modifs)
+{
+ Node* node = endNode;
+ Node* parentNode = endNode->parent;
+
+ Node* aux = 0;
+ if(subTree)
+ aux = commonParent;
+ else
+ aux = baseNode;
+ Node* commonParentStartChild = getNodeFromLocation(commonParentStartChildLocation, aux);
+ Node* commonParentEndChild = getNodeFromLocation(commonParentEndChildLocation, aux);
+ while(parentNode && commonParent && parentNode != commonParent)
+ {
+ if(node != parentNode->lastChild())
+ {
+ Node* newParentNode = duplicateNode(parentNode);
+ insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ if(parentNode == commonParentStartChild)
+ commonParentStartChild = newParentNode;
+ if(parentNode == commonParentEndChild)
+ commonParentEndChild = newParentNode;
+ Node* child = parentNode->firstChild();
+ while(child)
+ {
+ Node* next = child->next;
+ moveNode(child, newParentNode, 0L, modifs);
+ if(child == endNode || child->hasForChild(endNode))
+ {
+ if(QuantaCommon::closesTag(child->tag, next->tag))
+ moveNode(next, newParentNode, 0L, modifs);
+ break;
+ }
+ child = next;
+ }
+ }
+ node = parentNode;
+ parentNode = parentNode->parent;
+ }
+ commonParentStartChildLocation = getLocation(commonParentStartChild);
+ commonParentEndChildLocation = getLocation(commonParentEndChild);
+}
+
+void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation,
+ NodeSelection& cursorHolder,
+ Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes)
+{
+ assert(startNode && endNode);
+ assert(startOffset >= 0);
+ assert(endOffset >= 0);
+
+ // get correct start and end nodes and offsets
+ startNode = getCorrectStartNode(startNode, startOffset);
+ endNode = getCorrectEndNode(endNode, endOffset);
+
+ // look for common parent
+ if(!commonParent)
+ {
+ if(extractInlineParentNodes)
+ // get the non inline common parent
+ commonParent =
+ DTDGetNonInlineCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, subTree);
+ else
+ commonParent =
+ DTDGetCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, subTree);
+ }
+ else
+ {
+ assert(commonParent->hasForChild(startNode));
+ assert(commonParent->hasForChild(endNode));
+ assert(!commonParentStartChildLocation.empty());
+ assert(!commonParentEndChildLocation.empty());
+ }
+
+ Node* commonParentStartChild = kafkaCommon::getNodeFromLocation(commonParentStartChildLocation, subTree);
+ Node* commonParentEndChild = kafkaCommon::getNodeFromLocation(commonParentEndChildLocation, subTree);
+
+ Node* cursorNode = cursorHolder.cursorNode();
+ int cursorOffset = cursorHolder.cursorOffset();
+
+ // split start and end node
+ if(splitNode(startNode, startOffset, modifs))
+ {
+ if(startNode == cursorNode && cursorOffset > startOffset)
+ {
+ cursorNode = cursorNode->nextSibling();
+ cursorOffset -= startOffset;
+ }
+ if(startNode == commonParentStartChild)
+ commonParentStartChild = commonParentStartChild->nextSibling();
+
+ if(startNode == endNode)
+ {
+ endNode = endNode->nextSibling();
+ endOffset -= startOffset;
+ }
+ startNode = startNode->nextSibling();
+ startOffset = 0;
+ }
+ splitNode(endNode, endOffset, modifs);
+
+ // split start and end nodes subtree in function of common parent
+ commonParentStartChildLocation = kafkaCommon::getLocation(commonParentStartChild);
+ splitStartNodeSubtree(startNode, commonParent, commonParentStartChildLocation, modifs);
+
+ commonParentEndChildLocation = kafkaCommon::getLocation(commonParentEndChild);
+ splitEndNodeSubtree(endNode, commonParent, commonParentStartChildLocation, commonParentEndChildLocation, subTree, modifs);
+
+ cursorHolder.setCursorNode(cursorNode);
+ cursorHolder.setCursorOffset(cursorOffset);
+}
+
+bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeModifsSet *modifs, bool mergeTextOnly)
+{
+ NodeModif *modif;
+ Tag *tag;
+ if(!n || !n2)
+ return false;
+
+ if(((n->tag->type == Tag::Empty && !mergeTextOnly) || n->tag->type == Tag::Text) &&
+ ((n2->tag->type == Tag::Empty && !mergeTextOnly) || n2->tag->type == Tag::Text))
+ {
+ tag = new Tag(*(n->tag));
+
+ //logging
+ if(modifs)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setTag(tag);
+ modif->setLocation(getLocation(n));
+ modifs->addNodeModif(modif);
+ }
+
+ // have in consideration two spaces in a row
+ QString nStr(n->tag->tagStr());
+ QString n2Str(n2->tag->tagStr());
+ if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
+ {
+ nStr = nStr.left(nStr.length() - 1);
+ nStr.append("&nbsp;");
+ n->tag->setStr(nStr);
+
+ n2Str = n2Str.right(n2Str.length() - 1);
+ n2Str.prepend("&nbsp;");
+ n2->tag->setStr(n2Str);
+ }
+
+ if((n->tag->type == Tag::Text && n2->tag->type == Tag::Text) ||
+ (n->tag->type == Tag::Empty && n2->tag->type == Tag::Empty))
+ n->tag->setStr(n->tag->tagStr() + n2->tag->tagStr());
+ else if(n->tag->type == Tag::Empty && n2->tag->type == Tag::Text)
+ n->tag->setStr(n2->tag->tagStr());
+ //else n's string is already in n
+
+ if(n->tag->type == Tag::Text || n2->tag->type == Tag::Text)
+ n->tag->type = Tag::Text;
+ if(!n->tag->cleanStrBuilt() || !n2->tag->cleanStrBuilt())
+ n->tag->setCleanStrBuilt(false);
+ if(!n->tag->indentationDone() || !n2->tag->indentationDone())
+ n->tag->setIndentationDone(false);
+ kafkaCommon::extractAndDeleteNode(n2, modifs, false, false, false);
+
+ return true;
+ }
+ return false;
+}
+
+bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, NodeModifsSet *modifs, bool mergeTextOnly)
+{
+ NodeModif *modif;
+ Tag *tag;
+ if(!n || !n2)
+ return false;
+
+ if(((n->tag->type == Tag::Empty && !mergeTextOnly) || n->tag->type == Tag::Text) &&
+ ((n2->tag->type == Tag::Empty && !mergeTextOnly) || n2->tag->type == Tag::Text))
+ {
+ tag = new Tag(*(n->tag));
+
+ //logging
+ if(modifs)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setTag(tag);
+ modif->setLocation(getLocation(n));
+ modifs->addNodeModif(modif);
+ }
+
+ // have in consideration two spaces in a row
+ QString nStr(n->tag->tagStr());
+ QString n2Str(n2->tag->tagStr());
+ if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
+ {
+ nStr = nStr.left(nStr.length() - 1);
+ nStr.append("&nbsp;");
+ n->tag->setStr(nStr);
+
+ n2Str = n2Str.right(n2Str.length() - 1);
+ n2Str.prepend("&nbsp;");
+ n2->tag->setStr(n2Str);
+ }
+
+ if((n->tag->type == Tag::Text && n2->tag->type == Tag::Text) ||
+ (n->tag->type == Tag::Empty && n2->tag->type == Tag::Empty))
+ {
+ if(cursorHolder.cursorNode() == n2)
+ cursorHolder.setCursorOffset(n->tag->tagStr().length() + cursorHolder.cursorOffset() - 1);
+
+ n->tag->setStr(n->tag->tagStr() + n2->tag->tagStr());
+ }
+ else if(n->tag->type == Tag::Empty && n2->tag->type == Tag::Text)
+ n->tag->setStr(n2->tag->tagStr());
+ //else n's string is already in n
+
+ if(n->tag->type == Tag::Text || n2->tag->type == Tag::Text)
+ n->tag->type = Tag::Text;
+ if(!n->tag->cleanStrBuilt() || !n2->tag->cleanStrBuilt())
+ n->tag->setCleanStrBuilt(false);
+ if(!n->tag->indentationDone() || !n2->tag->indentationDone())
+ n->tag->setIndentationDone(false);
+ kafkaCommon::extractAndDeleteNode(n2, modifs, false, false, false);
+
+ cursorHolder.setCursorNode(n);
+
+ return true;
+ }
+ return false;
+}
+
+void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorNode,
+ long &cursorOffset, NodeModifsSet *modifs)
+{
+ Node *startNodeLastInlineParent, *parent, *node, *next;
+ bool goUp, success, isCursorNode, isEndNode;
+ int nodeLength;
+
+ if(!startNode || !endNode)
+ return;
+
+ //first search for the last inline parent of startNode, and then its last prev neighbour
+ // which is also inline : the merge will start from this Node.
+ startNodeLastInlineParent = startNode;
+ parent = startNode->parent;
+ while(parent && isInline(parent->tag->name))
+ {
+ startNodeLastInlineParent = parent;
+ parent = parent->parent;
+ }
+ if(startNodeLastInlineParent->prev)
+ {
+ if(startNodeLastInlineParent->prev->tag->type == Tag::Text)
+ startNodeLastInlineParent = startNodeLastInlineParent->prev;
+ else
+ {
+ node = startNodeLastInlineParent->prev;
+ while(node && (node->tag->type == Tag::Empty || node->tag->type == Tag::XmlTagEnd))
+ node = node->prev;
+ if(node && node->tag->type == Tag::XmlTag && isInline(node->tag->name))
+ startNodeLastInlineParent = node;
+ }
+ }
+
+
+ //Then navigate though the tree and merge.
+ node = startNodeLastInlineParent;
+ goUp = false;
+ while(node)
+ {
+ if(node->tag->type == Tag::XmlTag && isInline(node->tag->name))
+ {
+ next = node->next;
+ while(next && (next->tag->type == Tag::XmlTagEnd || next->tag->type == Tag::Empty))
+ next = next->next;
+ while(next && next != node && compareNodes(node, next))
+ {
+ while(next->firstChild())
+ moveNode(next->firstChild(), node, 0L, modifs, false);
+ if(next == endNode)
+ endNode = node;
+ else if((*cursorNode) == node->next)
+ {
+ //<TEMPORARY>
+ (*cursorNode) = node;
+ //</TEMPORARY>
+ }
+ extractNode(next, modifs, false, true);
+ next = node->next;
+ while(next && (next->tag->type == Tag::XmlTagEnd || next->tag->type == Tag::Empty))
+ next = next->next;
+ }
+ }
+ else if(node->tag->type == Tag::Text)
+ {
+ while(node->next && (node->next->tag->type == Tag::Text ||
+ node->next->tag->type == Tag::Empty))
+ {
+ nodeLength = (signed)node->tag->tagStr().length();
+ isCursorNode = ((*cursorNode) == node->next);
+ isEndNode = (endNode == node->next);
+ success = mergeNodes(node, node->next, modifs);
+ if(isCursorNode && success)
+ {
+ //<TEMPORARY>
+ (*cursorNode) = node;
+ cursorOffset += nodeLength;
+ //</TEMPORARY>
+ }
+ else if(isEndNode && success)
+ endNode = node;
+ }
+ }
+ if(node == endNode)
+ break;
+ node = getNextNode(node, goUp);
+ }
+}
+
+void kafkaCommon::getEndPosition(const QString &tagString, int bLine, int bCol, int &eLine, int &eCol)
+{
+ /**int result, oldResult;
+
+ result = tagString.find("\n", 0);
+ if(result == -1)
+ {
+ eLine = bLine;
+ eCol = bCol + tagString.length() - 1;
+ }
+ else
+ {
+ eLine = bLine;
+ while(result != -1)
+ {
+ eLine++;
+ oldResult = result;
+ result = tagString.find("\n", result + 1);
+ }
+ eCol = tagString.length() - oldResult - 2;
+ }*/
+ int i;
+
+ eLine = bLine;
+ eCol = bCol - 1;
+ for(i = 0; i < (signed)tagString.length(); ++i)
+ {
+ if(tagString[i] == "\n")
+ {
+ eLine++;
+ eCol = -1;
+ }
+ else
+ eCol++;
+ }
+}
+
+void kafkaCommon::getEndPosition(Node *node, int bLine, int bCol, int &eLine, int &eCol)
+{
+ if(!node)
+ {
+ eLine = 0;
+ eCol = 0;
+ return;
+ }
+
+ getEndPosition(node->tag->tagStr(), bLine, bCol, eLine, eCol);
+}
+
+void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+{
+ int eLine, eCol, bLine, bCol;
+ Tag *tag;
+ NodeModif* modif;
+
+ if(!node)
+ return;
+
+ //logging
+ if(modifs)
+ {
+ tag = new Tag(*(node->tag));
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setTag(tag);
+ modif->setLocation(getLocation(node));
+ modifs->addNodeModif(modif);
+ }
+
+ node->tag->beginPos(bLine, bCol);
+ node->tag->setStr(newTagString);
+ getEndPosition(node, bLine, bCol, eLine, eCol);
+ node->tag->setTagPosition(bLine, bCol, eLine, eCol);
+}
+
+void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+{
+ int eLine, eCol, oldELine, oldECol;
+ bool b = false;
+
+ if(!node)
+ return;
+
+ node->tag->endPos(oldELine, oldECol);
+ setTagString(node, newTagString, modifs);
+ node->tag->endPos(eLine, eCol);
+
+ fitsNodesPosition(getNextNode(node, b), eCol - oldECol, eLine - oldELine);
+}
+
+void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs)
+{
+ NodeModif *modif = 0;
+
+ if(!node)
+ return;
+
+ if(modifs)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setTag(new Tag(*(node->tag)));
+ modif->setLocation(getLocation(node));
+ }
+
+ if(node->tag->editAttribute(name, value))
+ {
+ node->tag->setCleanStrBuilt(false);
+ if(modifs)
+ modifs->addNodeModif(modif);
+ }
+}
+
+QValueList<int> kafkaCommon::getLocation(Node * node)
+{
+ QValueList<int> loc;
+ int i = 0;
+
+ while(node)
+ {
+ i = 1;
+ while(node->prev)
+ {
+ ++i;
+ node = node->prev;
+ }
+ loc.prepend(i);
+ node = node->parent;
+ }
+ return loc;
+}
+
+QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
+{
+ QValueList<int> loc;
+ int i = 0;
+
+ while(!domNode.isNull())
+ {
+ i = 1;
+ while(!domNode.previousSibling().isNull())
+ {
+ ++i;
+ domNode = domNode.previousSibling();
+ }
+ loc.prepend(i);
+ domNode = domNode.parentNode();
+ }
+ return loc;
+}
+
+Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
+{
+ QValueList<int>::iterator it;
+ Node *node = baseNode;
+ Node *m = 0L;
+ int i;
+
+ if(!node)
+ return 0L;
+ for(it = loc.begin(); it != loc.end(); ++it)
+ {
+ if(!node)
+ return 0L;
+ for(i = 1; i < (*it); ++i)
+ {
+ if(!node->next)
+ return 0L;
+ node = node->next;
+ }
+ m = node;
+ node = node->child;
+ }
+ return m;
+}
+
+Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
+{
+ QValueList<int>::iterator it;
+ Node *node = nodeTree;
+ if(!node)
+ node = baseNode;
+ Node *m = 0L;
+ int i;
+
+ if(!node)
+ return 0L;
+ for(it = loc.begin(); it != loc.end(); ++it)
+ {
+ if(!node)
+ return 0L;
+ for(i = 1; i < (*it); ++i)
+ {
+ if(!node->next)
+ return 0L;
+ node = node->next;
+ }
+ m = node;
+ node = node->child;
+ }
+ return m;
+}
+
+DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode)
+{
+ QValueList<int>::iterator it;
+ DOM::Node node = rootNode;
+ DOM::Node m = rootNode;
+ int i;
+
+ if(rootNode.isNull())
+ return DOM::Node();
+
+ for(it = loc.begin(); it != loc.end(); ++it)
+ {
+ if(node.isNull())
+ return DOM::Node();
+ for(i = 1; i < (*it); ++i)
+ {
+ if(node.nextSibling().isNull())
+ return DOM::Node();
+ node = node.nextSibling();
+ }
+ m = node;
+ node = node.firstChild();
+ }
+ return m;
+}
+
+Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
+{
+ QValueList<int>::iterator it = loc.begin();
+ QValueList<int> list;
+ int i;
+
+ for(i = 0; i < locOffset; ++i)
+ {
+ list.append((*it));
+ ++it;
+ }
+
+ return getNodeFromLocation(list);
+}
+
+Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree)
+{
+ QValueList<int>::iterator it = loc.begin();
+ QValueList<int> list;
+ int i;
+
+ for(i = 0; i != locOffset; ++i)
+ {
+ list.append((*it));
+ ++it;
+ }
+
+ return getNodeFromLocation(list, nodeTree);
+}
+
+int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
+{
+ QValueList<int>::iterator it1, it2;
+
+ it1 = pos1.begin();
+ it2 = pos2.begin();
+ while(it1 != pos1.end() && it2 != pos2.end() && (*it1) == (*it2))
+ {
+ it1++;
+ it2++;
+ }
+
+ if(it1 == pos1.end() && it2 == pos2.end())
+ return kafkaCommon::isAtTheSamePosition;
+ else if(it1 == pos1.end())
+ return kafkaCommon::isBefore;
+ else if(it2 == pos2.end() || (*it1) > (*it2))
+ return kafkaCommon::isAfter;
+ else if((*it1) < (*it2))
+ return kafkaCommon::isBefore;
+ else
+ return kafkaCommon::positionError;
+}
+
+int kafkaCommon::compareNodePosition(Node *n1, Node *n2)
+{
+ QValueList<int> pos1, pos2;
+
+ if(!n1 || !n2)
+ return kafkaCommon::positionError;
+
+ pos1 = getLocation(n1);
+ pos2 = getLocation(n2);
+
+ return compareNodePosition(pos1, pos2);
+}
+
+bool kafkaCommon::compareNodes(Node *n1, Node *n2)
+{
+ int i, j;
+
+ if(!n1 || !n2)
+ return false;
+
+ if(n1->tag->type != n2->tag->type)
+ return false;
+
+ if(n1->tag->type == Tag::XmlTag)
+ {
+ if(n1->tag->name.lower() != n2->tag->name.lower())
+ return false;
+
+ if(n1->tag->attrCount() != n2->tag->attrCount())
+ return false;
+
+ for(i = 0; i < n1->tag->attrCount(); ++i)
+ {
+ for(j = 0; j < n2->tag->attrCount(); ++j)
+ {
+ if(n1->tag->getAttribute(i).name.lower() == n2->tag->getAttribute(j).name.lower() &&
+ n1->tag->getAttribute(i).value.lower() == n2->tag->getAttribute(j).value.lower())
+ break;
+ }
+ if(j == n2->tag->attrCount())
+ return false;
+ }
+ }
+ else if(n1->tag->type == Tag::Text)
+ {
+ //TODO
+ }
+
+ return true;
+}
+
+int kafkaCommon::nodeDepth(Node *node)
+{
+ int depth = 0;
+
+ if(!node)
+ return -1;
+
+ node = node->parent;
+ while(node)
+ {
+ depth++;
+ node = node->parent;
+ }
+
+ return depth;
+}
+
+Node* kafkaCommon::hasParent(Node *node, const QString &name)
+{
+ node = node->parent;
+ while(node)
+ {
+ if(node->tag->name.lower() == name.lower())
+ return node;
+ node = node->parent;
+ }
+
+ return 0L;
+}
+
+Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const QString &name)
+{
+ Q_ASSERT(startNode && endNode);
+ //Andras: don't crash
+ if (!startNode || !endNode)
+ return 0;
+
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* node = DTDGetCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, 0);
+
+ while(node)
+ {
+ if(node->tag->name.lower() == name.lower())
+ return node;
+ node = node->parent;
+ }
+
+ return 0;
+}
+
+bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node parent, DOM::Node nextSibling,
+ DOM::Node rootNode)
+{
+ if(node.isNull())
+ return false;
+
+ if(parent.isNull())
+ {
+ if(rootNode.isNull())
+ return false;
+ parent = rootNode;
+ }
+ //Andras: avoid exceptions
+ if (!nextSibling.isNull() && nextSibling.parentNode() != parent)
+ {
+ kdDebug(25001)<< "kafkaCommon::insertDomNode() - invalid nextSibling!" << endl;
+ return false;
+ }
+ if (node.ownerDocument() != parent.ownerDocument())
+ {
+ kdDebug(25001)<< "kafkaCommon::insertDomNode() - ownerDocument is different!" << endl;
+ return false;
+ }
+
+ try
+ {
+ parent.insertBefore(node, nextSibling);
+ }
+ catch(DOM::DOMException e)
+ {
+ kdDebug(25001)<< "kafkaCommon::insertDomNode() - ERROR code :" << e.code << endl;
+ }
+ return true;
+}
+
+bool kafkaCommon::removeDomNode(DOM::Node node)
+{
+ DOM::Node parent = node.parentNode();
+
+ if(parent.isNull())
+ return false;
+
+ parent.removeChild(node);
+
+ return true;
+}
+
+DOM::Node kafkaCommon::createDomNode(const QString &nodeName, const DTDStruct* dtd,
+ DOM::Document rootNode)
+{
+ // FIXME
+ //this will change with the futur multi-DTDs support
+ //It does not use exceptions handling, so everything is checked via the DTEP definitions.
+ DOM::Node dn;
+ QTag *qTag = 0L;
+
+ qTag = QuantaCommon::tagFromDTD(dtd, nodeName);
+
+ if(qTag)
+ dn = rootNode.createElement(nodeName);
+#ifdef HEAVY_DEBUG
+
+ else
+ kdDebug(25001)<< "kafkaCommon::createDomNode() - ERROR bad nodeName :" <<
+ nodeName << endl;
+#endif
+
+ return dn;
+}
+
+DOM::Node kafkaCommon::createDomNode(Node *node, DOM::Document rootNode)
+{
+ if(!node)
+ return DOM::Node();
+
+ return createDomNode(node->tag->name, node->tag->dtd(), rootNode);
+}
+
+DOM::Node kafkaCommon::createTextDomNode(const QString &textString, DOM::Document rootNode)
+{
+ return rootNode.createTextNode(textString);
+}
+
+DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
+ const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+{
+ DOM::Node attr;
+ QTag *qTag = 0L;
+
+ qTag = QuantaCommon::tagFromDTD(dtd, nodeName);
+ if(!qTag)
+ return DOM::Node();
+
+ if(qTag->isAttribute(attrName))
+ {
+ attr = rootNode.createAttribute(attrName);
+ attr.setNodeValue(attrValue);
+ }
+#ifdef HEAVY_DEBUG
+ else
+ kdDebug(25001)<< "kafkaCommon::createDomNodeAttribute() - ERROR bad attrName " <<
+ attrName << endl;
+#endif
+
+ return attr;
+}
+
+DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrName,
+ DOM::Document rootNode)
+{
+ if(!node)
+ return DOM::Node();
+
+ return createDomNodeAttribute(node->tag->name, node->tag->dtd(), attrName, "", rootNode);
+}
+
+//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const QString &attrName,
+// DOM::Document rootNode)
+//{
+/**if(node.isNull())
+ return DOM::node();
+
+return createDomNodeAttribute()*/
+//}
+
+bool kafkaCommon::insertDomNodeAttribute(DOM::Node node, DOM::Node attr)
+{
+ if(node.isNull())
+ return false;
+
+ //should we check if the attr is valid???
+ node.attributes().setNamedItem(attr);
+
+ return true;
+}
+
+bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
+ const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+{
+ DOM::Node attr;
+
+ if(node.isNull())
+ return false;
+
+ attr = node.attributes().getNamedItem(attrName);
+ if(attr.isNull())
+ {
+ //let's create it
+ attr = createDomNodeAttribute(nodeName, dtd, attrName, attrValue, rootNode);
+ if(attr.isNull())
+ return false;
+ insertDomNodeAttribute(node, attr);
+ }
+
+ return true;
+}
+
+bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
+ const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+{
+ if(!node)
+ return false;
+
+ return editDomNodeAttribute(domNode, node->tag->name, node->tag->dtd(),
+ attrName, attrValue, rootNode);
+}
+
+DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const QString &name)
+{
+ while(!domNode.isNull())
+ {
+ if(domNode.nodeName().string().lower() == name.lower())
+ return domNode;
+ domNode = domNode.parentNode();
+ }
+
+ return DOM::Node();
+}
+
+int kafkaCommon::childPosition(DOM::Node domNode)
+{
+ DOM::Node parentNode, child;
+ int position = 1;
+
+ if(domNode.isNull())
+ return -1;
+
+ parentNode = domNode.parentNode();
+ child = parentNode.firstChild();
+ while(!child.isNull() && child != domNode)
+ {
+ position++;
+ child = child.nextSibling();
+ }
+
+ if(child == domNode)
+ return position;
+ else
+ return -1;
+}
+
+DOM::Node kafkaCommon::getChildNode(DOM::Node parentNode, int position, bool fallback)
+{
+ DOM::Node child;
+
+ if(parentNode.isNull())
+ return DOM::Node();
+
+ child = parentNode.firstChild();
+ while(!child.isNull() && position > 1 && ((fallback && !child.nextSibling().isNull()) || !fallback ))
+ {
+ child = child.nextSibling();
+ position--;
+ }
+
+ return child;
+}
+
+bool kafkaCommon::isInline(DOM::Node domNode)
+{
+ if(domNode.isNull())
+ return false;
+
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE)
+ return true;
+
+ return isInline(domNode.nodeName().string());
+}
+
+bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Node endNode,
+ const DTDStruct* dtd)
+{
+ QTag *parentQTag;
+ DOM::Node child;
+
+ if(!dtd || parent.isNull())
+ return false;
+
+ parentQTag = QuantaCommon::tagFromDTD(dtd, parent.nodeName().string());
+
+ if(!parentQTag)
+ return false;
+
+ child = startNode;
+ while(!child.isNull())
+ {
+ if(!parentQTag->isChild(child.nodeName().string()))
+ return false;
+ if(child == endNode)
+ return true;
+ child = child.nextSibling();
+ }
+
+ return true;
+}
+
+bool kafkaCommon::isInline(const QString &nodeNam)
+{
+ QString nodeName = nodeNam.lower();
+ if(nodeName == "q" || nodeName == "u" || nodeName == "i" || nodeName == "b" ||
+ nodeName == "cite" || nodeName == "em" || nodeName == "var" || nodeName == "em" ||
+ nodeName == "tt" || nodeName == "code" || nodeName == "kbd" || nodeName == "samp" ||
+ nodeName == "big" || nodeName == "small" || nodeName == "s" || nodeName == "strike" ||
+ nodeName == "sub" || nodeName == "sup" || nodeName == "abbr" ||
+ nodeName == "acronym" || nodeName == "a" || nodeName == "bdo" ||
+ nodeName == "font" || nodeName == "#text" || nodeName == "strong" || nodeName == "dfn" ||
+ nodeName == "img" || nodeName == "applet" || nodeName == "object" || nodeName == "basefont" ||
+ nodeName == "br" || nodeName == "script" || nodeName == "map" || nodeName == "span" ||
+ nodeName == "iframe" || nodeName == "input" || nodeName == "select" || nodeName == "textarea" ||
+ nodeName == "label" || nodeName == "button" )
+ return true;
+ else
+ return false;
+}
+
+#ifdef HEAVY_DEBUG
+void kafkaCommon::coutDomTree(DOM::Node rootNode, int indent)
+#else
+void kafkaCommon::coutDomTree(DOM::Node, int)
+#endif
+{
+#ifdef HEAVY_DEBUG
+ QString output, dots;
+ int j;
+ DOM::Node node;
+ if(rootNode.isNull())
+ kdDebug(25001)<< "kafkaCommon::coutDomTree() - bad node!" << endl;
+
+ node = rootNode;
+ while (!node.isNull())
+ {
+ dots = "";
+ dots.fill('_', indent);
+ output = dots;
+ if (node.nodeType() != DOM::Node::TEXT_NODE)
+ output += node.nodeName().string().replace('\n'," ");
+ else
+ {
+ output += "\"";
+ output+= node.nodeValue().string().replace('\n'," ");
+ output += "\"";
+ }
+ kdDebug(25001) << output <<" (" << node.nodeType() << ") "<<
+ node.handle() << endl;
+ kdDebug(25001)<< dots << " +++ prev " << node.previousSibling().handle() << " next " <<
+ node.nextSibling().handle() << " parent " <<
+ node.parentNode().handle() << " child " << node.firstChild().handle() << endl;
+ for(j = 0; j < (int)node.attributes().length(); ++j)
+ {
+ kdDebug(25001)<< dots << " *** attr" << j << " " <<
+ node.attributes().item(j).nodeName().string() << " - " <<
+ node.attributes().item(j).nodeValue().string() << endl;
+ }
+
+ if (node.hasChildNodes())
+ coutDomTree(node.firstChild(), indent + 4);
+ node = node.nextSibling();
+ }
+#endif
+}
+
+void kafkaCommon::coutTree(Node *node, int indent)
+{
+ QString output, dots;
+ int bLine, bCol, eLine, eCol, j;
+ if(!node)
+ kdDebug(25001)<< "kafkaCommon::coutTree() - bad node!" << endl;
+
+ while (node)
+ {
+ dots = "";
+ dots.fill('.', indent);
+ output = dots;
+ node->tag->beginPos(bLine, bCol);
+ node->tag->endPos(eLine, eCol);
+ if (node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd ||
+ node->tag->type == Tag::ScriptTag)
+ output += node->tag->name.replace('\n',"<return>");
+ else
+ {
+ output += "\"";
+ output+= node->tag->tagStr().replace('\n',"<return>");
+ output += "\"";
+ }
+ kdDebug(25001) << output <<" (" << node->tag->type << ", " << node->tag->cleanStrBuilt() << ", " <<
+ node->tag->indentationDone() << ") "<< node << " at pos " << bLine << ":" << bCol << " - " <<
+ eLine << ":" << eCol << endl;
+ kdDebug(25001)<< dots << " +++ prev " << node->prev << " next " << node->next << " parent " <<
+ node->parent << " child " << node->child << endl;
+ for(j = 0; j < node->tag->attrCount(); ++j)
+ {
+ kdDebug(25001)<< dots << " *** attr" << j << " " <<
+ node->tag->getAttribute(j).nameLine << ":" <<
+ node->tag->getAttribute(j).nameCol << ":" <<
+ node->tag->getAttribute(j).name << " - " <<
+ node->tag->getAttribute(j).valueLine << ":" <<
+ node->tag->getAttribute(j).valueCol << ":" <<
+ node->tag->getAttribute(j).value << endl;
+ }
+
+ if (node->child)
+ coutTree(node->child, indent + 4);
+ if(node == node->next || (node->next && node == node->next->next) ||
+ (node->next && node->next->next && node == node->next->next->next) ||
+ (node->next && node->next->next && node->next->next->next &&
+ node == node->next->next->next->next) || (node->next && node->next->next &&
+ node->next->next->next && node->next->next->next->next && node ==
+ node->next->next->next->next->next))
+ {
+ //try to detect invalid pointers.
+ kdDebug(25001)<< "ERROR - node == node->[..]next" << endl;
+ return;
+ }
+ node = node->next;
+ }
+}
+
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name)
+{
+ Q_ASSERT(start_node && end_node);
+ //Andras: don't crash
+ if (!start_node || !end_node)
+ return -1;
+
+ Node* tag_start = hasParent(start_node, end_node, tag_name);
+ if(tag_start)
+ return 1; // both start_node and end_node are surrounded by tag_name
+
+ tag_start = hasParent(start_node, tag_name);
+ if(tag_start)
+ return 0; // only start_node has tag_name as parent
+
+ tag_start = hasParent(end_node, tag_name);
+ if(tag_start)
+ return 0; // only end_node has tag_name as parent
+
+ return -1; // neither the nodes have tag_name as parent
+}
+
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
+ QString const& attribute_name, QString const& attribute_value)
+{
+ Q_ASSERT(start_node && end_node);
+ //Andras: don't crash
+ if (!start_node || !end_node)
+ return -1;
+
+ Node* tag_start = hasParent(start_node, end_node, tag_name);
+ if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
+ return 1; // both start_node and end_node are surrounded by tag_name
+
+ tag_start = hasParent(start_node, tag_name);
+ if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
+ return 0; // only start_node has tag_name as parent
+
+ tag_start = hasParent(end_node, tag_name);
+ if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
+ return 0; // only end_node has tag_name as parent
+
+ return -1; // neither the nodes have tag_name as parent
+}
+
+bool kafkaCommon::isBetweenWords(Node* node, int offset)
+{
+ Q_ASSERT(node->tag->type == Tag::Text || node->tag->type == Tag::Empty);
+ Q_ASSERT(offset >= 0);
+ Q_ASSERT(node);
+ if (!node)
+ return false; //FIXME: Andras: don't crash
+
+ QString tag_str = node->tag->tagStr();
+
+ return !
+ (tag_str[offset].isSpace() || tag_str[offset].isPunct() ||
+ tag_str[offset - 1].isSpace() || tag_str[offset - 1].isPunct());/* ||
+ tag_str[offset + 1].isSpace() || tag_str[offset + 1].isPunct());*/
+}
+
+void kafkaCommon::getStartOfWord(Node*& node, int& offset)
+{
+ Q_ASSERT(node);
+// Q_ASSERT(isBetweenWords(node, offset)); recursive
+ Q_ASSERT(offset >= 0);
+ //Andras: don't crash
+ if (!node || offset < 0)
+ return;
+
+ kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl;
+ kdDebug(23100) << "getStartOfWord offset BEGIN: " << offset << endl;
+
+ QString tag_str = node->tag->tagStr();
+ while(offset >= 0 && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
+ --offset;
+
+ if(offset == -1)
+ {
+ Node* aux = node->previousSibling();
+ while(aux && aux->tag->type != Tag::Text)
+ {
+ if(!isInline(aux->tag->name))
+ {
+ ++offset;
+ return;
+ }
+
+ aux = aux->previousSibling();
+ }
+ if(aux)
+ {
+ node = aux;
+ offset = aux->tag->tagStr().length() - 1;
+ kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl;
+ kdDebug(23100) << "getStartOfWord offset RECURS: " << offset << endl;
+ getStartOfWord(node, offset);
+ return;
+ }
+ }
+ ++offset;
+ kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl;
+ kdDebug(23100) << "getStartOfWord offset END: " << offset << endl;
+}
+
+void kafkaCommon::getEndOfWord(Node*& node, int& offset)
+{
+ Q_ASSERT(node);
+// assert(isBetweenWords(node, offset)); recursive
+ Q_ASSERT(isBetweenWords(node, offset));
+ Q_ASSERT(offset >= 0);
+
+ //Andras: if the following asserts are hit, don't do anything = don't crash
+ if (!node || !isBetweenWords(node, offset) || offset < 0)
+ return;
+
+
+ QString tag_str = node->tag->tagStr();
+ while((uint)offset != tag_str.length() && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
+ ++offset;
+
+ if((uint)offset == tag_str.length())
+ {
+ Node* aux = node->nextSibling();
+ while(aux && aux->tag->type != Tag::Text)
+ {
+ if(!isInline(aux->tag->name))
+ return;
+
+ aux = aux->nextSibling();
+ }
+ if(aux)
+ {
+ node = aux;
+ offset = 0;
+ getEndOfWord(node, offset);
+ }
+ }
+}
+
+void kafkaCommon::getStartOfParagraph(Node*& node, int& offset)
+{
+ Q_ASSERT(node);
+ //Andras: don't crash
+ if (!node)
+ {
+ offset = 0;
+ return;
+ }
+
+ Node* previous = node->previousSibling();
+ while(previous && (isInline(previous->tag->name) || previous->tag->name.lower() == "br" || previous->tag->type == Tag::Text))
+ previous = previous->previousSibling();
+
+ offset = 0;
+ if(previous)
+ {
+ node = previous->nextSibling();
+ return;
+ }
+ Q_ASSERT(node->tag->type == Tag::Text);
+}
+
+void kafkaCommon::getEndOfParagraph(Node*& node, int& offset)
+{
+ Q_ASSERT(node);
+ if (!node)
+ {
+ offset = 0;
+ return;
+ }
+
+ Node* begin_paragraph = node;
+ getStartOfParagraph(begin_paragraph, offset);
+
+ Node* next = begin_paragraph->nextSibling();
+ while(nodeDepth(next) > nodeDepth(begin_paragraph))
+ next = next->nextSibling();
+ while(next && (isInline(next->tag->name) || next->tag->name.lower() == "br" || next->tag->type == Tag::Text))
+ {
+ next = next->nextSibling();
+ while(nodeDepth(next) > nodeDepth(node))
+ next = next->nextSibling();
+ }
+ if(next)
+ {
+ node = next;
+ if(nodeDepth(next) < nodeDepth(begin_paragraph))
+ node = node->previousSibling();
+
+ if(node->tag->type == Tag::Text)
+ offset = node->tag->tagStr().length() - 1;
+ else
+ offset = 0;
+ return;
+ }
+}
+
+
diff --git a/quanta/parts/kafka/kafkacommon.h b/quanta/parts/kafka/kafkacommon.h
new file mode 100644
index 00000000..d71783aa
--- /dev/null
+++ b/quanta/parts/kafka/kafkacommon.h
@@ -0,0 +1,1177 @@
+/***************************************************************************
+ kafkacommon.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 KAFKACOMMON_H
+#define KAFKACOMMON_H
+
+#include <qvaluelist.h>
+#include <dom/dom_node.h>
+
+namespace DOM
+{
+ class Document;
+}
+class Node;
+class NodeModifsSet;
+class NodeSelection;
+class NodeSelectionInd;
+class Document;
+struct DTDStruct;
+
+/**
+ * For heavy debug including Node Tree in stdout printing, a DOM::Node tree widget.
+ */
+//#define HEAVY_DEBUG
+
+/**
+ * Light debugging, including functions name in stdout printing.
+ */
+//#define LIGHT_DEBUG
+
+
+/** This class gathers all the basic functions needed by kafka.
+ * It's very useful for manipulating nodes.
+ */
+
+class kafkaCommon
+{
+public:
+ kafkaCommon() {}
+ ~kafkaCommon() {}
+
+ /** ----------------------- NODE & DOM::NODE TREE NAVIGATION -------------------------------------*/
+
+ /**
+ * This function returns the next Node after node : the first child of
+ * node if available, else its next sibling if available, else the next
+ * available next sibling of a parent of node.
+ * @param _node It is the Node from which we want the next Node.
+ * @param goUp This boolean specifies if we should go up (torwards the root Node)
+ * i.e. not looking at the childs of node, or make a standart iteration.
+ * For a normal use, It must be set to false at the
+ * beginning and then the same boolean must be used when using
+ * several times this function.
+ * @param endNode Specifies at which Node the search should end.
+ * @return Returns the next Node.
+ */
+ static Node* getNextNode(Node *node, bool &goUp, Node *endNode = 0L);
+
+ /**
+ * It behaves essentially like the above function except that it will skip empty Nodes.
+ */
+ static Node* getNextNodeNE(Node *node, bool &goUp, Node *endNode = 0L);
+
+ /**
+ * This function returns the prev Node after node.
+ */
+ static Node* getPrevNode(Node *node, Node *endNode = 0L);
+
+ /**
+ * It behaves essentially like the above function except that it will skip empty Nodes.
+ */
+ static Node* getPrevNodeNE(Node *node, Node *endNode = 0L);
+
+
+ /**
+ * Returns the first common parent to startNode and endNode that isn't inline.
+ * @param startNode Start node.
+ * @param endNode End node.
+ * @param commonParentStartChildLocation Is the child of commonParent which is parent of startNode
+ * @param commonParentEndChildLocation Is the child of commonParent which is parent of endNode
+ * @param nodeSubtree When startNode and endNode doesn't belong to the current document tree. Pass 0 if they do.
+ * @return The first, non inline, common parent of startNode and endNode.
+ */
+ static Node* DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+
+ /**
+ * Same as above, only that the common parent can be inline.
+ */
+ static Node* DTDGetCommonParent(Node* startNode, Node* endNode,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+
+ /**
+ * This function returns the next DOM::Node after node : the first child of
+ * DOM::Node if available, else its next sibling if available, else the next
+ * available next sibling of a parent of node.
+ * @param node The DOM::Node the search starts from.
+ * @param goUp This boolean specifies if we should go up or down in the tree.
+ * For a normal use, It must be set to false at the
+ * beginning and then the same boolean must be used when using
+ * several times this function.
+ * @param returnParentNode Specifies if there are no child and next sibling, if
+ * we should return the parent.
+ * @param endNode Specifies at which DOM::Node the search should end. It is useful
+ * when setting returnParentNode to false.
+ * @return the next Node.
+ */
+ static DOM::Node getNextDomNode(DOM::Node node, bool &goUp, bool returnParentNode = false,
+ DOM::Node endNode = DOM::Node());
+
+ /**
+ * This function returns the previous Node after node.
+ * @return Returns the previous DOM::Node of node.
+ */
+ static DOM::Node getPrevDomNode(DOM::Node node, DOM::Node endNode = DOM::Node());
+
+ /**
+ * If node is not a text node or the cursor is at the end of node's tag string, this method return the next
+ * text node at offset 0, or a null pointer.
+ * This is particular useful when finding start and end nodes of a selection, because you can have a closing node
+ * as the start node, etc.
+ * @param startNode The current start node. startNode isn't changed inside the method.
+ * @param startOffset The current start offset. startOffset is changed inside the method.
+ * @return The next text node or a null pointer.
+ */
+ static Node* getCorrectStartNode(Node* startNode, int& startOffset);
+
+ /**
+ * If node is not a text node or the cursor is at the beggining of node's tag string, this method return the previous
+ * text node at offset at the end of the tag string, or a null pointer.
+ * This is particular useful when finding start and end nodes of a selection, because you can have a closing node
+ * as the start node, etc.
+ * @param endNode The current start node.
+ * @param endOffset The current start offset.
+ * @return The next text node or a null pointer.
+ */
+ static Node* getCorrectEndNode(Node* endNode, int& endOffset);
+
+ /**
+ * Get the first child of commonParent which is parent of node
+ * @param node
+ * @param commonParent
+ * @return
+ */
+ static Node* getCommonParentChild(Node* node, Node* commonParent);
+
+
+ /** ----------------------- NODE INDENTATION STUFF -------------------------------------*/
+
+ /**
+ * This function takes care to modify the current node or/and the next sibling in order to have a nice
+ * indentation. WARNING it doesn't create the necessary Nodes. Call fitIndentationNodes first.
+ * @param node Apply nice indentation to this Node.
+ * @param nbOfSpaces Specifies the number of spaces the minimal indentation must be.
+ * @param nbOfTabs Specifies the number of tabs the minimal indentation must be.
+ * @param modifs The changes made are logged into modifs.
+ * @param inlineNodeIndentation
+ * If true:
+ * <body>Text</body>
+ * else:
+ * <body>
+ * Text
+ * </body>
+ */
+ static void applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, NodeModifsSet *modifs,
+ bool inlineNodeIndentation = false);
+
+ /**
+ * Create/Delete the necessary Empty Nodes between n1 and n2 so that a nice indentation can be
+ * generated by the undoRedo system. The undoRedo system can't create itself these Nodes
+ * because it will create them only during the synchronization, making all the QValueList<int>
+ * Nodes location wrong.
+ * WARNING n1 and n2 must be siblings or parent-child. If there are sibling and n1 is a XmlTag,
+ * n1 should not have non empty childs.
+ * @param n1 The start node.
+ * @param n2 The end node.
+ * @param modifs The changes made are logged into modifs.
+ */
+ static void fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs);
+
+ /**
+ * Fits the Nodes positions after a change in the Node tree.
+ * @param startNode The Node where the update of the Node positions starts.
+ * @param colMovement The number of columns that should be
+ * added/retrieved from the column position. It is the difference of the new last char col position and the
+ * old last char col position.
+ * @param lineMovement The number of lines that should be
+ * added/retrieved from the line position. It is the difference of the number of lines of the new tag string
+ * and the number of lines of the old tag string.
+ * @param colEnd The column position where the update should stop.
+ * @param lineEnd The line position where the update should stop.
+ */
+ static void fitsNodesPosition(Node* startNode, int colMovement, int lineMovement = 0,
+ int colEnd = -2, int lineEnd = -2);
+
+ /**
+ * Get the display type of a Node. NOT an official list, more a little hack to
+ * handle the indentation. Text are inline. The rest return an error.
+ * @param closingNodeToo Specifies if we consider that closing Node have the same type as
+ * their opening tag.
+ * @return Returns the type.
+ */
+ static int getNodeDisplay(Node *node, bool closingNodeToo);
+
+ //the enumeration of the different display types
+ enum nodeDisplay
+ {
+ noneDisplay = 0,
+ inlineDisplay,
+ blockDisplay,
+ errorDisplay
+ };
+
+ /**
+ * Remove the indentation whitespaces in a string
+ * e.g. this function returns : " a b cd " for parameter: " a b cd "
+ * @param string The text to modify.
+ * @param removeAllSpacesAtTheLeft Specifies if it should remove ALL spaces in the left
+ * unlike the above example.
+ * @param removeAllSpacesAtTheRight Specifies if it should remove ALL spaces in the right
+ * unlike the above example.
+ * @return Returns the modified string.
+ */
+ static QString removeUnnecessaryWhitespaces(const QString &string,
+ bool removeAllSpacesAtTheLeft = false, bool removeAllSpacesAtTheRight = false);
+
+
+ /** ----------------------- NODE TREE MODIFICATIONS -------------------------------------*/
+
+ /**
+ * Create a simple Node, without taking care of building the closing Node.
+ * @param nodeName The name of the Node.
+ * @param tagString The String of the tag as it will appears in the editor.
+ * @param nodeType The node type, cf Tag::TokenType
+ * @param doc The document the Node will belong to.
+ * @return Returns the newly created node.
+ */
+ static Node* createNode(const QString &nodeName, const QString &tagString, int nodeType,
+ Document *doc);
+
+ /**
+ * Restore a Node that has been pasted, i.e., his doc and dtd pointers.
+ * @param node The Node to be restored.
+ * @param doc The document the Node will belong to.
+ */
+ static void restorePastedNode(Node* node, Document* doc);
+
+ /**
+ * Create a !doctype Node with all the necessary attributes. It has a child and a closing Node.
+ * @param doc It needs the document where the !doctype node will be inserted in order to
+ * build the right attributes.
+ */
+ static Node *createDoctypeNode(Document *doc);
+
+ /**
+ * Create a <?xml ... ?> Node. It has a child and a closing Node.
+ * @param doc It needs the document where the xml node will be inserted.
+ * @param encoding The encoding to use (usually get it with quantaApp->defaultEncoding())
+ */
+ static Node *createXmlDeclarationNode(Document *doc, const QString &encoding);
+
+ /**
+ * Create a node subtree which contains the mandatory Nodes in order to be DTD compliant.
+ * e.g. TABLE alone isn't DTD compliant, this function will return TABLE->TR->TD.
+ * WARNING : it won't log change thus node must NOT be in the Node tree.
+ * @param node The root Node of the Node subtree.
+ * @param doc The document the Node subtree will belong to.
+ * @return Returns the last Node of the subtree or node if there was nothing to add.
+ */
+ static Node* createMandatoryNodeSubtree(Node *node, Document *doc);
+
+ /**
+ * Insert node in the tree. WARNING This function will log that node was added.
+ * WARNING : baseNode is used as the rootNode.
+ * It will also try to merge text/Empty Nodes.
+ * @param node The node to insert.
+ * @param parentNode This Node will be the parent of node.
+ * @param nextSibling This Node will be the next Sibling of Node. If null, node will be appended at
+ * the child list of parentNode.
+ * TODO: @param rootNode The rootNode of the tree we want to insert the Node (usually &baseNode).
+ * @param modifs The changes made are logged into modifs. Put 0L if you don't want to log
+ * and if you know what you're doing!
+ * @param merge Try to merge with the siblings if possible.
+ * @return Returns a pointer to the node inserted.
+ */
+ static Node* insertNode(Node *node, Node* parentNode, Node* nextSibling,
+ NodeModifsSet *modifs/**, Node **rootNode*/, bool merge = true);
+
+ static Node* insertNode(Node *node, Node* parentNode, Node* nextSibling, NodeSelection& selection,
+ NodeModifsSet *modifs, bool merge = true);
+
+ /**
+ * It behaves essentially like the above function except that it can "surround" a set of Nodes with the
+ * new Node. Thus, the closing Node is created if necessary.
+ * nextSibling and nextEndSibling MUST have the same parent. If not, use the
+ * DTDinsertNode.
+ * This function does not try to know if the location of the new Node is DTD valid.
+ * @param newNode The new Node to insert.
+ * @param parent The parent of the Node.
+ * @param nextSibling The next sibling of the Node.
+ * @param nextEndSibling The next sibling of the closing Node if created. If nextEndSibling ==
+ * nextSibling, the closing Node will be placed at the right of the newly created Node.
+ * All the Nodes between the new Node and its closing Tag will be moved as childs of the new Node.
+ * @param modifs The changes made are logged into modifs.
+ * @return Returns a pointer to the node inserted.
+ */
+ static Node *insertNode(Node *newNode, Node *parent, Node *nextSibling, Node *nextEndSibling,
+ NodeModifsSet *modifs, bool merge = true);
+
+ /**
+ * It behaves essentially like the above function except that it can split the endNodeToSurround and
+ * startNodeToSurround if necessary, according to the offsets.
+ * startNodeToSurround et endNodeToSurround MUST have the same parent. If not, use the last
+ * DTDinsertNode.
+ * This function does not try to know if the location of the new Node is valid.
+ * @param startNodeToSurround The first Node which will be enclosed by the new Node.
+ * @param endNodeToSurround The last Node which will be enclosed by the new Node.
+ * @param startOffset The first Node will be splitted at offset startOffset, the right part will be enclosed.
+ * @param endOffset The last Node will be splitted at offset endOffset, the left part will be enclosed.
+ */
+ static Node* insertNode(Node *newNode, Node *parent, Node *startNodeToSurround,
+ Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
+
+ /**
+ * It behaves essentially like the above function except that it will insert the new Node only
+ * if the DTD allows it. The new Tag can surround any subtree. If
+ * necessary, several copies of the Node will be used.
+ * This function takes care of the DTD validity of the Nodes created.
+ * It will build the necessary mandatory Nodes (e.g. insertion of TABLE will also insert TR and TD).
+ * This is the key function making the toolbars working.
+ * @param startNode The first Node which must be surrounded by the new Node.
+ * @param startOffset If firstNode is a text, specify at which offset the new Node must begin to surround.
+ * @param endNode The last Node which must be surrounded by the new Node.
+ * @param endOffset If endNode is a text, specify at which offset the new Node must stop to surround.
+ * @param doc The document is needed in order to build the mandatory Node tree if necessary.
+ * <TEMPORARY> : We want to keep track of the cursor position. TODO : cursor class
+ * @param cursorNode The cursor is inside cursorNode.
+ * @param cursorOffset The offset of the cursor inside cursorNode.
+ * </TEMPORARY>
+ * @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid parent.
+ */
+ static bool DTDinsertNode(Node *newNode, Node *startNode, int startOffset, Node *endNode,
+ int endOffset, Document *doc, Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
+
+ /**
+ * It behaves essentially like the above function except that it will try first to remove newNode
+ * from the area, by calling DTDExtractNode. If newNode wasn't present, it will then insert it by
+ * calling DTDinsertNode.
+ * This is the key function making the toolbars working.
+ * @return Returns true if a modification was done (Node inserted/removed)
+ */
+ static bool DTDinsertRemoveNode(Node *newNode, Node *startNode, int startOffset, Node *endNode,
+ int endOffset, Document *doc, Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
+
+ /**
+ * Insert a node subtree in the tree. WARNING This function will log that the nodes were added.
+ * WARNING : baseNode is used as the rootNode.
+ * It will also try to merge text/Empty Nodes.
+ * @param node The root node of the Node subtree to insert.
+ * @param parentNode This Node will be the parent of node.
+ * @param nextSibling This Node will be the next Sibling of Node. If null, node will be appended at
+ * the child list of parentNode.
+ * @param modifs The changes made are logged into modifs. Put 0L if you don't want to log
+ * and if you know what you're doing!
+ * @param merge Try to merge with the siblings if possible.
+ * @return Returns a pointer to the node inserted.
+ */
+ static Node* insertNodeSubtree(Node *node, Node* parentNode, Node* nextSibling,
+ NodeModifsSet *modifs, bool merge = true);
+
+ /**
+ * It behaves essentially like the above function except that it can "surround" a set of Nodes with the
+ * new Node. Thus, the closing Node is created if necessary.
+ * nextSibling and nextEndSibling MUST have the same parent. If not, use the
+ * DTDinsertNode.
+ * The Node Subtree MUST be a single-Node-per-parent subtree.
+ * This function does not try to know if the location of the new Node is DTD valid.
+ * @param node The root node of the Node subtree to insert.
+ * @param parent The parent of the Node.
+ * @param nextSibling The next sibling of the Node.
+ * @param nextEndSibling The next sibling of the closing Node if created. If nextEndSibling ==
+ * nextSibling, the closing Node will be placed at the right of the newly created Node.
+ * All the Nodes between the new Node and its closing Tag will be moved as childs of the
+ * last Node of the Node subtree..
+ * @param modifs The changes made are logged into modifs.
+ * @return Returns a pointer to the node inserted.
+ */
+ static Node* insertNodeSubtree(Node *node, Node* parentNode, Node* nextSibling,
+ Node* nextEndSibling, NodeModifsSet *modifs, bool merge = true);
+
+ /**
+ * Split the Nodes as necessary, then check that the subtree is allowed to be inserted
+ * and then insert the subtree.
+ * @param node The root node of the Node subtree to insert.
+ * @param selection contains the cursor Node where the insertion will take place.
+ * @param modifs The changes made are logged into modifs.
+ */
+ static Node* DTDInsertNodeSubtree(Node *node, NodeSelectionInd& selection,
+ Node **cursorNode, long& cursorOffset, NodeModifsSet *modifs);
+
+ static Node* DTDInsertNodeSubtree(Node* newNode, Node* parentNode, Node* nextSibling,
+ NodeSelection& cursorHolder, NodeModifsSet *modifs);
+
+ /**
+ * Create a Node of name nodeName, of type nodeType, (see tag.h) connected to the document doc,
+ * and nextSibling as Node's next sibling.
+ * This function does not try to know if the location of the new Node is valid.
+ * @param nodeName The node's name of the node to create.
+ * @param tagString The string of the tag.
+ * @param nodeType The type of the Node cf Tag::TokenType.
+ * @param doc The Node belongs to this Document.
+ * @param parent The parent of the Node.
+ * @param nextSibling The next sibling of the Node.
+ * @return Returns a pointer to the newly created Node.
+ */
+ static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs, bool merge = true);
+
+ /**
+ * It behaves essentially like the above function except that it reate its closing Node if necessary
+ * and then insert them with parent as Node's parent.
+ * nextSibling and nextEndSibling MUST have the same parent. If not, use the
+ * DTDcreateAndInsertNode.
+ * @param nextEndSibling The next sibling of the closing Node if created. If nextEndSibling ==
+ * nextSibling, the closing Node will be placed at the right of the newly created Node.
+ * All the Nodes between the new Node and its closing Tag will be moved as childs of the new Node.
+ * @param modifs The changes made are logged into modifs.
+ */
+ static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs);
+
+ /**
+ * It behaves essentially like the above function except that if necessary, it will split the Nodes.
+ * startNodeToSurround et endNodeToSurround MUST have the same parent. If not, use the
+ * DTDcreateAndInsertNode.
+ * This function does not try to know if the location of the new Node is valid.
+ * @param startNodeToSurround The first Node which will be enclosed by the new Node.
+ * @param endNodeToSurround The last Node which will be enclosed by the new Node.
+ * @param startOffset The first Node will be splitted at offset startOffset, the right part will be enclosed.
+ * @param endOffset The last Node will be splitted at offset endOffset, the left part will be enclosed.
+ */
+ static Node *createAndInsertNode(const QString &nodeName, const QString &tagString,
+ int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
+ Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
+
+ /**
+ * It behaves essentially like the above function except that it will insert the new Node only
+ * if the DTD allows it. The new Tag can surround any subtree. If
+ * necessary, several copies of the Node will be used.
+ * This function takes care of the DTD validity of the Nodes created.
+ * It will build the necessary mandatory Nodes (e.g. insertion of TABLE will also insert TR and TD).
+ * This is the key function making the toolbars working.
+ * @param startNode The first Node which must be surrounded by the new Node.
+ * @param startOffset If firstNode is a text, specify at which offset the new Node must begin to surround.
+ * @param endNode The last Node which must be surrounded by the new Node.
+ * @param endOffset If endNode is a text, specify at which offset the new Node must stop to surround.
+ * @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid parent.
+ */
+ static bool DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
+ Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
+
+ /**
+ * For internal use. From startNode to endNode, it add where possible/necessary a new Node in order
+ * to surround the maximum of Nodes. This is used by the above function. This function calls itself.
+ * @param newNode The root Node of the node subtree to insert.
+ * @param leafNode The leaf Node of the node subtree to insert.
+ * @param startExaminationNode It will start examine Nodes from startExaminationNode.
+ * @param endExaminationNode It will stop examine Nodes from endExaminationNode.
+ * @param startNode This function will start adding newNode from startNode.
+ * @param endNode This function will stop adding newNode at endNode.
+ * @param currentNode This node is currently examined.
+ * @param examinationStarted Specifies if we have begun to examine the Nodes.
+ * @param addingStarted Specifies if we have begun to add the new Node.
+ * @param nodeInserted Returns true if newNode was inserted at least once. Set to false before calling the function.
+ * @level The relative level of the current Node Sibling (level 0 : root Node, level 1 : childs, and so on...)
+ * MUST BE set to 0.
+ */
+ static bool addNodeRecursively(Node *newNode, Node *leafNode, Node *startExaminationNode,
+ Node *endExaminationNode, Node* startNode, Node *endNode, Node* currentNode,
+ bool &examinationStarted, bool &addingStarted, bool &nodeInserted, int level, NodeModifsSet *modifs);
+
+ /**
+ * Create a copy of Node. It use the Node copy operator and add some kafka-specific flags :
+ * It set the node->tag->cleanStrBuilt and node->tag->indentationDone to false;
+ * @param node The node to duplicate.
+ * @return Returns the duplicated Node. I wonder if i should always write so obvious things ;-)
+ */
+ static Node *duplicateNode(Node *node);
+
+ /**
+ * It behaves essentially like the above function except that it can handle a node Subtree.
+ * INNEFICIENT for bi
+ */
+ static Node *duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly = false);
+
+ /**
+ * Returns the closing tag of node or its last child or itself.
+ * @param node
+ * @return
+ */
+ static Node* getLastChild(Node* node);
+
+ /**
+ * Extract a Node from the Node Tree. WARNING this will log that the Node was removed.
+ * This mean that the undo/redo system will delete it when necessary so don't reuse it!!!!
+ * @param node The node to delete.
+ * @param modifs The changes made are logged into modifs.
+ * @param extractChilds If we extract or move up the children. WARNING: it don't check
+ * if the children of node are legal childs of the parent of node.
+ * @param removeClosingTag Extract the closingTag if node isn't single and is Tag::XmlTag.
+ * TODO: @param removeEmbeddedTags Specifies if we delete the embedded Nodes e.g.
+ * <a href="<? boo ?>" > : the PHP block is an embedded block.
+ * @return Returns the node extracted with its childs
+ */
+ static Node* extractNode(Node *node, NodeModifsSet *modifs, bool extractChildren = true,
+ bool extractClosingTag = false/**, bool removeEmbeddedTags = false*/);
+
+ /**
+ * It behaves essentially like the above function.
+ * Extract and BUT NOT DELETE RIGHT NOW node from the Tree. The undo/redo system will delete it
+ * when necessary.
+ * TODO: remove it, and use extractNode instead.
+ * @param deleteClosingTag Delete the closingTag if node isn't single.
+ */
+ static void extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool deleteChildren = true,
+ bool deleteClosingTag = true, bool mergeAndFormat = true);
+
+ /**
+ * Extract a node subtree in the tree. WARNING This function will log that the nodes were added.
+ * This funtion not only extract the start node but also will extract inline parents.
+ * @param startNode The node from which we start the removal.
+ * @param startOffset The offset of startNode from which we start the removal.
+ * @param endNode The node from which we end the removal.
+ * @param endOffset The offset of endNode from which we end the removal.
+ * @param cursorNode The cursor is inside cursorNode.
+ * @param cursorOffset The offset of the cursor inside cursorNode.
+ * @return Returns a pointer to the node inserted.
+ */
+ static Node* DTDExtractNodeSubtree(Node *startNode, int startOffset, Node *endNode, int endOffset,
+ Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs, bool extractInlineParentNodes = true);
+
+ /**
+ * Similar to the above function but it operates on the given node tree. See DTDGetNodeSubtree.
+ * @param nodeSubtree The Node tree on which we're going to make the removal.
+ * @return Returns a pointer to the node inserted.
+ */
+ static Node* DTDExtractNodeSubtree(Node *startNode, int startOffset, Node *endNode, int endOffset,
+ Node* nodeSubtree, NodeModifsSet* modifs, bool extractInlineParentNodes = true);
+
+ static Node* extractNodeSubtreeAux(Node* commonParentStartChild, Node* commonParentEndChild, NodeModifsSet* modifs);
+
+ /**
+ * It behaves essentially like the above function. Provided for convenience.
+ */
+ static Node* DTDRemoveSelection(NodeSelectionInd& selection,
+ Node **cursorNode, long& cursorOffset, NodeModifsSet *modifs, bool extractInlineParentNodes = true);
+
+ /**
+ * Get a node subtree from the tree. It is similar to extractNodeSubtree()
+ * but it doesn't extract anything.
+ * It's useful to get a copy of the Node subtree from a selection, for example.
+ * This funtion not only extract the start node but also will extract inline parents.
+ * @param startNode The starting Node.
+ * @param startOffset If firstNode is a text, specify at which offset the new start Node will be splitted.
+ * @param endNode The ending Node.
+ * @param endOffset If endNode is a text, specify at which offset the new end Node will be splitted.
+ * @return Returns a pointer to the Node subtree.
+ */
+ static Node* getNodeSubtree(Node *startNode, int startOffset, Node *endNode, int endOffset, bool extractInlineParentNodes = true);
+
+ /**
+ * An enumeration of all the possible return states of DTDExtractNode
+ */
+ enum extractNodeStatus
+ {
+ //The node to extract was not found.
+ nothingExtracted = 0,
+ //The extract operation stopped because of a DTD error : if the node was removed, the child
+ //weren't able to be childs of the node's parent, according to the DTD. Should not occur
+ //except really bad HTML.
+ extractionStoppedDueToBadNodes,
+ //everything has gone fine
+ extractionDone,
+ //Invalid start or end position, or the given Node was a block.
+ extractionBadParameters
+ };
+
+ /**
+ * This function will try to extract the node nodeName (of type XmlTag) from a given subtree,
+ * according to the DTD. If the DTD don't allow it, it won't remove it.
+ * This function is only interesting for the removal of Inline Nodes thus it will return an error if
+ * a block nodeName is submitted.
+ * TODO: AVOID splitting of Node when the DTD don't allow the removal.
+ * @param nodeName The name of the Node to remove (must be inline).
+ * @param doc It is needed to get the DTD informations.
+ * @param startNode The node from which we start the removal.
+ * @param startOffset The offset of startNode from which we start the removal.
+ * @param endNode The node from which we end the removal.
+ * @param endOffset The offset of endNode from which we end the removal.
+ * <TEMPORARY> : We want to keep track of the cursor position. TODO : cursor class
+ * @param cursorNode The cursor is inside cursorNode.
+ * @param cursorOffset The offset of the cursor inside cursorNode.
+ * </TEMPORARY>
+ * @param modifs The usual modifs to log the modifications made for the undo/redo system.
+ * @return Returns a kafkaCommon::extractNodeStatus.
+ */
+ static int DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+ int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
+ NodeModifsSet *modifs);
+
+ /**
+ * Moves a Node somewhere else.
+ * @param nodeToMove The node to move :-)
+ * @param newParent The new parent of nodeToMove.
+ * @param newNextSibling The new next Sibling of nodeToMove. If null, node will be appended at
+ * the child list of parentNode.
+ * @param modifs The changes made are logged into modifs.
+ * @param merge Specifies if it should try to merge the Node at its new location.
+ */
+ static void moveNode(Node *nodeToMove, Node *newParent, Node *newNextSibling,
+ NodeModifsSet *modifs, bool merge = true, bool moveClosingNode = false);
+
+ static void moveNode(Node *nodeToMove, Node *newParent, Node *newNextSibling, NodeSelection& cursorHolder,
+ NodeModifsSet *modifs, bool merge = true, bool moveClosingNode = false);
+
+ /**
+ * Split a Text Node at offset offset. If offset or n is invalid, nothing is done.
+ * @param n The Node to split.
+ * @param offset Where to split the node.
+ * @param modifs The change made are logged into modifs.
+ * @return Returns if the node was splitted.
+ */
+ static bool splitNode(Node *n, int offset, NodeModifsSet *modifs);
+
+ /**
+ * This method takes care of spliting start and end nodes, if needed, finding the commonParent,
+ * commonParentStartChild and commonParentEndChild and split the start and end node subtrees,
+ * calling splitStartNodeSubtree and splitEndNodeSubtree.
+ * The following tree:
+ * <body>
+ * <b> --> commonParent
+ * <i> --> commonParentStartChild
+ * select|
+ * here --> startNode
+ * </i>
+ * continue
+ * <u> --> commonParentEndChild
+ * stop| --> endNode
+ * more
+ * </u>
+ * text
+ * </b>
+ * <body>
+ * Is changed to:
+ * <body>
+ * <b>
+ * <i>
+ * select|
+ * </i>
+ * </b>
+ * <b>
+ * <i>
+ * here
+ * </i>
+ * continue
+ * <u>
+ * stop
+ * </u>
+ * </b>
+ * <b>
+ * <u>
+ * more
+ * </u>
+ * text
+ * </b>
+ * </body>
+ * @param startNode The node where a selection starts, for example.
+ * @param startOffset
+ * @param endNode The node where a selection ends, for example.
+ * @param endOffset
+ * @param commonParent This is the common parent between start and end node.
+ * If 0, it tries to find the commonParent, else it uses the passed node.
+ * @param commonParentStartChildLocation The first child of commonParent which is parent of startNode is stored here.
+ * @param commonParentEndChildLocation The first child of commonParent which is parent of endNode is stored here.
+ * @param cursorNode The cursor node is stored here.
+ * @param cursorOffset The cursor offset is stored here.
+ * @param subTree The node corresponding to the start of a subtree that doesn't belong to the current document, or 0.
+ * @param modifs The changes made are logged into modifs.
+ */
+ static void splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation,
+ NodeSelection& cursorHolder,
+ Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes = true);
+
+ /**
+ * If n and n2 are both Text or Empty Nodes, merge them into one.
+ * WARNING if merging occurs, n2 is deleted.
+ * @param modifs The changes made are logged into modifs.
+ * @param mergeTextOnly Specify if we should only merge text Nodes, not empty ones.
+ * @return Returns true if the Nodes were merged, else false.
+ */
+ static bool mergeNodes(Node *n, Node *n2, NodeModifsSet *modifs, bool mergeTextOnly = false);
+
+ static bool mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, NodeModifsSet *modifs, bool mergeTextOnly = false);
+
+ /**
+ * This function will navigate through the Nodes from startNode to endNode and
+ * merge identical inline Nodes as well as text Nodes.
+ * @param startNode The node from which the merge starts.
+ * @param endNode The node from which the merge ends.
+ * @param modifs The usual modifs, to log the changes.
+ * <TEMPORARY> : We want to keep track of the cursor position. TODO : cursor class
+ * @param cursorNode The cursor is inside cursorNode.
+ * @param cursorOffset The offset of the cursor inside cursorNode.
+ * </TEMPORARY>
+ */
+ static void mergeInlineNode(Node *startNode, Node *endNode, Node **cursorNode,
+ long &cursorOffset, NodeModifsSet *modifs);
+
+
+ /** ----------------------- NODE MODIFICATIONS -------------------------------------*/
+
+ /**
+ * Computes the end position of a string starting at pos (bLine, bCol).
+ * @param tagString The tagString, representing usually a tag string ;-)
+ * @param bLine The line of the first letter of tagString.
+ * @param bCol The column of the first letter of tagString.
+ * @param eLine Returns the line of the last letter of tagString.
+ * @param eCol Returns the col of the last letter of tagString.
+ */
+ static void getEndPosition(const QString & tagString, int bLine, int bCol, int &eLine, int &eCol);
+
+ /**
+ * It behaves essentially like the above function except that the string is the Tag String of Node.
+ * @param node The tag string is taken from node.
+ */
+ static void getEndPosition(Node *node, int bLine, int bCol, int &eLine, int &eCol);
+
+ /**
+ * Set the tag string of node, and update the start/end position of the Node.
+ * @param node The node which get the new tag string.
+ * @param newTagString The new tag String :-)
+ * @param modifs The changes made are logged into modifs.
+ */
+ static void setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+
+ /**
+ * This function behaves essentially like the above function except that all the others Nodes' position
+ * are updated too.
+ */
+ static void setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+
+ /**
+ * This function behaves exactly like Node::editAttribute except that the change is logged inside a NodeModifsSet.
+ */
+ static void editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs);
+
+ /**
+ * Gets the location of a Node in a pointer-independant suit of ints e.g. 1,3,5 means
+ * that the node is the fifth child of the third child of the root Node. Efficient when
+ * deleting the Node tree and rebuilding it when switching between Documents.
+ * @param node The Node we want the location.
+ * @return Returns the location.
+ */
+ static QValueList<int> getLocation(Node* node);
+
+ /**
+ * It behaves essentially like the above function except that it operate on DOM::Nodes.
+ */
+ static QValueList<int> getLocation(DOM::Node domNode);
+
+ /**
+ * Get the node corresponding to a location. See the above function.
+ * @param loc We want the Node from this location.
+ * @return Returns the Node at location loc.
+ */
+ static Node* getNodeFromLocation(QValueList<int> loc);
+
+ /**
+ * Similar to the above function but instead of using baseNode it uses the passes Node tree.
+ * @param nodeTree Node tree where to get the location.
+ */
+ static Node* getNodeFromLocation(QValueList<int> loc, Node* nodeTree);
+
+ /**
+ * It behaves essentially like the above function except that it operate on DOM::Nodes.
+ * @rootNode It needs the root Node of the DOM::Node Tree i.e. the document() Node.
+ */
+ static DOM::Node getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode);
+
+ /**
+ * Get the node corresponding to a sublocation.
+ * @param loc A location of a Node.
+ * @locOffset We want the (totalNumberOfParent - locOffset)th parent of Node.
+ * @return Returns a parent of the node pointed by loc.
+ */
+ static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset);
+
+ static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree);
+
+ /**
+ * A enumeration for kafkaCommon::compareNodePosition().
+ */
+ enum position
+ {
+ //It means that it is a previous sibling (not the dom/dom_node.h definition, but rather
+ // the node.h definition)
+ isBefore = 0,
+ //It is the same Node.
+ isAtTheSamePosition,
+ //It means that it is a next sibling (in the node.h way).
+ isAfter,
+ //guess what?
+ positionError
+ };
+
+ /**
+ * Compare the position of two Nodes.
+ * e.g. (pos1)->next = (pos2); compareNodePosition(n1, n2) == kafkaCommon::before.
+ * @param pos1 The location of the Node to compare.
+ * @param pos2 The location of the Node to be compared to.
+ * @return Return a kafkaCommon::position flag.
+ */
+ static int compareNodePosition(QValueList<int> pos1, QValueList<int> pos2);
+
+ /**
+ * It behave essentially like the above function except that it is based on Nodes.
+ */
+ static int compareNodePosition(Node *n1, Node *n2);
+
+ /**
+ * Compare n1 and n2's node type, node name, and node attributes.
+ * @return Returns true if there are indentical.
+ */
+ static bool compareNodes(Node *n1, Node *n2);
+
+ /**
+ * Get the node's depth in the tree.
+ * @param node The node we want the depth.
+ * @return Returns the depth of node. It is basically the number of parents of node.
+ * It will return 0 if node has no parent Nodes, and -1 if node doesn't exists.
+ */
+ static int nodeDepth(Node *node);
+
+ /**
+ * Looks if node has a parent which is named name.
+ * @return Returns the first parent which is named name or 0L if not found.
+ */
+ static Node* hasParent(Node *node, const QString &name);
+
+ /**
+ * Tries to find the common parent to startNode and endNode, in the same conditions as above.
+ */
+ static Node* hasParent(Node* startNode, Node* endNode, const QString &name);
+
+
+ /** ----------------- DOM::NODE TREE MODIFICATIONS --------------------*/
+
+ /**
+ * Insert a DOM::Node in the DOM::Node tree. It takes care to handle the exceptions.
+ * WARNING : The postEnhancement is not done (cf htmlenhancer.h)
+ * Prefer using KafkaDocument::insertDomNode()
+ * @param node The node to insert.
+ * @param parent The new parent of node. If null, insert node at the top level.
+ * @param nextSibling The new next sibling of node. If null, append node at the end of the child list.
+ * @param rootNode The root DOM::Node of the DOM::Node tree. Useful when no parent is provided.
+ * @return Returns true if the operation was successfull.
+ */
+ static bool insertDomNode(DOM::Node node, DOM::Node parent = DOM::Node(),
+ DOM::Node nextSibling = DOM::Node(), DOM::Node rootNode = DOM::Node());
+
+
+ /**
+ * Removes a DOM::Node from the DOM::Node Tree. It takes care to handle the exceptions.
+ * WARNING : The postUnenhancement is not done (cf htmlenhancer.h)
+ * Prefer using KafkaDocument::removeDomNode()
+ * @param node The Node to remove from the tree.
+ * @retun Returns true if the operation was successfull..
+ */
+ static bool removeDomNode(DOM::Node node);
+
+
+ /** --------------------- DOM::NODE MODIFICATIONS ---------------------- */
+
+ /**
+ * Create a new DOM::Node. It takes care to check if nodeName is valid.
+ * @param nodeName The DOM::Node's name.
+ * @param dtd The currently used dtd.
+ * @param rootNode The rootNode is needed in order to create a new DOM::Node.
+ * @return Returns the DOM::Node created or a null DOM::Node if nodeName is invalid.
+ */
+ static DOM::Node createDomNode(const QString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
+
+ /**
+ * It behaves essentially like the above function.
+ * @param node The DOM::Node will be created with node's name.
+ */
+ static DOM::Node createDomNode(Node *node, DOM::Document rootNode);
+
+ /**
+ * Create a new Text Node.
+ * @param textString The text inside the new text DOM::Node.
+ * @param rootNode The rootNode is needed in order to create a new Text DOM::Node.
+ * @return a new text DOM::Node.
+ */
+ static DOM::Node createTextDomNode(const QString &textString, DOM::Document rootNode);
+
+ /**
+ * Create a new attribute and check if the attrName can have this attribute.
+ * @param nodeName The node name of the DOM::Node which will get this attribute.
+ * @param dtd The currently used dtd.
+ * @param attrName The name of the new attribute.
+ * @param attrValue The value of the new attribute.
+ * @param rootNode The rootNode is needed in order to create a new Attribute.
+ * @return Returns the new Attribute or a null DOM::Node if attrName is invalid.
+ */
+ static DOM::Node createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
+ const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+
+ /**
+ * It behaves essentially like the above function.
+ * @param node The corresponding DOM::Node of node will get the attribute. It don't add the attribute.
+ */
+ static DOM::Node createDomNodeAttribute(Node* node, const QString &attrName, DOM::Document rootNode);
+
+ /**
+ * It behaves essentially like the above function except that it use the DOM::Node->Node* link to get the
+ * corresponding Node. So be sure that the link is set.
+ * @param node The node which will get the attribute. It don't add the attribute.
+ */
+ //static DOM::node createDomNodeAttribute(DOM::Node node, const QString &attrName,
+ // DOM::Document rootNode);
+
+ /**
+ * Append a new attribute to a DOM::Node.
+ * @param node The node which will get the new attribute.
+ * @param attr The new attribute to add.
+ * @return Returns if the operation was successfull.
+ */
+ static bool insertDomNodeAttribute(DOM::Node node, DOM::Node attr);
+
+ /**
+ * It behaves essentially like the above function except that if the attribute doesn't exist, it will create it,
+ * and then it fills the attribute with attrValue.
+ * @param nodeName The name of the Node corresponding to node.
+ * @param dtd The currently used DTD.
+ * @param attrName The name of the (new) Attribute.
+ * @param attrValue The value of the new Attribute.
+ * @param rootNode The rootNode is needed in order to create a new Attribute.
+ * @return Returns if the operation was successfull.
+ */
+ static bool editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
+ const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+
+ /**
+ * It behaves essentially like the above function.
+ * @param node The DOM::Node comes from this node.
+ */
+ static bool editDomNodeAttribute(DOM::Node domNode, Node* node,
+ const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+
+ /**
+ * Looks if domNode has a parent which is named name.
+ * @return Returns the first parent which is named name or an empty DOM::Node if not found.
+ */
+ static DOM::Node hasParent(DOM::Node domNode, const QString &name);
+
+ /**
+ * Returns the position of the child domNode.
+ * @param domNode This is the DOM::Node we want the position.
+ * @return Returns the position of domNode inside domNode's parent's children or -1 if not found.
+ */
+ static int childPosition(DOM::Node domNode);
+
+ /**
+ * Returns the position'th child of parentNode.
+ * @param parentNode The parent Node of the node to return.
+ * @param position We return the position'th child Node.
+ * @param fallback If set to true, it will always return a valid Node (except if there is no child!!)
+ */
+ static DOM::Node getChildNode(DOM::Node parentNode, int position, bool fallback = false);
+
+ /**
+ * Specify if a DOM::Node is inline (as specified in isInline()) or text.
+ * @return true if it is an inline Node.
+ */
+ static bool isInline(DOM::Node domNode);
+
+ /**
+ * Specify if parent supports the siblings DOM::Nodes starting from startNode to endNode
+ * according to the DTD dtd.
+ */
+ static bool parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Node endNode,
+ const DTDStruct* dtd);
+
+
+ /** ----------------------- MISCELLANEOUS -------------------------------------*/
+
+ /**
+ * TEMPORARY, HTML specific
+ * @return Returns true if it is a inline Node. Official DTD List, unlike getNodeDisplay().
+ */
+ static bool isInline(const QString &nodename);
+
+ /**
+ * Prints in stdout the current DOM::Node tree.
+ * @param rootNode The root Node of the DOM::Node Tree (usually document())
+ * @param indent The indentation.
+ */
+ static void coutDomTree(DOM::Node rootNode, int indent);
+
+ /**
+ * Prints in stdout the current Node tree.
+ * @param node The startNode
+ * @param indent The number of little dots per parent relationship.
+ */
+ static void coutTree(Node *node, int indent);
+
+ /**
+ * Returns whether a range is surrounded by a tag.
+ * @param start_node The start of the range to be checked.
+ * @param end_node The end of the range to be checked.
+ * @param tag_name The name of the tag, e.g., "strong".
+ * @return -1 is not inside tag_name
+ * 1 is inside tag_name
+ * 0 mixed
+ */
+ static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name);
+
+ static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
+ QString const& attribute_name, QString const& attribute_value);
+
+ /**
+ * Return whether the offset is placed between two words in a text node.
+ * @pre node is a Node of type text.
+ * @pre offset >= 0
+ * @param node The text node to be checked.
+ * @param offset The position in text we want to see if it's between words.
+ * @return true if is a space between words or if it's in the limit of a word.
+ */
+ static bool isBetweenWords(Node* node, int offset);
+
+ /**
+ * Set node and offset to the beggining of the word
+ * @pre node is a text node.
+ * @pre isBetweenWords
+ * @param node The text node, which will be changed (or not) to the start of the word.
+ * @param offset The current offset of the text node which will be changed (or not) to the start of the word.
+ * @return the offset of the beggining of the word
+ */
+ static void getStartOfWord(Node*& node, int& offset);
+
+ /**
+ * Same as above, but will get the end of the word
+ */
+ static void getEndOfWord(Node*& node, int& offset);
+
+ /**
+ * Set node and offset to the beggining of the paragraph.
+ * The distinction between inline/block nodes is used here.
+ * @param node
+ * @param offset
+ */
+ static void getStartOfParagraph(Node*& node, int& offset);
+
+ static void getEndOfParagraph(Node*& node, int& offset);
+
+private:
+ /**
+ * Split the last valid start parent (commonParentStartChild) into two.
+ * This and the method above are related and are used in sequence.
+ * The following tree:
+ * <body>
+ * <b> --> commonParent
+ * <i> --> commonParentStartChild
+ * select|
+ * here --> startNode
+ * </i>
+ * continue
+ * <u>
+ * stop|more
+ * </u>
+ * text
+ * </b>
+ * <body>
+ * Is changed to:
+ * <body>
+ * <b>
+ * <i>
+ * select|
+ * </i>
+ * </b>
+ * <b>
+ * <i>
+ * here
+ * </i>
+ * continue
+ * <u>
+ * stop|more
+ * </u>
+ * text
+ * </b>
+ * </body>
+ * @param startNode The node where a selection starts, for example.
+ * @param commonParent This is the common parent between start and end node.
+ * @param commonParentStartChildLocation The first child of commonParent which is parent of startNode
+ * @param modifs The changes made are logged into modifs.
+ */
+ static void splitStartNodeSubtree(Node* startNode, Node* commonParent,
+ QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
+ /**
+ * Split the last valid start parent (commonParentStartChild) into two.
+ * The following tree:
+ * <body>
+ * <b> --> commonParent
+ * <i> --> commonParentStartChild
+ * select|
+ * here
+ * </i>
+ * continue
+ * <u> --> commonParentEndChild
+ * stop| --> endNode
+ * more
+ * </u>
+ * text
+ * </b>
+ * <body>
+ * Is changed to:
+ * <body>
+ * <b>
+ * <i>
+ * select|here
+ * </i>
+ * continue
+ * <u>
+ * stop|
+ * </u>
+ * </b>
+ * <b>
+ * <u>
+ * more
+ * </u>
+ * text
+ * </b>
+ * </body>
+ * @param endNode The node where a selection ends, for example.
+ * @param commonParent This is the common parent between start and end node.
+ * @param commonParentStartChildLocation The first child of commonParent which is parent of startNode.
+ * @param commonParentEndChildLocation The first child of commonParent which is parent of endNode.
+ * @param subTree True if we are dealing with a tree that doesn't belong to the current document.
+ * @param modifs The changes made are logged into modifs.
+ */
+ static void splitEndNodeSubtree(Node* endNode, Node* commonParent,
+ QValueList<int>& commonParentStartChildLocation,
+ QValueList<int>& commonParentEndChildLocation,
+ bool subTree, NodeModifsSet* modifs);
+};
+
+#endif
diff --git a/quanta/parts/kafka/kafkadragobject.cpp b/quanta/parts/kafka/kafkadragobject.cpp
new file mode 100644
index 00000000..652ea6f2
--- /dev/null
+++ b/quanta/parts/kafka/kafkadragobject.cpp
@@ -0,0 +1,90 @@
+/***************************************************************************
+ kafkadragobject.h
+ -------------------
+
+ copyright : (C) 2004 - Paulo Moura Guedes
+ email : moura@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 <kdebug.h>
+
+#include <qdom.h>
+#include <qtextstream.h>
+
+#include "kafkadragobject.h"
+#include "node.h"
+#include "kafkacommon.h" // for debug only
+
+char const* KafkaDragObject::m_mimetype = "application/kafka-nodeselection";
+
+KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const char* name)
+ : QStoredDrag(m_mimetype, dragSource, name), m_item(item)
+{
+ QDomDocument doc("KafkaSelection");
+ QString docstart = "<KafkaSelection/>";
+ doc.setContent(docstart);
+ QDomElement itemsElement = doc.createElement("Items");
+ doc.documentElement().appendChild(itemsElement);
+ //kdDebug(25001) << doc.toString() << endl;
+ item->save(itemsElement);
+ //QDataStream s(m_array, IO_WriteOnly);
+ QTextStream s(m_array, IO_WriteOnly);
+ s << doc.toString();
+ //s << "biltre";
+ /*
+ kdDebug(25001) << m_array.size() << endl;
+ kdDebug(25001) << doc.toString() << endl;
+ kdDebug(25001) << QString(m_array) << endl;
+ */
+ //setEncodedData(m_array);
+}
+
+KafkaDragObject::~KafkaDragObject()
+{}
+
+QByteArray KafkaDragObject::encodedData(const char* mimetype) const
+{
+ if(m_mimetype == mimetype)
+ return m_array;
+
+ return QByteArray();
+}
+
+Node const* KafkaDragObject::getItem() const
+{
+ return m_item;
+}
+
+bool KafkaDragObject::canDecode(QMimeSource *e)
+{
+ return e->provides(m_mimetype);
+}
+
+bool KafkaDragObject::decode(QMimeSource* e, Node* node)
+{
+ if(!node || !e->provides(m_mimetype))
+ return false;
+
+ QByteArray data = e->encodedData(m_mimetype);
+ //kdDebug(25001) << QString(data) << endl;
+ QDomDocument doc;
+ doc.setContent(data, false);
+ //kdDebug(25001) << doc.toString() << endl;
+ node->load(doc.documentElement().firstChild().toElement());
+
+ kdDebug(25001) << "Load: " << endl;
+ kafkaCommon::coutTree(node, 3);
+
+ return node;
+}
+
+#include "kafkadragobject.moc"
diff --git a/quanta/parts/kafka/kafkadragobject.h b/quanta/parts/kafka/kafkadragobject.h
new file mode 100644
index 00000000..3325812c
--- /dev/null
+++ b/quanta/parts/kafka/kafkadragobject.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ kafkadragobject.h
+ -------------------
+
+ copyright : (C) 2004 - Paulo Moura Guedes
+ email : moura@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 KAFKADRAGOBJECT_H
+#define KAFKADRAGOBJECT_H
+
+#include <qcstring.h>
+#include <qdragobject.h>
+
+class Node;
+
+/**
+@author Paulo Moura Guedes
+*/
+class KafkaDragObject: public QStoredDrag
+{
+ Q_OBJECT
+
+public:
+ KafkaDragObject(Node const* item, QWidget* dragSource = 0, const char* name = 0);
+ ~KafkaDragObject();
+
+ QByteArray encodedData(const char* c) const;
+ Node const* getItem() const;
+
+ static bool canDecode(QMimeSource*);
+ static bool decode(QMimeSource*, Node* node);
+
+private:
+ QByteArray m_array;
+ Node const* m_item;
+
+ static char const* m_mimetype;
+};
+
+#endif
diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp
new file mode 100644
index 00000000..493a9a3f
--- /dev/null
+++ b/quanta/parts/kafka/kafkahtmlpart.cpp
@@ -0,0 +1,2272 @@
+/***************************************************************************
+ kafkahtmlpart.cpp
+ -------------------
+
+ copyright : (C) 2001 - The Kafka Team
+ (C) 2003, 2004 - Nicolas Deschildre
+ email : kde-kafka@master.kde.org && ndeschildre@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 <qfile.h>
+#include <qpainter.h>
+#include <qtextstream.h>
+#include <qstringlist.h>
+#include <qlayout.h>
+#include <qmainwindow.h>
+#include <qtimer.h>
+#include <qtooltip.h>
+#include <qpopupmenu.h>
+
+#include <kdebug.h>
+#include <klocale.h>
+#include <khtmlview.h>
+#include <kmessagebox.h>
+#include <ktrader.h>
+#include <klibloader.h>
+#include <kparts/factory.h>
+#include <dom/dom_node.h>
+#include <dom/dom_text.h>
+#include <dom/dom_exception.h>
+#include <dom/dom_string.h>
+#include <dom/dom2_range.h>
+#include <khtml_events.h>
+//#include <khtml_part.h>
+
+#include "kafkacommon.h"
+#ifdef HEAVY_DEBUG
+#include "domtreeview.h"
+#include <qdialog.h>
+#endif
+#include "wkafkapart.h"
+#include "undoredo.h"
+#include "nodeproperties.h"
+#include "tagaction.h"
+#include "tagactionset.h"
+#include "document.h"
+#include "resource.h"
+#include "quantacommon.h"
+#include "quanta.h"
+#include "quantaview.h"
+#include "tagattributetree.h"
+#include "tagactionmanager.h"
+#include "tagactionset.h"
+#include "cursors.h"
+
+#include "viewmanager.h"
+
+class KafkaWidgetPrivate
+{
+public:
+ KafkaWidgetPrivate()
+ {}
+ ~KafkaWidgetPrivate()
+ {}
+ int m_cursorOffset;
+ int m_pressOffset;
+ int m_releaseOffset;
+ /** when going up and down, trying to be as close as possible from the
+ original node X pos like a good text editor :=) */
+ bool stuckCursorHorizontalPos;
+ int stuckedCursorPosX;
+
+#ifdef HEAVY_DEBUG
+ KafkaDOMTreeDialog *domdialog;
+#endif
+};
+
+KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+ const char *name)
+ : KHTMLPart(widgetParent, name, parent, name),
+ w(part)
+{
+ m_contextPopupMenu = new QPopupMenu();
+
+ d = new KafkaWidgetPrivate();
+
+ d->m_cursorOffset = 0;
+ d->m_pressOffset = 0;
+ d->m_releaseOffset = 0;
+ d->stuckCursorHorizontalPos = false;
+
+ m_modifs = 0L;
+
+ // With the mix of Leo Savernik's caret Mode and the current editing
+ // functions, it will be kind of VERY messy
+ setCaretMode(true);
+ connect(this, SIGNAL(caretPositionChanged(const DOM::Node &, long)),
+ this, SLOT(slotNewCursorPos(const DOM::Node &, long)));
+ setCaretDisplayPolicyNonFocused(KHTMLPart::CaretVisible);
+
+ connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)),
+ this, SLOT(slotContextMenuRequested(const QString&, const QPoint&)));
+
+ view()->setMouseTracking(true);
+ view()->installEventFilter(this);
+
+ //for debug purposes, we add a DOM tree view
+#ifdef HEAVY_DEBUG
+ //d->domdialog = new KafkaDOMTreeDialog(view(), this);
+ //d->domdialog->show();
+#endif
+ //IMPORTANT:without him, no document() is created in khtmlPart
+ begin();
+ write("<html></html>");
+ end();
+}
+
+KafkaWidget::~KafkaWidget()
+{}
+
+void KafkaWidget::newDocument()
+{
+ //FIXME: Somehow we should get it from Quanta settings: qConfig.attrValueQuotation
+ //-->No need for that: Quotations aren't stored in the DOM::Nodes
+ QString newPageHTMLCode = "<html>\n"
+ "<head>\n"
+ "</head>\n"
+ "<body>\n"
+ "</body>\n"
+ "</html>\n";
+
+ begin();
+ write(newPageHTMLCode);
+ end();
+
+}
+
+void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::insertText text " << text << " pos " << position << endl;
+#endif
+
+ int focus;
+ kNodeAttrs *attrs = w->getAttrs(node);
+
+ if(!attrs)
+ return;
+
+ focus = attrs->chCurFoc();
+
+ if(position < 0)
+ return;//nothing to do if something is selected
+ //if(focus == kNodeAttrs::no || !cbModified) return;//can't add text in this Node.
+ if(position == 0 && node.nodeName().string().lower() == "body")
+ {
+ //SPECIFIC HTML code!!!
+ //doesn't work!
+ //putCursorAtFirstAvailableLocation();
+ if(!node.firstChild().isNull() && node.firstChild().nodeType() == DOM::Node::TEXT_NODE)
+ {
+ node = m_currentNode = node.firstChild();
+ position = 0;
+ }
+
+ if(position == 0 && node.nodeName().string().lower() == "body")
+ {
+ //We shouldn't go here...
+ DOM::Text textNode = document().createTextNode(text);
+ node.appendChild(textNode);
+ m_currentNode = textNode;
+ d->m_cursorOffset = text.length();
+ emit domNodeInserted(textNode, false, m_modifs);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::insertText() - added text - 1" << endl;
+#endif
+
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ return;
+ }
+ }
+
+ if(focus == kNodeAttrs::textNode && node.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ DOM::DOMString textNode = node.nodeValue();
+ DOM::DOMString textSplitted = textNode.split(position);
+ node.setNodeValue(textNode + text + textSplitted);
+ d->m_cursorOffset += text.length();
+ emit domNodeModified(node, m_modifs);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::insertText() - added text" << endl;
+#endif
+
+ }
+ else if(position == 0)
+ {
+ DOM::Text textNode = document().createTextNode(text);
+ DOM::Node parent = node.parentNode();
+//FIXME: Andras: safety checks, as parent can be null. Maybe it just hides the error...
+ if (!parent.isNull())
+ parent.insertBefore(textNode, node);
+ else
+ node.appendChild(textNode);
+ m_currentNode = textNode;
+ d->m_cursorOffset = text.length();
+ emit domNodeInserted(textNode, false, m_modifs);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::insertText() - added text - 2" << endl;
+#endif
+
+ }
+ else if(position == 3 || (position == 1 && (focus == kNodeAttrs::singleNodeAndItself)))
+ {
+ DOM::Text textNode = document().createTextNode(text);
+ DOM::Node parent = node.parentNode();
+//FIXME: Andras: safety checks, as parent and node.nextSibling can be null. Maybe it just hides the error...
+//Also it seems that position can be 3 and node is "body". See bug 112733.
+ if (node.nodeName().string().lower() != "body" && !parent.isNull())
+ {
+ if (!node.nextSibling().isNull())
+ parent.insertBefore(textNode, node.nextSibling());
+ else
+ parent.insertBefore(textNode, node);
+ }
+ else
+ node.appendChild(textNode);
+ m_currentNode = textNode;
+ d->m_cursorOffset = text.length();
+ emit domNodeInserted(textNode, false, m_modifs);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::insertText() - added text - 3" << endl;
+#endif
+
+ }
+ else if(position == 1)
+ {
+ DOM::Text textNode = document().createTextNode(text);
+ if(!node.firstChild().isNull())
+ node.insertBefore(textNode, node.firstChild());
+ else
+ node.appendChild(textNode);
+ m_currentNode = textNode;
+ d->m_cursorOffset = text.length();
+ emit domNodeInserted(textNode, false, m_modifs);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::insertText() - added text - 4" << endl;
+#endif
+
+ }
+ //document().updateRendering();
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+}
+
+void KafkaWidget::slotDelayedSetCaretPosition()
+{
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+}
+
+void KafkaWidget::insertText(const QString &text, int position)
+{
+ insertText(m_currentNode, text, (position == -1 ? d->m_cursorOffset : position));
+}
+
+
+void KafkaWidget::normalize(DOM::Node _node)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::normalize()" << endl;
+#endif
+
+//FIXME: Andras: getAttrs() can sometimes return NULL and causes a crash. No idea why and what it means though.
+ DOM::Node childNode = _node.firstChild();
+ while(!childNode.isNull())
+ {
+ if(w->getAttrs(childNode) && w->getAttrs(childNode)->chCurFoc() == kNodeAttrs::textNode)
+ {
+ while(!childNode.nextSibling().isNull() &&
+ w->getAttrs(childNode.nextSibling()) && w->getAttrs(childNode.nextSibling())->chCurFoc() ==
+ kNodeAttrs::textNode )
+ {
+ childNode.setNodeValue(childNode.nodeValue() +
+ childNode.nextSibling().nodeValue());
+ emit domNodeModified(childNode, m_modifs);
+ emit domNodeIsAboutToBeRemoved(childNode.nextSibling(), true, m_modifs);
+ _node.removeChild(childNode.nextSibling());
+ }
+ }
+ childNode = childNode.nextSibling();
+ }
+}
+
+void KafkaWidget::keyReturn(bool specialPressed)
+{
+ //WARNING : HTML-specific function
+ DOM::Node text, text2, pDomNode, pDomNode2, brDomNode, brDomNode2, tmp, PNode, emptyText;
+ int focus;
+ // QTag *qTag;
+ bool childOfP;
+ //kNodeAttrs *props;
+
+ if(m_currentNode.isNull())
+ return;
+ if(!w->getAttrs(m_currentNode))
+ return;
+
+ focus = w->getAttrs(m_currentNode)->chCurFoc();
+ if (focus == kNodeAttrs::textNode)
+ {
+ //First determine if the current Node is a child of a P
+ childOfP = false;
+ tmp = m_currentNode;
+ while(!tmp.isNull())
+ {
+ if(tmp.nodeName().string().lower() == "p")
+ {
+ PNode = tmp;
+ childOfP = true;
+ break;
+ }
+ tmp = tmp.parentNode();
+ }
+
+ //Then split if necessary the text
+ if((static_cast<DOM::CharacterData>(m_currentNode)).length() == 0)
+ text = m_currentNode;
+ else if(d->m_cursorOffset <= 0)
+ text2 = m_currentNode;
+ else if((unsigned)d->m_cursorOffset >=
+ (static_cast<DOM::CharacterData>(m_currentNode)).length())
+ text = m_currentNode;
+ else
+ {
+ text = m_currentNode;
+ text2 = (static_cast<DOM::Text>(m_currentNode)).splitText(d->m_cursorOffset);
+ emit domNodeModified(m_currentNode, m_modifs);
+ emit domNodeInserted(text2, false, m_modifs);
+ }
+
+ if(!specialPressed)
+ {
+ if(childOfP)
+ {}
+ else
+ {}
+ }
+ else
+ {
+ if(childOfP)
+ {}
+ else
+ {}
+ }
+
+
+ //Then look if we are in a area which can handle a P
+ //and if it is ok and necessary, insert the current text in a P
+ //TODO: Change a bit for the p so that it handle every case
+ /**qTag = QuantaCommon::tagFromDTD(w->getCurrentDoc()->defaultDTD(),
+ m_currentNode.parentNode().nodeName().string());
+ pDomNode = kafkaCommon::hasParent(m_currentNode, "p");
+ if(pDomNode.isNull() && qTag && qTag->isChild("p"))
+ {
+ if(!text.isNull())
+ {
+ emit domNodeIsAboutToBeRemoved(text, false);
+ w->removeDomNode(text);
+ }
+
+ pDomNode = kafkaCommon::createDomNode("p", w->getCurrentDoc()->defaultDTD(),
+ document());
+ w->insertDomNode(pDomNode, m_currentNode.parentNode(),
+ m_currentNode.nextSibling());
+ emit domNodeInserted(pDomNode, false);
+
+ if(!text.isNull())
+ {
+ w->::insertDomNode(text, pDomNode);
+ emit domNodeInserted(text, false);
+ }
+ }
+
+ //Then we insert either a P or a BR tag.
+ if(qTag && qTag->isChild("p") && !pDomNode.isNull())
+ {
+ if(!text2.isNull())
+ {
+ emit domNodeIsAboutToBeRemoved(text2, false);
+ w->::removeDomNode(text2);
+ }
+
+ pDomNode2 = kafkaCommon::createDomNode("p", w->getCurrentDoc()->defaultDTD(),
+ document());
+ w->insertDomNode(pDomNode2, pDomNode.parentNode(),
+ pDomNode.nextSibling());
+ emit domNodeInserted(pDomNode2, false);
+
+ if(!text2.isNull())
+ {
+ w->insertDomNode(text2, pDomNode2);
+ emit domNodeInserted(text2, false);
+ }
+ m_currentNode = pDomNode2.firstChild();
+ d->m_cursorOffset = 0;
+ }
+ else
+ {*/
+ brDomNode = kafkaCommon::createDomNode("br", w->getCurrentDoc()->defaultDTD(),
+ document());
+ if(!text.isNull())
+ w->insertDomNode(brDomNode, m_currentNode.parentNode(),
+ text.nextSibling());
+ else
+ w->insertDomNode(brDomNode, m_currentNode.parentNode(),
+ text2);
+ emit domNodeInserted(brDomNode, false, m_modifs);
+ if(!text2.isNull())
+ m_currentNode = text2;
+ else
+ {
+ if(!brDomNode.nextSibling().isNull())
+ m_currentNode = brDomNode.nextSibling();
+ if(!brDomNode.nextSibling().isNull() && brDomNode.nextSibling().nextSibling().isNull())
+ {
+ //TEMP before the webcore caret.
+ brDomNode2 = kafkaCommon::createDomNode("br", w->getCurrentDoc()->defaultDTD(),
+ document());
+ if(!brDomNode.nextSibling().isNull())
+ w->insertDomNode(brDomNode2, m_currentNode.parentNode(),
+ DOM::Node());
+
+ emit domNodeInserted(brDomNode2, false, m_modifs);
+ m_currentNode = brDomNode;
+ }
+
+ }
+ d->m_cursorOffset = 0;
+
+ }
+ else if( m_currentNode.nodeName().string().lower() == "br")
+ {
+ brDomNode = kafkaCommon::createDomNode("br", w->getCurrentDoc()->defaultDTD(),
+ document());
+ w->insertDomNode(brDomNode, m_currentNode.parentNode(),
+ brDomNode.nextSibling());
+ emit domNodeInserted(brDomNode, false, m_modifs);
+ m_currentNode = brDomNode;
+ d->m_cursorOffset = 0;
+ }
+
+#ifdef HEAVY_DEBUG
+
+ kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
+ << m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
+ << m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
+ //emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ // kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
+ // << m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
+ //postprocessCursorPosition();
+ kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
+ << m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
+#endif
+
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+}
+
+bool KafkaWidget::eventFilter(QObject *, QEvent *event)
+{
+ bool forgetEvent = false;
+ //tmp
+ //DOM::Node attr, tmpNode;
+ //end tmp
+
+ if(event->type() == QEvent::FocusIn)
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "KafkaWidget::eventFilter() FocusIn" << endl;
+#endif
+
+ emit hasFocus(true);
+ }
+
+ if(event->type() == QEvent::FocusOut)
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "KafkaWidget::eventFilter() FocusOut" << endl;
+#endif
+
+ emit hasFocus(false);
+ }
+
+ if(event->type() == QEvent::KeyPress)
+ {
+ QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+
+ //Create a new NodeModifsSet where the changes will be logged.
+ m_modifs = new NodeModifsSet();
+
+ switch(keyevent->key())
+ {
+ case Key_Left:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::eventFilter() Left" << endl;
+#endif
+ //previousOffset(1);
+ d->stuckCursorHorizontalPos = false;
+ //forgetEvent = true;//to avoid the scrolling of the page
+ break;
+
+ case Key_Right:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001) << "KafkaWidget::eventFilter() Right" << endl;
+#endif
+ //nextOffset(1);
+ d->stuckCursorHorizontalPos = false;
+ //forgetEvent = true;
+ break;
+
+ case Key_Backspace:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::eventFilter() Backspace" << endl;
+#endif
+
+ keyBackspace();
+ d->stuckCursorHorizontalPos = false;
+ break;
+
+ case Key_Delete:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::eventFilter() Delete" << endl;
+#endif
+
+ keyDelete();
+ d->stuckCursorHorizontalPos = false;
+ break;
+
+ case Key_Up:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::eventFilter() Up" << endl;
+#endif
+ //keyUp();
+ //forgetEvent = true;
+ break;
+ case Key_Down:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::eventFilter() Down" << endl;
+#endif
+ //keyDown();
+ //forgetEvent = true;
+ break;
+ case Key_Escape:
+ break;
+ case Key_Tab:
+ if(!m_currentNode.isNull() && w->getAttrs(m_currentNode) &&
+ w->getAttrs(m_currentNode)->chCurFoc() != kNodeAttrs::no)
+ {
+ // @todo check tab settings in Quanta
+ if(hasSelection())
+ removeSelection();
+ insertText(" ", -1);
+ makeCursorVisible();
+ }
+ forgetEvent = true;
+ d->stuckCursorHorizontalPos = false;
+ break;
+ case Key_BackTab:
+ break;
+ case Key_Return:
+ case Key_Enter:
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::eventFilter() Return" << endl;
+#endif
+ if(hasSelection())
+ removeSelection();
+
+ applyQueuedToggableTagActions();
+
+ keyReturn(keyevent->state() & ControlButton);
+ d->stuckCursorHorizontalPos = false;
+ break;
+ case Key_Insert:
+ break;
+ case Key_Pause:
+#ifdef HEAVY_DEBUG
+
+ kafkaCommon::coutTree(baseNode, 2);
+ kafkaCommon::coutDomTree(document(), 2);
+ w->coutLinkTree(baseNode, 2);
+#endif
+
+ break;
+ case Key_Print:
+ break;
+ case Key_SysReq:
+ break;
+ case Key_Home:
+ d->stuckCursorHorizontalPos = false;
+ break;
+ case Key_End:
+ d->stuckCursorHorizontalPos = false;
+ break;
+ case Key_Next:
+ break;
+ case Key_Shift:
+ break;
+ case Key_Control:
+ break;
+ case Key_Meta:
+ break;
+ case Key_Alt:
+ break;
+ case Key_CapsLock:
+ break;
+ case Key_NumLock:
+ break;
+ case Key_ScrollLock:
+ break;
+
+ default:
+ if(m_currentNode.isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::eventFilter() - DOM::Node NULL" << endl;
+#endif
+
+ break;
+ }
+ else if(w->getAttrs(m_currentNode) &&
+ w->getAttrs(m_currentNode)->chCurFoc() != kNodeAttrs::no ||
+ m_currentNode.nodeName().string().lower() == "body")
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "KafkaWidget::eventFilter() Text - " <<
+ keyevent->text() << endl;
+#endif
+ //if(( keyevent->state() & Qt::ShiftButton) || ( keyevent->state() == Qt::NoButton))
+ if( keyevent->text().length() &&
+ ( !( keyevent->state() & ControlButton ) &&
+ !( keyevent->state() & AltButton ) &&
+ !( keyevent->state() & MetaButton ) ||
+ ( ( (keyevent->state()&ControlButton) | AltButton ) == (ControlButton|AltButton) ) ) &&
+ ( !keyevent->ascii() || keyevent->ascii() >= 32 || keyevent->text() == "\t" ) )
+ {
+ if(hasSelection())
+ removeSelection();
+
+ applyQueuedToggableTagActions();
+
+ insertText(keyevent->text(), -1);
+ }
+ makeCursorVisible();
+#ifdef HEAVY_DEBUG
+ //w->coutLinkTree(baseNode, 2);
+#endif
+
+ }
+ forgetEvent = true;
+ d->stuckCursorHorizontalPos = false;
+ break;
+ }
+
+ //Submit the modifs to the undoRedo system.
+ ViewManager::ref()->activeDocument()->docUndoRedo->addNewModifsSet(m_modifs, undoRedo::KafkaModif, 0, qConfig.replaceAccented);
+ m_modifs = 0L;
+ }
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "Current Offset : " << m_currentNode.nodeName().string() << ":" <<
+ d->m_cursorOffset << " (" << event->type() << ")" << endl;
+#endif
+
+ return forgetEvent;
+}
+
+void KafkaWidget::slotContextMenuRequested(const QString& /*url*/, const QPoint& point)
+{
+ TagActionManager::self()->fillWithTagActions(m_contextPopupMenu, nodeUnderMouse());
+
+ if(m_contextPopupMenu->count() != 0)
+ m_contextPopupMenu->popup(point);
+}
+
+
+#if 0
+void KafkaWidget::keyDeleteNodes(DOM::Node &startNode, long &offset, bool backspace)
+{
+ DOM::Node domNode = startNode, nextNode;
+ kNodeAttrs *attrs;
+ long nextOffset;
+ DOM::DOMString nodeText, textSplitted;
+
+ while(!domNode.isNull())
+ {
+ //Start by getting the attributes of the Node
+ attrs = w->getAttrs(domNode);
+ if(!attrs)
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<<"KafkaWidget::keyDeleteNodes() - ERROR KNodeAttrs not found!"
+ << endl;
+#endif
+
+ break;
+ }
+
+ //Get the next Location
+ nextNode = domNode;
+ nextOffset = offset;
+ if(backspace)
+ getPrevNodeRangeSpecs(nextNode, offset, blok! );
+ else
+ getNextNodeRangeSpecs(nextNode, offset);
+
+ //Nodes that can't be deleted stop the cursor (e.g. TBODY)
+ if(!attrs->cbDel())
+ break;
+
+ //If we are in some text, and a letter can be deleted, delete it.
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE && ((backspace && offset != 0)) ||
+ (!backspace && offset != (static_cast<DOM::CharacterData>(domNode)).length()))
+ )
+ {
+ nodeText = domNode.nodeValue();
+ textSplitted = nodeText.split(backspace?offset:offset + 1);
+ nodeText.split(backspace?offset - 1:offset);
+ domNode.setNodeValue(nodeText + textSplitted);
+ //m_currentNode.parentNode().applyChanges();
+ emit domNodeModified(domNode);
+ //postprocessCursorPosition();
+ break;
+ }
+
+ //If we are in an empty text (shoudn't occur), delete it
+ if(domNode.nodeType()
+ == DOM::Node::TEXT_NODE &&
+ (static_cast<DOM::CharacterData>(domNode)).length() == 0)
+ {
+ emit domNodeIsAboutToBeRemoved(domNode, true);
+ domNode.parentNode().removeChild(domNode);
+ domNode = nextNode;
+ continue;
+ }
+
+ //If we are in an empty Node (Inline), delete it
+ if(domNode.nodeType()
+ == DOM::Node::ELEMENT_NODE && offset == 0 && !domNode.hasChildNodes())
+ {
+
+ continue;
+ }
+
+ //If the current Node is an empty Text, delete it
+ if()
+ {
+ continue;
+ }
+
+ //If the current Node is an empty Node (kNodeAttrs::singleNodeAndItself)), delete it
+ if()
+ {
+ return;
+ }
+
+ //If the current Node is an empty Node (Inline) delete it
+ if()
+ {
+ continue;
+ }
+}
+
+
+}
+#endif
+
+void KafkaWidget::keyDelete()
+{
+ kNodeAttrs *attrs, *attrsTmp;
+ int focus, childPosition;
+ DOM::Node _nodeParent, _node, _nodeNext, temp, tempParent, nextSibling, nodeNextNext;
+ DOM::Node toplevelBlock, toplevelBlock2, startNode, endNode, startNode2, endNode2;
+ DOM::Node childOfCommonParent, childOfCommonParent2, commonParent;
+ bool _goingTowardsRootNode, isParent, singleNodeDeleted, nextIsBlock, startNode2IsNotInline;
+
+ if(hasSelection())
+ {
+ removeSelection();
+ return;
+ }
+
+ if(m_currentNode.isNull())
+ return;
+ attrs = w->getAttrs(m_currentNode);
+ if(!attrs)
+ return;
+
+ //OLD PART, TO BE REMOVED or #ifdef'ed
+ if(attrs->chCurFoc() == kNodeAttrs::textNode && (unsigned)d->m_cursorOffset !=
+ (static_cast<DOM::CharacterData>(m_currentNode)).length())
+ {//if we are in the middle of some text, we remove one letter
+ if(!attrs->cbMod())
+ return;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::keyDelete() - one letter removed - 1" << endl;
+#endif
+
+ DOM::DOMString nodeText = m_currentNode.nodeValue();
+ DOM::DOMString textSplitted = nodeText.split(d->m_cursorOffset + 1);
+ nodeText.split(d->m_cursorOffset);
+ m_currentNode.setNodeValue(nodeText + textSplitted);
+ m_currentNode.parentNode().applyChanges();
+ emit domNodeModified(m_currentNode, m_modifs);
+ postprocessCursorPosition();
+ return;
+ }
+
+ if(attrs->chCurFoc() != kNodeAttrs::no && attrs->chCurFoc() != kNodeAttrs::textNode &&
+ d->m_cursorOffset < 0)
+ {//if we delete ourselves, which node will be m_currentNode??
+ if(!attrs->cbDel())
+ return;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::keyDelete() - deleting a Node - 2" << endl;
+#endif
+
+ DOM::Node _node = m_currentNode;
+ bool b = false;
+ while(1)
+ {//try to find a prev node from which we can delete the node
+ _node = getPrevNode(_node, b);
+ if(_node == 0)
+ break;
+ attrs = w->getAttrs(_node);
+ if(attrs && attrs->chCurFoc() == kNodeAttrs::textNode)
+ {
+ m_currentNode = _node;
+ d->m_cursorOffset =
+ (static_cast<DOM::CharacterData>(_node)).length();
+ keyDelete();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ if(attrs && attrs->chCurFoc() != kNodeAttrs::no &&
+ attrs->chCurFoc() != kNodeAttrs::textNode)
+ {
+ m_currentNode = _node;
+ d->m_cursorOffset = 1;
+ keyDelete();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ }
+ b = false;
+ while(1)
+ {//try to find a next node from which we can delete the node
+ _node = getNextNode(_node, b);
+ if(_node == 0)
+ break;
+ attrs = w->getAttrs(_node);
+ if(attrs && attrs->chCurFoc() != kNodeAttrs::no)
+ {
+ m_currentNode = _node;
+ d->m_cursorOffset = 0;
+ keyBackspace();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ }
+ //here, there is no node right and left that can have the cursor focus
+ _node = m_currentNode.parentNode();
+ emit domNodeIsAboutToBeRemoved(m_currentNode, true, m_modifs);
+ _node.removeChild(m_currentNode);
+ m_currentNode = document().createTextNode("");
+ _node.appendChild(m_currentNode);
+ emit domNodeInserted(m_currentNode, false, m_modifs);
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ }
+
+ //Beginning of the actual keyDelete
+ _node = m_currentNode;
+ _goingTowardsRootNode = false;
+ singleNodeDeleted = false;
+ _nodeNext = getNextNode(_node, _goingTowardsRootNode);
+ while(!_nodeNext.isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyDelete() - currentNode: " <<
+ _nodeNext.nodeName().string() << endl;
+#endif
+
+ attrs = w->getAttrs(_nodeNext);
+
+ //If this Node can't be deleted, we stop here.
+ if(!attrs || !attrs->cbDel())
+ return;
+
+ //If we are in a TEXT node, we remove a letter
+ if(attrs->chCurFoc() == kNodeAttrs::textNode)
+ {
+ if((static_cast<DOM::CharacterData>(_nodeNext)).length() != 0)
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyDelete() - one letter" <<
+ " removed - 2" << endl;
+#endif
+
+ DOM::DOMString nodeText = _nodeNext.nodeValue();
+ DOM::DOMString textSplitted = nodeText.split(1);
+ _nodeNext.setNodeValue(textSplitted);
+ emit domNodeModified(_nodeNext, m_modifs);
+ postprocessCursorPosition();
+ normalize(_nodeNext.parentNode());
+ break;
+ }
+ else
+ {//if we are in an empty text, delete it
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyDelete() - deleting" <<
+ "empty #text" << endl;
+#endif
+
+ _nodeParent = _nodeNext.parentNode();
+ //If this empty text contains the cursor, change node to its parent.
+ if(_nodeNext == _node && _nodeParent.firstChild() == _nodeNext &&
+ _nodeNext.nextSibling().isNull())
+ {
+ _node = _nodeParent;
+ //d->m_cursorOffset = -2;
+ }
+ emit domNodeIsAboutToBeRemoved(_nodeNext, true, m_modifs);
+ _nodeParent.removeChild(_nodeNext);
+ singleNodeDeleted = true;
+ _nodeParent.applyChanges();
+ _nodeNext = _node;
+ }
+ }
+ //Else if the current Node is a BLOCK which can be entered/leaved e.g. H1
+ else if(attrs->chCurFoc() == kNodeAttrs::blockNode)
+ {
+ //First look if it is one of _node's parent
+ isParent = false;
+ temp = _node;
+ while(!temp.isNull())
+ {
+ if(_nodeNext == temp)
+ isParent = true;
+ temp = temp.parentNode();
+ }
+
+ //1 - Locate the toplevel blocks
+ temp = _nodeNext;
+ if(isParent)
+ {
+ toplevelBlock = temp;
+ while(temp.parentNode().lastChild() == temp && w->getAttrs(temp.parentNode()) &&
+ w->getAttrs(temp.parentNode())->chCurFoc() == kNodeAttrs::blockNode)
+ temp = temp.parentNode();
+ childOfCommonParent = temp;
+ temp = temp.nextSibling();
+ }
+ if(temp.isNull())
+ break;
+ childOfCommonParent2 = temp;
+ commonParent = temp.parentNode();
+ attrsTmp = w->getAttrs(temp);
+ nextIsBlock = (attrsTmp && attrsTmp->chCurFoc() == kNodeAttrs::blockNode);
+ while(!temp.isNull() && temp.hasChildNodes() && w->getAttrs(temp.firstChild()) &&
+ w->getAttrs(temp.firstChild())->chCurFoc() == kNodeAttrs::blockNode)
+ temp = temp.firstChild();
+ toplevelBlock2 = temp;
+
+ //2 - Determine the Nodes which could be moved
+ if(!toplevelBlock.isNull() && toplevelBlock.hasChildNodes())
+ endNode = toplevelBlock.lastChild();
+ else if(!childOfCommonParent2.isNull() && !childOfCommonParent2.previousSibling().isNull())
+ endNode = childOfCommonParent2.previousSibling();
+ temp = endNode;
+ while(!temp.isNull() && !temp.previousSibling().isNull() &&
+ ((kafkaCommon::isInline(temp) && (temp.previousSibling().isNull() ||
+ kafkaCommon::isInline(temp.previousSibling()))) /**||
+ (!isInline(temp) && temp.previousSibling().isNull())*/))
+ temp = temp.previousSibling();
+ startNode = temp;
+
+ if(!toplevelBlock2.isNull() && toplevelBlock2.hasChildNodes())
+ startNode2 = toplevelBlock2.firstChild();
+ else if(!childOfCommonParent.isNull() && !childOfCommonParent.nextSibling().isNull())
+ startNode2 = childOfCommonParent.nextSibling();
+ startNode2IsNotInline = false;
+ temp = startNode2;
+ attrsTmp = w->getAttrs(temp);
+ if(attrsTmp && (attrsTmp->chCurFoc() == kNodeAttrs::singleNodeAndItself ||
+ attrsTmp->chCurFoc() == kNodeAttrs::no))
+ startNode2IsNotInline = true;
+ while(!temp.isNull() && !temp.nextSibling().isNull() &&
+ ((kafkaCommon::isInline(temp) && (temp.nextSibling().isNull() ||
+ kafkaCommon::isInline(temp.nextSibling())))/** ||
+ (!isInline(temp) && temp.nextSibling().isNull())*/))
+ temp = temp.nextSibling();
+ endNode2 = temp;
+
+ //3 - Move Nodes.
+ if(!startNode2.isNull() && startNode2IsNotInline)
+ {
+ emit domNodeIsAboutToBeRemoved(startNode2, true, m_modifs);
+ startNode2.parentNode().removeChild(startNode2);
+ }
+ else if(isParent && !nextIsBlock)
+ {
+ if(kafkaCommon::parentSupports(toplevelBlock, startNode2, endNode2,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(toplevelBlock, startNode2, endNode2, DOM::Node(), false);
+ else
+ {
+ if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(commonParent, startNode, endNode, childOfCommonParent2,
+ true);
+ else
+ {
+ //Damn it! What to do??
+ }
+ }
+ }
+ else if(isParent && nextIsBlock)
+ {
+ if(kafkaCommon::parentSupports(toplevelBlock, startNode2, endNode2,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(toplevelBlock, startNode2, endNode2, DOM::Node(), false);
+ else
+ {
+ if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()) && kafkaCommon::parentSupports(
+ commonParent, startNode2, endNode2, w->getCurrentDoc()->defaultDTD()))
+ {
+ moveDomNodes(commonParent, startNode, endNode, childOfCommonParent,
+ false);
+ moveDomNodes(commonParent, startNode2, endNode2, childOfCommonParent2,
+ true);
+ }
+ else
+ {
+ //Damn it! What to do??
+ }
+ }
+ }
+ else if(!isParent && nextIsBlock)
+ {
+ if(kafkaCommon::parentSupports(commonParent, startNode2, endNode2,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(commonParent, startNode2, endNode2, childOfCommonParent2, true);
+ else
+ {
+ //Damn it! What to do??
+ }
+ }
+ if(!endNode.isNull())
+ normalize(endNode.parentNode());
+
+ //4 - Delete empty Block Nodes.
+ if(!toplevelBlock.isNull())
+ {
+ temp = toplevelBlock;
+ attrsTmp = w->getAttrs(temp);
+ while(attrsTmp && attrsTmp->chCurFoc() == kNodeAttrs::blockNode &&
+ !temp.hasChildNodes())
+ {
+ tempParent = temp.parentNode();
+ emit domNodeIsAboutToBeRemoved(temp, true, m_modifs);
+ tempParent.removeChild(temp);
+ temp = tempParent;
+ attrsTmp = w->getAttrs(temp);
+ }
+ }
+ if(!toplevelBlock2.isNull())
+ {
+ temp = toplevelBlock2;
+ attrsTmp = w->getAttrs(temp);
+ while(attrsTmp && attrsTmp->chCurFoc() == kNodeAttrs::blockNode &&
+ !temp.hasChildNodes())
+ {
+ tempParent = temp.parentNode();
+ emit domNodeIsAboutToBeRemoved(temp, true, m_modifs);
+ tempParent.removeChild(temp);
+ temp = tempParent;
+ attrsTmp = w->getAttrs(temp);
+ }
+ }
+ break;
+ }
+ //Else if the nextNode is a BLOCK, or an invisible Node, Inline Node
+ //which can be deleted, delete it!
+ else if(attrs->chCurFoc() == kNodeAttrs::singleNodeAndItself || ((attrs->chCurFoc() ==
+ kNodeAttrs::no || attrs->chCurFoc() == kNodeAttrs::inlineNode) &&
+ !_nodeNext.hasChildNodes()))
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyDelete() - deleting" <<
+ " a Node" << endl;
+#endif
+
+ _nodeParent = _nodeNext.parentNode();
+ //If this block is used to define the cursor pos, change node to its parent.
+ if(_nodeNext == _node && _nodeParent.firstChild() == _nodeNext &&
+ _nodeNext.nextSibling().isNull())
+ {
+ _node = _nodeParent;
+ //d->m_cursorOffset = -2;
+ }
+ focus = w->getAttrs(_nodeNext)->chCurFoc();
+ emit domNodeIsAboutToBeRemoved(_nodeNext, true, m_modifs);
+ _nodeParent.removeChild(_nodeNext);
+ singleNodeDeleted = true;
+ _nodeNext = _node;
+ if(focus == kNodeAttrs::singleNodeAndItself)
+ {
+ normalize(_nodeParent);
+ break;
+ }
+ }
+ _nodeNext = getNextNode(_nodeNext, _goingTowardsRootNode);
+ }
+
+ //If the node which is defining the cursor position has been deleted (thus changed)
+ if(false && singleNodeDeleted)
+ {
+ //Now that we have deleted something, the cursor may end up in something weird, e.g.
+ //in an empty text or empty Inline. So delete them.
+ _nodeNext = _nodeParent;//<== !!!!
+ _nodeParent = _node.parentNode();
+ childPosition = -1;
+ while(!_nodeNext.isNull())
+ {
+ attrs = w->getAttrs(_nodeNext);
+
+ //If this Node can't be deleted, we stop here.
+ if(!attrs || !attrs->cbDel())
+ break;
+
+ //Let's delete useless Nodes
+ if((_nodeNext.nodeType() == DOM::Node::TEXT_NODE &&
+ (static_cast<DOM::CharacterData>(_nodeNext)).length() == 0) ||
+ (attrs->chCurFoc() == kNodeAttrs::inlineNode && _nodeNext.hasChildNodes())
+ )
+ {
+ childPosition = kafkaCommon::childPosition(_node);
+ _node = _nodeParent;
+ emit domNodeIsAboutToBeRemoved(_nodeNext, true, m_modifs);
+ _nodeParent.removeChild(_nodeNext);
+ normalize(_nodeParent);
+ }
+ else
+ break;
+
+ _nodeNext = _nodeParent;
+ }
+
+ //And finally, if the cursor is at a bad place (e.g. inside a Inline with childs), move it
+ attrs = w->getAttrs(_node);
+ while(attrs && attrs->chCurFoc() == kNodeAttrs::inlineNode && _node.hasChildNodes())
+ {
+ _node = kafkaCommon::getChildNode(_node, childPosition, true);
+ childPosition = 1;
+ }
+ }
+
+ /**m_currentNode = _node;
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset, m_modifs);*/
+}
+
+void KafkaWidget::keyBackspace()
+{
+ kNodeAttrs *attrs, *attrsTmp;
+ int focus, m_currentNodeType;
+ DOM::Node _nodeParent, _node, _nodePrev, oldCurrentNode, temp, tempParent, prevSibling, nodePrevPrev;
+ DOM::Node toplevelBlock, toplevelBlock2, startNode, endNode, startNode2, endNode2;
+ DOM::Node childOfCommonParent, childOfCommonParent2, commonParent;
+ bool _goingTowardsRootNode, singleNodeDeleted, isParent, prevIsBlock, endNodeIsNotInline, boolTmp;
+ QString text;
+
+ if(hasSelection())
+ {
+ removeSelection();
+ return;
+ }
+
+ if(m_currentNode.isNull())
+ return;
+
+ attrs = w->getAttrs(m_currentNode);
+ if(!attrs)
+ return;
+ m_currentNodeType = m_currentNode.nodeType();
+
+#ifdef HEAVY_DEBUG
+
+ kdDebug(25001)<< "m_currentNode(" << m_currentNode.handle() << ") : " << m_currentNode.nodeName() <<
+ endl;
+#endif
+
+ //OLD PART, to be removed or #ifdef'ed
+ if(attrs->chCurFoc() == kNodeAttrs::textNode && d->m_cursorOffset != 0)
+ {//if we are in the middle of some text, we remove one letter
+ if(!attrs->cbMod())
+ return;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::keyBackspace() - one letter removed - 1" << endl;
+#endif
+
+ DOM::DOMString nodeText = m_currentNode.nodeValue();
+ DOM::DOMString textSplitted = nodeText.split(d->m_cursorOffset);
+ nodeText.split(d->m_cursorOffset - 1);
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << nodeText.string() << textSplitted.string() << endl;
+#endif
+
+ m_currentNode.setNodeValue(nodeText + textSplitted);
+ m_currentNode.parentNode().applyChanges();
+ --(d->m_cursorOffset);
+ emit domNodeModified(m_currentNode, m_modifs);
+ postprocessCursorPosition();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ if(attrs->chCurFoc() == kNodeAttrs::singleNodeAndItself &&
+ d->m_cursorOffset != 0)
+ {//if we delete ourselves, which node will be m_currentNode??
+ if(!attrs->cbDel())
+ return;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::keyBackspace() - deleting a TagDeletable - 2" << endl;
+#endif
+
+ DOM::Node _node = m_currentNode;
+ bool b = false;
+ while(1)
+ {//try to find a previous node from which we can delete the node
+ _node = getPrevNode(_node, b);
+ if(_node == 0)
+ break;
+ attrs = w->getAttrs(_node);
+ if(attrs && attrs->chCurFoc() == kNodeAttrs::textNode)
+ {
+ m_currentNode = _node;
+ d->m_cursorOffset = (static_cast<DOM::CharacterData>(_node)).length();
+ keyDelete();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ if(attrs && attrs->chCurFoc() != kNodeAttrs::no && attrs->chCurFoc() !=
+ kNodeAttrs::textNode)
+ {
+ m_currentNode = _node;
+ d->m_cursorOffset = 1;
+ keyDelete();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ }
+ _node = m_currentNode;
+ b = false;
+ while(1)
+ {//try to find a next node from which we can delete the node
+ _node = getNextNode(_node, b);
+ if(_node == 0)
+ break;
+ attrs = w->getAttrs(_node);
+ if(attrs && attrs->chCurFoc() != kNodeAttrs::no)
+ {
+ m_currentNode = _node;
+ d->m_cursorOffset = 0;
+ keyBackspace();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ return;
+ }
+ }
+ //here, there is no node right and left that can have the cursor focus
+ _node = m_currentNode.parentNode();
+ emit domNodeIsAboutToBeRemoved(m_currentNode, true, m_modifs);
+ _node.removeChild(m_currentNode);
+ m_currentNode = document().createTextNode("");
+ _node.appendChild(m_currentNode);
+ emit domNodeInserted(m_currentNode, false, m_modifs);
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+
+ }
+
+ //Beginning of the actual keyBackspace
+ _node = m_currentNode;
+ _goingTowardsRootNode = false;
+ singleNodeDeleted = false;
+ _nodePrev = getPrevNode(_node, _goingTowardsRootNode);
+ oldCurrentNode = m_currentNode;
+
+ while(!_nodePrev.isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyBackspace() - currentNode: " <<
+ _nodePrev.nodeName().string() << endl;
+#endif
+
+ attrs = w->getAttrs(_nodePrev);
+ if(!attrs)
+ {
+ kdError(25001) << "NULL kNodeAttrs instance: attrs = w->getAttrs(_nodePrev);" << endl;
+ kafkaCommon::coutDomTree(_nodePrev, 3);
+ return;
+ // FIXME Understand why this happen.
+// Test case:
+// 1. Write two words in a new VPL document and make the first one a link;
+// 2. Put the cursor at most right and then press backspace until it crashes
+// When you get to the link the cursor stays in the same plave and you have press it several times until it crashes.
+ }
+
+ //If this Node can't be deleted, we stop here.
+ if(!attrs->cbDel())
+ return;
+
+ //If we are in a TEXT node, we remove a letter
+ if(attrs->chCurFoc() == kNodeAttrs::textNode)
+ {
+ if((static_cast<DOM::CharacterData>(_nodePrev)).length() != 0)
+ {//if we are in text, remove a letter
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyBackspace() - one" <<
+ " letter removed - 2" << endl;
+#endif
+
+ DOM::DOMString nodeText = _nodePrev.nodeValue();
+ nodeText.split((static_cast<DOM::CharacterData>(_nodePrev)).length() - 1);
+ _nodePrev.setNodeValue(nodeText);
+ _nodePrev.parentNode().applyChanges();
+
+ m_currentNode = _nodePrev;
+ d->m_cursorOffset = (static_cast<DOM::CharacterData>(_nodePrev)).length();
+
+ postprocessCursorPosition();
+ emit domNodeModified(_nodePrev, m_modifs);
+ return;
+ }
+ else
+ {//if we are in an empty text
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyBackspace() - deleting" <<
+ " empty #text" << endl;
+#endif
+
+ _nodeParent = _nodePrev.parentNode();
+ emit domNodeIsAboutToBeRemoved(_nodePrev, true, m_modifs);
+ _nodeParent.removeChild(_nodePrev);
+ _nodeParent.applyChanges();
+ _nodePrev = _node;
+ continue;
+ }
+ }
+ //Else if the current Node if a BLOCK which can be entered/leaved e.g. H1, P
+ else if(attrs->chCurFoc() == kNodeAttrs::blockNode)
+ {
+ //First look if it is one of _node's parent
+ isParent = false;
+ temp = _node;
+ while(!temp.isNull())
+ {
+ if(_nodePrev == temp)
+ isParent = true;
+ temp = temp.parentNode();
+ }
+
+ //1 - Locate the toplevel blocks
+ temp = _nodePrev;
+ if(isParent)
+ {
+ toplevelBlock2 = temp;
+ while(temp.parentNode().firstChild() == temp && w->getAttrs(temp.parentNode()) &&
+ w->getAttrs(temp.parentNode())->chCurFoc() == kNodeAttrs::blockNode)
+ temp = temp.parentNode();
+ childOfCommonParent2 = temp;
+ temp = temp.previousSibling();
+ }
+ if(temp.isNull())
+ break;
+ childOfCommonParent = temp;
+ commonParent = temp.parentNode();
+ attrsTmp = w->getAttrs(temp);
+ prevIsBlock = (attrsTmp && attrsTmp->chCurFoc() == kNodeAttrs::blockNode);
+ while(!temp.isNull() && temp.hasChildNodes() && w->getAttrs(temp.lastChild()) &&
+ w->getAttrs(temp.lastChild())->chCurFoc() == kNodeAttrs::blockNode)
+ temp = temp.lastChild();
+ toplevelBlock = temp;
+
+ //2 - Determine the Nodes which could be moved
+ if(!toplevelBlock.isNull() && toplevelBlock.hasChildNodes())
+ endNode = toplevelBlock.lastChild();
+ else if(!childOfCommonParent2.isNull() && !childOfCommonParent2.previousSibling().isNull())
+ endNode = childOfCommonParent2.previousSibling();
+ endNodeIsNotInline = false;
+ temp = endNode;
+ attrsTmp = w->getAttrs(temp);
+ if(attrsTmp && (attrsTmp->chCurFoc() == kNodeAttrs::singleNodeAndItself ||
+ attrs->chCurFoc() == kNodeAttrs::no))
+ endNodeIsNotInline = true;
+ while(!temp.isNull() && !temp.previousSibling().isNull() &&
+ ((kafkaCommon::isInline(temp) && (temp.previousSibling().isNull() ||
+ kafkaCommon::isInline(temp.previousSibling())))))
+ temp = temp.previousSibling();
+ startNode = temp;
+
+ if(!toplevelBlock2.isNull() && toplevelBlock2.hasChildNodes())
+ startNode2 = toplevelBlock2.firstChild();
+ else if(!childOfCommonParent.isNull() && !childOfCommonParent.nextSibling().isNull())
+ startNode2 = childOfCommonParent.nextSibling();
+ temp = startNode2;
+ while(!temp.isNull() && !temp.nextSibling().isNull() &&
+ ((kafkaCommon::isInline(temp) && (temp.nextSibling().isNull() ||
+ kafkaCommon::isInline(temp.nextSibling())))))
+ temp = temp.nextSibling();
+ endNode2 = temp;
+
+ //3 - Move Nodes.
+ if(!endNode.isNull() && endNodeIsNotInline)
+ {
+ emit domNodeIsAboutToBeRemoved(endNode, true, m_modifs);
+ endNode.parentNode().removeChild(endNode);
+ }
+ else if(isParent && !prevIsBlock)
+ {
+ if(kafkaCommon::parentSupports(toplevelBlock2, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(toplevelBlock2, startNode, endNode, toplevelBlock2.firstChild(),
+ true);
+ else
+ {
+ if(kafkaCommon::parentSupports(commonParent, startNode2, endNode2,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(commonParent, startNode2, endNode2,
+ childOfCommonParent2, true);
+ else
+ {
+ //Damn it! What to do??
+ }
+ }
+ }
+ else if(isParent && prevIsBlock)
+ {
+ if(kafkaCommon::parentSupports(toplevelBlock2, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(toplevelBlock2, startNode, endNode, toplevelBlock2.firstChild(),
+ true);
+ else
+ {
+ if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()) && kafkaCommon::parentSupports(
+ commonParent, startNode2, endNode2, w->getCurrentDoc()->defaultDTD()))
+ {
+ moveDomNodes(commonParent, startNode, endNode, childOfCommonParent,
+ false);
+ moveDomNodes(commonParent, startNode2, endNode2, childOfCommonParent2,
+ true);
+ }
+ else
+ {
+ //Damn it! What to do??
+ }
+ }
+ }
+ else if(!isParent && prevIsBlock)
+ {
+ if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()))
+ moveDomNodes(commonParent, startNode, endNode, childOfCommonParent, false);
+ else
+ {
+ //Damn it! What to do??
+ }
+ }
+ if(!startNode2.isNull() && startNode2.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ //normalize(startNode2.parentNode());
+ temp = startNode2.previousSibling();
+ if(!temp.isNull() && temp.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ boolTmp = false;
+ if(m_currentNode == startNode2)
+ {
+ m_currentNode = temp;
+ d->m_cursorOffset += temp.nodeValue().length();
+ boolTmp = true;
+ }
+ text = temp.nodeValue().string() + startNode2.nodeValue().string();
+ tempParent = temp.parentNode();
+ emit domNodeIsAboutToBeRemoved(startNode2, true, m_modifs);
+ tempParent.removeChild(startNode2);
+
+ temp.setNodeValue(text);
+ emit domNodeModified(temp, m_modifs);
+
+ if(boolTmp)
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ }
+
+ }
+
+ //4 - Delete empty Block Nodes.
+ if(!toplevelBlock.isNull())
+ {
+ temp = toplevelBlock;
+ attrsTmp = w->getAttrs(temp);
+ while(attrsTmp && attrsTmp->chCurFoc() == kNodeAttrs::blockNode &&
+ !temp.hasChildNodes())
+ {
+ tempParent = temp.parentNode();
+ emit domNodeIsAboutToBeRemoved(temp, true, m_modifs);
+ tempParent.removeChild(temp);
+ temp = tempParent;
+ attrsTmp = w->getAttrs(temp);
+ }
+ }
+ if(!toplevelBlock2.isNull())
+ {
+ temp = toplevelBlock2;
+ attrsTmp = w->getAttrs(temp);
+ while(attrsTmp && attrsTmp->chCurFoc() == kNodeAttrs::blockNode &&
+ !temp.hasChildNodes())
+ {
+ tempParent = temp.parentNode();
+ emit domNodeIsAboutToBeRemoved(temp, true, m_modifs);
+ tempParent.removeChild(temp);
+ temp = tempParent;
+ attrsTmp = w->getAttrs(temp);
+ }
+ }
+ break;
+ }
+ //Else if the prevNode is a BLOCK or an invisible Node, Inline Node
+ //which can be deleted, delete it!
+ else if(attrs->chCurFoc() == kNodeAttrs::singleNodeAndItself || ((attrs->chCurFoc() ==
+ kNodeAttrs::no || attrs->chCurFoc() == kNodeAttrs::inlineNode) &&
+ !_nodePrev.hasChildNodes()))
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::keyBackspace() - deleting" <<
+ " a Node" << endl;
+#endif
+
+ _nodeParent = _nodePrev.parentNode();
+ focus = w->getAttrs(_nodePrev)->chCurFoc();
+ emit domNodeIsAboutToBeRemoved(_nodePrev, true, m_modifs);
+ _nodeParent.removeChild(_nodePrev);
+ //normalize(_nodeParent);
+ if(focus == kNodeAttrs::singleNodeAndItself)
+ {
+ postprocessCursorPosition();
+ //merge the previous DOM::Node if it is a text.
+ //domNodeIsAboutToBeRemoved() already do it in the Node tree.
+ //=> It seems it was removed from it.
+ _nodePrev = _node.previousSibling();
+ if(!_nodePrev.isNull() && _nodePrev.nodeType() == DOM::Node::TEXT_NODE &&
+ m_currentNodeType == DOM::Node::TEXT_NODE)
+ {
+ if(_node == m_currentNode)
+ {
+ m_currentNode = _nodePrev;
+ d->m_cursorOffset += (static_cast<DOM::CharacterData>(_nodePrev)).length();
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ }
+ _nodePrev.setNodeValue(_nodePrev.nodeValue() + _node.nodeValue());
+ emit domNodeModified(_nodePrev, m_modifs);
+ //_nodeParent = _nodePrev.parentNode();
+ emit domNodeIsAboutToBeRemoved(_node, true, m_modifs);
+ _nodeParent.removeChild(_node);
+ }
+ //dirty workaround when after having deleted a br, there is only one br left
+ //Anyway webcore will override this
+ if(m_currentNode.nodeName().string().lower() == "br" &&
+ (m_currentNode.previousSibling().isNull() || (m_currentNode.previousSibling().nodeType() ==
+ DOM::Node::TEXT_NODE && m_currentNode.previousSibling().previousSibling().isNull())) &&
+ (m_currentNode.nextSibling().isNull() || (m_currentNode.nextSibling().nodeType() ==
+ DOM::Node::TEXT_NODE && m_currentNode.nextSibling().nextSibling().isNull())))
+ {
+ if(!m_currentNode.previousSibling().isNull())
+ {
+ m_currentNode = m_currentNode.previousSibling();
+ d->m_cursorOffset = 0;
+
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ }
+ else if(!m_currentNode.nextSibling().isNull())
+ {
+ m_currentNode = m_currentNode.nextSibling();
+ d->m_cursorOffset = 0;
+ }
+ }
+ break;
+ }
+ _nodePrev = _node;
+ }
+ _nodePrev = getPrevNode(_nodePrev, _goingTowardsRootNode);
+ }
+}
+
+DOM::Node KafkaWidget::getNextNode(DOM::Node _node, bool &goingTowardsRootNode, bool skipParentNodes, bool dontBlock, DOM::Node _endNode)
+{
+ kNodeAttrs *attrs = 0L;
+
+ if(_node == 0)
+ return 0;
+ attrs = w->getAttrs(_node);
+ if(!attrs)
+ {
+ kdDebug(25001)<< "KafkaWidget::getNextNode() Attrs not found!"<< endl;
+ return 0;
+ }
+ if(_node.hasChildNodes() && goingTowardsRootNode == false &&
+ (attrs->ccanEnter() || dontBlock))
+ {//if we can descend to a child node, we do it
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::getNextNode() - descending from node : " <<
+ _node.nodeName().string() << " to " <<
+ _node.firstChild().nodeName().string() << endl;
+#endif
+
+ if(_endNode == _node.firstChild())
+ return 0;
+ return _node.firstChild();
+ }
+ if(_node.nextSibling() != 0)
+ {//else if there is a sibling, we move to it
+ goingTowardsRootNode = false;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::getNextNode() - going from node : " <<
+ _node.nodeName().string() <<
+ " to " << _node.nextSibling().nodeName().string() << endl;
+#endif
+
+ if(_endNode == _node.nextSibling())
+ return 0;
+ return _node.nextSibling();
+ }
+ if(_node.nextSibling() == 0)
+ {//else if there is no sibling, we go up if we can
+ goingTowardsRootNode = true;
+ if(_node.parentNode().isNull())
+ return 0;
+ if(w->getAttrs(_node.parentNode()) &&
+ w->getAttrs(_node.parentNode())->ccanEnter() || dontBlock)
+ {
+ if(!_node.parentNode().isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::getNextNode() - going" <<
+ " up from node : " << _node.nodeName().string() <<
+ " to " << _node.parentNode().nodeName().string() << endl;
+#endif
+
+ }
+ else
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::getNextNode() - going" <<
+ " up from node : " << _node.nodeName().string() <<
+ " to an empty Node" << endl;
+#endif
+
+ }
+ if(skipParentNodes)
+ {
+ if(_endNode == _node.parentNode())
+ return 0;
+ return getNextNode(_node.parentNode(), goingTowardsRootNode,
+ skipParentNodes, dontBlock);
+ }
+ else
+ {
+ if(_endNode == _node.parentNode())
+ return 0;
+ return _node.parentNode();
+ }
+ }
+ else
+ return 0;
+ }
+ kdError()<< "KafkaWidget::getNextNode() ERROR" << endl;
+ return 0;
+}
+
+DOM::Node KafkaWidget::getPrevNode(DOM::Node _node, bool &goingTowardsRootNode, bool skipParentNodes, bool dontBlock, DOM::Node _endNode)
+{
+ kNodeAttrs *attrs = 0L;
+
+ if(_node == 0)
+ return 0;
+ attrs = w->getAttrs(_node);
+ if(!attrs)
+ {
+ kdDebug(25001)<< "KafkaWidget::getPrevNode() Attrs not found!"<< endl;
+ return 0;
+ }
+ if(_node.hasChildNodes() && goingTowardsRootNode == false &&
+ (attrs->ccanEnter() || dontBlock))
+ {//if we can descend to a child node, we do it
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::getPrevNode() - descending from node : " <<
+ _node.nodeName().string() << " to " <<
+ _node.lastChild().nodeName().string() << endl;
+#endif
+
+ if(_endNode == _node.lastChild())
+ return DOM::Node();
+ return _node.lastChild();
+ }
+ if(_node.previousSibling() != 0)
+ {//else if there is a sibling, we move to it
+ goingTowardsRootNode = false;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::getPrevNode() - going from node : " <<
+ _node.nodeName().string() <<
+ " to " << _node.previousSibling().nodeName().string() << endl;
+#endif
+
+ if(_endNode == _node.previousSibling())
+ return DOM::Node();
+ return _node.previousSibling();
+ }
+ if(_node.previousSibling() == 0)
+ {//else if there is no sibling, we go up if we can
+ goingTowardsRootNode = true;
+ if(_node.parentNode().isNull())
+ return DOM::Node();
+ if(w->getAttrs(_node.parentNode()) &&
+ w->getAttrs(_node.parentNode())->ccanEnter() || dontBlock)
+ {
+ if(!_node.parentNode().isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::getPrevNode() - going up from" <<
+ " node : " << _node.nodeName().string() << " to " <<
+ _node.parentNode().nodeName().string() << endl;
+#endif
+
+ }
+ else
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::getPrevNode() - going up from" <<
+ " node : " << _node.nodeName().string() << " to an " <<
+ "empty Node" << endl;
+#endif
+
+ }
+ if (skipParentNodes)
+ {
+ if(_endNode == _node.parentNode())
+ return DOM::Node();
+ return getPrevNode(_node.parentNode(), goingTowardsRootNode,
+ skipParentNodes, dontBlock);
+ }
+ else
+ {
+ if(_endNode == _node.parentNode())
+ return DOM::Node();
+ return _node.parentNode();
+ }
+ }
+ else
+ return 0;
+ }
+ kdError()<< "KafkaWidget::getPrevNode() ERROR" << endl;
+ return 0;
+}
+
+void KafkaWidget::updateToggableTagActions(/*const DOM::Node &domNode, long offset*/) const
+{
+//Andras: Disable toggle behavior. It is just too broken.
+return;
+
+ quantaApp->removeAllTagActionPoolItems();
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+
+ Node* start_node = 0, *end_node = 0;
+// int start_offset = 0, end_offset = 0;
+
+ start_node = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+// start_offset = selection.cursorOffset();
+
+ if(!start_node)
+ return;
+
+ if(selection.hasSelection())
+ {
+ end_node = kafkaCommon::getNodeFromLocation(selection.cursorNodeEndSel());
+// end_offset = selection.cursorOffsetEndSel();
+ }
+ else
+ {
+ end_node = start_node;
+// end_offset = start_offset;
+ }
+
+ // Iterate all toggable toolbar actions and toggle them on or off
+ // Look if there is a selection
+ TagAction* tag_action = 0;
+ QPtrList<TagAction> tag_actions = quantaApp->tagActions();
+ for (tag_action = tag_actions.first(); tag_action; tag_action = tag_actions.next())
+ {
+ if(tag_action->toggable())
+ {
+ QString tag_name = tag_action->XMLTagName();
+ if(tag_name.isEmpty())
+ break;
+
+ QDomElement data(tag_action->data());
+ QString attribute_name(data.attribute("attribute_name", QString()));
+ QString attribute_value(data.attribute("attribute_value", QString()));
+
+ int inside_tag;
+ if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
+ inside_tag = kafkaCommon::isInsideTag(start_node, end_node, tag_name, attribute_name, attribute_value);
+ else
+ inside_tag = kafkaCommon::isInsideTag(start_node, end_node, tag_name);
+
+ tag_action->setChecked(inside_tag == 1);
+ }
+ }
+}
+
+void KafkaWidget::makeCursorVisible(int , int )
+{
+ /**DOM::Range range;
+ if(m_currentNode == 0)
+ return;
+ kdDebug(25001)<< "KafkaWidget::makeCursorVisible()" << endl;
+ int X, Y, dummy;
+ getCursor(m_currentNode, d->m_cursorOffset, X, Y, dummy);
+ view()->ensureVisible (X, Y, xMargin, yMargin);*/
+ //does not work... ???
+ /**range = selection();
+ //try{
+ range.setStart(m_currentNode, d->m_cursorOffset);
+ }
+ catch(DOM::RangeException e)
+ {
+ //ignore
+ kdDebug(25001)<< "KafkaWidget::makeCursorVisible() - ERROR " << e.code << endl;
+ return;
+ }
+ catch(DOM::DOMException e)
+ {
+ kdDebug(25001)<< "KafkaWidget::makeCursorVisible() - ERROR " << e.code << endl;
+ }*/
+ //range.setEnd(m_currentNode, d->m_cursorOffset);
+}
+
+void KafkaWidget::postprocessCursorPosition()
+{
+ kNodeAttrs *attrs, *attrs2;
+ if(m_currentNode == 0)
+ return;
+ attrs = w->getAttrs(m_currentNode);
+ DOM::Node _prevNextNode;
+ DOM::Node _nextNode = m_currentNode;
+ bool b = false;
+
+ if(!attrs)
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaWidget::postprocessCursorPosition() - WARNING no Attrs!! " << endl;
+#endif
+
+ return;
+ }
+
+ if(attrs->chCurFoc() == kNodeAttrs::textNode &&
+ d->m_cursorOffset == 0)
+ {
+ /** while(1)
+ {
+ _prevNextNode = _nextNode;
+ _nextNode = kafkaCommon::getPrevDomNode(_nextNode);
+ if(_nextNode.isNull())
+ break;
+ attrs2 = w->getAttrs(_nextNode);
+ if(attrs2 && attrs2->chCurFoc() == kNodeAttrs::textNode &&
+ (static_cast<DOM::CharacterData>(_nextNode)).length() != 0)
+ {
+ m_currentNode = _nextNode;
+ d->m_cursorOffset = (static_cast<DOM::CharacterData>(_nextNode)).length();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+ #ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::postprocessCursorPosition()" <<
+ " - new currentNode :" <<
+ m_currentNode.nodeName().string() << endl;
+ #endif
+
+ break;
+ }
+ else if(attrs2->chCurFoc() == kNodeAttrs::singleNodeAndItself ||
+ attrs2->chCurFoc() == kNodeAttrs::inlineNode ||
+ attrs2->chCurFoc() == kNodeAttrs::blockNode)
+ break;
+ else
+ continue;
+ }*/
+ }
+ else if(attrs->chCurFoc() == kNodeAttrs::singleNodeAndItself)
+ {
+ if(d->m_cursorOffset == 0 && !m_currentNode.isNull() &&
+ (m_currentNode.nodeName().string().lower() != "br" ||
+ (m_currentNode.nodeName().string().lower() == "br" && /**!m_currentNode.nextSibling().isNull() &&
+ m_currentNode.nextSibling().nodeType() == DOM::Node::TEXT_NODE &&
+ m_currentNode.nextSibling().nodeValue().string().isEmpty() &&
+ m_currentNode.nextSibling().nextSibling().isNull() &&*/
+ !m_currentNode.previousSibling().isNull() &&
+ m_currentNode.previousSibling().nodeType() == DOM::Node::TEXT_NODE &&
+ !m_currentNode.previousSibling().nodeValue().string().isEmpty())))
+ {
+ while(1)
+ {
+ _prevNextNode = _nextNode;
+ _nextNode = getPrevNode(_nextNode, b);
+ if(_nextNode == 0)
+ break;
+ attrs2 = w->getAttrs(_nextNode);
+ if(attrs2 && attrs2->chCurFoc() == kNodeAttrs::textNode &&
+ (static_cast<DOM::CharacterData>(_nextNode)).length()
+ != 0)
+ {
+ m_currentNode = _nextNode;
+ d->m_cursorOffset = (static_cast<DOM::CharacterData>(_nextNode)).length();
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::postprocessCursorPosition()" <<
+ " - new currentNode :" << m_currentNode.nodeName().string() << endl;
+#endif
+
+ break;
+ }
+ else if(attrs2 && attrs2->chCurFoc() == kNodeAttrs::singleNodeAndItself)
+ {
+ m_currentNode = _nextNode;
+ d->m_cursorOffset = 1;
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::postprocessCursorPosition()" <<
+ " - new currentNode :" << m_currentNode.nodeName().string() << endl;
+#endif
+
+ break;
+ }
+ else
+ continue;
+ }
+ }
+ else if(d->m_cursorOffset == 1)
+ {
+ while(1)
+ {
+ _prevNextNode = _nextNode;
+ _nextNode = getNextNode(_nextNode, b);
+ if(_nextNode == 0)
+ break;
+ attrs2 = w->getAttrs(_nextNode);
+ if(attrs2 && attrs2->chCurFoc() == kNodeAttrs::singleNodeAndItself)
+ break;
+ else if(attrs2 && attrs2->chCurFoc() == kNodeAttrs::textNode &&
+ (static_cast<DOM::CharacterData>(_nextNode)).length() != 0)
+ {
+ m_currentNode = _nextNode;
+ d->m_cursorOffset = 0;
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<< "KafkaWidget::postprocessCursorPosition() " <<
+ "- new currentNode :" << m_currentNode.nodeName().string() << endl;
+#endif
+
+ break;
+ }
+ else
+ continue;
+ }
+ }
+ }
+ makeCursorVisible();
+}
+
+void KafkaWidget::khtmlMouseMoveEvent(khtml::MouseMoveEvent *event)
+{
+ DOM::Node mouseNode = event->innerNode();
+
+ if(mouseNode == 0)
+ {
+ return;
+ }
+ if(mouseNode.nodeType() == DOM::Node::TEXT_NODE)
+ view()->setCursor(Qt::ibeamCursor);
+ else
+ view()->setCursor(Qt::arrowCursor);
+
+ KHTMLPart::khtmlMouseMoveEvent(event);
+}
+
+void KafkaWidget::khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event)
+{
+ KHTMLPart::khtmlMouseReleaseEvent(event);
+ if(m_currentNode.isNull() || m_currentNode.nodeName().string().lower() == "#document")
+ {
+ m_currentNode = w->body;
+ d->m_cursorOffset = 0;
+ setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+ }
+ if(quantaApp->aTab)
+ quantaApp->aTab->setCurrentNode(w->getNode(event->innerNode()));
+}
+
+void KafkaWidget::khtmlMousePressEvent(khtml::MousePressEvent *event)
+{
+ KHTMLPart::khtmlMousePressEvent(event);
+ if(d->m_cursorOffset == 0 && !m_currentNode.isNull() &&
+ m_currentNode.nodeName().string().lower() == "body")
+ putCursorAtFirstAvailableLocation();
+#ifdef HEAVY_DEBUG
+ //d->domdialog->domview->showTree(document());
+#endif
+
+}
+
+void KafkaWidget::khtmlDrawContentsEvent(khtml::DrawContentsEvent *event)
+{
+ KHTMLPart::khtmlDrawContentsEvent(event);
+}
+
+void KafkaWidget::getCurrentNode(DOM::Node &_currentNode, long &offset)
+{
+ _currentNode = m_currentNode;
+ offset = d->m_cursorOffset;
+}
+
+void KafkaWidget::setCurrentNode(DOM::Node node, int offset)
+{
+ m_currentNode = node;
+ d->m_cursorOffset = offset;
+ makeCursorVisible();
+ if(!m_currentNode.isNull() && m_currentNode.nodeName().string() != "#document")
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ //setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
+}
+
+void KafkaWidget::setCurrentNode(Node* cursorNode, int cursorOffset)
+{
+ DOM::Node domNode;
+ long longDomNodeOffset;
+ KafkaDocument::ref()->translateNodeIntoKafkaCursorPosition(cursorNode, cursorOffset, domNode, longDomNodeOffset);
+ if (!domNode.isNull() && domNode.nodeType() != DOM::Node::TEXT_NODE &&
+ !domNode.firstChild().isNull() && domNode.firstChild().nodeType() == DOM::Node::TEXT_NODE)
+ domNode = domNode.firstChild();
+ if (!domNode.isNull())
+ setCurrentNode(domNode, (int)longDomNodeOffset);
+}
+
+void KafkaWidget::putCursorAtFirstAvailableLocation()
+{
+ kNodeAttrs *attrs = 0L;
+ DOM::Node node = w->body;
+ bool b = false;
+
+#ifdef HEAVY_DEBUG
+
+ w->coutLinkTree(baseNode, 2);
+ kafkaCommon::coutTree(baseNode, 2);
+ kafkaCommon::coutDomTree(document(), 2);
+#endif
+
+ while(!node.isNull())
+ {
+ node = kafkaCommon::getNextDomNode(node, b);
+ if(node.isNull())
+ {
+ if(!w->body.isNull())
+ node = w->body;
+ else
+ node = DOM::Node();
+ break;
+ }
+ attrs = w->getAttrs(node);
+ if(!attrs)
+ {
+ node = w->body;
+ break;
+ }
+ if(node.nodeType() == DOM::Node::TEXT_NODE)
+ break;
+ }
+ m_currentNode = node;
+ d->m_cursorOffset = 0;
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+
+#ifdef LIGHT_DEBUG
+
+ if(!m_currentNode.isNull())
+ kdDebug(25001)<< "KafkaWidget::putCursorAtFirstAvailableLocation() - " <<
+ m_currentNode.nodeName().string() << endl;
+#endif
+
+}
+
+void KafkaWidget::slotNewCursorPos(const DOM::Node &domNode, long offset)
+{
+ if(!w->isLoaded())
+ return;
+
+ m_currentNode = domNode;
+ d->m_cursorOffset = (int)offset;
+#ifdef LIGHT_DEBUG
+
+ kdDebug(25001)<<"KafkaWidget::slotNewCursorPos() offset : " << d->m_cursorOffset << endl;
+#endif
+
+ if(quantaApp->aTab && ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ quantaApp->aTab->setCurrentNode(w->getNode(domNode));
+
+ updateToggableTagActions(/*domNode, offset*/);
+}
+
+void KafkaWidget::moveDomNodes(DOM::Node newParent, DOM::Node startNode, DOM::Node endNode,
+ DOM::Node refNode, bool before)
+{
+ DOM::Node domNode, domNodeNext;
+
+ if(newParent.isNull())
+ return;
+
+ if(before)
+ {
+ domNode = endNode;
+ while(!domNode.isNull())
+ {
+ domNodeNext = domNode.previousSibling();
+ emit domNodeIsAboutToBeMoved(domNode, newParent, refNode, m_modifs);
+ //emit domNodeIsAboutToBeRemoved(domNode, true);
+ domNode = domNode.parentNode().removeChild(domNode);
+ if(!refNode.isNull())
+ newParent.insertBefore(domNode, refNode);
+ else
+ newParent.insertBefore(domNode, DOM::Node());
+ //emit domNodeInserted(domNode, true);
+ if(domNode == startNode)
+ break;
+ domNode = domNodeNext;
+ }
+ }
+ else
+ {
+ domNode = startNode;
+ while(!domNode.isNull())
+ {
+ domNodeNext = domNode.nextSibling();
+ //emit domNodeIsAboutToBeRemoved(domNode, true);
+ if(!refNode.isNull())
+ emit domNodeIsAboutToBeMoved(domNode, newParent, refNode.nextSibling(), m_modifs);
+ else
+ emit domNodeIsAboutToBeMoved(domNode, newParent, DOM::Node(), m_modifs);
+ domNode = domNode.parentNode().removeChild(domNode);
+ if(!refNode.isNull())
+ newParent.insertBefore(domNode, refNode.nextSibling());
+ else
+ newParent.insertBefore(domNode, DOM::Node());
+ //emit domNodeInserted(domNode, true);
+ if(domNode == endNode)
+ break;
+ domNode = domNodeNext;
+ }
+ }
+}
+
+void KafkaWidget::removeSelection()
+{
+ Q_ASSERT(hasSelection());
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+ Node* cursorNode = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ long cursorOffset = 0;
+ long domNodeCursorOffset = 0;
+
+ kafkaCommon::DTDRemoveSelection(selection, &cursorNode, cursorOffset, m_modifs);
+
+ KafkaDocument::ref()->translateNodeIntoKafkaCursorPosition(cursorNode, cursorOffset, m_currentNode, domNodeCursorOffset);
+ d->m_cursorOffset = domNodeCursorOffset;
+
+ setCurrentNode(m_currentNode, domNodeCursorOffset);
+
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+
+ NodeSelection* cursorPos = new NodeSelection();
+ cursorPos->setCursorNode(cursorNode);
+ cursorPos->setCursorOffset(cursorOffset);
+
+ ViewManager::ref()->activeDocument()->docUndoRedo->addNewModifsSet(m_modifs, undoRedo::NodeTreeModif, cursorPos);
+ m_modifs = 0;
+
+ delete cursorPos;
+
+ makeCursorVisible();
+}
+
+void KafkaWidget::applyQueuedToggableTagActions()
+{
+ QStringList queued_actions = quantaApp->tagActionPool();
+ QPtrList<TagAction> action_list = quantaApp->tagActions();
+ for(QStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
+ {
+ TagAction* tag_action = 0;
+ for (tag_action = action_list.first(); tag_action; tag_action = action_list.next())
+ {
+ if(tag_action->name() == *it)
+ {
+ tag_action->slotActionActivated(KAction::EmulatedActivation, Qt::NoButton);
+ break;
+ }
+ }
+ }
+ quantaApp->removeAllTagActionPoolItems();
+}
+
+#include "kafkahtmlpart.moc"
diff --git a/quanta/parts/kafka/kafkahtmlpart.h b/quanta/parts/kafka/kafkahtmlpart.h
new file mode 100644
index 00000000..f1dc79c1
--- /dev/null
+++ b/quanta/parts/kafka/kafkahtmlpart.h
@@ -0,0 +1,315 @@
+/***************************************************************************
+ kafkahtmlpart.h
+ -------------------
+
+ copyright : (C) 2001 - The Kafka Team
+ (C) 2003, 2004 - Nicolas Deschildre
+ email : kde-kafka@master.kde.org && ndeschildre@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 KAFKAHTMLPART_H
+#define KAFKAHTMLPART_H
+
+#include <kurl.h>
+#include <khtml_part.h>
+#include <khtml_events.h>
+#include <kparts/event.h>
+
+#include <qstringlist.h>
+#include <qptrlist.h>
+#include <qdockwindow.h>
+#include <qevent.h>
+
+#include <dom/dom_node.h>
+#include <dom/dom_element.h>
+
+class DOMString;
+class KafkaWidgetPrivate;
+class KafkaDocument;
+class NodeModifsSet;
+class QPopupMenu;
+
+/*
+ * It is the main central widget which get the cursor focus and takes care of "simple" edition
+ * such as typing text.
+ */
+
+class KafkaWidget : public KHTMLPart
+{
+ Q_OBJECT
+public:
+ KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+ const char *name = 0);
+ ~KafkaWidget();
+
+ /**
+ * Category: Standard Functions
+ * Called by KafkaPart to create a new document
+ */
+ void newDocument();
+
+ /**
+ * Returns the current Node (which has the focus) and its offset.
+ * @param currentNode The Node which has the cursor focus.
+ * @param offset The offset of the cursor in _currentNode.
+ */
+ void getCurrentNode(DOM::Node &currentNode, long &offset);
+
+ /**
+ * Set the focus.
+ * @param node The DOM::Node which will get the focus.
+ * @param offset The offset of the cursor if node is a DOM::Node::TEXT_NODE
+ */
+ void setCurrentNode(DOM::Node node, int offset);
+
+ /**
+ * Convenience function to set the current node.
+ * @param node The Quanta node which will get the focus.
+ * @param offset The offset of the cursor if node tag is of type Tag::Text.
+ */
+ void setCurrentNode(Node* cursorNode, int cursorOffset);
+
+ /**
+ * Get the next DOM::Node after _node.
+ * @param _node The DOM::Node the search starts from.
+ * @param goUp A needed boolean for several consecutive call to
+ * this function. Setting it to false by default, or to true if we don't want to go through
+ * the childs of _node.
+ * @param skipParentNodes Specifies if we should skip the parent Node when going up :
+ * this implies that Nodes will not be returned two times.
+ * @param dontBlock Specifies if the search should or not be blocked by BlockingTags.
+ * @param _endNode Specifies at which DOM::Node the search should end. It is useful
+ * when setting skipParentNodes to true.
+ * @return Returns the next Node :)
+ */
+ DOM::Node getNextNode(DOM::Node _node, bool &goUp, bool skipParentNodes = false,
+ bool dontBlock = false, DOM::Node _endNode = DOM::Node());
+
+ /**
+ * The same that above, but this function search the previous DOM::Node.
+ */
+ DOM::Node getPrevNode(DOM::Node _node, bool &goUp, bool skipParentNodes = false,
+ bool dontBlock = false, DOM::Node _endNode = DOM::Node());
+
+ /**
+ * Set the TagActions checked/unchecked in context.
+ * This is called when the cursor position changes.
+ * @param domNode
+ * @param offset
+ */
+ void updateToggableTagActions(/*const DOM::Node &domNode, long offset*/) const;
+
+
+ /** --------------- DOM::Node modifications -------------------------- */
+
+ /**
+ * It will move DOM::Nodes from startNode to endNode as children of newParent. It does NOT check
+ * if the move is valid, so it may crash. Please check before with kafkaCommon::parentSupports().
+ * @param newParent The new parent of the DOM::Nodes.
+ * @param startNode The first node to move.
+ * @param endNode Starting from endNode, the last sibling to move.
+ * @param refNode The reference DOM::Node.
+ * @bool before If set to true, the DOM::nodes will be moved at the left of refNode,
+ * otherwise they will be happenend at the right of refNode.
+ */
+ void moveDomNodes(DOM::Node newParent, DOM::Node startNode, DOM::Node endNode,
+ DOM::Node refNode, bool before);
+
+public slots:
+
+ /**
+ * Category: HTML Editing Functions
+ * Adds text into a DOM::Node of type DOM::Node::TEXT_NODE
+ * @param node The node where text should be added
+ * @param text The text to be added
+ * @param position Specifies the position where to add text
+ */
+ void insertText(DOM::Node node, const QString &text, int position);
+
+ /**
+ * Category: HTML Editing Functions
+ * Adds text into the current DOM::Node
+ * @param text The text to add
+ * @param position Specifies the position where to add text, if it's -1
+ * the text will be appended after the last position
+ */
+ void insertText(const QString &text, int position);
+
+ /**
+ * Puts all the child Text DOM::Node into a "normal" form where only
+ * structure (e.g., elements, comments, processing instructions, CDATA
+ * sections, and entity references) separates Text nodes, i.e., there are
+ * neither adjacent Text nodes nor empty Text nodes.
+ * Should be used instead of DOM::Node::normalize().
+ * @param _node This node is the parent node of the childs normalized
+ */
+ void normalize(DOM::Node _node);
+
+ /**
+ * Set the cursor after having loaded the DOM tree from scratch.
+ * Look for the first available location for the cursor.
+ */
+ void putCursorAtFirstAvailableLocation();
+
+ /**
+ * Reload the TagAttributesTree if necessary;
+ * @param domNode The current DOM::Node.
+ * @param offset The current cursor offset.
+ */
+ void slotNewCursorPos(const DOM::Node &domNode, long offset);
+
+ /**
+ * Called to set the cursor Position with a QTimer::singleShot() after calling
+ * document->updateRendering()
+ */
+ void slotDelayedSetCaretPosition();
+
+signals:
+ /**
+ * Category: HTML Editing Signal
+ * Is emitted whenever the DOM tree has changed
+ * Not yet implemented
+ */
+ void domChanged();
+
+ /**
+ * Category: HTML Editing Signal
+ * Is emitted whenever a dom Node is inserted to the tree.
+ * @param node is the node created.
+ * @param insertChilds Specifies if we should insert the _node's childs
+ * @param modifs The changes made are logged into modifs.
+ */
+ void domNodeInserted(DOM::Node node, bool insertChilds, NodeModifsSet *modifs);
+
+ /**
+ * Category: HTML Editing Signal
+ * Is emitted whenever a DOM node has its properties modified.
+ * @param node is the node modified.
+ * @param modifs The changes made are logged into modifs.
+ */
+ void domNodeModified(DOM::Node node, NodeModifsSet *modifs);
+
+ /**
+ * Category: HTML Editing Signal
+ * Is emitted whenever a DOM node is about to be removed from the tree.
+ * @param node is the node to be deleted.
+ * @param deleteChilds Specifies if we should delete the child nodes of _node.
+ * @param modifs The changes made are logged into modifs.
+ */
+ void domNodeIsAboutToBeRemoved(DOM::Node node, bool deleteChilds, NodeModifsSet *modifs);
+
+ /**
+ * Is emitted whenever a DOM::Node is about to be moved in the tree.
+ * @param node The DOM::Node which will be moved.
+ * @param newParent The new parent of domNode.
+ * @param before domNode will be placed before before.
+ * @param modifs The changes made are logged into modifs.
+ */
+ void domNodeIsAboutToBeMoved(DOM::Node node, DOM::Node newParent, DOM::Node before, NodeModifsSet *modifs);
+
+ /**
+ * Category: HTML Editing Signal
+ * Is emitted whenever the cursor position change in one DOM::Node.
+ * @param node The DOM::Node which contains the cursor.
+ * @param _offset The new cursorOffset.
+ */
+ void domNodeNewCursorPos(DOM::Node node, int offset);
+
+ /**
+ * Category: Widget Signal
+ * Is emitted whenever the KafkaWidget widget get or lost the focus
+ * @param focus True if it has got the focus, false otherwise.
+ */
+ void hasFocus(bool focus);
+
+protected:
+ bool eventFilter(QObject *object, QEvent *event);
+
+ virtual void khtmlMouseMoveEvent(khtml::MouseMoveEvent *event);
+ virtual void khtmlMousePressEvent(khtml::MousePressEvent *event);
+ virtual void khtmlMouseReleaseEvent(khtml::MouseReleaseEvent *event);
+ virtual void khtmlDrawContentsEvent(khtml::DrawContentsEvent *event);
+
+private slots:
+
+ void slotContextMenuRequested(const QString& url, const QPoint& point);
+
+private:
+#if 0
+ /**
+ * NOT IMPLEMENTED.
+ * Internal function used by keyBackspace(), keyDelete() to delete Nodes.
+ * @param startNode The DOM::Node location of the point where we start deleting Nodes.
+ * @param offset The offset location of the point where we start deleting Nodes. They can be
+ * updated.
+ * @param backspace Specifies if it should delete Nodes backward (backspace keystroke)
+ * or torwards (delete backspace).
+ */
+ void keyDeleteNodes(DOM::Node &startNode, long &offset, bool backspace);
+#endif
+
+ /**
+ * Delete one character/DOM::Node left to the cursor.
+ */
+ void keyBackspace();
+
+ /**
+ * Delete one character/DOM::Node right to the cursor.
+ */
+ void keyDelete();
+
+ /**
+ * Break the current line.
+ * @param specialPressed If a special touch is pressed e.g. ctrl, we try to insert a BR,
+ * otherwise we try to insert a P.
+ */
+ void keyReturn(bool specialPressed);
+
+ /**
+ * Postprocess the cursor position, i.e. when the cursor is between two
+ * DOM::Nodes, it set the cursor in the right node to make edition as
+ * in a word processor.
+ */
+ void postprocessCursorPosition();
+ /**
+ * Make the cursor visible whenever it is going :-)
+ * @param xMargin The minimum margin in the X axis between the cursor
+ * and the edge of the widget.
+ * @param yMargin The minimim margin in the Y axis between the cursor
+ * and the edge of the widget.
+ */
+ void makeCursorVisible(int xMargin = 50, int yMargin = 50);
+
+ /**
+ * Removes the selection and places the cursor in the right place.
+ */
+ void removeSelection();
+
+ void applyQueuedToggableTagActions();
+
+private:
+ /**
+ * When some changes are made, store the changes made in m_modifs.
+ * It will be created when a key is pressed, and will be submitted to
+ * the undoRedo system after the changes have been made.
+ */
+ NodeModifsSet *m_modifs;
+
+ DOM::Node m_currentNode;
+ KafkaWidgetPrivate *d;
+ KafkaDocument *w;
+ friend class KafkaWidgetPrivate;
+
+ QPopupMenu* m_contextPopupMenu;
+};
+
+#endif
diff --git a/quanta/parts/kafka/kafkaresource.h b/quanta/parts/kafka/kafkaresource.h
new file mode 100644
index 00000000..e1261c14
--- /dev/null
+++ b/quanta/parts/kafka/kafkaresource.h
@@ -0,0 +1,34 @@
+/***************************************************************************
+ kafkaresource.h
+ -------------------
+
+ copyright : (C) 2003 - Nicolas Deschildre
+ email : nicolasdchd@ifrance.com
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 KAFKARESOURCE_H
+#define KAFKARESOURCE_H
+
+/**
+ * A few globals variables avoiding to use the quantaApp global variables :
+ * quantaApp->view()->kafkaInterface()->getKafkaPart()...
+ * Also a (little) step torwards kafka independance from the quanta code (to be able to make it a kpart, at last!)
+ */
+
+class KafkaDocument;
+class KafkaWidget;
+
+extern KafkaWidget *kafkaWidget;
+extern KafkaDocument *kafkaDoc;
+
+#endif
+
diff --git a/quanta/parts/kafka/kafkasyncoptions.cpp b/quanta/parts/kafka/kafkasyncoptions.cpp
new file mode 100644
index 00000000..a355b99a
--- /dev/null
+++ b/quanta/parts/kafka/kafkasyncoptions.cpp
@@ -0,0 +1,85 @@
+/***************************************************************************
+ kafkasyncoptions.cpp
+ -------------------
+
+ copyright : (C) 2003 - Nicolas Deschildre
+ email : ndeschildre@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 <qradiobutton.h>
+#include <qcheckbox.h>
+#include <qspinbox.h>
+
+#include <kconfig.h>
+#include <kdebug.h>
+
+#include "kafkasyncoptions.h"
+#include "kafkasyncoptions.moc"
+
+KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const char* name )
+ : KafkaSyncOptionsUI( parent, name )
+{
+ config = a_config;
+
+ config->setGroup("HTML Enhancer");
+ bool showIcons = config->readBoolEntry("Show Scripts Icons", true);
+
+ config->setGroup("Kafka Synchronization options");
+ QString sourceRefresh = config->readEntry("Source refresh", "delay");
+ int sourceRefreshDelay = config->readNumEntry("Source refresh delay", 500);
+ QString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
+ int kafkaRefreshDelay = config->readNumEntry("Kafka refresh delay", 4000);
+
+ if ( !name )
+ setName( "kafkaSyncOptions" );
+
+ showScriptsIcon->setChecked(showIcons);
+
+ if(sourceRefresh == "focus")
+ sourceFocusRefresh->setChecked(true);
+ else if(sourceRefresh == "delay")
+ sourceDelayRefresh->setChecked(true);
+ sourceDelay->setValue(sourceRefreshDelay);
+
+ if(kafkaRefresh == "focus")
+ kafkaFocusRefresh->setChecked(true);
+ else if(kafkaRefresh == "delay")
+ kafkaDelayRefresh->setChecked(true);
+ kafkaDelay->setValue(kafkaRefreshDelay);
+}
+
+KafkaSyncOptions::~KafkaSyncOptions()
+{
+
+}
+
+
+void KafkaSyncOptions::updateConfig()
+{
+ config->setGroup("HTML Enhancer");
+ config->writeEntry("Show Scripts Icons", showScriptsIcon->isChecked());
+
+ config->setGroup("Kafka Synchronization options");
+ if(sourceFocusRefresh->isChecked())
+ config->writeEntry("Source refresh", "focus");
+ else if(sourceDelayRefresh->isChecked())
+ config->writeEntry("Source refresh", "delay");
+ config->writeEntry("Source refresh delay", sourceDelay->value());
+
+ if(kafkaFocusRefresh->isChecked())
+ config->writeEntry("Kafka refresh", "focus");
+ else if(kafkaDelayRefresh->isChecked())
+ config->writeEntry("Kafka refresh", "delay");
+ config->writeEntry("Kafka refresh delay", kafkaDelay->value());
+
+}
+
diff --git a/quanta/parts/kafka/kafkasyncoptions.h b/quanta/parts/kafka/kafkasyncoptions.h
new file mode 100644
index 00000000..25b200d7
--- /dev/null
+++ b/quanta/parts/kafka/kafkasyncoptions.h
@@ -0,0 +1,39 @@
+/***************************************************************************
+ kafkasyncoptions.h
+ -------------------
+
+ copyright : (C) 2003 - Nicolas Deschildre
+ email : ndeschildre@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 KAFKASYNCOPTIONS_H
+#define KAFKASYNCOPTIONS_H
+
+#include "kafkasyncoptionsui.h"
+
+class KConfig;
+
+class KafkaSyncOptions : public KafkaSyncOptionsUI
+{
+ Q_OBJECT
+
+public:
+ KafkaSyncOptions( KConfig *config, QWidget* parent = 0, const char* name = 0);
+ ~KafkaSyncOptions();
+
+ void updateConfig();
+
+protected:
+ KConfig *config;
+};
+
+#endif
diff --git a/quanta/parts/kafka/kafkasyncoptionsui.ui b/quanta/parts/kafka/kafkasyncoptionsui.ui
new file mode 100644
index 00000000..2fb73661
--- /dev/null
+++ b/quanta/parts/kafka/kafkasyncoptionsui.ui
@@ -0,0 +1,196 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>KafkaSyncOptionsUI</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>KafkaSyncOptionsUI</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>498</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>views</cstring>
+ </property>
+ <property name="title">
+ <string>Dual Views Mode Synchronization</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>kafkaGroup</cstring>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>120</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="3">
+ <property name="name">
+ <cstring>ms2</cstring>
+ </property>
+ <property name="text">
+ <string>ms</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="2">
+ <property name="name">
+ <cstring>kafkaDelay</cstring>
+ </property>
+ <property name="maxValue">
+ <number>10000</number>
+ </property>
+ <property name="minValue">
+ <number>10</number>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>kafkaFocusRefresh</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh the VPL editor on click</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>kafkaDelayRefresh</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh the VPL editor every:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>sourceGroup</cstring>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>27</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="1" column="3">
+ <property name="name">
+ <cstring>ms</cstring>
+ </property>
+ <property name="text">
+ <string>ms</string>
+ </property>
+ </widget>
+ <widget class="QSpinBox" row="1" column="2">
+ <property name="name">
+ <cstring>sourceDelay</cstring>
+ </property>
+ <property name="maxValue">
+ <number>10000</number>
+ </property>
+ <property name="minValue">
+ <number>10</number>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>sourceFocusRefresh</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh the source editor on click</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>sourceDelayRefresh</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh the source editor every:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>21</width>
+ <height>167</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>showScriptsIcon</cstring>
+ </property>
+ <property name="text">
+ <string>Show an icon where scripts are located</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/parts/kafka/nodeenhancer.h b/quanta/parts/kafka/nodeenhancer.h
new file mode 100644
index 00000000..376379f1
--- /dev/null
+++ b/quanta/parts/kafka/nodeenhancer.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+ nodeenhancer.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 NODEENHANCER_H
+#define NODEENHANCER_H
+
+class KConfig;
+class Node;
+namespace DOM
+{
+ class Node;
+}
+
+/**
+ * Base class which define an interface to enhance DOM::Nodes
+ * i.e. to modify the corresponding DOM::Node of a Node.
+ * The aim is to modify the kafka view to provide visual aids
+ * like a error system which highlight syntax error, and so on...
+ * Defining this in XML files could be a nice idea once kafka
+ * support all the DTDs.
+ */
+
+class NodeEnhancer
+{
+public:
+ NodeEnhancer(){}
+ virtual ~NodeEnhancer(){}
+
+ /**
+ * This function modify the DOM::Node of the node.
+ * The DOM::Node must be built before calling this
+ * function.
+ * @param node The Node we want to enhance.
+ * @param parentDNode the parent DOM::Node of the root DOM::Node of node.
+ * @param nextDNode the DOM::Node next to the root DOM::Node of node.
+ */
+ virtual bool enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode) = 0;
+
+ /**
+ * This function apply some modifications once the whole DOM::Node tree is built.
+ * @param domNode The domNode we want to add some modifications.
+ */
+ virtual void postEnhanceNode(DOM::Node domNode) = 0;
+
+ /**
+ * This function un-apply the modifications made by postEnhanceNode()
+ * @param domNode The DOM::Node we want to un-enhance!
+ */
+ virtual void postUnenhanceNode(DOM::Node domNode) = 0;
+
+ /**
+ * Read the config.
+ * @m_config The config to read.
+ */
+ virtual void readConfig(KConfig *m_config) = 0;
+
+ /**
+ * This need to be strongly extended.
+ */
+};
+
+#endif
diff --git a/quanta/parts/kafka/nodeproperties.cpp b/quanta/parts/kafka/nodeproperties.cpp
new file mode 100644
index 00000000..8ce8a29d
--- /dev/null
+++ b/quanta/parts/kafka/nodeproperties.cpp
@@ -0,0 +1,37 @@
+/***************************************************************************
+ nodeproperties.cpp
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 "node.h"
+
+#include "nodeproperties.h"
+
+kNodeAttrs::kNodeAttrs()
+{
+ m_node = 0L;
+ m_isLinkedToNode = true;
+ m_specialBehavior = kNodeAttrs::none;
+ m_type = 0;
+ m_cbDeleted = false;
+ m_cbModified = false;
+ m_chCursorFocus = kNodeAttrs::no;
+ m_ccEnter = false;
+}
+
+kNodeAttrs::~kNodeAttrs()
+{
+
+}
diff --git a/quanta/parts/kafka/nodeproperties.h b/quanta/parts/kafka/nodeproperties.h
new file mode 100644
index 00000000..592e69d7
--- /dev/null
+++ b/quanta/parts/kafka/nodeproperties.h
@@ -0,0 +1,154 @@
+/***************************************************************************
+ nodeproperties.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 NODEPROPERTIES_H
+#define NODEPROPERTIES_H
+
+#include <dom/dom_node.h>
+
+class Node;
+
+/**
+ * This class basically acts as a link containing attributes between Nodes and DOM::Nodes.
+ * Node->rootNode(), Node->leafNode() are Node->DOM::Node links (cf node.h)
+ * domNodeProps[domNode.handle()] is DOM::Node->kNodeAttr link (cf wkafkapart.h)
+ */
+class kNodeAttrs
+{
+public:
+ kNodeAttrs();
+ ~kNodeAttrs();
+
+ /**
+ * Get/set the Node this kNodeAttrs is linked to.
+ */
+ Node *getNode() {return m_node;}
+ void setNode(Node *node) {m_node = node;}
+
+ /**
+ * Get/set the DOM::Node this kNodeAttrs is linked to.
+ */
+ DOM::Node getDomNode() {return m_domNode;}
+ void setDomNode(DOM::Node domNode) {m_domNode = domNode;}
+
+ /**
+ * Get/set if the DOM::Node linked by this kNodeAttrs has a corresponding Node.
+ * If not, this may reveal that it is a special DOM::Node which could be handled separatly.
+ */
+ bool isLinkedToNode() {return m_isLinkedToNode;}
+ void setIsLinkedToNode(bool isLinkedToNode) {m_isLinkedToNode = isLinkedToNode;}
+
+ /**
+ * The different possible reasons why this kNodeAttr isn't linked to a Node.
+ */
+ enum specialBehavior
+ {
+ /**
+ * No special behavior.
+ */
+ none = 0,
+
+ /**
+ * The DOM::Node linked by this kNodeAttrs is an empty Text DOM::Node
+ * which has been set at the left of a block so that the user can
+ * access this area with the cursor.
+ */
+ emptyTextSurroundingBlockElementAtTheLeft,
+
+ /**
+ * Same as above but at the right of a block.
+ */
+ emptyTextSurroundingBlockElementAtTheRight,
+
+ /**
+ * The DOM::Node linked by this kNodeAttrs is an empty Text DOM::Node
+ * which has been set as the only child of a childless element so that the user
+ * can access this area with the cursor.
+ */
+ emptyTextAsChildOfAChildlessElement
+ };
+
+ /**
+ * Get/set the reason why this kNodeAttrs isn't linked to a Node.
+ */
+ int specialBehavior() {return m_specialBehavior;}
+ void setSpecialBehavior(int specialBehavior) {m_specialBehavior = specialBehavior;}
+
+ /**
+ * SOME PARTS will be brought back later (for non-HTML DTD edition)
+ */
+
+ //DEPRECATED.
+ int getType() {return m_type;}
+ void setType(int type) {m_type = type;}
+
+ /**
+ * Get/set the "type" of Node. (Can Have CUrsor FOCus) cf cursorType. Useful
+ * when manipulating Nodes with the caret.
+ */
+ int chCurFoc() {return m_chCursorFocus;}
+ void setCHCursorFocus(int chCursorFocus) {m_chCursorFocus = chCursorFocus;}
+
+ //Not real clear, comes from old deprecated code.
+ enum cursorType
+ {
+ //Can't have the cursor focus, or we don't care to know that.
+ no = 0,
+ //Inline Node
+ inlineNode,
+ //A Block Node in which the cursor can enter/leave e.g. H1, DIV
+ blockNode,
+ //A BLOCK Node in which the cursor can't enter/leave e.g. TABLE
+ singleNodeAndItself,
+ //A text Node.
+ textNode
+ };
+
+ /**
+ * Specifies if the cursor can enter/leave this Node. (Cursor CAN ENTER)
+ */
+ bool ccanEnter() {return m_ccEnter;}
+ void setCCEnter(bool ccEnter) {m_ccEnter = ccEnter;}
+
+ /**
+ * NOT USED. It will be used with the non HTML DTD support.
+ * Specifies if this Node can be modified e.g. resizing.
+ */
+ bool cbMod() {return m_cbModified;}
+ void setCBModified(bool cbModified) {m_cbModified = cbModified;}
+
+ /**
+ * NOT USED. It will be used with the non HTML DTD support.
+ * Specifies if this Node can be deleted.
+ */
+ bool cbDel() {return m_cbDeleted;}
+ void setCBDeleted(bool cbDeleted) {m_cbDeleted = cbDeleted;}
+
+private:
+ Node* m_node;
+ DOM::Node m_domNode;
+ bool m_isLinkedToNode;
+ int m_specialBehavior;
+ int m_type;
+ bool m_cbDeleted;
+ bool m_cbModified;
+ int m_chCursorFocus;
+ bool m_ccEnter;
+
+};
+
+#endif
diff --git a/quanta/parts/kafka/pics/Makefile.am b/quanta/parts/kafka/pics/Makefile.am
new file mode 100644
index 00000000..57a6d42e
--- /dev/null
+++ b/quanta/parts/kafka/pics/Makefile.am
@@ -0,0 +1,2 @@
+kafkapartpicsdir = $(kde_datadir)/kafkapart/pics
+kafkapartpics_DATA = php.png comment.png
diff --git a/quanta/parts/kafka/pics/comment.png b/quanta/parts/kafka/pics/comment.png
new file mode 100644
index 00000000..e8b58b4f
--- /dev/null
+++ b/quanta/parts/kafka/pics/comment.png
Binary files differ
diff --git a/quanta/parts/kafka/pics/php.png b/quanta/parts/kafka/pics/php.png
new file mode 100644
index 00000000..2b03a087
--- /dev/null
+++ b/quanta/parts/kafka/pics/php.png
Binary files differ
diff --git a/quanta/parts/kafka/undoredo.cpp b/quanta/parts/kafka/undoredo.cpp
new file mode 100644
index 00000000..7ca12718
--- /dev/null
+++ b/quanta/parts/kafka/undoredo.cpp
@@ -0,0 +1,1539 @@
+/***************************************************************************
+ undoredo.cpp
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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. *
+ * *
+ ***************************************************************************/
+
+//debug only
+#include <qdatetime.h>
+//end debug only
+#include <qtabwidget.h>
+
+#include <kapplication.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/editinterfaceext.h>
+#include <ktexteditor/selectioninterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <dom/dom_node.h>
+#include <dom/dom_exception.h>
+
+#include "document.h"
+#include "node.h"
+#include "quantaview.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "tag.h"
+#include "viewmanager.h"
+#include "wkafkapart.h"
+#include "kafkacommon.h"
+#include "kafkaresource.h"
+#include "cursors.h"
+
+#include "undoredo.h"
+
+
+NodeModif::NodeModif()
+{
+ m_type = -1;
+ m_node = 0L;
+ m_tag = 0L;
+ m_childrenMovedUp = 0;
+ m_neighboursMovedDown = 0;
+}
+
+NodeModif::~NodeModif()
+{
+ if(m_node)
+ {
+ m_node->parent = 0L;
+ m_node->next = 0L;
+ m_node->prev = 0L;
+ if(m_type == NodeRemoved)
+ m_node->child = 0L;
+ Node::deleteNode(m_node);
+ }
+ if(m_tag)
+ delete m_tag;
+}
+
+void NodeModif::setNode(Node *node)
+{
+ ViewManager *viewManager = ViewManager::ref();
+ if(viewManager && viewManager->activeDocument() && !viewManager->activeDocument()->docUndoRedo->turnedOn())
+ {
+ //FIXME: Andras: I don't have the slightest idea what this is supposed to do and what the
+ //below comment means, but without a real delete we are seriously leaking memory
+ Node::deleteNode(m_node);
+ m_node = 0L;
+ Node::deleteNode(node);
+ return;
+ }
+ else
+ {
+ m_node = node;
+ if(m_node)
+ {
+ m_node->parent = 0L;
+ m_node->next = 0L;
+ m_node->prev = 0L;
+ if(m_type == NodeRemoved)
+ m_node->child = 0L;
+ }
+ }
+}
+
+void NodeModif::setTag(Tag *tag)
+{
+ ViewManager *viewManager = ViewManager::ref();
+ if(viewManager && viewManager->activeDocument() && !viewManager->activeDocument()->docUndoRedo->turnedOn())
+ {
+ //TEMPORARY cf setNode
+ m_tag = tag;
+ if(m_tag)
+ {
+ delete m_tag;
+ m_tag = 0L;
+ }
+ }
+ else
+ {
+ m_tag = tag;
+ }
+}
+
+NodeModifsSet::NodeModifsSet()
+{
+ m_selectionBefore = new NodeSelectionInd();
+ m_selectionAfter = new NodeSelectionInd();
+ m_indentationStartOffset = -1;
+
+ if(ViewManager::ref()->activeDocument())
+ m_isModifiedBefore = ViewManager::ref()->activeDocument()->isModified();
+ else
+ m_isModifiedBefore = true;
+ m_isModifiedAfter = true;
+
+ //A NodeModifsSet instance is created before the changes are made =>
+ //Recording the cursor position
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ {
+ m_selectionBefore->fillWithVPLCursorSelection();
+ }
+ else
+ {
+ }
+}
+
+NodeModifsSet::~NodeModifsSet()
+{
+ m_nodeModifList.setAutoDelete(true);
+ m_nodeModifList.clear();
+ delete m_selectionBefore;
+ delete m_selectionAfter;
+}
+
+undoRedo::undoRedo(Document *doc)
+ :documentIterator(m_undoList),
+ sourceIterator(m_undoList),
+ kafkaIterator(m_undoList), m_doc(doc)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::undoRedo() - *doc" << endl;
+#endif
+ //TODO:add it to the config
+ m_listLimit = 50;
+ m_merging = false;
+ m_mergeNext = false;
+ m_loggingEnabled = false;
+}
+
+undoRedo::~undoRedo()
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::~undoRedo()" << endl;
+#endif
+}
+
+void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSelection *selection, bool encodeText)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::addNewModifsSet() - NodeModifsSet type: " << modifLocation << endl;
+#endif
+
+ QValueList<NodeModif>::iterator it2;
+ NodeModifsSet *NMSet;
+ QValueList<int> loc;
+ int curFocus, foo, foo2;
+ int diff, diff2;
+ NodeSelectionInd *nodeSelection;
+ Node *node;
+ bool goUp;
+
+ //If modifs is empty, stop here
+ if(!modifs || modifs->nodeModifList().isEmpty())
+ {
+ delete modifs;
+ return;
+ }
+
+ KConfig* config = kapp->config();
+ config->setGroup("Kate Document Defaults");
+ int indentationWidth = config->readNumEntry("Indentation Width", 4);
+
+ //Once the changes have been made, we will generate the "clean" string for Text Nodes only, and
+ //we will add the empty indentation Nodes.
+ modifs->startOfIndentation();
+ node = baseNode;
+ while(node)
+ {
+ if(!node->tag->cleanStrBuilt() &&
+ (node->tag->type == Tag::Text || (node->tag->type == Tag::Empty && !node->tag->tagStr().isEmpty())))
+ {
+ if(!node->insideSpecial)
+ {
+ node->tag->setStr(KafkaDocument::ref()->generateCodeFromNode(node, 0, 0, foo, foo2, encodeText));
+ node->tag->setCleanStrBuilt(true);
+ }
+ }
+ if(!node->tag->indentationDone() && !node->insideSpecial)
+ {
+ kafkaCommon::fitIndentationNodes(kafkaCommon::getPrevNodeNE(node), node, modifs);
+ goUp = false;
+ kafkaCommon::fitIndentationNodes(node, kafkaCommon::getNextNodeNE(node, goUp), modifs);
+ kafkaCommon::applyIndentation(node, indentationWidth, 0, modifs, qConfig.inlineNodeIndentation);
+ }
+ node = node->nextSibling();
+ }
+
+ //Set the modification flag
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ m_doc->setModified(true);
+
+ //Store the cursor position after the changes.
+ nodeSelection = modifs->selectionAfter();
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ nodeSelection->fillWithVPLCursorSelection();
+
+ //If the previous NodeModifsSet contains some text insertion/deletion and if
+ //the current one is doing the same thing, compress the two NodeModifsSet : delete modifs
+ if(modifs->nodeModifList().count() >= 1 && modifs->indentationStartOffset() == 1 &&
+ modifs->nodeModifList().at(0)->type() == NodeModif::NodeModified)
+ {
+ QPtrListIterator<NodeModifsSet> it(m_undoList);
+ it = documentIterator;
+ if((*it) && (*it)->nodeModifList().count() >= 1 && (*it)->indentationStartOffset() == 1 &&
+ (*it)->nodeModifList().at(0)->type() == NodeModif::NodeModified &&
+ (*it)->isModifiedAfter())
+ {
+ node = kafkaCommon::getNodeFromLocation(modifs->nodeModifList().at(0)->location());
+ diff = modifs->nodeModifList().at(0)->tag()->tagStr().length() - (*it)->nodeModifList().at(0)->tag()->tagStr().length();
+ diff2 = node->tag->tagStr().length() - modifs->nodeModifList().at(0)->tag()->tagStr().length();
+
+ if(*((*it)->selectionAfter()) == *(modifs->selectionBefore()) &&
+ ((diff >= 0 && diff2 >= 0) || (diff <= 0 && diff2 <= 0)))
+ {
+ //Ok, we are skipping this one. Update the selection coordinates of (*it)
+ (*it)->setSelectionAfter(modifs->selectionAfter());
+ modifs->setSelectionAfter(0L);
+ delete modifs;
+
+ //Move backward the iterator so that it will refresh next time
+ curFocus = ViewManager::ref()->activeView()->hadLastFocus();
+ if((modifLocation == undoRedo::SourceModif ||
+ (modifLocation == undoRedo::NodeTreeModif && curFocus == QuantaView::SourceFocus)) &&
+ kafkaIterator.atLast())
+ --kafkaIterator;
+ else if((modifLocation == undoRedo::KafkaModif ||
+ (modifLocation == undoRedo::NodeTreeModif && curFocus == QuantaView::VPLFocus)) &&
+ sourceIterator.atLast())
+ --sourceIterator;
+ if(modifLocation == undoRedo::NodeTreeModif)
+ {
+ if(curFocus == QuantaView::SourceFocus)
+ reloadQuantaEditor();
+ else
+ reloadKafkaEditor(false, selection);
+ }
+ return;
+ }
+ }
+ }
+
+ //Store the NodeModifsSet
+ m_undoList.append(modifs);
+#ifdef HEAVY_DEBUG
+ debugOutput();
+#endif
+ while(m_undoList.count() > (unsigned)m_listLimit)
+ {
+ // FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME FIXME
+ //FIXME: This is to prevent the list to be infinite, change when undoRedo is finished!! FIXME
+ if(!kafkaIterator.current() || kafkaIterator.atFirst())
+ {
+ kafkaIterator = sourceIterator;
+ --kafkaIterator;
+ }
+ else if(sourceIterator.current() || sourceIterator.atFirst())
+ {
+ sourceIterator = kafkaIterator;
+ --sourceIterator;
+ }
+ //END FIXME
+ NMSet = m_undoList.getFirst();
+ m_undoList.remove(NMSet);
+ delete NMSet;
+ }
+ if(modifLocation == undoRedo::SourceModif)
+ {
+ sourceIterator.toLast();
+ //The node Tree is ALWAYS in sync
+ documentIterator.toLast();
+ }
+ else if(modifLocation == undoRedo::KafkaModif)
+ {
+ kafkaIterator.toLast();
+ //The node Tree is ALWAYS in sync
+ documentIterator.toLast();
+ }
+ else if(modifLocation == undoRedo::NodeTreeModif)
+ {
+ documentIterator.toLast();
+ curFocus = ViewManager::ref()->activeView()->hadLastFocus();
+ if(curFocus == QuantaView::SourceFocus)
+ reloadQuantaEditor();
+ else
+ reloadKafkaEditor(false, selection);
+ }
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<<"-------------------------------------------------------------------------------"<< endl;
+ debugOutput();
+#endif
+ /**}*/
+
+ /** A lot more to do:
+ * -NodeModifs fusionning in case of typing text multiple times, and also for some similar
+ * actions like NodeCreated and then just after NodeModified.
+ * -Flags to prevent fusionning in case of copy/paste, and to provoke NodeModifs separation
+ * in case of too heavy NodeModified (e.g. typing 100 lines of text shouldn't be undo'ed in one time)
+ */
+#ifdef HEAVY_DEBUG
+ //debugOutput();
+#endif
+}
+
+void undoRedo::turnOn(bool on)
+{
+ if(!m_loggingEnabled && on)
+ {
+ //TEMPORARY : Delete all the undo/Redo stack, we only want to keep VPL NodeModifs
+ m_undoList.setAutoDelete(true);
+ m_undoList.clear();
+ m_undoList.setAutoDelete(false);
+ }
+
+ m_loggingEnabled = on;
+}
+
+bool undoRedo::undo()
+{
+ bool success = true;
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::undo()"<< endl;
+ QTime t;
+ t.start();
+#endif
+ if(documentIterator.isEmpty() || !(*documentIterator))
+ return false;
+ QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ it.toLast();
+
+ while(*it)
+ {
+ //Undo the changes
+ if(!undoNodeModif(*it))
+ {
+ //one undo has failed, trying to recover considering that the undo has done nothing.
+ kdDebug(25001)<< "Undo failed, trying to recover." << endl;
+ ++it;
+ while((*it) && success)
+ {
+ success = redoNodeModif(*it);
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "NodeModif type :" << (*it)->type() <<" redoed!" << endl;
+#endif
+ ++it;
+ }
+ return false;
+ }
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "NodeModif type :" << (*it)->type() <<" undoed!" << endl;
+#endif
+ --it;
+ }
+
+ //We need to update the internal pointer of baseNode in the parser. FIXME:why?
+ parser->setRootNode(baseNode);
+
+ //Update the modified flag
+ m_doc->setModified((*documentIterator)->isModifiedBefore());
+
+ QPtrListIterator<NodeModifsSet> currentIt(documentIterator);
+ --documentIterator;
+
+ //TEMP: Reload the kafka editor TODO: update only the modified Nodes
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ reloadKafkaEditor();
+
+ //Restore the cursor at the old coordinates
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ KafkaDocument::ref()->setCursorAndSelection((*currentIt)->selectionBefore());
+
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "undoRedo::undo() : " << t.elapsed() << " ms" << endl;
+#endif
+
+#ifdef HEAVY_DEBUG
+ //debugOutput();
+#endif
+ return !(*documentIterator);
+}
+
+bool undoRedo::redo()
+{
+ bool success = true;
+
+#ifdef LIGHT_DEBUG
+ QTime t;
+ t.start();
+ kdDebug(25001)<< "undoRedo::redo()" << endl;
+#endif
+ if(documentIterator.isEmpty() || documentIterator.atLast())
+ return false;
+
+ if(!(*documentIterator))
+ documentIterator.toFirst();
+ else
+ ++documentIterator;
+
+ QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ it.toFirst();
+
+ while(*it)
+ {
+ //Redo the changes
+ if(!redoNodeModif(*it))
+ {
+ //one redo has failed, trying to recover considering that the redo has done nothing.
+ kdDebug(25001)<< "Redo failed, trying to recover." << endl;
+ --it;
+ while((*it) && success)
+ {
+ success = undoNodeModif(*it);
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "NodeModif type :" << (*it)->type() <<" undoed!" << endl;
+#endif
+ --it;
+ }
+ --documentIterator;
+ return false;
+ }
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "NodeModif type :" << (*it)->type() <<" redoed!" << endl;
+#endif
+ ++it;
+ }
+ //We need to update the internal pointer of baseNode in the parser. FIXME: why?
+ parser->setRootNode(baseNode);
+
+ //Update the modified flag
+ m_doc->setModified((*documentIterator)->isModifiedAfter());
+
+ //TEMP: Reload the kafka editor TODO: update only the modified Nodes
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ reloadKafkaEditor();
+
+ //Restore the cursor at the old coordinates
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ KafkaDocument::ref()->setCursorAndSelection((*documentIterator)->selectionAfter());
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "undoRedo::redo() : " << t.elapsed() << " ms" << endl;
+#endif
+
+#ifdef HEAVY_DEBUG
+ //debugOutput();
+#endif
+ return !documentIterator.atLast();
+}
+
+bool undoRedo::undoNodeModif(NodeModif *nodeModif)
+{
+ Node *node, *newNode;
+ QValueList<int> ref;
+ Tag *tag;
+ bool b;
+
+ //Note : for NodeModif::NodeMoved && NodeModif::NodeAndChildsMoved, we go
+ //through the processing of NodeModif::NodeAdded && NodeModif::NodeRemoved
+
+ if(nodeModif->type() == NodeModif::NodeTreeAdded)
+ {
+ //Set baseNode to 0L
+ nodeModif->setNode(baseNode);
+ baseNode = 0L;
+ }
+ if(nodeModif->type() == NodeModif::NodeAndChildsAdded ||
+ nodeModif->type() == NodeModif::NodeAdded ||
+ nodeModif->type() == NodeModif::NodeMoved ||
+ nodeModif->type() == NodeModif::NodeAndChildsMoved)
+ {
+ // Removing the node
+ if(nodeModif->type() == NodeModif::NodeAndChildsAdded ||
+ nodeModif->type() == NodeModif::NodeAdded)
+ node = kafkaCommon::getNodeFromLocation(nodeModif->location());
+ else
+ node = kafkaCommon::getNodeFromLocation(nodeModif->finalLocation());
+
+ if(!node)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModif() - NodeModif::NodeAdded/Moved - ERROR1" << endl;
+ return false;
+ }
+ kafkaCommon::extractNode(node, 0L, true,false);
+ nodeModif->setNode(node);
+ }
+ if(nodeModif->type() == NodeModif::NodeModified)
+ {
+ // Simply replacing the tag(node->tag) of the node by the old tag.
+ node = kafkaCommon::getNodeFromLocation(nodeModif->location());
+ if(!node)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModif() - NodeModif::NodeModified - ERROR3" << endl;
+ return false;
+ }
+ tag = nodeModif->tag();
+ nodeModif->setTag(node->tag);
+ b = false;
+ node->tag = tag;
+ }
+ if(nodeModif->type() == NodeModif::NodeRemoved ||
+ nodeModif->type() == NodeModif::NodeAndChildsRemoved ||
+ nodeModif->type() == NodeModif::NodeMoved ||
+ nodeModif->type() == NodeModif::NodeAndChildsMoved)
+ {
+ // Adding the node
+ newNode = nodeModif->node();
+ nodeModif->setNode(0L);
+ node = kafkaCommon::getNodeFromLocation(nodeModif->location());
+ if(!node)
+ {
+ // No node at this location, getting the parent Node and appending newNode after
+ // the last child of the parent.
+ ref = nodeModif->location();
+ QValueList<int> loc(ref);
+ loc.remove(loc.fromLast());
+ if(loc.empty())
+ {
+ // No parent, adding it on top of the tree.
+ kafkaCommon::insertNode(newNode, 0L, 0L, 0L, false);
+ }
+ else
+ {
+ node = kafkaCommon::getNodeFromLocation(loc);
+ if(!node)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModif() - NodeModif::NodeRemoved - ERROR4" << endl;
+ return false;
+ }
+ kafkaCommon::insertNode(newNode, node, 0L, 0L, false);
+ }
+ }
+ else
+ {
+ // A node is already here. Moving it to the right and adding newNode here.
+ kafkaCommon::insertNode(newNode, node->parent, node, 0L, false);
+ }
+ }
+ if(nodeModif->type() == NodeModif::NodeTreeRemoved)
+ {
+ //Adding the tree.
+ baseNode = nodeModif->node();
+ nodeModif->setNode(0L);
+ }
+
+ return true;
+}
+
+bool undoRedo::redoNodeModif(NodeModif *nodeModif)
+{
+ bool success;
+ QValueList<int> tmp;
+
+ //To do the opposite action of undoNodeModif(), we simply have
+ //to change the type of nodeModif
+
+ if(nodeModif->type() == NodeModif::NodeTreeAdded)
+ nodeModif->setType(NodeModif::NodeTreeRemoved);
+ else if(nodeModif->type() == NodeModif::NodeAndChildsAdded)
+ nodeModif->setType(NodeModif::NodeAndChildsRemoved);
+ else if(nodeModif->type() == NodeModif::NodeAdded)
+ nodeModif->setType(NodeModif::NodeRemoved);
+ else if(nodeModif->type() == NodeModif::NodeRemoved)
+ nodeModif->setType(NodeModif::NodeAdded);
+ else if(nodeModif->type() == NodeModif::NodeAndChildsRemoved)
+ nodeModif->setType(NodeModif::NodeAndChildsAdded);
+ else if(nodeModif->type() == NodeModif::NodeTreeRemoved)
+ nodeModif->setType(NodeModif::NodeTreeAdded);
+ else if(nodeModif->type() == NodeModif::NodeMoved || nodeModif->type() == NodeModif::NodeAndChildsMoved)
+ {
+ tmp = nodeModif->location();
+ nodeModif->setLocation(nodeModif->finalLocation());
+ nodeModif->setFinalLocation(tmp);
+ }
+
+ success = undoNodeModif(nodeModif);
+
+ if(nodeModif->type() == NodeModif::NodeTreeRemoved)
+ nodeModif->setType(NodeModif::NodeTreeAdded);
+ else if(nodeModif->type() == NodeModif::NodeAndChildsRemoved)
+ nodeModif->setType(NodeModif::NodeAndChildsAdded);
+ else if(nodeModif->type() == NodeModif::NodeRemoved)
+ nodeModif->setType(NodeModif::NodeAdded);
+ else if(nodeModif->type() == NodeModif::NodeAdded)
+ nodeModif->setType(NodeModif::NodeRemoved);
+ else if(nodeModif->type() == NodeModif::NodeAndChildsAdded)
+ nodeModif->setType(NodeModif::NodeAndChildsRemoved);
+ else if(nodeModif->type() == NodeModif::NodeTreeAdded)
+ nodeModif->setType(NodeModif::NodeTreeRemoved);
+ else if(nodeModif->type() == NodeModif::NodeMoved || nodeModif->type() == NodeModif::NodeAndChildsMoved)
+ {
+ tmp = nodeModif->location();
+ nodeModif->setLocation(nodeModif->finalLocation());
+ nodeModif->setFinalLocation(tmp);
+ }
+
+ return success;
+}
+
+bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
+{
+ /**Node *_node, *n;
+ Tag *_tag;
+ DOM::Node domNode, domNode2, dn, dm;
+ bool goUp;
+ KafkaDocument *kafkaInterface = quantaApp->view()->kafkaInterface();
+ KafkaWidget *kafkaPart = quantaApp->view()->kafkaInterface()->getKafkaWidget();
+
+ if(_nodeModif.type == undoRedo::NodeTreeAdded)
+ {
+ //clear the kafkaPart
+ kafkaInterface->disconnectAllDomNodes();
+ while(kafkaPart->document().hasChildNodes())
+ {
+ //try{
+ kafkaPart->document().removeChild(kafkaPart->document().firstChild());
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ }
+ //reload the minimum tree
+ domNode = kafkaPart->document().createElement("HTML");
+ kafkaPart->document().appendChild(domNode);
+ _node = new Node(0L);
+ _tag = new Tag();
+ _tag->name = "HTML";
+ _node->tag = _tag;
+ kafkaInterface->connectDomNodeToQuantaNode(kafkaPart->document().firstChild(), _node);
+ kafkaInterface->html = kafkaPart->document().firstChild();
+ domNode = kafkaPart->document().createElement("HEAD");
+ kafkaPart->document().firstChild().appendChild(domNode);
+ _node = new Node(0L);
+ _tag = new Tag();
+ _tag->name = "HEAD";
+ _node->tag = _tag;
+ kafkaInterface->connectDomNodeToQuantaNode(kafkaPart->document().firstChild().firstChild(), _node);
+ kafkaInterface->head = kafkaPart->document().firstChild().firstChild();
+ domNode = kafkaPart->document().createElement("BODY");
+ kafkaPart->document().firstChild().appendChild(domNode);
+ _node = new Node(0L);
+ _tag = new Tag();
+ _tag->name = "BODY";
+ _node->tag = _tag;
+ kafkaInterface->connectDomNodeToQuantaNode(kafkaPart->document().firstChild().lastChild(), _node);
+ kafkaInterface->body = kafkaPart->document().firstChild().lastChild();
+ }
+ else if(_nodeModif.type == undoRedo::NodeAndChildsAdded ||
+ _nodeModif.type == undoRedo::NodeAdded)
+ {
+ //removing the Kakfa node and moving others nodes.
+ _node = kafkaCommon::getNodeFromLocation(_nodeModif.location);
+ if(!_node)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModifInKafka() - ERROR1" << endl;
+ return false;
+ }
+ if(_node->_rootNode.isNull())
+ return true;//no kafka node here, due to an invalid pos.
+ domNode = _node->_rootNode;
+ domNode2 = _node->_leafNode;
+ kafkaInterface->disconnectDomNodeFromQuantaNode(domNode);
+ if(_node->tag->type == Tag::XmlTag || _node->tag->type == Tag::Text)
+ {
+ if(_nodeModif.type == undoRedo::NodeAdded && _node->child)
+ {
+ n = _node->child;
+ while(n)
+ {
+ if(!n->_rootNode.isNull())
+ {
+ //try
+ //{
+ dn = n->_rootNode.parentNode().removeChild(n->_rootNode);
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ //try{
+ domNode.parentNode().insertBefore(dn, domNode);
+ //} catch(DOM::DOMException e) {}
+ }
+ else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text)
+ kafkaInterface->buildKafkaNodeFromNode(n, true);
+ n = n->next;
+ }
+ if(domNode.hasChildNodes() && domNode != domNode2)
+ {
+ //HTML Specific to handle one specific case!!
+ kafkaInterface->disconnectDomNodeFromQuantaNode(domNode.firstChild());
+ //try{
+ domNode.removeChild(domNode.firstChild());
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ }
+ }
+ else if(domNode.hasChildNodes())
+ {
+ dm = domNode.firstChild();
+ goUp = false;
+ while(!dm.isNull())
+ {
+ kafkaInterface->disconnectDomNodeFromQuantaNode(dm);
+ dm = kafkaCommon::getNextDomNode(dm, goUp, false, domNode);
+ }
+ }
+ //try{
+ domNode.parentNode().removeChild(domNode);
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ }
+ else if(_node->tag->type == Tag::XmlTagEnd && _node->closesPrevious &&
+ !domNode.nextSibling().isNull())
+ {
+ n = _node->prev;
+ if(!n)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModifInKafka() - ERROR2" << endl;
+ return false;
+ }
+ domNode2 = n->_leafNode;
+ if(domNode2.isNull())
+ return true;
+ if(n->child)
+ {
+ while(n->child)
+ {
+ n = n->child;
+ while(n->next)
+ n = n->next;
+ }
+ if(n->parent->_leafNode.isNull())
+ {
+ dm = domNode.nextSibling();
+ goUp = false;
+ while(!dm.isNull())
+ {
+ kafkaInterface->disconnectDomNodeFromQuantaNode(dm);
+ //try{
+ dm.parentNode().removeChild(dm);
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ dm = kafkaCommon::getNextDomNode(dm, goUp, false, domNode.parentNode());
+ }
+ }
+ else
+ {
+ domNode2 = n->parent->_leafNode;
+ while(!domNode.nextSibling().isNull())
+ {
+ //try{
+ dn = domNode.parentNode().removeChild(domNode.nextSibling());
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ //try{
+ domNode2.appendChild(dn);
+ //} catch(DOM::DOMException e) {}
+ }
+ }
+ }
+ else
+ {
+ while(!domNode.nextSibling().isNull())
+ {
+ //try{
+ dn = domNode.parentNode().removeChild(domNode.nextSibling());
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ //try{
+ domNode2.appendChild(dn);
+ //} catch(DOM::DOMException e) {}
+ }
+ }
+ }
+ }
+ else if(_nodeModif.type == undoRedo::NodeModified)
+ {
+ //reload the kafka Node
+ _node = kafkaCommon::getNodeFromLocation(_nodeModif.location);
+ if(!_node)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModifInKafka() - ERROR4" << endl;
+ return false;
+ }
+ if(_node->_rootNode.isNull())
+ return true;//no kafka node here, due to an invalid pos.
+ domNode = _node->_rootNode;
+ //try{
+ domNode.parentNode().removeChild(domNode);
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ kafkaInterface->disconnectDomNodeFromQuantaNode(domNode);
+ kafkaInterface->buildKafkaNodeFromNode(_node);
+ }
+ else if(_nodeModif.type == undoRedo::NodeRemoved ||
+ _nodeModif.type == undoRedo::NodeAndChildsRemoved)
+ {
+ //adding a kafka Node and moving the others.
+ _node = kafkaCommon::getNodeFromLocation(_nodeModif.location);
+ if(!_node)
+ {
+ kdDebug(25001)<< "undoRedo::undoNodeModifInKafka() - ERROR1" << endl;
+ return false;
+ }
+ if(_node->tag->type == Tag::XmlTag || _node->tag->type == Tag::Text)
+ {
+ kafkaInterface->buildKafkaNodeFromNode(_node, true);
+ domNode = _node->_leafNode;
+ if(!domNode.isNull() && _node->child)
+ {
+ n = _node->child;
+ while(n)
+ {
+ if(!n->_rootNode.isNull())
+ {
+ //try{
+ dn = n->_rootNode.parentNode().removeChild(n->_rootNode);
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ //try{
+ domNode.appendChild(dn);
+ //} catch(DOM::DOMException e) {}
+ }
+ else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text)
+ kafkaInterface->buildKafkaNodeFromNode(n, true);
+ n = n->next;
+ }
+ }
+ }
+ else if(_node->tag->type == Tag::XmlTagEnd && _node->closesPrevious && _node->next)
+ {
+ n = _node->next;
+ while(n)
+ {
+ if(!n->_rootNode.isNull())
+ {
+ //try{
+ dn = n->_rootNode.parentNode().removeChild(n->_rootNode);
+ //} catch(DOM::DOMException e) {kafkaSyncError();}
+ //try{
+ domNode.parentNode().appendChild(dn);
+ //} catch(DOM::DOMException e) {}
+ }
+ else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text)
+ kafkaInterface->buildKafkaNodeFromNode(n, true);
+ n = n->next;
+ }
+ }
+ }
+ else if(_nodeModif.type == undoRedo::NodeTreeRemoved)
+ {
+ //fill the kafka tree.
+ goUp = false;
+ _node = baseNode;
+ while(_node)
+ {
+ if(!goUp)
+ kafkaInterface->buildKafkaNodeFromNode(_node);
+ _node = kafkaCommon::getNextNode(_node, goUp);
+ }
+ }
+ */
+ return true;
+}
+
+void undoRedo::reloadKafkaEditor(bool force, NodeSelection *selection)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::reloadKafkaEditor()" << endl;
+#endif
+
+ if(kafkaIterator == documentIterator && !force)
+ {
+ syncKafkaCursorAndSelection(selection);
+ return;
+ }
+
+ kafkaIterator = documentIterator;
+ KafkaDocument *kafkaInterface = KafkaDocument::ref();
+
+ kafkaInterface->reloadDocument();
+
+ syncKafkaCursorAndSelection(selection);
+}
+
+void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encodeText)
+{
+ QString text, allText;
+ Node *node = baseNode, *child;
+ int bCol, bLine, eCol, eLine, bCol2, bLine2, bCol3, bLine3, eCol3, eLine3, i;
+ KafkaDocument *kafkaInterface = KafkaDocument::ref();
+ bool updateClosing, goUp, isModified;
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::reloadQuantaEditor()" << endl;
+#endif
+
+ if(documentIterator == sourceIterator && !force)
+ {
+ if(syncQuantaCursor)
+ syncQuantaCursorAndSelection();
+ return;
+ }
+
+ if(m_doc->editIfExt)
+ m_doc->editIfExt->editBegin();
+ sourceIterator = documentIterator;
+
+ //save some values which must not be affected by / affect the reload
+ isModified = m_doc->isModified();
+ updateClosing = qConfig.updateClosingTags;
+ m_doc->activateParser(false);
+ m_doc->activateRepaintView(false);
+ qConfig.updateClosingTags = false;
+
+ //First build the tag string which needs to be updated, and add the necessary
+ //empty Nodes for the indentation.
+ while(node)
+ {
+ if(!node->tag->cleanStrBuilt())
+ {
+ if(!node->insideSpecial)
+ {
+ node->tag->setStr(kafkaInterface->generateCodeFromNode(node, 0, 0, eLine, eCol, encodeText));
+ }
+ else
+ {
+ //Script formatting
+ }
+ node->tag->setCleanStrBuilt(true);
+ }
+ //_node->tag->beginPos(bLine, bCol);
+ //i can't stop redraw events of Kate!
+ //m_doc->editIf->insertText(bLine, bCol, _node->tag->tagStr());
+ //allText += _node->tag->tagStr();
+ node->tag->endPos(bLine, bCol);
+ bCol++;
+ node = node->nextSibling();
+ }
+
+ //Then, we gather all the tag string and put it into kate, and we set the tag positions.
+ node = baseNode;
+ goUp = false;
+ bCol = 0;
+ bLine = 0;
+ while(node)
+ {
+ //kdDebug(25001)<< "CurNode : " << _node->tag->name << " - " << _node->tag->tagStr() << endl;
+ if(node->parent)
+ {
+ node->parent->tag->beginPos(bLine3, bCol3);
+ node->parent->tag->endPos(eLine3, eCol3);
+ }
+ node->tag->beginPos(bLine2, bCol2);
+
+ //if we are in a Script inside a tag e.g. <a href="<? PHP stuff here ?>">, skip it
+ if(node->tag->type == Tag::ScriptTag && node->parent &&
+ QuantaCommon::isBetween(bLine2, bCol2, bLine3, bCol3, eLine3,eCol3) == 0)
+ {
+ goUp = true;
+
+ //if we found the closing script tag, skip it too
+ if(node->next && node->next->tag->type == Tag::XmlTagEnd)
+ node = node->next;
+ }
+ else
+ {
+ allText += node->tag->tagStr();
+
+ //If a child is a Script inside this Tag e.g. <a href="<? PHP stuff here ?>">, make
+ //its position fits inside the parent
+ node->tag->beginPos(bLine3, bCol3);
+ node->tag->endPos(eLine3, eCol3);
+ child = node->firstChild();
+ while(child)
+ {
+ child->tag->beginPos(bLine2, bCol2);
+ if(child->tag->type == Tag::ScriptTag &&
+ QuantaCommon::isBetween(bLine2, bCol2, bLine3, bCol3, eLine3,eCol3) == 0)
+ {
+ child->tag->setTagPosition(bLine, bCol + 1, bLine, bCol + 1);
+ }
+ child = child->next;
+ }
+
+ //Update the node's positions
+ node->tag->setTagPosition(bLine, bCol, -1, -1);
+ for(i = 0; i < node->tag->attrCount(); i++)
+ {
+ bCol3 = node->tag->getAttribute(i).nameLine;
+ bLine3 = node->tag->getAttribute(i).nameCol;
+ eCol3 = node->tag->getAttribute(i).valueLine;
+ eLine3 = node->tag->getAttribute(i).valueCol;
+
+ //FIXME: This is OK only when it has just been rebuild.
+ node->tag->setAttributePosition(i, bLine3 + bLine, bCol3 + bCol, eLine3 + bLine,
+ eCol3 + bCol);
+ }
+ kafkaCommon::getEndPosition(node->tag->tagStr(), bLine, bCol, eLine, eCol);
+ node->tag->setTagPosition(bLine, bCol, eLine, eCol);
+
+ bCol = eCol + 1;
+ bLine = eLine;
+ }
+ node = kafkaCommon::getNextNode(node, goUp);
+ }
+
+ //temp
+ m_doc->editIf->removeText(0, 0, m_doc->editIf->numLines() - 1,
+ m_doc->editIf->lineLength(m_doc->editIf->numLines() - 1));
+ m_doc->editIf->insertText(0, 0, allText);
+ //m_doc->editIf->setText(allText);
+ if(m_doc->editIfExt)
+ m_doc->editIfExt->editEnd();
+ if(syncQuantaCursor)
+ syncQuantaCursorAndSelection();
+
+ m_doc->setModified(isModified);
+ qConfig.updateClosingTags = updateClosing;
+ m_doc->activateRepaintView(true);
+ m_doc->activateParser(true);
+
+}
+
+void undoRedo::codeFormatting()
+{
+ Node *node = baseNode;
+
+ while (node)
+ {
+ node->tag->setCleanStrBuilt(false);
+ node->tag->setIndentationDone(false);
+ node = node->nextSibling();
+ }
+ reloadQuantaEditor(true, false, false);
+}
+
+bool undoRedo::redoNodeModifInKafka(NodeModif */**_nodeModif*/)
+{
+ /**bool success;
+ if(_nodeModif.type == undoRedo::NodeTreeAdded)
+ _nodeModif.type = undoRedo::NodeTreeRemoved;
+ else if(_nodeModif.type == undoRedo::NodeAndChildsAdded)
+ _nodeModif.type = undoRedo::NodeAndChildsRemoved;
+ else if(_nodeModif.type == undoRedo::NodeAdded)
+ _nodeModif.type = undoRedo::NodeRemoved;
+ else if(_nodeModif.type == undoRedo::NodeRemoved)
+ _nodeModif.type = undoRedo::NodeAdded;
+ else if(_nodeModif.type == undoRedo::NodeAndChildsRemoved)
+ _nodeModif.type = undoRedo::NodeAndChildsAdded;
+ else if(_nodeModif.type == undoRedo::NodeTreeRemoved)
+ _nodeModif.type = undoRedo::NodeTreeAdded;
+
+ success = undoNodeModifInKafka(_nodeModif);
+
+ if(_nodeModif.type == undoRedo::NodeTreeRemoved)
+ _nodeModif.type = undoRedo::NodeTreeAdded;
+ else if(_nodeModif.type == undoRedo::NodeAndChildsRemoved)
+ _nodeModif.type = undoRedo::NodeAndChildsAdded;
+ else if(_nodeModif.type == undoRedo::NodeRemoved)
+ _nodeModif.type = undoRedo::NodeAdded;
+ else if(_nodeModif.type == undoRedo::NodeAdded)
+ _nodeModif.type = undoRedo::NodeRemoved;
+ else if(_nodeModif.type == undoRedo::NodeAndChildsAdded)
+ _nodeModif.type = undoRedo::NodeAndChildsRemoved;
+ else if(_nodeModif.type == undoRedo::NodeTreeAdded)
+ _nodeModif.type = undoRedo::NodeTreeRemoved;
+ return success;*/
+ return true;
+}
+
+bool undoRedo::syncKafkaView()
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncKafkaView()" << endl;
+#endif
+ /** QValueList<NodeModifsSet>::iterator it;
+ QValueList<NodeModif>::iterator it2;
+ bool undoKafkaView = true;
+
+ if(kafkaIterator == sourceIterator)
+ return true;
+ it = kafkaIterator;
+ while(it != end())
+ {
+ if(it == sourceIterator)
+ {
+ undoKafkaView = false;
+ break;
+ }
+ ++it;
+ }
+
+ it = sourceIterator;
+ if(!undoKafkaView)
+ {
+ //changes have been made to quanta, syncing the kafka view
+ //First undo all the node modifs made after the last update
+ //needed to have the right context to update the kafka tree.
+ while(it != kafkaIterator)
+ {
+ it2 = (*it).NodeModifList.fromLast();
+ while(it2 != (*it).NodeModifList.end())
+ {
+ if(!undoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 1" << endl;
+ return false;
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - Nodes without text undoed!" << endl;
+ #endif
+ if(it2 == (*it).NodeModifList.begin())
+ break;
+ it2--;
+ }
+ it--;
+ }
+ //then for each NodeModif, it is redoed, and the kafka Nodes are build/deleted/modified
+ while(kafkaIterator != sourceIterator)
+ {
+ kafkaIterator++;
+ for (it2 = (*kafkaIterator).NodeModifList.begin(); it2 != (*kafkaIterator).NodeModifList.end(); ++it2)
+ {
+ if((*it2).type == undoRedo::NodeTreeAdded || (*it2).type == undoRedo::NodeAndChildsAdded ||
+ (*it2).type == undoRedo::NodeAdded || (*it2).type == undoRedo::NodeModified)
+ {
+ if(!redoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 2" << endl;
+ return false;
+ }
+ if(!redoNodeModifInKafka(*it2))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 3" << endl;
+ return false;
+ }
+ }
+ else
+ {
+ if(!redoNodeModifInKafka(*it2))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 4" << endl;
+ return false;
+ }
+ if(!redoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 5" << endl;
+ return false;
+ }
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - Nodes without text, and kafka Nodes redoed!" << endl;
+ #endif
+ }
+ }
+ }
+ else
+ {
+ //undo operations have been done in the quanta view
+ //First redo all the Node modifs made after the last update.
+ //This might be called when an user action occurs after undoing : we must sync before the
+ //deletion of part of the undo stack.
+ while(it != kafkaIterator)
+ {
+ ++it;
+ for(it2 = (*it).NodeModifList.begin(); it2 != (*it).NodeModifList.end(); ++it2)
+ {
+ if(!redoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 6" << endl;
+ return false;
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - Nodes without text redoed!" << endl;
+ #endif
+ }
+ }
+ //then for each NodeModif, Nodes are undoed, and the kafka Nodes are build/deleted/modified
+ while(kafkaIterator != sourceIterator)
+ {
+ it2 = (*kafkaIterator).NodeModifList.fromLast();
+ while(it2 != (*kafkaIterator).NodeModifList.end())
+ {
+ if((*it2).type == undoRedo::NodeTreeAdded || (*it2).type == undoRedo::NodeAndChildsAdded ||
+ (*it2).type == undoRedo::NodeAdded || (*it2).type == undoRedo::NodeModified)
+ {
+ if(!undoNodeModifInKafka(*it2))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 8" << endl;
+ return false;
+ }
+ if(!undoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 7" << endl;
+ return false;
+ }
+ }
+ else
+ {
+ if(!undoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 10" << endl;
+ return false;
+ }
+ if(!undoNodeModifInKafka(*it2))
+ {
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - ERROR 9" << endl;
+ return false;
+ }
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncKafkaView() - Nodes without text, and kafka Nodes undoed!" << endl;
+ #endif
+ if(it2 == (*kafkaIterator).NodeModifList.begin())
+ break;
+ it2--;
+ }
+ kafkaIterator--;
+ }
+ }
+ kafkaIterator = sourceIterator;*/
+ return true;
+}
+
+bool undoRedo::syncQuantaView()
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncQuantaView()" << endl;
+#endif
+ /**QValueList<NodeModifsSet>::iterator it;
+ QValueList<NodeModif>::iterator it2;
+ bool undoQuantaView = true;
+
+ if(kafkaIterator == sourceIterator)
+ return true;
+ it = sourceIterator;
+ while(it != end())
+ {
+ if(it == kafkaIterator)
+ {
+ undoQuantaView = false;
+ break;
+ }
+ ++it;
+ }
+
+ it = kafkaIterator;
+ if(!undoQuantaView)
+ {
+ //changes have been made to kafka, syncing the quanta view
+ //First undo all the node modifs made after the last update
+ //needed to have the right context to update the quanta tree.
+ while(it != sourceIterator)
+ {
+ it2 = (*it).NodeModifList.fromLast();
+ while(it2 != (*it).NodeModifList.end())
+ {
+ if(!undoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - ERROR 1" << endl;
+ return false;
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - Nodes without text undoed!" << endl;
+ #endif
+ if(it2 == (*it).NodeModifList.begin())
+ break;
+ it2--;
+ }
+ it--;
+ }
+ //then for each NodeModif, Nodes are redoed, and the tags text is generated and inserted.
+ while(sourceIterator != kafkaIterator)
+ {
+ sourceIterator++;
+ for (it2 = (*sourceIterator).NodeModifList.begin(); it2 != (*sourceIterator).NodeModifList.end(); ++it2)
+ {
+ if(!redoNodeModif((*it2), true, true))
+ {
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - ERROR 2" << endl;
+ return false;
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - Nodes and text redoed!" << endl;
+ #endif
+ }
+ }
+ }
+ else
+ {
+ //undo operations have been done in the kafka view
+ //First redo all the Node modifs made after the last update.
+ //This might be called when an user action occurs after undoing : we must sync before the
+ //deletion of part of the undo stack.
+ while(it != sourceIterator)
+ {
+ ++it;
+ for(it2 = (*it).NodeModifList.begin(); it2 != (*it).NodeModifList.end(); ++it2)
+ {
+ if(!redoNodeModif((*it2), false))
+ {
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - ERROR 3" << endl;
+ return false;
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - Nodes without text redoed!" << endl;
+ #endif
+ }
+ }
+ //then for each NodeModif, Nodes are undoed, and the tags text is generated and inserted.
+ while(sourceIterator != kafkaIterator)
+ {
+ it2 = (*sourceIterator).NodeModifList.fromLast();
+ while(it2 != (*sourceIterator).NodeModifList.end())
+ {
+ if(!undoNodeModif((*it2), true, true))
+ {
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - ERROR 4" << endl;
+ return false;
+ }
+ #ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "undoRedo::syncQuantaView() - Nodes and text undoed!" << endl;
+ #endif
+ if(it2 == (*sourceIterator).NodeModifList.begin())
+ break;
+ it2--;
+ }
+ sourceIterator--;
+ }
+ }
+ sourceIterator = kafkaIterator;*/
+ return true;
+}
+
+void undoRedo::syncKafkaCursorAndSelection(NodeSelection *selection)
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ KafkaWidget *kafkaPart = KafkaDocument::ref()->getKafkaWidget();
+ DOM::Node node;
+ long offset;
+ uint curLine, curCol/**, curLine2, curCol2*/;
+ /**DOM::Range range(kafkaPart) = kafkaPart->selection();*/
+
+ if(!KafkaDocument::ref()->isLoaded())
+ return;
+
+ /**DOM::Range tempRange(document());
+ tempRange.setStart(document(), 0);
+ tempRange.setEnd(m_currentNode, 2);
+ setSelection(tempRange);*/
+
+ //Translate and set the cursor.
+ if(selection)
+ {
+ KafkaDocument::ref()->translateNodeIntoKafkaCursorPosition(selection->cursorNode(),
+ selection->cursorOffset(), node, offset);
+ kafkaPart->setCurrentNode(node, offset);
+ }
+ else
+ {
+ view->document()->viewCursorIf->cursorPositionReal(&curLine, &curCol);
+ KafkaDocument::ref()->translateQuantaIntoKafkaCursorPosition(curLine,
+ curCol, node, offset);
+ kafkaPart->setCurrentNode(node, offset);
+ }
+
+ //Translate and set the selection.
+ //quantaApp->view()->write()->selectionIf()
+}
+
+void undoRedo::syncQuantaCursorAndSelection()
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ KafkaWidget *kafkaPart = KafkaDocument::ref()->getKafkaWidget();
+ int curCol, curLine, curCol2, curLine2;
+ uint oldCurCol, oldCurLine;
+ DOM::Node domNode, domNodeEnd;
+ long offset, offsetBegin, offsetEnd;
+ DOM::Range range(kafkaPart);
+
+ //Translate and set the cursor.
+ KafkaDocument::ref()->getKafkaWidget()->getCurrentNode(domNode, offset);
+ KafkaDocument::ref()->translateKafkaIntoQuantaCursorPosition(domNode,
+ offset, curLine, curCol);
+ view->document()->viewCursorIf->cursorPositionReal(&oldCurLine, &oldCurCol);
+ if(oldCurCol != (uint)curCol || oldCurLine != (uint)curLine)
+ view->document()->viewCursorIf->setCursorPositionReal((uint)curLine, (uint)curCol);
+
+ //Translate and set the selection
+ kafkaPart->selection(domNode, offsetBegin, domNodeEnd, offsetEnd);
+ KafkaDocument::ref()->translateKafkaIntoQuantaCursorPosition(
+ domNode, (int)offsetBegin, curLine, curCol);
+ KafkaDocument::ref()->translateKafkaIntoQuantaCursorPosition(
+ domNodeEnd, (int)offsetEnd, curLine2, curCol2);
+ if (view->document()->selectionIf)
+ view->document()->selectionIf->setSelection(curLine, curCol, curLine2, curCol2);
+}
+
+void undoRedo::debugOutput()
+{
+#ifdef HEAVY_DEBUG
+ int i = 0;
+ bool afterEditorIt = false;
+
+ kdDebug(24000)<< "Undo/redo stack contents:" << endl;
+ if(m_undoList.isEmpty())
+ {
+ kdDebug(24000)<< "Empty!" << endl;
+ return;
+ }
+ QPtrListIterator<NodeModifsSet> it(m_undoList);
+ for(it.toFirst(); it ; ++it )
+ {
+ kdDebug(24000)<< "== Node Modifications set #" << i << "(" << (*it)->isModifiedBefore() << "," <<
+ (*it)->isModifiedAfter() << ")" << endl;
+ if((*it)->nodeModifList().isEmpty())
+ {
+ kdDebug(24000)<< "== Empty!" << endl;
+ kdDebug(24000)<< "== End Node Modifications set #" << i << endl;
+ i++;
+ continue;
+ }
+ //kdDebug(24000)<< "== Cursor Pos: " << (*it).cursorY << ":" << (*it).cursorX << endl;
+ //kdDebug(24000)<< "== Cursor Pos2:" << (*it).cursorY2 << ":" << (*it).cursorX2 << endl;
+ QPtrListIterator<NodeModif> it2((*it)->nodeModifList());
+ for(it2.toFirst(); it2; ++it2)
+ {
+ kdDebug(24000)<< "==== NodeModif type:" << (*it2)->type() << endl;
+ kdDebug(24000)<< "==== Location1: " << endl;
+ QValueList<int>::iterator it3;
+ if((*it2)->location().empty())
+ {
+ kdDebug(24000)<< "==== Empty location!!" << endl;
+ }
+ else if((*it2)->type() != NodeModif::NodeTreeAdded &&
+ (*it2)->type() != NodeModif::NodeTreeRemoved)
+ {
+ for(it3 = (*it2)->location().begin(); it3 != (*it2)->location().end(); ++it3)
+ kdDebug(24000)<< (*it3) << endl;
+ if((*it2)->type() != NodeModif::NodeMoved ||
+ (*it2)->type() != NodeModif::NodeAndChildsMoved)
+ {
+ kdDebug(24000)<< "==== Location2: " << endl;
+ for(it3 = (*it2)->finalLocation().begin(); it3 != (*it2)->finalLocation().end(); ++it3)
+ kdDebug(24000)<< (*it3) << endl;
+ }
+ }
+ if((((*it2)->type() == NodeModif::NodeRemoved && !afterEditorIt) ||
+ ((*it2)->type() == NodeModif::NodeAdded && afterEditorIt)) && (*it2)->node())
+ kdDebug(24000)<< "==== Node: " << (*it2)->node()->tag->name <<
+ " - contents: " << (*it2)->node()->tag->tagStr() << endl;
+ if((*it2)->type() == NodeModif::NodeModified && (*it2)->tag())
+ kdDebug(24000)<< "==== Tag: " << (*it2)->tag()->name <<
+ " - contents: " << (*it2)->tag()->tagStr() << endl;
+ if(((*it2)->type() == NodeModif::NodeRemoved && !afterEditorIt) ||
+ ((*it2)->type() == NodeModif::NodeAdded && afterEditorIt))
+ kdDebug(24000)<< "==== ChildsNumber1 : " << (*it2)->childrenMovedUp() <<
+ " - ChildsNumber2 : " << (*it2)->neighboursMovedDown() << endl;
+ }
+ kdDebug(24000)<< "== End Node Modifications set #" << i << endl;
+ i++;
+ if(it == sourceIterator)
+ afterEditorIt = true;
+ }
+ kdDebug(24000)<< "End Undo/redo stack contents" << endl;
+ kafkaCommon::coutTree(baseNode, 2);
+#endif
+}
+
+void undoRedo::fileSaved()
+{
+ QPtrListIterator<NodeModifsSet> it(m_undoList);
+ bool previousWasDocIt = false;
+ for(it.toFirst(); it ; ++it )
+ {
+ if(previousWasDocIt)
+ {
+ (*it)->setIsModifiedBefore(false);
+ (*it)->setIsModifiedAfter(true);
+ previousWasDocIt = false;
+ }
+ else if(it == documentIterator)
+ {
+ (*it)->setIsModifiedBefore(true);
+ (*it)->setIsModifiedAfter(false);
+ previousWasDocIt = true;
+ }
+ else
+ {
+ (*it)->setIsModifiedBefore(true);
+ (*it)->setIsModifiedAfter(true);
+ }
+ }
+ /**
+ QValueList<NodeModifsSet>::iterator it = sourceIterator;
+ (*sourceIterator).isModified = false;
+ //seting isModified = true to all others
+ while(it != begin())
+ {
+ it--;
+ (*it).isModified = true;
+ }
+ it = sourceIterator;
+ ++it;
+ while(it != end())
+ {
+ (*it).isModified = true;
+ ++it;
+ }*/
+}
+
+void undoRedo::kafkaLoaded()
+{
+ kafkaIterator = documentIterator;
+}
+
diff --git a/quanta/parts/kafka/undoredo.h b/quanta/parts/kafka/undoredo.h
new file mode 100644
index 00000000..f9ec09cf
--- /dev/null
+++ b/quanta/parts/kafka/undoredo.h
@@ -0,0 +1,453 @@
+/***************************************************************************
+ undoredo.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 UNDOREDO_H
+#define UNDOREDO_H
+
+#include <qvaluelist.h>
+#include <qptrlist.h>
+#include <qobject.h>
+#include "node.h"
+
+class Document;
+class NodeSelection;
+class NodeSelectionInd;
+
+/**
+ * The basic unit of the undo/redo system : a Node modification.
+ */
+class NodeModif
+{
+public:
+ NodeModif();
+ ~NodeModif();
+
+ /**
+ * For all NodeModifs : Type of the Node modification : Added, removed, modified, moved,...
+ * cf the NodeModification enumeration.
+ * WARNING The type MUST be set first!!
+ * @param type The type of the NodeModif, as described in the NodeModification enumeration.
+ */
+ void setType(int type){m_type = type;}
+
+ /**
+ * @return Returns the current type of the NodeModif.
+ */
+ int type() {return m_type;}
+
+ /**
+ * For all type : Location of the Node added/modified/removed/moved.
+ * @param location The location of the Node, cf kafkaCommon::getNodeLocation()
+ */
+ void setLocation(QValueList<int> location) {m_location = location;}
+
+ /**
+ * @return Returns the location of the Node which have been modified.
+ */
+ QValueList<int>& location() {return m_location;}
+
+ /**
+ * For Node move : Final location of the Node moved.
+ * @param location The final location of the Node moved, cf kafkaCommon::getNodeLocation()
+ */
+ void setFinalLocation(QValueList<int> location) {m_finalLocation = location;}
+
+ /**
+ * @return Returns the final location of the Node which was moved.
+ */
+ QValueList<int>& finalLocation() {return m_finalLocation;}
+
+ /**
+ * For Node deletion: Store the deleted Node.
+ * @param node The deleted node.
+ */
+ void setNode(Node *node);
+
+ /**
+ * @return Returns the deleted Node.
+ */
+ Node *node() {return m_node;}
+
+ /**
+ * For Node modification : Store the old tag
+ * @param tag The original tag.
+ */
+ void setTag(Tag *tag);
+
+ /**
+ * @return Returns the original Tag.
+ */
+ Tag *tag() {return m_tag;}
+
+ /**
+ * TODO:REMOVE
+ * For non-XmlEnd Node deletion without its children.
+ * @param childrenNumber The number of children which are moved up
+ * at the location where was the deleted Node.
+ */
+ void setChildrenMovedUp(int childrenNumber) {m_childrenMovedUp = childrenNumber;}
+
+ /**
+ * TODO:REMOVE
+ * @return Returns the number of childs which were moved up.
+ */
+ int childrenMovedUp() {return m_childrenMovedUp;}
+
+ /**
+ * TODO:REMOVE
+ * For XmlEnd Node deletion : number of moved down
+ * @param number The number of right neighbours which are moved down.
+ */
+ void setNeighboursMovedDown(int number) {m_neighboursMovedDown = number;}
+
+ /**
+ * TODO:REMOVE
+ * @return Returns the number of right neighbours which were moved down.
+ */
+ int neighboursMovedDown() {return m_neighboursMovedDown;}
+
+ /** All the possible Node modifications */
+ enum NodeModification {
+ //A complete Node Tree is added. Implemented.
+ NodeTreeAdded = 0,
+ //A Node and its childs are added. Implemented.
+ NodeAndChildsAdded,
+ //A Node is added. Implemented.
+ NodeAdded,
+ //WARNING : do not use this if the node type or the node name change.
+ //A Node is modified. Implemented.
+ NodeModified,
+ //A Node is removed. Implemented.
+ NodeRemoved,
+ //A Node and its childs are removed. Implemented.
+ NodeAndChildsRemoved,
+ //The complete Node tree is removed. Implemented.
+ NodeTreeRemoved,
+ //Moving a Node from one location to another. Implemented.
+ NodeMoved,
+ //Moving a Node and its children from one location to another.
+ NodeAndChildsMoved
+ };
+
+private:
+ int m_type;
+ QValueList<int> m_location, m_finalLocation;
+ Node *m_node;
+ Tag *m_tag;
+ int m_childrenMovedUp;
+ int m_neighboursMovedDown;
+};
+
+/**
+ * A NodeModifsSet contains all the Node modifications made by one user input, and the
+ * cursor and selection location before and after the user input.
+ */
+class NodeModifsSet
+{
+public:
+ NodeModifsSet();
+ ~NodeModifsSet();
+
+ /**
+ * Add a new NodeModif to the list of NodeModifs.
+ */
+ void addNodeModif(NodeModif *nodeModif) {m_nodeModifList.append(nodeModif);}
+
+ /**
+ * Returns the list of NodeModifs.
+ */
+ QPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
+
+ /**
+ * Set the Modified flag BEFORE the user input.
+ */
+ void setIsModifiedBefore(bool isModifiedBefore) {m_isModifiedBefore = isModifiedBefore;}
+
+ /**
+ * @return Returns the Modified flag BEFORE the user input.
+ */
+ bool isModifiedBefore(){return m_isModifiedBefore;}
+
+ /**
+ * Set the Modified flag AFTER the user input.
+ */
+ void setIsModifiedAfter(bool isModifiedAfter) {m_isModifiedAfter = isModifiedAfter;}
+
+ /**
+ * @return Returns the Modified flag AFTER the user input.
+ */
+ bool isModifiedAfter(){return m_isModifiedAfter;}
+
+ /**
+ * Set a description to the user input.
+ */
+ void setDescription(const QString &description) {m_description = description;}
+
+ /**
+ * @return Returns the description of the user input.
+ */
+ QString description() {return m_description;}
+
+ /**
+ * Set the coordinates of the selection before the user input.
+ */
+ void setSelectionBefore(NodeSelectionInd* selectionBefore) {m_selectionBefore = selectionBefore;}
+
+ /**
+ * @return Return the selection before the Node modifications.
+ */
+ NodeSelectionInd *selectionBefore() {return m_selectionBefore;}
+
+ /**
+ * Set the coordinates of the selection after the user input.
+ */
+ void setSelectionAfter(NodeSelectionInd* selectionAfter) {m_selectionAfter = selectionAfter;}
+
+ /**
+ * @return Return the selection after the Node modifications.
+ */
+ NodeSelectionInd *selectionAfter() {return m_selectionAfter;}
+
+ /**
+ * We can separate the NodeModif into two categories ; the Node modifs made by the user
+ * and then the indentation.
+ * Call this function when we have finished with the first category.
+ */
+ void startOfIndentation() {m_indentationStartOffset = m_nodeModifList.count();}
+
+ /**
+ * @return Return the offset (starting from 0) where the indentation NodeModifs begin in the list of NodeModif.
+ * Return -1 if it hasn't begin to add the indentation NodeModifs.
+ */
+ int indentationStartOffset() {return m_indentationStartOffset;}
+
+
+private:
+ QPtrList<NodeModif> m_nodeModifList;
+ bool m_isModifiedBefore, m_isModifiedAfter;
+ QString m_description;
+ NodeSelectionInd *m_selectionBefore, *m_selectionAfter;
+ int m_indentationStartOffset, m_type;
+};
+
+/**
+ * This class, basically a new undo/redo system, also helps KafkaDocument to synchronize the
+ * kafka and quanta view.
+ */
+class undoRedo : public QObject
+{
+public:
+ /**
+ * Creates a document specific undo/redo system.
+ * @param doc The Document the undo/redo system is linked to.
+ */
+ undoRedo(Document *doc);
+
+ ~undoRedo();
+
+ /** The enumeration of all possible location where modifications can occur */
+ enum modificationLocation {
+ // A modification was made in the source view (kate).
+ SourceModif = 0,
+ // A modification was made directly in the node Tree.
+ NodeTreeModif,
+ // A modification was made in the VPL view (kafka).
+ KafkaModif
+ };
+
+ /**
+ * Adds a new set of Node modification. This should be called whenever
+ * the kafka/quanta editor is modified.
+ * @param modifs The new modification set to add to the undo/redo stack.
+ * @param modifLocation Specifies where the modification was made
+ * @param selection If given, and if modifLocation == SourceModif, it will synchronize the cursor
+ * and the selection to 'selection'. Only work when the focus is in VPL for the moment.
+ * cf undoRedo::modificationLocation.
+ */
+ void addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSelection *selection = 0L, bool encodeText = true);
+
+ /**
+ * TEMPORARY function.
+ * First we will only enable undoRedo in VPL : this class will only log changes
+ * made in VPL.
+ * This function specify if we should log the changes submitted to addNewModifsSet or not.
+ * @param True => enable, false => disable
+ */
+ void turnOn(bool on);
+
+ /**
+ * TEMPORARY function.
+ * @return Returns true if the changes are logged.
+ */
+ bool turnedOn() {return m_loggingEnabled;}
+
+ /**
+ * TODO:REMOVE
+ * Ignores the ModifSet that will come in the number'th position. Useful when
+ * KTextEditor::EditInterface::insertText() is called before parser::rebuild() and
+ * thus parser::rebuild will be called two times.
+ * @param number Specifies the position of the ModifsSet to ignore.
+ */
+ void dontAddModifsSet(int number) {m_dontAddModifSet = number;}
+
+ /**
+ * TODO:REMOVE
+ * Merges the next ModifsSet with the previous one. Useful when autocompletion
+ * makes parser::rebuild() to be called again.
+ */
+ void mergeNextModifsSet() {m_mergeNext = true;}
+
+ /**
+ * Makes the undo operation.
+ * @param kafkaUndo Specifies if the undo operation is done in the kafka view.
+ * @return Returns true if a previous undo operation is available.
+ */
+ bool undo();
+
+ /**
+ * Makes the redo operation.
+ * @param kafkaUndo Specifies if the undo operation is done in the kafka view.
+ * @return Returns true if a next redo operation is available.
+ */
+ bool redo();
+
+ /**
+ * Synchronize the kafka view with the quanta view by applying the NodeModifs
+ * which have occured since the last synchronization.
+ * @return Returns if the synchronization was successful.
+ */
+ bool syncKafkaView();
+
+ /**
+ * Synchronize the quanta view with the kafka view by applying the NodeModifs
+ * which have occured since the last synchronization.
+ * @return Returns if the synchronization was successful.
+ */
+ bool syncQuantaView();
+
+ /**
+ * Synchronize the cursor position and the selection of the kafka view by translating
+ * the cursor position and selection of the quanta view.
+ * @param selection Synchronize the selection and the cursor position to "selection".
+ */
+ void syncKafkaCursorAndSelection(NodeSelection *selection);
+
+ /**
+ * Synchronize the cursor position and the selection of the quanta view by translating
+ * the cursor position and selection of the kafka view.
+ */
+ void syncQuantaCursorAndSelection();
+
+ /**
+ * Reload kafka from the current document.
+ * @param force If set to true, it will reload kafka even if it is already up to date.
+ * @param selection If given, it will synchronize the selection and the cursor position to 'selection'.
+ */
+ void reloadKafkaEditor(bool force = false, NodeSelection *selection = 0L);
+
+ /**
+ * Reload the quanta editor from kafka.
+ * @param force If set to true, it will reload quanta even if it is already up to date.
+ * @param syncQuantaCursor If set to true, it will try to sync the quanta cursor from
+ * the kafka one.
+ * @param encodeText Usually when a Text Node has the dirty flag (cleanStrBuilt), it means that
+ * it was modified in VPL and thus it contains some unencoded text : we have to encode it. (e.g.
+ * whitespace => &nbsp;) But some functions calling this function might not want that because
+ * the text is already encoded e.g. codeFormatting().
+ */
+ void reloadQuantaEditor(bool force = false, bool syncQuantaCursor = true, bool encodeText = true);
+
+ /**
+ * Format the code of the document. It simply call reloadQuantaEditor() after having
+ * set the dirty flag to every Node.
+ */
+ void codeFormatting();
+
+public slots:
+
+ /**
+ * Called by quantaApp whenever the current file is saved. The isModified
+ * flag of each NodeModisSet is updated.
+ */
+ void fileSaved();
+
+ /**
+ * Called when the kafkaPart is loaded.
+ */
+ void kafkaLoaded();
+
+private:
+
+ /**
+ * This is one of the main functions which apply the changes needed to undo a nodeModif
+ * in the text and in the Node tree.
+ * @param nodeModif The nodeModif to undo.
+ * @return Returns true if the undo has correctly worked.
+ */
+ bool undoNodeModif(NodeModif *nodeModif);
+
+ /**
+ * Convenient function which call undoNodeModif,
+ * while changing the type of the NodeModifs to make them redo.
+ */
+ bool redoNodeModif(NodeModif *nodeModif);
+
+ /**
+ * This is one of the main functions which apply the changes needed to undo a nodeModif
+ * in the kafka tree.
+ * @param _nodeModif The nodeModif to undo.
+ * @return Returns true if the undo has correctly worked.
+ */
+ bool undoNodeModifInKafka(NodeModif *nodeModif);
+
+ /**
+ * Convenient function which call undoNodeModifInKafka,
+ * while changing the type of the NodeModifs to make them redo.
+ */
+ bool redoNodeModifInKafka(NodeModif *nodeModif);
+
+ /**
+ * Prints in stdout a debugging flow.
+ */
+ void debugOutput();
+
+private:
+ /**
+ * The main undoRedo list which contains the NodeModifsSet.
+ */
+ QPtrList<NodeModifsSet> m_undoList;
+ /**
+ * The undoRedo list iterators which point the current location of each component in
+ * the undoRedo list.
+ * documentIterator point the current location of the Node Tree.
+ * sourceIterator point the current location of the source view (kate).
+ * kafkaIterator point the current location of the VPL view (kafka).
+ */
+ QPtrListIterator<NodeModifsSet> documentIterator;
+ QPtrListIterator<NodeModifsSet> sourceIterator;
+ QPtrListIterator<NodeModifsSet> kafkaIterator;
+ int m_listLimit;
+ bool m_merging;
+ bool addingText;
+ QValueList<int> m_currentLoc;
+ Document *m_doc;
+ bool m_mergeNext;
+ int m_dontAddModifSet;
+ bool m_loggingEnabled;
+};
+
+#endif
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp
new file mode 100644
index 00000000..5641bb36
--- /dev/null
+++ b/quanta/parts/kafka/wkafkapart.cpp
@@ -0,0 +1,2407 @@
+/***************************************************************************
+ wkafkapart.cpp
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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. *
+ * *
+ ***************************************************************************/
+
+#define HEAVY_DEBUG 1
+
+#include <dom/dom_node.h>
+#include <dom/dom_exception.h>
+#include <dom/dom_string.h>
+#include <dom/css_stylesheet.h>
+#include <kdebug.h>
+#include <khtmlview.h>
+#include <kstandarddirs.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/selectioninterface.h>
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kmultipledrag.h>
+#include <kglobal.h>
+#include <kcharsets.h>
+
+#include <qregexp.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qdatetime.h>
+#include <qclipboard.h>
+#include <qptrvector.h>
+
+#include "document.h"
+#include "viewmanager.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "undoredo.h"
+#include "node.h"
+#include "parser.h"
+#include "project.h"
+#include "tag.h"
+#include "nodeproperties.h"
+#include "htmlenhancer.h"
+#include "kafkacommon.h"
+#include "kafkaresource.h"
+#include "cursors.h"
+#include "kafkadragobject.h"
+#include "cursors.h"
+
+#include "wkafkapart.moc"
+
+KafkaWidget *kafkaWidget;
+KafkaDocument *kafkaDoc;
+
+KafkaDocument::KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name)
+:domNodeProps(1021), _docLoaded(false)
+{
+// i18n reserve
+QString a = i18n("Selector");QString b = i18n("Attribute");QString c = i18n("Class");
+QString d = i18n("Pseudo-class");QString e = i18n("CSS rules");QString f = i18n("Universal selector");
+QString g = i18n("Linked stylesheets");QString h = i18n("Embedded stylesheets");QString i = i18n("Inline style attribute");
+QString j = i18n("Link");QString k = i18n("Priority");QString l = i18n("ID");
+QString m = i18n("Browser support");QString n = i18n("Pseudo-element");QString o = i18n("Imported");
+QString p = i18n("Inheritance");QString q = i18n("Inherited");QString r = "";
+
+QString s = i18n("Name");QString tt = i18n("Undo");QString u = i18n("Redo");
+QString v = i18n("Undo/Redo history");QString w = i18n("CSS styles");
+
+QString x = i18n("Sorry, VPL does not support this functionality yet.");
+QString y = i18n("Merge cells");
+QString z = i18n("Split cells");
+QString aa = i18n("Edit CSS style of this Tag");
+QString ab = i18n("Ident all");
+//end
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::KafkaDocument()" << endl;
+#endif
+
+ kafkaDoc = this;
+
+ m_kafkaPart = new KafkaWidget(parent, widgetParent,this, name);
+ kafkaWidget = m_kafkaPart;
+ //m_kafkaPart->showDomTree();
+ m_currentDoc = 0L;
+ mainEnhancer = new HTMLEnhancer(this);
+ domNodeProps.setAutoDelete(false);
+
+ KStandardDirs *m_stddirs = new KStandardDirs();
+ QFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
+ delete m_stddirs;
+ QString tmp;
+ if ( file.open(IO_ReadOnly) )
+ {
+ QTextStream t( &file ); // use a text stream
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ while ( !t.eof() )
+ {
+ tmp = t.readLine();
+ if(tmp.left(2) == "//") continue;//comments
+ int begin = tmp.find("(") + 1;
+ if(begin == (-1 + 1)) continue;//"(" not found : invalid line
+ int length = tmp.find(")") - begin;
+ decodedChars.insert(tmp.left(1), tmp.mid(begin, length));
+ encodedChars.insert(tmp.mid(begin, length), tmp.left(1));
+ }
+ file.close();
+ }
+
+ connect(m_kafkaPart, SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
+ this, SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
+ this, SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
+ this, SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
+ this, SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
+
+ connect(m_kafkaPart, SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
+ this, SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
+
+}
+
+KafkaDocument::~KafkaDocument()
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::~KafkaDocument()" << endl;
+#endif
+ //delete the empty node linked to the DOM::Node #document
+ disconnectAllDomNodes();
+}
+
+void KafkaDocument::loadDocument(Document *doc)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001) << "KafkaDocument::loadDocument()" << endl;
+#endif
+ Node *node;
+ Tag *tag;
+ DOM::Node domNode;
+ bool goUp;
+
+ if(!m_kafkaPart) return;
+ if(!doc) return;
+#ifdef LIGHT_DEBUG
+ QTime t;
+ t.start();
+#endif
+ m_currentDoc = doc;
+
+ (static_cast<HTMLEnhancer *>(mainEnhancer))->setBaseURL(Project::ref()->projectBaseURL());
+
+ //create a empty document with a basic tree : HTML, HEAD, BODY
+ m_kafkaPart->newDocument();
+
+ // When loading a weird html file in khtml (e.g. without BODY or HTML), khtml takes care
+ // to create the necessary tags. But as we are handling directly the Nodes, we have to handle this!!
+ // creating and linking an empty node to the root DOM::Node (#document) and
+ // to HEAD, HTML, BODY
+ node = new Node(0L);
+ tag = new Tag();
+ tag->name = "#document";
+ tag->setNotInTree(true);
+ node->tag = tag;
+ connectDomNodeToQuantaNode(m_kafkaPart->document(), node);
+ node = new Node(0L);
+ tag = new Tag();
+ tag->name = "HTML";
+ tag->setNotInTree(true);
+ node->tag = tag;
+ connectDomNodeToQuantaNode(m_kafkaPart->document().firstChild(), node);
+ html = m_kafkaPart->document().firstChild();
+ node = new Node(0L);
+ tag = new Tag();
+ tag->name = "HEAD";
+ tag->setNotInTree(true);
+ node->tag = tag;
+ connectDomNodeToQuantaNode(m_kafkaPart->document().firstChild().firstChild(), node);
+ head = m_kafkaPart->document().firstChild().firstChild();
+ node = new Node(0L);
+ tag = new Tag();
+ tag->name = "BODY";
+ tag->setNotInTree(true);
+ node->tag = tag;
+ connectDomNodeToQuantaNode(m_kafkaPart->document().firstChild().lastChild(), node);
+ body = m_kafkaPart->document().firstChild().lastChild();
+
+ //load the DOM::Nodes from the node tree.
+ node = baseNode;
+ while(node)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001) << "KafkaDocument::loadDocument - Node name :" <<
+ node->tag->name.upper() << "; type : " <<
+ node->tag->type << "; tagstr : " << node->tag->tagStr() <<
+ " is opened :" << node->opened << endl;
+#endif
+ if(!buildKafkaNodeFromNode(node))
+ emit loadingError(node);
+ node = node->nextSibling();
+ }
+
+ //post process the DOM::Node Tree by adding Empty TEXT so that the cursor can go
+ //everywhere the user wants.
+ domNode = m_kafkaPart->document();
+ goUp = false;
+ while(!domNode.isNull())
+ {
+ mainEnhancer->postEnhanceNode(domNode);
+ domNode = kafkaCommon::getNextDomNode(domNode, goUp);
+ }
+
+ m_kafkaPart->putCursorAtFirstAvailableLocation();
+ _docLoaded = true;
+
+ //Avoid moving objects...
+ m_kafkaPart->stopAnimations();
+
+ m_currentDoc->docUndoRedo->kafkaLoaded();
+ emit loaded();
+
+ m_currentDoc->docUndoRedo->syncKafkaCursorAndSelection(0);
+ //m_kafkaPart->document().updateRendering();
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::loadDocument() in " << t.elapsed() << " ms only!" << endl;
+#endif
+#ifdef HEAVY_DEBUG
+ kafkaCommon::coutDomTree(m_kafkaPart->document(), 2);
+ coutLinkTree(baseNode, 2);
+#endif
+}
+
+void KafkaDocument::unloadDocument()
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::unloadDocument()" << endl;
+#endif
+ Node *node;
+
+ domNodeProps.clear();
+ //clean the kafkapart
+ while(m_kafkaPart->document().hasChildNodes())
+ m_kafkaPart->document().removeChild(m_kafkaPart->document().firstChild());
+ m_currentDoc = 0L;
+
+ html = body = head = DOM::Node();
+
+ _docLoaded = false;
+ node = baseNode;
+ while(node)
+ {
+ if(node->rootNode())
+ delete node->rootNode();
+ node->setRootNode(0L);
+ if(node->leafNode())
+ delete node->leafNode();
+ node->setLeafNode(0L);
+ node = node->nextSibling();
+ }
+ emit unloaded();
+}
+
+void KafkaDocument::reloadDocument()
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::reloadDocument()" << endl;
+#endif
+ Node *node;
+ int offsetX, offsetY;
+
+ offsetX = m_kafkaPart->view()->contentsX();
+ offsetY = m_kafkaPart->view()->contentsY();
+
+ m_kafkaPart->closeURL();
+
+ if(!_docLoaded)
+ return;
+
+ domNodeProps.clear();
+ while(m_kafkaPart->document().hasChildNodes())
+ m_kafkaPart->document().removeChild(m_kafkaPart->document().firstChild());
+ node = baseNode;
+ while(node)
+ {
+ if(node->rootNode())
+ delete node->rootNode();
+ node->setRootNode(0L);
+ if(node->leafNode())
+ delete node->leafNode();
+ node->setLeafNode(0L);
+ node = node->nextSibling();
+ }
+
+ /**KParts::URLArgs args(false, offsetX, offsetY);
+ (static_cast<KParts::BrowserExtension *>(((KParts::ReadOnlyPart *)m_kafkaPart)->child( 0L,
+ "KParts::BrowserExtension" )))->setURLArgs( args );*/
+
+ loadDocument(m_currentDoc);
+
+ //m_kafkaPart->view()->setContentsPos(offsetX, offsetY);
+}
+
+kNodeAttrs *KafkaDocument::getAttrs(DOM::Node _domNode)
+{
+ return domNodeProps[_domNode.handle()];
+}
+
+
+Node *KafkaDocument::getNode(DOM::Node _domNode)
+{
+ if(_domNode.isNull() || _domNode.nodeName().string() == "#document")
+ {
+ kdDebug(25001)<< "KafkaDocument::getNode() - Bad Node given" <<
+ endl;
+ return 0L;
+ }
+ kNodeAttrs *props = domNodeProps[_domNode.handle()];
+ if(!props)
+ {
+ kdDebug(25001)<< "KafkaDocument::getNode() -" <<
+ " Corresponding Node not Found!!!" << endl;
+ return 0L;
+ }
+ return props->getNode();
+}
+
+kNodeAttrs* KafkaDocument::connectDomNodeToQuantaNode(DOM::Node domNode, Node *node)
+{
+ QString name;
+ kNodeAttrs *props;
+
+ if(domNode.isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::connectDomNodeToQuantaNode()" <<
+ " - WARNING empty DOM::Node" << endl;
+#endif
+ }
+ /**qtag = QuantaCommon::tagFromDTD(m_currentDoc->defaultDTD(),
+ _domNode.nodeName().string());*/
+ else
+ name = domNode.nodeName().string().lower();
+
+// kdDebug(25001) << "KafkaDocument::connectDomNodeToQuantaNode() - domNode name: |" << name << "|" << endl;
+
+ props = new kNodeAttrs();
+
+ //We can split Nodes into several groups essentially for the deletion behavior:
+ //1- Text
+ //2- Block in which the cursor can't enter in when deleting e.g. TABLE, IMG
+ //3- Block in which the cursor can't escape from e.g. TD, BODY
+ //4- Block in which the cursor can enter in/escape from when deleting e.g. H1, DIV
+ //5- Inline
+ //6- "Invisible" Nodes e.g. HTML, HEAD
+
+ //Hmmm... I guess we can do better here...
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ props->setCHCursorFocus(kNodeAttrs::textNode);
+ props->setCCEnter(true);
+ props->setCBModified(true);
+ props->setCBDeleted(true);
+ }
+ else if(name == "abbr" || name == "acronym" || name == "address" || name == "b" || name == "bdo" ||
+ name == "big" || name == "cite" || name == "code" ||
+ name == "del" || name == "dfn" || name == "dir" ||
+ name == "em" || name == "fieldset" || name == "font" || name == "i" || name == "iframe" ||
+ name == "ins" || name == "kbd" || name == "label" || name == "legend" || name == "menu" ||
+ name == "noframes" || name == "pre" || name == "s" || name == "samp" ||
+ name == "small" || name == "span" || name == "strike" || name == "strong" || name == "sub" ||
+ name == "sup" || name == "tt" || name == "u" || name == "var" || name == "a" ||
+ name == "blockquote" ||
+ name == "em" || name == "form" || name == "ins" ||
+ name == "q" || name == "tt" )
+ {
+ props->setCHCursorFocus(kNodeAttrs::inlineNode);
+ props->setCCEnter(true);
+ props->setCBModified(true);
+ props->setCBDeleted(true);
+ }
+ else if(name == "center" || name == "li" || name == "h1" || name == "h2" || name == "h3" ||
+ name == "h4" || name == "h5" || name == "h6" || name == "div" || name == "dd" ||
+ name == "dt" || name == "p")
+ {
+ props->setCHCursorFocus(kNodeAttrs::blockNode);
+ props->setCCEnter(true);
+ props->setCBModified(true);
+ props->setCBDeleted(true);
+ }
+ else if(name == "applet" || name == "button" || name == "img" || name == "map" || name == "object" ||
+ name == "hr" || name == "input" || name == "select" || name == "table" || name == "textarea" ||
+ name == "br" || name == "dl" || name == "ul" || name == "ol")
+ {
+ props->setCHCursorFocus(kNodeAttrs::singleNodeAndItself);
+ props->setCCEnter(false);
+ props->setCBModified(true);
+ props->setCBDeleted(true);
+ }
+ else if(name == "basefont" || name == "location" || name == "fieldset" || name == "noscript" ||
+ name == "script")
+ {
+ props->setCHCursorFocus(kNodeAttrs::no);
+ props->setCCEnter(false);
+ props->setCBModified(true);
+ props->setCBDeleted(true);
+ }
+ else if(name == "caption" || name == "frame" || name == "frameset" || name == "isindex" ||
+ name == "optgroup" || name == "param" || name == "title" || name == "area" || name == "base" ||
+ name == "body" || name == "col" || name == "colgroup" || name == "head" || name == "html" ||
+ name == "link" || name == "meta" || name == "option" || name == "style" || name == "tbody" ||
+ name == "td" || name == "tfoot" || name == "th" || name == "thead" || name == "tr")
+ {
+ props->setCHCursorFocus(kNodeAttrs::no);
+ props->setCCEnter(false);
+ props->setCBModified(false);
+ props->setCBDeleted(false);
+ }
+ else
+ {
+ kdDebug(25001)<< "KafkaDocument::connectDomNodeToQuantaNode () - " <<
+ "No QTag found! Setting default parameters..." << endl;
+ props->setCHCursorFocus(kNodeAttrs::no);
+ props->setCCEnter(false);
+ props->setCBModified(false);
+ props->setCBDeleted(false);
+ }
+
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "KafkaDocument::connectDomNodeToQuantaNode() - tag name :" <<
+ name << " canBeDeleted:" << props->cbDel() << " canBeModified:" <<
+ props->cbMod() << " canHaveCursorFocus:" << props->chCurFoc() <<
+ " cursorCanEnter:" << props->ccanEnter() << endl;
+#endif
+ props->setNode(node);
+ props->setDomNode(domNode);
+ domNodeProps.insert(domNode.handle(), props);
+
+ return props;
+}
+
+void KafkaDocument::disconnectDomNodeFromQuantaNode(DOM::Node _domNode)
+{
+ if(_domNode.isNull())
+ return;
+ domNodeProps.remove(_domNode.handle());
+}
+
+void KafkaDocument::disconnectAllDomNodes()
+{
+ domNodeProps.clear();
+}
+
+void KafkaDocument::setCursorAndSelection(NodeSelectionInd *nodeSelection)
+{
+ bool cursorAtSelectionStart;
+ DOM::Node startDomNode, endDomNode, foo;
+ Node *startNode, *endNode;
+ long startOffset, endOffset;
+
+ cursorAtSelectionStart = nodeSelection->cursorAtSelectionStart();
+ startNode = kafkaCommon::getNodeFromLocation(nodeSelection->cursorNode());
+ endNode = kafkaCommon::getNodeFromLocation(nodeSelection->cursorNodeEndSel());
+
+ if(startNode && startNode->rootNode())
+ startDomNode = *(startNode->rootNode());
+ if(endNode && endNode->rootNode())
+ endDomNode = *(endNode->rootNode());
+ translateNodeIntoKafkaCursorPosition(startNode, nodeSelection->cursorOffset(), foo, startOffset);
+ translateNodeIntoKafkaCursorPosition(endNode, nodeSelection->cursorOffsetEndSel(), foo, endOffset);
+
+
+ if(cursorAtSelectionStart && !startDomNode.isNull())
+ {
+ m_kafkaPart->setCurrentNode(startDomNode, startOffset);
+ }
+ else if(!cursorAtSelectionStart && !endDomNode.isNull())
+ {
+ m_kafkaPart->setCurrentNode(endDomNode, endOffset);
+ }
+
+ if(!startDomNode.isNull() && !endDomNode.isNull())
+ m_kafkaPart->setSelection(DOM::Range(startDomNode, (long)startOffset, endDomNode, (long)endOffset));
+}
+
+void KafkaDocument::setCursor(Node* cursorNode, int cursorOffset)
+{
+ DOM::Node domNode;
+ long longDomNodeOffset;
+ translateNodeIntoKafkaCursorPosition(cursorNode, cursorOffset, domNode, longDomNodeOffset);
+ if (!domNode.isNull() && domNode.nodeType() != DOM::Node::TEXT_NODE &&
+ !domNode.firstChild().isNull() && domNode.firstChild().nodeType() == DOM::Node::TEXT_NODE)
+ domNode = domNode.firstChild();
+ if (!domNode.isNull())
+ m_kafkaPart->setCurrentNode(domNode, (int)longDomNodeOffset);
+}
+
+bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
+{
+#ifdef LIGHT_DEBUG
+ if(node)
+ kdDebug(25001)<< "KafkaDocument::buildKafkaNodeFromNode() " << endl;
+#endif
+ DOM::Node newNode, newNode2, attr, nextNode, parentNode, *ptDomNode;
+ bool removeLeftWhitespaces, removeRightWhitespaces;
+ QString str, nodeValue;
+ Node *n, *parent;
+ int i;
+
+// Don't create DOM::Nodes from Quanta empty nodes outside the body or inside other not allowed element, or KHTML
+// will give us problems.
+ bool canInsertEmptyNode = false;
+ if(node->tag->type == Tag::Empty)
+ {
+ if(!m_currentDoc->defaultDTD()->name.contains("HTML", false))
+ canInsertEmptyNode = true;
+ else
+ canInsertEmptyNode = kafkaCommon::hasParent(node, "body");
+
+ Node* parent_node = node->parent;
+ QTag* parent_node_description_tag = QuantaCommon::tagFromDTD(parent_node);
+ if(parent_node_description_tag && !parent_node_description_tag->isChild(node, false, true))
+ canInsertEmptyNode = false;
+ }
+
+ if(node->tag->type == Tag::XmlTag ||
+ ((node->tag->type == Tag::Text || (node->tag->type == Tag::Empty && canInsertEmptyNode)) && !node->insideSpecial))
+ {
+ str = node->tag->name.lower();
+
+ //The basics DOM::Nodes HTML, HEAD and BODY are loaded anyway, but we must now
+ // link the real HTML,... to their Nodes.
+ //A basic Common tree is !doctype<-html<-(head, body)
+ if(!node->parent)
+ {//FIXME:html, head and body are HTML-specific tag, for others DTDs it might result to some pbs.
+ if(str == "html")
+ {
+ if(!html.isNull())//delete the empty Node
+ disconnectDomNodeFromQuantaNode(html);
+ newNode = html;
+ insertNode = false;
+ }
+ else if(str == "body")
+ {
+ if(!body.isNull())
+ disconnectDomNodeFromQuantaNode(body);
+ newNode = body;
+ insertNode = false;
+ }
+ else if(str == "head")
+ {
+ if(!head.isNull())
+ disconnectDomNodeFromQuantaNode(head);
+ newNode = head;
+ insertNode = false;
+ }
+ else
+ {
+ if(node->tag->type == Tag::Text || node->tag->type == Tag::Empty)
+ {
+ newNode = kafkaCommon::createTextDomNode("", m_kafkaPart->document());
+ }
+ else
+ {
+ newNode = kafkaCommon::createDomNode(node, m_kafkaPart->document());
+ }
+ }
+ }
+ else if(str == "html" && (!node->parent || (node->parent && !node->parent->parent)))
+ {
+ if(!html.isNull())//delete the empty Node
+ disconnectDomNodeFromQuantaNode(html);
+ newNode = html;
+ insertNode = false;
+ }
+ else if(str == "body" && ((node->parent && !node->parent->parent) || (node->parent &&
+ node->parent->parent && !node->parent->parent->parent)))
+ {
+ if(!body.isNull())
+ disconnectDomNodeFromQuantaNode(body);
+ newNode = body;
+ insertNode = false;
+ }
+ else if(str == "head" && ((node->parent && !node->parent->parent) || (node->parent &&
+ node->parent->parent && !node->parent->parent->parent)))
+ {
+ if(!head.isNull())
+ disconnectDomNodeFromQuantaNode(head);
+ newNode = head;
+ insertNode = false;
+ }
+ /** else if(node->parent->tag->str == "html")*/
+ else
+ {
+ if(node->tag->type == Tag::Text || node->tag->type == Tag::Empty)
+ {
+ newNode = kafkaCommon::createTextDomNode("", m_kafkaPart->document());
+ }
+ else
+ {
+ newNode = kafkaCommon::createDomNode(node->tag->name, m_currentDoc->defaultDTD(),
+ m_kafkaPart->document());
+ }
+ }
+
+ if(newNode.isNull())
+ {
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::buildKafkaNodeFromNode() - ERROR null newNode" << endl;
+#endif
+ return false;
+ }
+
+ connectDomNodeToQuantaNode(newNode, node);
+ if(node->tag->type == Tag::Text || node->tag->type == Tag::Empty)
+ {
+ //Now we get if the whitespaces at the left and right are kept or not.
+ //Left whitespaces are removed if:
+ //- It is the first child of a BLOCK
+ //- Previous Node(skipping inlines) is a text with spaces at the end
+ //Right whitespaces are removed if:
+ //- It is the last child of a BLOCK
+ removeLeftWhitespaces = false;
+ n = node;
+ parent = node->parent;
+ while(parent && parent->SFirstChild() == n)
+ {
+ if(!kafkaCommon::isInline(parent->tag->name))
+ {
+ removeLeftWhitespaces = true;
+ break;
+ }
+ n = parent;
+ parent = parent->parent;
+ }
+ if(!removeLeftWhitespaces)
+ {
+ n = node;
+ n = kafkaCommon::getPrevNodeNE(n);
+ while(n && (n->tag->type == Tag::XmlTagEnd ||
+ (n->tag->type == Tag::XmlTag && kafkaCommon::isInline(n->tag->name) &&
+ !n->tag->single)))
+ n = kafkaCommon::getPrevNodeNE(n);
+ if(n && n->tag->type == Tag::Text)
+ {
+ nodeValue = n->tag->tagStr();
+ if(nodeValue.length() > 0 && nodeValue[nodeValue.length() - 1].isSpace())
+ removeLeftWhitespaces = true;
+ }
+
+ }
+
+ removeRightWhitespaces = false;
+ n = node;
+ parent = node->parent;
+ while(parent && parent->SLastChild() == n)
+ {
+ if(!kafkaCommon::isInline(parent->tag->name))
+ {
+ removeRightWhitespaces = true;
+ break;
+ }
+ n = parent;
+ parent = parent->parent;
+ }
+
+ nodeValue = node->tag->tagStr();
+ nodeValue = getDecodedText(nodeValue, !kafkaCommon::hasParent(node, "pre"),
+ removeLeftWhitespaces, removeRightWhitespaces);
+ newNode.setNodeValue(nodeValue);
+ }
+
+ for(i = 0; i < node->tag->attrCount(); i++)
+ {
+ attr = kafkaCommon::createDomNodeAttribute(node, node->tag->attribute(i),
+ m_kafkaPart->document());
+ if(!attr.isNull())
+ {
+ //TODO: create a createAttr function and add this (setNodeValue sometimes
+ //don't like null QString)
+ if(!node->tag->attributeValue(i).isNull())
+ attr.setNodeValue(node->tag->attributeValue(i));
+ kafkaCommon::insertDomNodeAttribute(newNode, attr);
+ }
+ }
+
+ if(node->next && node->next->tag && node->next->tag->name ==
+ ("/" + node->tag->name))
+ {
+ //DEPRECATED, NO USE TO CHANGE THE above check
+ node->_closingNode = node->next;
+ }
+
+ if(insertNode)
+ {
+ ptDomNode = new DOM::Node(newNode);
+ node->setRootNode(ptDomNode);
+ n = node;
+ while(n->next)
+ {
+ n = n->next;
+ if(n->rootNode())
+ {
+ nextNode = *n->rootNode();
+ break;
+ }
+ }
+ if(node->parent && node->parent->leafNode())
+ parentNode = *node->parent->leafNode();
+ else if(node->parent && !node->parent->leafNode())
+ {
+ //the parent tag was invalid and khtml refuse to insert it
+ //so impossible to inser the current node
+ disconnectDomNodeFromQuantaNode(newNode);
+ if(node->rootNode())
+ delete node->rootNode();
+ node->setRootNode(0L);
+ return false;
+ }
+ else
+ parentNode = body;
+
+ //Set the visual enhancements.
+ ptDomNode = new DOM::Node(newNode);
+ node->setLeafNode(ptDomNode);
+ mainEnhancer->enhanceNode(node, parentNode, nextNode);
+
+ QTag* qTag = QuantaCommon::tagFromDTD(getCurrentDoc()->defaultDTD(),
+ parentNode.nodeName().string());
+
+ if(qTag && qTag->isChild(node, false))
+ {
+
+ if(nextNode.isNull())
+ {
+ if(!kafkaCommon::insertDomNode(newNode, parentNode))
+ {
+ disconnectDomNodeFromQuantaNode(newNode);
+ if(node->rootNode())
+ delete node->rootNode();
+ node->setRootNode(0L);
+ return false;
+ }
+ }
+ else
+ {
+ if(!kafkaCommon::insertDomNode(newNode, parentNode, nextNode))
+ {
+ disconnectDomNodeFromQuantaNode(newNode);
+ if(node->rootNode())
+ delete node->rootNode();
+ node->setRootNode(0L);
+ return false;
+ }
+ }
+ }
+ }
+ else
+ {
+ ptDomNode = new DOM::Node(newNode);
+ node->setRootNode(ptDomNode);
+ ptDomNode = new DOM::Node(newNode);
+ node->setLeafNode(ptDomNode);
+ }
+ }
+ else
+ {
+ if(node->parent && node->parent->leafNode())
+ parentNode = *node->parent->leafNode();
+ else
+ parentNode = body;
+ n = node;
+ while(n->next)
+ {
+ n = n->next;
+ if(n->rootNode())
+ {
+ nextNode = *n->rootNode();
+ break;
+ }
+ }
+ mainEnhancer->enhanceNode(node, parentNode, nextNode);
+ }
+ return true;
+}
+
+void KafkaDocument::buildNodeFromKafkaNode(Node *node, DOM::Node domNode)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "void KafkaDocument::buildNodeFromKafkaNode() - Node* DOM::Node" << endl;
+#endif
+ long i;
+
+ if(!node) return;
+
+ node->tag->setCleanStrBuilt(false);
+ node->tag->setIndentationDone(false);
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ QString text = domNode.nodeValue().string();
+ text.replace("<", "&lt;");
+ text.replace(">", "&gt;");
+ node->tag->setStr(text);
+ }
+ else
+ {
+ while(node->tag->attrCount())
+ node->tag->deleteAttribute(0);
+ for(i = 0; (unsigned)i < domNode.attributes().length(); i++)
+ {
+ TagAttr attr;
+ attr.name = domNode.attributes().item(i).nodeName().string();
+ attr.value = domNode.attributes().item(i).nodeValue().string();
+ attr.quoted = true;
+ node->tag->addAttribute(attr);
+ }
+ }
+}
+
+Node * KafkaDocument::buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent,
+ Node *beginNode, int beginOffset, Node */*endNode*/, int endOffset, NodeModifsSet *modifs)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "Node* KafkaDocument::buildNodeFromKafkaNode() - DOM::Node 2xNode* int: " <<
+ beginOffset << " Node* int: " << endOffset << " NodeModifsSet " << endl;
+#else
+ Q_UNUSED(beginOffset);
+ Q_UNUSED(endOffset);
+#endif
+ DOM::Node *ptDomNode;
+ Node *node;
+
+ if(domNode.isNull())
+ {
+ kdDebug(25001)<< "Node* KafkaDocument::buildNodeFromKafkaNode(DOM::Node, 2xNode*)" <<
+ " *ERROR* - empty _domNode"<< endl;
+ }
+
+ //nodeParent can be the false body node which is not in the tree.
+ if(nodeParent->tag->notInTree())
+ nodeParent = 0L;
+
+ /**_node = new Node(_nodeParent);*/
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE)
+ {
+ node = kafkaCommon::createNode("#text", "",Tag::Text, m_currentDoc);
+ }
+ else
+ {
+ node = kafkaCommon::createNode(domNode.nodeName().string(), "",
+ Tag::XmlTag, m_currentDoc);
+ }
+ buildNodeFromKafkaNode(node, domNode);
+
+ connectDomNodeToQuantaNode(domNode, node);
+
+ ptDomNode = new DOM::Node(domNode);
+ node->setRootNode(ptDomNode);
+ ptDomNode = new DOM::Node(domNode);
+ node->setLeafNode(ptDomNode);
+
+ kafkaCommon::insertNode(node, nodeParent, beginNode, beginNode, modifs, false);
+
+ return node;
+}
+
+QString KafkaDocument::getDecodedChar(const QString &encodedChar)
+{
+ QMap<QString, QString>::Iterator it = encodedChars.find(encodedChar);
+ if(it == encodedChars.end())
+ {
+ //try this
+ return KGlobal::charsets()->resolveEntities(encodedChar);;
+ }
+ return it.data();
+}
+
+QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
+ bool removeLeftWhitespaces, bool removeRightWhitespaces)
+{
+ QString encodedText = a_encodedText;
+ if (encodedText.isEmpty())
+ encodedText = " ";
+ QString decodedChar;
+ int i, j;
+#ifdef LIGHT_DEBUG
+ QString oldEncodedText = encodedText;
+#endif
+
+ i = -1;
+ while((unsigned)++i < encodedText.length() && translateWhiteSpacesAndLineBreaks)
+ {
+ if(encodedText[i].isSpace())
+ {
+ encodedText.remove(i, 1);
+ encodedText.insert(i, " ");
+ while((unsigned)++i < encodedText.length() && encodedText[i].isSpace())
+ {
+ encodedText.remove(i, 1);
+ i--;
+ }
+ }
+ }
+ i = -1;
+ while((unsigned)++i < encodedText.length())
+ {
+ if(QString(encodedText[i]) == "&")
+ {
+ j = i;
+ while((unsigned)++i < encodedText.length() &&
+ QString(encodedText[i]) != ";")
+ {}
+ decodedChar = getDecodedChar(encodedText.mid(j, i - j + 1));
+ encodedText.remove(j, i - j + 1);
+ //TODO:set a special behavior if the encoded symbol doesn't exist
+ encodedText.insert(j, decodedChar);
+ i = j + decodedChar.length() - 1;
+ }
+ }
+
+ if(translateWhiteSpacesAndLineBreaks && removeLeftWhitespaces && encodedText.length() > 0 &&
+ encodedText[0].isSpace())
+ encodedText.remove(0, 1);
+
+ if(translateWhiteSpacesAndLineBreaks && removeRightWhitespaces && encodedText.length() > 0 &&
+ encodedText[encodedText.length() - 1].isSpace())
+ encodedText.remove(encodedText.length() - 1, 1);
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::getDecodedText() - \"" << oldEncodedText << "\" -> \"" <<
+ encodedText << "\"" << endl;
+#endif
+ return encodedText;
+ //return KGlobal::charsets()->resolveEntities(encodedText); =>nice but not sufficient
+}
+
+QString KafkaDocument::getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar)
+{
+ if(decodedChar[0].isSpace() && !previousDecodedChar[0].isSpace())
+ return " ";
+ else if(decodedChar[0].isSpace())
+ //FIXME:for an unknown reason, by default it return &iquest; instead of &nbsp;
+ return "&nbsp;";
+ QMap<QString, QString>::Iterator it = decodedChars.find(decodedChar);
+ if(it == decodedChars.end())
+ return decodedChar;
+
+ return it.data();
+ }
+
+QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
+ bool translateWhiteSpaces)
+{
+ QString decodedText = a_decodedText;
+ QString Encodedchar;
+ QString decodedChar, previousDecodedChar;
+#ifdef LIGHT_DEBUG
+ QString oldDecodedText = decodedText;
+#endif
+ int i;
+#ifdef LIGHT_DEBUG
+ int _bLine = bLine, _bCol = bCol;
+#endif
+
+ i = -1;
+ while((unsigned)++i < decodedText.length())
+ {
+ previousDecodedChar = decodedChar;
+ decodedChar = QString(decodedText[i]);
+
+ if(translateWhiteSpaces || !decodedText[i].isSpace())
+ Encodedchar = getEncodedChar(QString(decodedText[i]),
+ (i>=1)?previousDecodedChar:QString(""));
+ else
+ Encodedchar = decodedChar;
+ bCol += Encodedchar.length();
+
+ decodedText.remove(i,1);
+ decodedText.insert(i, Encodedchar);
+ i += Encodedchar.length() - 1;
+ }
+ eLine = bLine;
+ eCol = bCol - 1;
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::getEncodedText() - " << oldDecodedText << " -> " << decodedText <<
+ " - " << _bLine << ":" << _bCol << " - " << eLine << ":" << eCol << endl;
+#endif
+ return decodedText;
+}
+
+QString KafkaDocument::getEncodedText(const QString& decodedText)
+{
+ int a = 0, b = 0, c, d;
+ return getEncodedText(decodedText, a, b, c, d);
+}
+
+QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
+{
+ QString text, _char;
+ Node *openingNode;
+ int bLineAttr, bColAttr;
+ int j = 0;
+ bool hasPreParent;
+
+ if(!node) return "";
+
+ if(node->tag->type == Tag::XmlTag)
+ {
+ text = "<" + QuantaCommon::tagCase(node->tag->name);
+ bCol += node->tag->name.length() + 1;
+ for(j = 0; j < node->tag->attrCount(); j++)
+ {
+ text += " ";
+ bCol++;
+ bLineAttr = bLine;
+ bColAttr = bCol;
+ text += node->tag->attribute(j);
+ bCol += node->tag->attribute(j).length();
+
+ //doctype have only attrNames.
+ if(node->tag->name.lower() != "!doctype" && !node->tag->getAttribute(j).special)
+ {
+ text += "=";
+ bCol++;
+ if(node->tag->isQuotedAttribute(j))
+ {
+ text += qConfig.attrValueQuotation;
+ bCol++;
+ }
+ node->tag->setAttributePosition(j, bLineAttr, bColAttr, bLine, bCol);
+ text += node->tag->attributeValue(j);
+ bCol += node->tag->attributeValue(j).length();
+ if(node->tag->isQuotedAttribute(j))
+ {
+ text += qConfig.attrValueQuotation;
+ bCol++;
+ }
+ }
+ else
+ node->tag->setAttributePosition(j, bLineAttr, bColAttr, -2, -2);
+ }
+
+ //only single Nodes except !doctype and ?xml nodes in XML tag style get the "/"
+ if ( node->tag->dtd()->singleTagStyle == "xml" &&
+ (node->tag->single || (!qConfig.closeOptionalTags &&
+ QuantaCommon::isOptionalTag(node->tag->dtd()->name, node->tag->name)))
+ && node->tag->name.lower() != "?xml" && node->tag->name.lower() != "!doctype")
+ {
+ text += " /";
+ bCol += 2;
+ }
+ //?xml nodes get a "?"
+ if(node->tag->name.lower() == "?xml")
+ {
+ text += "?";
+ bCol++;
+ }
+
+ text += ">";
+ eCol = bCol;
+ eLine = bLine;
+ }
+ else if(node->tag->type == Tag::XmlTagEnd)
+ {
+ openingNode = node->getOpeningNode();
+ if(openingNode && openingNode->tag->type == Tag::ScriptTag)
+ {
+ if(openingNode->tag->name.contains("XML PI", false) ||
+ openingNode->tag->name.contains("PHP", false))
+ text = "?>";
+ else if(openingNode->tag->name.contains("DTD", false))
+ text = ">";
+ else
+ text = ">";
+ }
+ else
+ {
+ if (node->tag->tagStr() == "-->")
+ text = "-->";
+ else
+ text = "<" + QuantaCommon::tagCase(node->tag->name) + ">";
+ }
+ bCol += text.length();
+ eCol = bCol - 1;
+ eLine = bLine;
+ }
+ else if(node->tag->type == Tag::Text)
+ {
+ hasPreParent = kafkaCommon::hasParent(node, "pre");
+ if(encodeText)
+ text = getEncodedText(node->tag->tagStr(), bLine, bCol, eLine, eCol,
+ !hasPreParent);
+ /** Can't use KGlobal::charsets()->toEntity() :
+ * It translate all chars into entities! */
+ else if(!hasPreParent)
+ text = node->tag->tagStr().replace(QRegExp("\\s+"), " ");
+ else
+ text = node->tag->tagStr();
+ }
+ else if(node->tag->type == Tag::ScriptTag)
+ {
+ //WARNING : HTML SPECIFIC
+ if(node->tag->name.contains("style", false))
+ {
+ text = "<" + QuantaCommon::tagCase("style") + ">";
+ }
+ else if(node->tag->name.contains("DTD", false))
+ {
+ text = "<!";
+ }
+ else if(node->tag->name.contains("XML PI", false))
+ {
+ text = "<?xml";
+ }
+ else if(node->tag->name.contains("PHP", false))
+ {
+ text = "<?php";
+ }
+ bCol += text.length();
+ eCol = bCol - 1;
+ eLine = bLine;
+ }
+ else
+ {
+ //default behavior : return node->tag->tagStr()
+ text = node->tag->tagStr();
+ kafkaCommon::getEndPosition(text, bLine, bCol, eLine, eCol);
+ }
+ return text;
+}
+
+void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint curCol, DOM::Node &domNode, long &offset)
+{
+ Node *node;
+ int bCol, bLine, eCol, eLine, col, line;
+ QString curChar, decodedChar, currentLine;
+ bool lookForEntity, lookForSpaces, found;
+
+ node = baseNode;
+ while(node)
+ {
+ node->tag->beginPos(bLine, bCol);
+ node->tag->endPos(eLine, eCol);
+ if((bLine < (signed)curLine || (bLine == (signed)curLine && bCol <= (signed)curCol)) &&
+ (eLine > (signed)curLine || (eLine == (signed)curLine && eCol >= (signed)curCol)))
+ {
+ if(bLine == (signed)curLine && bCol == (signed)curCol && node->tag->type != Tag::Text &&
+ node->previousSibling() && node->previousSibling()->tag->type == Tag::Text)
+ {
+ //if we are at the end of a text which is recognized as the beginning of the next tag
+ node = node->previousSibling();
+ //we can go directly to the last offset
+ if(!node->rootNode())
+ {
+ offset = 0;
+ kdDebug(25001)<< "KafkaDocument::getKafkaCursorPosition() - ERROR DOM::Node not found"
+ << endl;
+ return;
+ }
+ domNode = *node->rootNode();
+ offset = domNode.nodeValue().string().length();
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::getKafkaCursorPosition() - " <<
+ domNode.nodeName().string() << ":" << offset << endl;
+#endif
+ return;
+ }
+ col = bCol;
+ line = bLine;
+ break;
+ }
+ node = node->nextSibling();
+
+ }
+ if(!node)
+ {
+ kdDebug(25001)<< "KafkaDocument::getKafkaCursorPosition() - ERROR node not found" << endl;
+ return;
+ }
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::getKafkaCursorPosition() - node :" << node->tag->name << ": type:" <<
+ node->tag->type << ": pos " << bLine << ":" << bCol << " - " << eLine << ":" << eCol << endl;
+#endif
+
+ offset = 0;
+ if(node->rootNode() && node->rootNode()->nodeType() == DOM::Node::TEXT_NODE)
+ {
+ domNode = *node->rootNode();
+ currentLine = m_currentDoc->editIf->textLine(line);
+ if(line < eLine)
+ currentLine += " ";//remplace the \n
+ while(line < (signed)curLine || (col < (signed)curCol && line == (signed)curLine))
+ {
+ lookForEntity = false;
+ lookForSpaces = false;
+ curChar = currentLine.mid(col, 1);
+ if(curChar == "&")
+ lookForEntity = true;
+ else if(curChar[0].isSpace())
+ lookForSpaces = true;
+ found = false;
+ while(!found)
+ {
+ if((lookForEntity && curChar == ";") ||
+ !(lookForSpaces || lookForEntity))
+ found = true;
+ else if(lookForSpaces && !curChar[0].isSpace())//curChar != " ")
+ break;
+ if((col + 1) >= (signed)currentLine.length())
+ {
+ line++;
+ col = 0;
+ currentLine = m_currentDoc->editIf->textLine(line);
+ if(line < eLine)
+ currentLine += " ";//remplace the \n
+ }
+ else col++;
+ curChar = currentLine.mid(col, 1);
+ }
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "endpos at " << line << ":" << col << endl;
+#endif
+ offset++;
+ }
+ }
+ else if(node->rootNode())
+ offset = 0;//shoud we select?
+ else
+ m_kafkaPart->putCursorAtFirstAvailableLocation();//set the cursor in the first text
+#ifdef LIGHT_DEBUG
+ if(!domNode.isNull())
+ kdDebug(25001)<< "KafkaDocument::getKafkaCursorPosition() - " << domNode.nodeName().string() <<
+ ":" << offset << endl;
+ else
+ kdDebug(25001)<< "KafkaDocument::getKafkaCursorPosition() - NULL domNode" << endl;
+#endif
+}
+
+void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, Node **node, long &offset)
+{
+ int curCol, curLine, beginCol, beginLine;
+ QString currentLine;
+
+ *node = parser->nodeAt(line, col, false);
+
+ offset = 0;
+ if(!*node)
+ return;
+
+ if((*node)->tag->cleanStrBuilt() && (*node)->tag->indentationDone())
+ {
+ (*node)->tag->beginPos(beginLine, beginCol);
+ curLine = beginLine;
+ curCol = beginCol;
+ while(curLine < (signed)line)
+ {
+ currentLine = ViewManager::ref()->activeDocument()->editIf->textLine(curLine);
+ if(curLine == beginLine)
+ offset += (signed)currentLine.length() - beginCol;
+ else
+ offset += (signed)currentLine.length();
+ offset++;
+ curLine++;
+ }
+ if(beginLine != (signed)line)
+ offset += col;
+ else
+ offset += col - beginCol;
+ }
+ else
+ {
+ //TODO
+ }
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::translateQuantaIntoNodeCursorPosition() - " << *node <<
+ ":" << offset << endl;
+#endif
+}
+
+void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long domNodeOffset, Node **node, long &offset)
+{
+ QString decodedText, encodedChar, encodedText, currentChar;
+ QChar curChar, oldChar;
+ long currentOffset;
+ bool waitForSpace = false, found = false;
+ int curNodeOffset, bLine = 0, bCol = 0, eLine, eCol;
+
+ offset = 0;
+ (*node) = 0L;
+
+ if(domNode.isNull())
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "KafkaDocument::translateKafkaIntoNodeCursorPosition()" <<
+ " - DOM::Node not found!" << endl;
+#endif
+ return ;
+ }
+
+ //get the corresponding Node*
+ (*node) = getNode(domNode);
+ if(!(*node))
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "KafkaDocument::translateKafkaIntoNodeCursorPosition()" <<
+ " - Node not found!" << endl;
+#endif
+ return ;
+ }
+ if(!(*node)->tag)
+ {
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "KafkaDocument::translateKafkaIntoNodeCursorPosition()" <<
+ " - Node tag not found!" << endl;
+#endif
+ (*node) = 0L;
+ return ;
+ }
+
+ //If this node is selected (-1 means selected) then return "node selected" ;-)
+ if(domNodeOffset == -1)
+ {
+ return ;
+ }
+
+ if(!(*node)->tag->cleanStrBuilt())
+ {
+ //We NEED to have the up-to-date string in node.
+ (*node)->tag->setStr(generateCodeFromNode((*node), bLine, bCol, eLine, eCol));
+ //FIXME we shouldn't set it but if we don't the text will be re-encoded!
+ (*node)->tag->setCleanStrBuilt(true);
+ }
+
+ decodedText = domNode.nodeValue().string();
+ encodedText = (*node)->tag->tagStr();
+ currentOffset = domNodeOffset;
+ curNodeOffset = 0;
+
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "KafkaDocument::translateKafkaIntoNodeCursorPosition() - decodedText:"<<
+ decodedText << ": encoded text:" << encodedText << ":" << endl;
+#endif
+
+ if((*node)->tag->type == Tag::Text)
+ {
+ while(currentOffset > 0)
+ {
+ curChar = decodedText.at(domNodeOffset - currentOffset);
+#ifdef HEAVY_DEBUG
+ //kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" <<
+ // QString(oldChar) << endl;
+#endif
+ encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ if(encodedChar == "&nbsp;")
+ encodedChar = " ";
+ found = false;
+ waitForSpace = false;
+ while(!found)
+ {
+#ifdef HEAVY_DEBUG
+ //kdDebug(25001)<< "look 4 :" << encodedChar << ": found :" <<
+ // encodedText.mid(curNodeOffset, encodedChar.length()) << endl;
+#endif
+ if(encodedChar != " " && encodedChar == encodedText.mid(curNodeOffset,
+ encodedChar.length()))
+ found = true;
+ else if(encodedChar == " " && encodedText.mid(curNodeOffset, 1).at(0).isSpace())
+ waitForSpace = true;
+ else if(waitForSpace)
+ break;//no more spaces
+ else if(encodedChar == " " && encodedText.mid(curNodeOffset, 6) == "&nbsp;")
+ {
+ encodedChar = "&nbsp;";
+ found = true;
+ }
+
+ if(curNodeOffset > (signed)encodedText.length() || encodedChar.isEmpty())
+ {
+ //The good nodeOffset was not found. Returns a default value.
+ //encodedChar.isEmpty() -->prevent an infinite loop
+ curNodeOffset = 0;
+ break;
+ }
+ else
+ curNodeOffset += encodedChar.length();
+ }
+ oldChar = curChar;
+ currentOffset--;
+ }
+ }
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<<"KafkaDocument::translateKafkaIntoNodeCursorPosition() - " <<
+ curNodeOffset << endl;
+#endif
+ offset = curNodeOffset;
+}
+
+void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDomNode, int offset, int &line, int &col)
+{
+ Node *_currentNode, *closingNode, *node;
+ kNodeAttrs *attrs;
+ QString decodedText, encodedChar, currentLine, currentChar;
+ QChar curChar, oldChar;
+ int currentOffset;
+ int curLine, curCol, endLine, endCol;
+ int i;
+ bool waitForSpace = false, found = false;
+ bool tagLeft = false, tagRight = false, tagMiddle = false;
+ bool specialBehavior = false;
+
+ //m_kafkaPart->getCurrentNode(_currentDomNode, offset);
+ currentOffset = offset;
+
+ if(_currentDomNode.isNull())
+ {
+ kdDebug(25001)<< "KafkaDocument::getQuantaCursorPosition() - DOM::Node not found!" << endl;
+ line = 0;
+ col = 0;
+ return;
+ }
+
+ attrs = getAttrs(_currentDomNode);
+ if(!attrs)
+ {
+ kdDebug(25001)<< "KafkaDocument::getQuantaCursorPosition() - Attrs not found!" << endl;
+ line = 0;
+ col = 0;
+ return;
+ }
+
+ //If the current DOM::Node has a special behavior (cf nodeproperties.h), get the nearest
+ //node which can get the focus!
+ if(attrs->specialBehavior() != kNodeAttrs::none)
+ {
+ specialBehavior = true;
+ if(attrs->specialBehavior() == kNodeAttrs::emptyTextSurroundingBlockElementAtTheLeft)
+ {
+ _currentDomNode = _currentDomNode.nextSibling();
+ //tagRight means to put the cursor at the left of the tag so that the cursor
+ //looks at its right place (otherwise as there is no Node for this DOM::Node,
+ //the cursor won't go anywhere!)
+ tagLeft = true;
+ }
+ else if(attrs->specialBehavior() == kNodeAttrs::emptyTextSurroundingBlockElementAtTheRight)
+ {
+ _currentDomNode = _currentDomNode.previousSibling();
+ tagRight = true;
+ }
+ else if(attrs->specialBehavior() == kNodeAttrs::emptyTextAsChildOfAChildlessElement)
+ {
+ _currentDomNode = _currentDomNode.parentNode();
+ tagMiddle = true;
+ }
+ attrs = getAttrs(_currentDomNode);
+ if(!attrs)
+ {
+ kdDebug(25001)<< "KafkaDocument::getQuantaCursorPosition() - Attrs not found!" << endl;
+ line = 0;
+ col = 0;
+ return;
+ }
+ }
+
+ _currentNode = attrs->getNode();
+ if(!_currentNode /* && attrs->specialBehavior() == kNodeAttrs::none -- Andras: what happens if _currentNode is null, but this part of the if is not true?*/)
+ {
+ kdDebug(25001)<< "KafkaDocument::getQuantaCursorPosition() - Node not found!" << endl;
+ line = 0;
+ col = 0;
+ return;
+ }
+
+ decodedText = _currentDomNode.nodeValue().string();
+ _currentNode->tag->beginPos(curLine, curCol);
+ _currentNode->tag->endPos(endLine, endCol);
+ currentLine = m_currentDoc->editIf->textLine(curLine);
+ if(curLine < endLine)
+ currentLine += " ";//remplace the \n
+
+ if(offset == -1)
+ {
+ if (m_currentDoc->selectionIf)
+ m_currentDoc->selectionIf->setSelection(curLine, curCol, endLine, endCol + 1);
+ line = endLine;
+ col = endCol + 1;
+ return;
+ }
+#ifdef HEAVY_DEBUG
+// kdDebug(25001)<< "KafkaDocument::getQuantaCursorPosition() - decodedText:"<< decodedText << ":" << endl;
+#endif
+ if(_currentNode->tag->type == Tag::Text)
+ {
+ while(currentOffset > 0)
+ {
+ curChar = decodedText[offset - currentOffset];
+#ifdef HEAVY_DEBUG
+// kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" << QString(oldChar) << endl;
+#endif
+ encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ if(encodedChar == "&nbsp;")
+ encodedChar = " ";
+ found = false;
+ waitForSpace = false;
+ while(!found)
+ {
+#ifdef HEAVY_DEBUG
+// kdDebug(25001)<< "look 4 :" << encodedChar << ": found :" <<
+// currentLine.mid(curCol, encodedChar.length()) << endl;
+// kdDebug(25001)<< "pos " << curLine << ":" << curCol << endl;
+// kdDebug(25001)<< "endPos " << endLine << ":" << endCol << endl;
+#endif
+ if(encodedChar != " " && encodedChar == currentLine.mid(curCol, encodedChar.length()))
+ found = true;
+ else if(encodedChar == " " && currentLine.mid(curCol, 1).at(0).isSpace())
+ waitForSpace = true;
+ else if(waitForSpace)
+ break;//no more spaces
+ else if(encodedChar == " " && currentLine.mid(curCol, 6) == "&nbsp;")
+ {
+ encodedChar = "&nbsp;";
+ found = true;
+ }
+ if((curCol > endCol && curLine == endLine) || curLine > endLine ||
+ encodedChar.length() == 0)
+ {
+ //encodedChar.length() == 0 =>prevent infinite loop
+ curLine = endLine;
+ curCol = endCol + 1;
+ currentOffset = 0;
+ break;
+ }
+ else if((curCol + encodedChar.length()) >= currentLine.length())
+ {
+ ++curLine;
+ curCol = 0;
+ currentLine = m_currentDoc->editIf->textLine(curLine);
+ if(curLine < endLine)
+ currentLine += " ";//remplace the \n
+ }
+ else
+ {
+ curCol += encodedChar.length();
+ }
+ }
+ oldChar = curChar;
+ --currentOffset;
+ }
+ }
+ else if(_currentNode->tag->type == Tag::XmlTag)
+ {
+ //If we are in the special case
+ if(specialBehavior)
+ {
+ if(tagLeft)
+ _currentNode->tag->beginPos(curLine, curCol);
+ else if(tagRight)
+ {
+ closingNode = _currentNode->getClosingNode();
+ if(closingNode)
+ closingNode->tag->endPos(curLine, curCol);
+ else
+ _currentNode->tag->endPos(curLine, curCol);
+ ++curCol;
+ }
+ else
+ {
+ _currentNode->tag->endPos(curLine, curCol);
+ ++curCol;
+ }
+ }
+ else
+ {
+ if(_currentNode->tag->single)
+ {
+ //The tag is single, there shouldn't be any (tag, x) location, but the old way
+ //was (tag,0) for left of the tag and (tag,1) for the right of the tag)
+
+ if(offset == 1)
+ {
+ _currentNode->tag->endPos(curLine, curCol);
+ curCol++;
+ }
+ else
+ _currentNode->tag->beginPos(curLine, curCol);
+ }
+ else
+ {
+ //The new way to define cursor position.
+ node = _currentNode->SFirstChild();
+ i = 1;
+ while(i < offset && node && node->SNext())
+ {
+ node = node->SNext();
+ ++i;
+ }
+ if(!node)
+ node = _currentNode;
+ if(offset == 0)
+ node->tag->beginPos(curLine, curCol);
+ else
+ {
+ closingNode = node->getClosingNode();
+ if(closingNode)
+ closingNode->tag->endPos(curLine, curCol);
+ else
+ node->tag->endPos(curLine, curCol);
+ ++curCol;
+ }
+ }
+ }
+ }
+
+ line = curLine;
+ col = curCol;
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<<"KafkaDocument::getQuantaCursorPosition() - " << line << ":" << col << endl;
+#endif
+ return;
+}
+
+void KafkaDocument::translateNodeIntoKafkaCursorPosition(Node *node, int offset, DOM::Node &domNode,
+ long &domNodeOffset)
+{
+ QString textNode, curChar;
+ int col;
+ bool lookForEntity, lookForSpaces, found;
+
+ if(node && node->rootNode() && node->rootNode()->nodeType() == DOM::Node::TEXT_NODE)
+ {
+ domNodeOffset = 0;
+ domNode = *node->rootNode();
+ textNode = node->tag->tagStr();
+ col = 0;
+ while(col < offset)
+ {
+ lookForEntity = false;
+ lookForSpaces = false;
+ curChar = textNode.mid(col, 1);
+ if(curChar == "&")
+ lookForEntity = true;
+ else if(curChar[0].isSpace())
+ lookForSpaces = true;
+ found = false;
+ while(!found && col < offset)
+ {
+ if((lookForEntity && curChar == ";") ||
+ !(lookForSpaces || lookForEntity))
+ found = true;
+ else if(lookForSpaces && !curChar[0].isSpace())//curChar != " ")
+ break;
+ col++;
+ curChar = textNode.mid(col, 1);
+ }
+#ifdef HEAVY_DEBUG
+ //kdDebug(25001)<< "endpos at " << line << ":" << col << endl;
+#endif
+ domNodeOffset++;
+ }
+ }
+ else if(node && node->rootNode())
+ {
+ domNode = *node->rootNode();
+ domNodeOffset = 0;//shoud we select?
+ }
+ else
+ {
+ domNode = DOM::Node();
+ domNodeOffset = 0;
+ }
+}
+
+void KafkaDocument::translateNodeIntoQuantaCursorPosition(Node *node, int offset, uint &line, uint &col)
+{
+ int curCol, curLine, curOffset;
+
+ node->tag->beginPos(curLine, curCol);
+ line = curLine;
+ col = curCol;
+ curOffset = offset;
+ while(curOffset > 0)
+ {
+ if(node->tag->tagStr()[offset - curOffset] == '\n')
+ line++;
+ else
+ col++;
+ curOffset--;
+ }
+}
+
+bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node parent,
+ DOM::Node nextSibling, DOM::Node rootNode)
+{
+ DOM::Node siblingNSpecial;
+
+ //First insert the node
+ if(!kafkaCommon::insertDomNode(node, parent, nextSibling, rootNode))
+ return false;
+
+ //Then unEnhance and reEnhance the nearest non special nodes so that everything's fine.
+ siblingNSpecial = getPrevSiblingNSpecial(node);
+ if(!siblingNSpecial.isNull())
+ {
+ mainEnhancer->postUnenhanceNode(siblingNSpecial);
+ mainEnhancer->postEnhanceNode(siblingNSpecial);
+ }
+ siblingNSpecial = getNextSiblingNSpecial(node);
+ if(!siblingNSpecial.isNull())
+ {
+ mainEnhancer->postUnenhanceNode(siblingNSpecial);
+ mainEnhancer->postEnhanceNode(siblingNSpecial);
+ }
+ mainEnhancer->postUnenhanceNode(node.parentNode());
+ mainEnhancer->postEnhanceNode(node.parentNode());
+
+ mainEnhancer->postEnhanceNode(node);
+ return true;
+}
+
+bool KafkaDocument::removeDomNode(DOM::Node node)
+{
+ DOM::Node nextSiblingNSpecial, prevSiblingNSpecial, parent;
+
+ //First remove the node
+ prevSiblingNSpecial = getPrevSiblingNSpecial(node);
+ nextSiblingNSpecial = getNextSiblingNSpecial(node);
+ parent = node.parentNode();
+ if(!kafkaCommon::removeDomNode(node))
+ return false;
+
+ //Then unEnhance and reEnhance the nearest non special nodes so that everything's fine.
+ if(!prevSiblingNSpecial.isNull())
+ {
+ mainEnhancer->postUnenhanceNode(prevSiblingNSpecial);
+ mainEnhancer->postEnhanceNode(prevSiblingNSpecial);
+ }
+ if(!nextSiblingNSpecial.isNull())
+ {
+ mainEnhancer->postUnenhanceNode(nextSiblingNSpecial);
+ mainEnhancer->postEnhanceNode(nextSiblingNSpecial);
+ }
+ mainEnhancer->postUnenhanceNode(parent);
+ mainEnhancer->postEnhanceNode(parent);
+
+ return true;
+}
+
+DOM::Node KafkaDocument::getPrevSiblingNSpecial(DOM::Node domNode)
+{
+ kNodeAttrs *attrs;
+
+ if(domNode.isNull())
+ return DOM::Node();
+
+ domNode = domNode.previousSibling();
+ while(!domNode.isNull())
+ {
+ attrs = getAttrs(domNode);
+ if(!attrs)
+ return DOM::Node();
+ if(attrs->specialBehavior() == kNodeAttrs::none)
+ return domNode;
+ domNode = domNode.previousSibling();
+ }
+
+ return DOM::Node();
+}
+
+DOM::Node KafkaDocument::getNextSiblingNSpecial(DOM::Node domNode)
+{
+ kNodeAttrs *attrs;
+
+ if(domNode.isNull())
+ return DOM::Node();
+
+ domNode = domNode.nextSibling();
+ while(!domNode.isNull())
+ {
+ attrs = getAttrs(domNode);
+ if(!attrs)
+ return DOM::Node();
+ if(attrs->specialBehavior() == kNodeAttrs::none)
+ return domNode;
+ domNode = domNode.nextSibling();
+ }
+
+ return DOM::Node();
+}
+
+void KafkaDocument::readConfig(KConfig *m_config)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::readConfig()" << endl;
+#endif
+ //for each nodeEnhancer
+ if(mainEnhancer)
+ mainEnhancer->readConfig(m_config);
+ //reload the document
+ reloadDocument();
+}
+
+const DTDStruct* KafkaDocument::defaultDTD()
+{
+ return m_currentDoc->defaultDTD();
+}
+
+#ifdef HEAVY_DEBUG
+void KafkaDocument::coutLinkTree(Node *node, int indent)
+#else
+void KafkaDocument::coutLinkTree(Node *, int)
+#endif
+{
+#ifdef HEAVY_DEBUG
+ QString output, dots;
+ DOM::Node domNode;
+ Node *n = 0L;
+ if(!node)
+ kdDebug(25001)<< "kafkaDocument::coutTree() - bad node!" << endl;
+
+ while (node)
+ {
+ dots = "";
+ dots.fill('*', indent);
+ output = dots;
+ if (node->tag->type != Tag::Text)
+ output += node->tag->name.replace('\n'," ");
+ else
+ output+= node->tag->tagStr().replace('\n'," ");
+ output += " (";
+ output += node->tag->type;
+ output += ") ";
+ n = 0L;
+ if(node->rootNode())
+ {
+ domNode = *node->rootNode();
+ n = getNode(domNode);
+ }
+
+ kdDebug(25001) << output <<" (" << node << ") " << domNode.handle() << " - " << n <<endl;
+
+ if (node->child)
+ coutLinkTree(node->child, indent + 4);
+
+ node = node->next;
+ }
+#endif
+}
+
+void KafkaDocument::slotDomNodeInserted(DOM::Node domNode, bool insertChilds, NodeModifsSet* modifs)
+{
+#ifdef LIGHT_DEBUG
+ if(!domNode.isNull())
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeInserted() - DOM::Node: " <<
+ domNode.nodeName().string() << endl;
+ else
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeInserted() - DOM::Node: NULL" << endl;
+#endif
+ Node *_nodeParent = 0L, *nodeNext = 0L, *_node = 0L;
+ DOM::Node tmpDomNode, nextDomNode;
+ bool b = false;
+
+#ifdef LIGHT_DEBUG
+ QTime t;
+ t.start();
+#endif
+
+ _nodeParent = getNode(domNode.parentNode());
+
+ if(!_nodeParent)
+ {//DOM::Node not found, strange...
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeInserted() - *ERROR* the" <<
+ " corresponding DOM::Node is not found!" << endl;
+ return;
+ }
+
+ nextDomNode = getNextSiblingNSpecial(domNode);
+ if(!nextDomNode.isNull())
+ {
+ nodeNext = getNode(nextDomNode);
+ if(!nodeNext)
+ {
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeInserted() - *ERROR2*" <<
+ " the corresponding DOM::Node is not found!" << endl;
+ return;
+ }
+ }
+
+ _node = buildNodeFromKafkaNode(domNode, _nodeParent, nodeNext, 0, 0L, 0, modifs);
+
+ if(insertChilds && domNode.hasChildNodes())
+ {
+ //TODO: check if it is working
+ tmpDomNode = domNode.firstChild();
+ while(!tmpDomNode.isNull())
+ {
+ buildNodeFromKafkaNode(tmpDomNode,
+ getNode(tmpDomNode.parentNode()), 0L, 0, 0L, 0, modifs);
+ tmpDomNode = kafkaCommon::getNextDomNode(tmpDomNode, b, false, domNode);
+ }
+ }
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeInserted() in " << t.elapsed() <<
+ " ms only!" << endl;
+#endif
+#ifdef HEAVY_DEBUG
+ kafkaCommon::coutTree(baseNode, 2);
+#endif
+
+}
+
+void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs)
+{
+#ifdef LIGHT_DEBUG
+ if(!domNode.isNull())
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeModified() - DOM::Node: " <<
+ domNode.nodeName().string() << endl;
+ else
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeModfied() - DOM::Node: NULL" << endl;
+#endif
+ Node *node = 0L;
+ NodeModif *modif;
+ kNodeAttrs *props, *newProps;
+ DOM::Node newDomNode, parentDomNode, nextSiblingDomNode;
+ DOM::Node *ptDomNode;
+ QTag *qTag;
+
+#ifdef LIGHT_DEBUG
+ QTime t;
+ t.start();
+#endif
+
+ //gets the DOM::Node's kNodeAttrs
+ props = domNodeProps[domNode.handle()];
+ if(!props)
+ {
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeModified - *ERROR " <<
+ " missing kNodeAttrs for a DOM::Node!!!" << endl;
+ return;
+ }
+
+ //First look if domNode has a corresponding Node.
+ if(props->isLinkedToNode())
+ {
+
+ //Look which Node correspond to this DOM::Node
+ node = props->getNode();
+
+ if(!node)
+ {//DOM::Node not found, weird...
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeModified() - *ERROR* the" <<
+ " corresponding DOM::Node is not found!" << endl;
+ return;
+ }
+
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeModified);
+ modif->setTag(new Tag(*(node->tag)));
+ modif->setLocation(kafkaCommon::getLocation(node));
+
+ buildNodeFromKafkaNode(node, domNode);
+ if (!modifs)
+ modifs = new NodeModifsSet();
+ modifs->addNodeModif(modif);
+ }
+ else
+ {
+ //no corresponding Node, we are in a special case with a special behavior.
+ qTag = QuantaCommon::tagFromDTD(getNode(domNode.parentNode()));
+ if(((!domNode.parentNode().isNull() && domNode.parentNode().nodeName() == "#document") ||
+ qTag) && (
+ props->specialBehavior() == kNodeAttrs::emptyTextSurroundingBlockElementAtTheLeft ||
+ props->specialBehavior() == kNodeAttrs::emptyTextSurroundingBlockElementAtTheRight ||
+ props->specialBehavior() == kNodeAttrs::emptyTextAsChildOfAChildlessElement))
+ {
+ //let's create the corresponding Text Node and the P tag only if necessary
+ modifs = new NodeModifsSet();
+ modif = new NodeModif();
+ parentDomNode = domNode.parentNode();
+ nextSiblingDomNode = domNode.nextSibling();
+
+ if(!qTag->isChild("#text", false))
+ {
+ newDomNode = kafkaCommon::createDomNode("p",
+ getNode(domNode.parentNode())->tag->dtd(), m_kafkaPart->document());
+ kafkaCommon::removeDomNode(domNode);
+ kafkaCommon::insertDomNode(newDomNode, parentDomNode, nextSiblingDomNode);
+ kafkaCommon::insertDomNode(domNode, newDomNode);
+
+ node = kafkaCommon::createNode("p", "", Tag::XmlTag, m_currentDoc);
+ newProps = connectDomNodeToQuantaNode(newDomNode, node);
+ ptDomNode = new DOM::Node(newDomNode);
+ node->setRootNode(ptDomNode);
+ ptDomNode = new DOM::Node(newDomNode);
+ node->setLeafNode(ptDomNode);
+ node = kafkaCommon::insertNode(node, getNode(parentDomNode),
+ getNode(nextSiblingDomNode), getNode(nextSiblingDomNode), modifs);
+ newProps->setNode(node);
+ modifs->addNodeModif(modif);
+
+ parentDomNode = newDomNode;
+ nextSiblingDomNode = DOM::Node();
+ modif = new NodeModif();
+ }
+
+ node = kafkaCommon::createNode("", domNode.nodeValue().string(), Tag::Text,
+ m_currentDoc);
+ ptDomNode = new DOM::Node(domNode);
+ node->setRootNode(ptDomNode);
+ ptDomNode = new DOM::Node(domNode);
+ node->setLeafNode(ptDomNode);
+ //avoid the merging of Text Nodes
+ node = kafkaCommon::insertNode(node, getNode(parentDomNode),
+ getNode(nextSiblingDomNode), modifs, false);
+ props->setNode(node);
+ modifs->addNodeModif(modif);
+ //If there is a empty Node after of before the text, remove them
+ if(node->prev && node->prev->tag->type == Tag::Empty)
+ kafkaCommon::extractNode(node->prev, modifs);
+ if(node->next && node->next->tag->type == Tag::Empty)
+ kafkaCommon::extractNode(node->next, modifs);
+
+ //Log the changes
+ m_currentDoc->docUndoRedo->addNewModifsSet(modifs, undoRedo::KafkaModif);
+ }
+
+ props->setIsLinkedToNode(true);
+ props->setSpecialBehavior(kNodeAttrs::none);
+ }
+
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeModified() in " << t.elapsed() <<
+ " ms only!" << endl;
+#endif
+
+#ifdef HEAVY_DEBUG
+ kafkaCommon::coutTree(baseNode, 2);
+#endif
+}
+
+void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteChilds, NodeModifsSet* modifs)
+{
+#ifdef LIGHT_DEBUG
+ if(!_domNode.isNull())
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeAboutToBeRemoved() - DOM::Node: " <<
+ _domNode.nodeName().string() << "(" << _domNode.handle() << ")"<< " bool :" <<
+ deleteChilds << endl;
+ else
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeAboutToBeRemoved() - DOM::Node: NULL bool :" <<
+ deleteChilds << endl;
+#endif
+ Node *_node = 0L, *_nodeNext = 0L, *_tmpNode = 0L, *n = 0L;
+ int i, bLine, bCol, eLine, eCol, bLine2, bCol2;
+ bool hasClosingNode = false, b;
+ NodeModif *modif;
+
+#ifdef LIGHT_DEBUG
+ QTime t;
+ t.start();
+#endif
+
+ _node = getNode(_domNode);
+ if(!_node)
+ {
+ kdDebug(25001)<<"KafkaDocument::slotDomNodeAboutToBeRemoved() - *ERROR* the" <<
+ " corresponding DOM::Node is not found!" << endl;
+ return;
+ }
+
+
+ //If we are deleting a PHP Node which is embedded into a tag e.g. <a <? echo boo; ?> >
+ //We must regenerate the <a> tag string.
+ if(_node->tag->type == Tag::ScriptTag && _node->parent)
+ {
+ _node->parent->tag->beginPos(bLine, bCol);
+ _node->parent->tag->endPos(eLine, eCol);
+ _node->tag->beginPos(bLine2, bCol2);
+ if(QuantaCommon::isBetween(bLine2, bCol2, bLine, bCol, eLine,eCol) == 0)
+ _node->parent->tag->setCleanStrBuilt(false);
+ }
+
+ if(_node->prev)
+ {
+ //delete the previous empty tag if present
+ _nodeNext = _node;
+ _node = _node->prev;
+ if(_node && _node->tag->type == Tag::Empty)
+ {
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(kafkaCommon::getLocation(_node));
+ if(_node->parent && _node->parent->child == _node)
+ _node->parent->child = _node->next;
+ if(_node->prev)
+ _node->prev->next = _node->next;
+ if(_node->next)
+ _node->next->prev = _node->prev;
+ if(_node == baseNode)
+ baseNode = _node->next;
+ _node->parent = 0L;
+ _node->prev = 0L;
+ _node->next = 0L;
+ _node->child = 0L;
+ modif->setNode(_node);
+ modifs->addNodeModif(modif);
+ }
+ _node = _nodeNext;
+ }
+
+ //delete the Node
+ modif = new NodeModif();
+ if(deleteChilds)
+ modif->setType(NodeModif::NodeAndChildsRemoved);
+ else
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(kafkaCommon::getLocation(_node));
+
+ if(_node->getClosingNode())
+ hasClosingNode = true;
+ else
+ hasClosingNode = false;
+ //_node->removeAll = false;
+
+ if(_node->parent && _node->parent->child == _node)
+ _node->parent->child = _node->next;
+ if(_node->next)
+ _node->next->prev = _node->prev;
+ if(_node->prev)
+ _node->prev->next = _node->next;
+
+ i = 0;
+ if(_node->child && deleteChilds)
+ {
+ _tmpNode = _node->child;
+ b = false;
+ while(_tmpNode)
+ {
+ if(_tmpNode->rootNode())
+ disconnectDomNodeFromQuantaNode(*_tmpNode->rootNode());
+ if(_tmpNode->leafNode())
+ disconnectDomNodeFromQuantaNode(*_tmpNode->leafNode());
+ _tmpNode = kafkaCommon::getNextNode(_tmpNode, b, _node);
+ }
+ //delete _node->child;
+ }
+ else if(_node->child)// && !deleteChilds
+ {
+ if(_node->parent && !_node->parent->child)
+ _node->parent->child = _node->child;
+ if(_node->prev)
+ _node->prev->next = _node->child;
+ _tmpNode = _node->child;
+ while(_tmpNode)
+ {
+ i++;
+ _tmpNode->parent = _node->parent;
+ n = _tmpNode;
+ _tmpNode = _tmpNode->next;
+ if(!_tmpNode)
+ {
+ n->next = _node->next;
+ if(_node->next)
+ _node->next->prev = n;
+ }
+ }
+ }
+ if(_node == baseNode)
+ baseNode = _node->next;
+
+ if(_node->rootNode())
+ disconnectDomNodeFromQuantaNode(*_node->rootNode());
+ if(_node->leafNode())
+ disconnectDomNodeFromQuantaNode(*_node->leafNode());
+ _node->parent = 0L;
+ _nodeNext = _node->next;
+ _node->next = 0L;
+ _node->prev = 0L;
+ _node->child = 0L;
+ modif->setNode(_node);
+ //delete _node;
+ modif->setChildrenMovedUp(i);
+ modifs->addNodeModif(modif);
+ _node = _nodeNext;
+
+ if(hasClosingNode)
+ {
+ //delete the closing Node if present
+ if(_node->parent && _node->parent->child == _node)
+ _node->parent->child = _node->next;
+ if(_node->prev)
+ _node->prev->next = _node->next;
+ if(_node->next)
+ _node->next->prev = _node->prev;
+ _node->parent = 0L;
+ _nodeNext = _node->next;
+ _node->next = 0L;
+ _node->prev = 0L;
+ _node->child = 0L;
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(kafkaCommon::getLocation(_node));
+ modif->setNode(_node);
+ modifs->addNodeModif(modif);
+ //delete _node;
+ _node = _nodeNext;
+ }
+
+ if(_node && _node->tag->type == Tag::Empty)
+ {
+ //delete the next empty tag if present
+ modif = new NodeModif();
+ modif->setType(NodeModif::NodeRemoved);
+ modif->setLocation(kafkaCommon::getLocation(_node));
+ if(_node->parent && _node->parent->child == _node)
+ _node->parent->child = _node->next;
+ if(_node->prev)
+ _node->prev->next = _node->next;
+ if(_node->next)
+ _node->next->prev = _node->prev;
+ _node->parent = 0L;
+ _nodeNext = _node->next;
+ _node->prev = 0L;
+ _node->next = 0L;
+ _node->child = 0L;
+ modif->setNode(_node);
+ modifs->addNodeModif(modif);
+ _node = _nodeNext;
+ }
+
+ //NO NORMALIZATION!! It is KafkaWidget::normalize()'s job!
+
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::slotDomNodeDeleted() in " << t.elapsed() <<
+ " ms only!" << endl;
+#endif
+#ifdef HEAVY_DEBUG
+ kafkaCommon::coutTree(baseNode, 2);
+#endif
+
+}
+
+void KafkaDocument::slotDomNodeIsAboutToBeMoved(DOM::Node domNode, DOM::Node newParent, DOM::Node before, NodeModifsSet* modifs)
+{
+ Node *node, *parent, *nextSibling, *closingNode;
+
+ if(domNode.isNull())
+ return;
+
+ node = getNode(domNode);
+ parent = getNode(newParent);
+ nextSibling = getNode(before);
+
+ if(!node)
+ return;
+
+ closingNode = node->getClosingNode();
+
+ kafkaCommon::moveNode(node, parent, nextSibling, modifs, false);
+
+ if(closingNode)
+ kafkaCommon::moveNode(closingNode, parent, nextSibling, modifs, false);
+
+}
+
+void KafkaDocument::slotdomNodeNewCursorPos(DOM::Node, int)
+{
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "KafkaDocument::slotdomNodeNewCursorPos()" << endl;
+#endif
+ //int line, col;
+ //dont calculate cursor pos until the next view update
+ //getQuantaCursorPosition(line, col);
+ //emit newCursorPosition(line, col);
+}
+
+void KafkaDocument::slotCut()
+{
+ QString text = m_kafkaPart->selectedText();
+
+ NodeSelectionInd selection_ind;
+ selection_ind.fillWithVPLCursorSelection();
+
+ int startOffset = selection_ind.cursorOffset();
+ int endOffset = selection_ind.cursorOffsetEndSel();
+ Node* startNode = kafkaCommon::getNodeFromLocation(selection_ind.cursorNode());
+ Node* endNode = kafkaCommon::getNodeFromLocation(selection_ind.cursorNodeEndSel());
+
+ DOM::Node cursorDomNode;
+ long cursorOffset;
+
+ m_kafkaPart->getCurrentNode(cursorDomNode, cursorOffset);
+ Node* cursorNode = getNode(cursorDomNode);
+
+ slotCut(startNode, startOffset, endNode, endOffset, &cursorNode, cursorOffset, text);
+}
+
+void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
+ Node** cursorNode, long cursorOffset, QString const& text)
+{
+ if(!startNode || !endNode)
+ return;
+
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ Node* subtree_root = kafkaCommon::DTDExtractNodeSubtree(startNode, startOffset, endNode, endOffset,
+ cursorNode, cursorOffset, modifs);
+
+ m_currentDoc->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+ //Now update the VPL cursor position
+ kafkaWidget->setCurrentNode(startNode, startOffset);
+
+ if(subtree_root)
+ {
+ KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
+ QTextDrag* text_drag = new QTextDrag(text);
+ KMultipleDrag* drag_object = new KMultipleDrag();
+ drag_object->addDragObject(node_drag);
+ drag_object->addDragObject(text_drag);
+
+ QApplication::clipboard()->setData(drag_object);
+#ifdef LIGHT_DEBUG
+ kafkaCommon::coutTree(subtree_root, 3);
+#endif
+ }
+}
+
+void KafkaDocument::slotCopy()
+{
+ QString text = m_kafkaPart->selectedText();
+
+ NodeSelectionInd selection_ind;
+ selection_ind.fillWithVPLCursorSelection();
+
+ int startOffset = selection_ind.cursorOffset();
+ int endOffset = selection_ind.cursorOffsetEndSel();
+ Node* startNode = kafkaCommon::getNodeFromLocation(selection_ind.cursorNode());
+ Node* endNode = kafkaCommon::getNodeFromLocation(selection_ind.cursorNodeEndSel());
+
+ slotCopy(startNode, startOffset, endNode, endOffset, text);
+}
+
+void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& text)
+{
+ if(!startNode || !endNode)
+ return;
+
+ Node* subtree_root = kafkaCommon::getNodeSubtree(startNode, startOffset, endNode, endOffset);
+
+ if(subtree_root)
+ {
+ KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
+ QTextDrag* text_drag = new QTextDrag(text);
+ KMultipleDrag* drag_object = new KMultipleDrag();
+ drag_object->addDragObject(node_drag);
+ drag_object->addDragObject(text_drag);
+
+ QApplication::clipboard()->setData(drag_object);
+ // FIXME delete the subtree
+#ifdef LIGHT_DEBUG
+ kafkaCommon::coutTree(subtree_root, 3);
+#endif
+ }
+}
+
+void KafkaDocument::slotPaste()
+{
+ QClipboard *cb = QApplication::clipboard();
+ QMimeSource* e = cb->data();
+ Node* node = new Node(0);
+
+ if(KafkaDragObject::decode(e, node))
+ {
+ bool go_up = false;
+ for(Node* aux = node; aux; aux = kafkaCommon::getNextNode(aux, go_up))
+ kafkaCommon::restorePastedNode(aux, getCurrentDoc());
+
+ NodeSelectionInd selection_ind;
+ selection_ind.fillWithVPLCursorSelection();
+
+ Node* cursorNode = kafkaCommon::getNodeFromLocation(selection_ind.cursorNode());
+ long cursorOffset = selection_ind.cursorOffset();
+
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ if(selection_ind.hasSelection())
+ kafkaCommon::DTDRemoveSelection(selection_ind, &cursorNode, cursorOffset, modifs);
+ else
+ cursorNode = 0; // use selection_ind
+ kafkaCommon::DTDInsertNodeSubtree(node, selection_ind, &cursorNode, cursorOffset, modifs);
+
+ m_currentDoc->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, 0, false);
+
+ //Now update the VPL cursor position
+ kafkaWidget->setCurrentNode(cursorNode, cursorOffset);
+ }
+}
diff --git a/quanta/parts/kafka/wkafkapart.h b/quanta/parts/kafka/wkafkapart.h
new file mode 100644
index 00000000..6b045150
--- /dev/null
+++ b/quanta/parts/kafka/wkafkapart.h
@@ -0,0 +1,473 @@
+/***************************************************************************
+ wkafkapart.h
+ -------------------
+
+ copyright : (C) 2003, 2004 - Nicolas Deschildre
+ email : ndeschildre@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 WKAFKAPART_H
+#define WKAFKAPART_H
+
+class KConfig;
+namespace DOM
+{
+ class Node;
+}
+
+class Document;
+class Node;
+class Parser;
+class kNodeAttrs;
+class NodeModifsSet;
+class NodeEnhancer;
+struct DTDStruct;
+class NodeSelectionInd;
+class NodeModifsSet;
+
+#include <qmap.h>
+#include <qobject.h>
+#include <qptrdict.h>
+
+#include "kafkahtmlpart.h"
+
+/**
+ * This class assures the synchronisation of the two trees : the quanta and the
+ * kafka tree.
+ * By Quanta Node, i mean Node (cf quanta/parser/node.h)
+ * By Kafka Node, i mean DOM::Node (cf <dom/dom_node.h>)
+ * It is a singleton class.
+ */
+class KafkaDocument : public QObject
+{
+Q_OBJECT
+public:
+ /** Returns a reference to the KafkaDocument object */
+ static KafkaDocument* const ref(QWidget *parent = 0L, QWidget *widgetParent = 0L, const char *name = 0L)
+ {
+ static KafkaDocument *m_ref;
+ if (!m_ref) m_ref = new KafkaDocument(parent, widgetParent, name);
+ return m_ref;
+ }
+
+ ~KafkaDocument();
+
+
+ /* ----------------------------- LOADING/UNLOADING -----------------------------------------*/
+
+ /**
+ * Builds kafka's own tree from the Quanta tree.
+ * If the current Document is empty, it will create a minimum tree.
+ * @param the Document we want to load.
+ */
+ void loadDocument(Document *doc);
+
+ /**
+ * Unloads the kafka tree.
+ */
+ void unloadDocument();
+
+ /**
+ * Reloads the Document.
+ */
+ void reloadDocument();
+
+ /**
+ * Called to get KafkaDocument's state.
+ * @return Returns true if KafkaDocument is loaded.
+ */
+ bool isLoaded() {return _docLoaded;}
+
+
+ /* ----------------------------------- KAFKA<->QUANTA NODES LINK ----------------------------------*/
+
+ /**
+ * @param _node The DOM::Node we want the attributess.
+ * @return Return the corresponding kNodeAttrs of the DOM::Node.
+ */
+ kNodeAttrs *getAttrs(DOM::Node _domNode);
+
+ /**
+ * This function search the corresponding quanta Node to the kafka DOM::Node
+ * @param _domNode The DOM::Node we seek its corresponding Node.
+ * @return The Node corresponding to _domNode.
+ */
+ Node *getNode(DOM::Node _domNode);
+
+ /**
+ * Connects the domNode to the corresponding Quanta Node with an intermediate class :
+ * a kNodeAttrs which links the node and the DOM::Node.
+ * This is MANDATORY, even if node is null, to use this function at each
+ * DOM::Node insertion !!
+ * @param domNode The DOM::Node to connect to the Node.
+ * @param node The Node to connect to the DOM::Node. Can be null.
+ * @return Returns the kNodeAttr which links them.
+ */
+ kNodeAttrs* connectDomNodeToQuantaNode(DOM::Node domNode, Node *node);
+
+ /**
+ * Disconnects the domNode from its corresponding Quanta Node.
+ * @param _domNode The DOM::Node to disconnect from its Node.
+ */
+ void disconnectDomNodeFromQuantaNode(DOM::Node _domNode);
+
+ /**
+ * Disconnects all the domNode from their Quanta Node.
+ */
+ void disconnectAllDomNodes();
+
+
+ /* --------------------------- CURSOR AND SELECTION HANDLING --------------------------*/
+
+ /**
+ * Set the cursor and selection coordinates.
+ * @param nodeSelection The coordinates of the selection and cursor.
+ */
+ void setCursorAndSelection(NodeSelectionInd *nodeSelection);
+
+ void setCursor(Node* node, int cursorOffset);
+
+ /* --------------------------- KAFKA/QUANTA NODES CREATION -----------------------------*/
+
+ /**
+ * This function build a kafka DOM:::Node from a Quanta Node.
+ * @param _node The node from which we build the DOM::Node
+ * @param insertNode Specifies if we should insert the Node.
+ * @return Returns if the insertion was successful if asked, else true.
+ */
+ bool buildKafkaNodeFromNode(Node *_node, bool insertNode = true);
+
+ /**
+ * This function synchronizes the Node from the DOM::Node. If the Node is a text Node,
+ * we try to keep its indentation while updating it.
+ * @param node The Node to synchronize.
+ * @param domNode The Node is synchronized from this DOM::Node.
+ */
+ void buildNodeFromKafkaNode(Node *node, DOM::Node domNode);
+
+ /**
+ * This function creates and synchronize a Node from the DOM::Node. It adds
+ * the closing Node if necessary, and the node and its closing Node can surround Nodes
+ * and thus make them its childs. Usefull when adding a Node on a selected range of Nodes.
+ * It also create empty Nodes between Nodes.
+ * @param domNode The Node returned is synchronized from this DOM::Node.
+ * @param nodeParent The parent Node of the Node returned.
+ * @param beginNode The new Node will be placed before or within _beginNode.
+ * @param beginOffset NOT IMLEMENTED If set to 0 or -1, the new Node will be placed before _beginNode,
+ * else _beginNode will be splitted at offset #beginOffset and the new Node will be placed
+ * inbetween.
+ * @param endNode NOT IMPLEMENTED If not null and if the new Node has a closing tag, set the closing node
+ * after or within endNode.
+ * @param endOffset NOT IMPLEMENTED If set to -1, the closing node will be placed after _endNode, else _endNode
+ * will be splitted at offset #endOffset and the closing Node will be placed inbetween.
+ * @param modifs The NodeModifSet to log the changes made.
+ * @return Returns the new main Node created from the DOM::Node.
+ */
+ Node * buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent,
+ Node *beginNode, int beginOffset, Node *endNode, int endOffset,
+ NodeModifsSet *modifs);
+
+
+ /* ------------------------------- TEXT ENTITIES ENCODING/DECODING ---------------------*/
+
+ /**
+ * This function returns the special XML character (e.g. space, �...)
+ * from its encoded form (e.g. &nbsp;)
+ * @return Returns the special character.
+ */
+ QString getDecodedChar(const QString &encodedChar);
+
+ /**
+ * This function returns the text decoded from its XML-encoded form.
+ * @param encodedText The text to decode.
+ * @param translateWhiteSpacesAndLineBreaks Specifies if whiteSpaces and line breaks should be
+ * compressed. Set it to false if we are inside PRE tag.
+ * @param removeLeftWhitespaces Specify if we should remove ALL whitespaces at the left of the string
+ * e.g. if the current text is the first child of a BLOCK Node (e.g. P)
+ * @param removeLeftWhitespaces Specify if we should remove ALL whitespaces at the right of the string
+ * e.g. if the current text is the last child of a BLOCK Node (e.g. P)
+ * @return Returns the text decoded.
+ */
+ QString getDecodedText(const QString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
+ bool removeLeftWhitespaces = false, bool removeRightWhitespaces = false);
+
+ /**
+ * This function returns the XML-encoded character (e.g. &nbsp;)
+ * from the XML special character (e.g. space, �...)
+ * @param decodedChar The character to encode.
+ * @param previousDecodedchar The previous decoded character.
+ * @return Returns the XML-encoded character.
+ */
+ QString getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar);
+
+ /**
+ * This function returns the text with all the special XML characters encoded.
+ * @param decodedText The text to encode.
+ * @param bLine The start line of the returned encoded text.
+ * @param bCol The start col of the returned encoded text.
+ * @param eLine Returns the end line of the returned encoded text.
+ * @param eCol Returns the end col of the return encoded text.
+ * @param translateWhiteSpaces Specifies if we should translate the whitespaces
+ * into &nbsp; Set it to false for PRE Tag.
+ * @return Return the XML-encoded text.
+ */
+ QString getEncodedText(const QString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
+ bool translateWhiteSpaces = true);
+
+ /**
+ * This function behaves essentially like the above function except that it doesn't
+ * return the position of the encoded text.
+ */
+ QString getEncodedText(const QString &decodedText);
+
+ /**
+ * This function generates the code corresponding to the XML node.
+ * @param _node The Node we want to generate its code.
+ * @param bLine The start line of the returned generated code.
+ * @param bCol The start col of the returned generated code.
+ * @param eLine Returns the end line of the returned generated code.
+ * @param eCol Returns the end col of the return generated code.
+ * @param encodeText Specify, if node is a Text Node, if we should encode the text
+ * (e.g. whitespace => &nbsp;)
+ * @return Returns the code.
+ */
+ QString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
+ bool encodeText = true);
+
+
+ /* ------------------------- KAFKA<->QUANTA POSITION TRANSLATION -------------------------------*/
+
+ /**
+ * Returns the kafka cursor position corresponding to the quanta cursor position.
+ * @param line The quanta line cursor position.
+ * @param col The quanta column cursor position.
+ * @param domNode Returns the DOM::Node in which the cursor is located.
+ * @param offset Returns the offset of the cursor.
+ */
+ void translateQuantaIntoKafkaCursorPosition(uint line, uint col, DOM::Node &domNode, long &offset);
+
+ /**
+ * Returns the internal Node offset corresponding to the Quanta cursor position.
+ * @param line The quanta line cursor position.
+ * @param col The quanta column cursor position.
+ * @param node Returns the node where is located the node internal offset.
+ * @param offset Returns the node internal corresponding offset.
+ */
+ void translateQuantaIntoNodeCursorPosition(uint line, uint col, Node **node, long &offset);
+
+ /**
+ * Returns the internal Node offset corresponding to the kafka cursor position.
+ * @param domNode The kafka DOM::Node cursor position.
+ * @param domNodeOffset The kafka offset cursor position.
+ * @param node Returns the node where is located the node internal offset.
+ * @param offset Returns the node internal corresponding offset.
+ */
+ void translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long domNodeOffset, Node **node, long &offset);
+
+ /**
+ * Returns the quanta cursor position corresponding to the kafka cursor position.
+ * @param domNode The kafka DOM::Node cursor position.
+ * @param offset The kafka offset cursor position.
+ * @param line Returns the line cursor position.
+ * @param col Returns the col cursor position.
+ */
+ void translateKafkaIntoQuantaCursorPosition(DOM::Node domNode, int offset, int &line, int &col);
+
+ /**
+ * Returns the kafka cursor position corresponding to the internal Node offset.
+ * @param node The node.
+ * @param offset The internal offset of Node.
+ * @param domNode Returns the corresponding DOM::Node of node. Can be null.
+ * @param domNodeOffset Returns the offset inside the DOM::Node.
+ */
+ void translateNodeIntoKafkaCursorPosition(Node *node, int offset, DOM::Node &domNode,
+ long &domNodeOffset);
+
+ /**
+ * Returns the quanta cursor position corresponding to the internal Node offset.
+ * @param node The node.
+ * @param offset The internal offset of Node.
+ * @param line Returns the line position of the corresponding Quanta cursor.
+ * @param col Returns the col position of the corresponding Quanta cursor.
+ */
+ void translateNodeIntoQuantaCursorPosition(Node *node, int offset, uint &line, uint &col);
+
+
+ /** ----------------- DOM::NODE TREE MODIFICATIONS --------------------*/
+
+ /**
+ * Insert a DOM::Node in the DOM::Node tree. It takes care to handle the exceptions and
+ * to postEnhance (cf htmlenhancer.h)
+ * @param node The node to insert.
+ * @param parent The new parent of node. If null, insert node at the top level.
+ * @param nextSibling The new next sibling of node. If null, append node at the end of the child list.
+ * @param rootNode The root DOM::Node of the DOM::Node tree. Useful when no parent is provided.
+ * @return Returns true if the operation was successfull.
+ */
+ bool insertDomNode(DOM::Node node, DOM::Node parent = DOM::Node(),
+ DOM::Node nextSibling = DOM::Node(), DOM::Node rootNode = DOM::Node());
+
+
+ /**
+ * Removes a DOM::Node from the DOM::Node Tree. It takes care to handle the exceptions
+ * and to postUnenhance (cf htmlenhancer.h)
+ * @param node The Node to remove from the tree.
+ * @retun Returns true if the operation was successfull..
+ */
+ bool removeDomNode(DOM::Node node);
+
+
+ /** ------------------ DOM::NODE TREE NAVIGATION -----------------------------------------*/
+
+ /**
+ * @param domNode The DOM::Node the search starts from.
+ * @return Returns the next previous sibling which has no special behavior (cf htmlenhancer.h)
+ * Sibling here (contrary to node.h) has the same meaning as in dom/dom_node.h
+ */
+ DOM::Node getPrevSiblingNSpecial(DOM::Node domNode);
+
+ /**
+ * @param domNode The DOM::Node the search starts from.
+ * @return Returns the next next sibling which has no special behavior (cf htmlenhancer.h)
+ * Sibling here (contrary to node.h) has the same meaning as in dom/dom_node.h
+ */
+ DOM::Node getNextSiblingNSpecial(DOM::Node domNode);
+
+ /* --------------------------------- MISCELLANEOUS ------------------------------------------*/
+
+ /**
+ * Read the config.
+ * @param m_config The config to read.
+ */
+ void readConfig(KConfig *m_config);
+
+ /**
+ * Returns the default DTD of the current Document.
+ */
+ const DTDStruct* defaultDTD();
+
+ /**
+ * @return Returns the current KafkaWidget.
+ */
+ KafkaWidget *getKafkaWidget() {return m_kafkaPart;}
+
+ /**
+ * @return Returns the current Document.
+ */
+ Document *getCurrentDoc() {return m_currentDoc;}
+
+ /**
+ * Prints in stdout the current Node tree + Node->DOM::Node->Node relationship.
+ * @node The startNode
+ * @indent The number of little dots per parent relationship.
+ */
+ void coutLinkTree(Node *node, int indent);
+
+ /**
+ * In order to have khtml works whatever DTD is loaded, they must always exists
+ * and be valid.
+ */
+ DOM::Node html, body, head;
+
+signals:
+ /**
+ * Emitted when an error occurs when loading kafka. Can be called multiple times.
+ * @param node The node which caused this error.
+ */
+ void loadingError(Node *node);
+
+ /**
+ * Called whenever a DOM::Node get the focus
+ */
+ void newCursorPosition(int col, int row);
+
+ /**
+ * Called whenever a DOM::Node get the focus
+ */
+ void nodeGetFocus(Node *_node);
+
+ /**
+ * Called when the wKafkaPart is loaded.
+ */
+ void loaded();
+
+ /**
+ * Called when the wKafkaPart is unloaded.
+ */
+ void unloaded();
+
+public slots:
+ /**
+ * Called whenever a DOM::Node is inserted in the Kafka tree.
+ * @param domNode is the Node inserted.
+ * @param insertChilds Specifies if the _domNode's child should be inserted
+ * @param modifs The changes made are logged into modifs.
+ */
+ void slotDomNodeInserted(DOM::Node domNode, bool insertChilds, NodeModifsSet *modifs);
+
+ /**
+ * Called whenever DOM::Node's attributes are modified.
+ * @param domNode is the Node modified.
+ * @param modifs The changes made are logged into modifs.
+ */
+ void slotDomNodeModified(DOM::Node domNode, NodeModifsSet *modifs);
+
+ /**
+ * Called whenever a DOM::Node is about to be removed from the Kafka tree.
+ * @param domNode is the Node to be deleted.
+ * @param deleteChilds Specifies if we should delete the child nodes of _node
+ * @param modifs The changes made are logged into modifs.
+ */
+ void slotDomNodeAboutToBeRemoved(DOM::Node domNode, bool deleteChilds, NodeModifsSet *modifs);
+
+ /**
+ * Called whenever a DOM::Node is moved.
+ * @param domNode The DOM::Node to move.
+ * @param newParent The new parent DOM::Node of domNode.
+ * @param before domNode will be inserted before before.
+ * @param modifs The changes made are logged into modifs.
+ */
+ void slotDomNodeIsAboutToBeMoved(DOM::Node domNode, DOM::Node newParent, DOM::Node before, NodeModifsSet *modifs);
+
+ /**
+ * Called whenever a DOM::Node get the focus
+ */
+ void slotdomNodeNewCursorPos(DOM::Node _domNode, int offset);
+
+ void slotCut();
+ void slotCopy();
+ void slotPaste();
+
+ void slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
+ Node** cursorNode, long cursorOffset, QString const& plainText);
+ void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& plainText);
+
+public:
+ //use a QPtrList aferwards
+ NodeEnhancer *mainEnhancer;
+
+private:
+ /**
+ * Create a KafkaWidget.
+ */
+ KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name);
+
+ QMap<QString, QString> decodedChars;
+ QMap<QString, QString> encodedChars;
+ QPtrDict<kNodeAttrs> domNodeProps;
+ QGuardedPtr<KafkaWidget> m_kafkaPart;
+ Document *m_currentDoc;
+ bool _docLoaded;
+
+};
+
+#endif
diff --git a/quanta/parts/preview/Makefile.am b/quanta/parts/preview/Makefile.am
new file mode 100644
index 00000000..a449f9c4
--- /dev/null
+++ b/quanta/parts/preview/Makefile.am
@@ -0,0 +1,7 @@
+noinst_LTLIBRARIES = libpreview.la
+
+METASOURCES = AUTO
+
+libpreview_la_SOURCES = whtmlpart.cpp
+
+AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility $(all_includes)
diff --git a/quanta/parts/preview/whtmlpart.cpp b/quanta/parts/preview/whtmlpart.cpp
new file mode 100644
index 00000000..b84ffe5c
--- /dev/null
+++ b/quanta/parts/preview/whtmlpart.cpp
@@ -0,0 +1,189 @@
+/***************************************************************************
+ whtmlpart.cpp - description
+ -------------------
+ begin : Fri Aug 18 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2002, 2004, 2005 Andras Mantia <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 <qfileinfo.h>
+#include <qtextcodec.h>
+
+//kde includes
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kdeversion.h>
+#include <khtml_settings.h>
+#include <khtmlview.h>
+#include <klocale.h>
+#include <kpopupmenu.h>
+#include <ktempfile.h>
+
+//app includes
+#include "whtmlpart.h"
+#include "resource.h"
+
+WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableViewSource,
+ QObject *parent, const char *name, GUIProfile prof)
+ : KHTMLPart(parentWidget, widgetName, parent, name, prof), m_contextMenu(0)
+{
+ //kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl;
+ hpos = 0;
+ // get settings from konq.
+ KConfig konqConfig("konquerorrc");
+
+ konqConfig.setGroup("HTML Settings");
+
+ const KHTMLSettings * set = settings();
+
+ const_cast<KHTMLSettings*>(set)->init( &konqConfig, false );
+ view()->installEventFilter(this);
+
+ m_enableViewSource = enableViewSource;
+ if (m_enableViewSource)
+ {
+ m_contextMenu = new KPopupMenu(parentWidget);
+ m_contextMenu->insertItem(i18n("View &Document Source"), this, SLOT(slotViewSource()));
+
+ connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)), SLOT(popupMenu(const QString&, const QPoint&)));
+ }
+ connect(browserExtension(), SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, SLOT(openURL(const KURL&)));
+
+// setCharset( konqConfig.readEntry("DefaultEncoding") );
+// setEncoding( konqConfig.readEntry("DefaultEncoding") );
+// setStandardFont( konqConfig.readEntry("StandardFont") );
+// setFixedFont( konqConfig.readEntry("FixedFont") );
+// updateFontSize( konqConfig.readNumEntry("FontSize"));
+}
+
+WHTMLPart::~WHTMLPart()
+{
+}
+
+void WHTMLPart::setPreviewedURL(const KURL &url)
+{
+ m_previewedURL = url;
+}
+
+bool WHTMLPart::openURL(const KURL& url)
+{
+ if (url == m_previewedURL)
+ {
+ KURL previewURL = url;
+ previewURL.setFileName("preview-" + url.fileName());
+ return KHTMLPart::openURL(previewURL);
+ } else
+ return KHTMLPart::openURL(url);
+}
+
+void WHTMLPart::urlSelected ( const QString &url, int button, int state, const QString &target, KParts::URLArgs args)
+{
+ KHTMLPart::urlSelected (url, button, state, target, args);
+ KURL cURL = completeURL( url );
+// alternative not tested but used in kdevelop !
+// KURL cURL=KURL(baseURL(),url);
+ if (target.isEmpty() || (target == "_self") || (target == "_top") || (target == "_blank") || (target == "_parent") )
+ openURL( cURL ) ;
+ addToHistory( cURL.url() );
+}
+
+void WHTMLPart::forward()
+{
+ if ( forwardEnable() ) {
+ hpos++;
+ openURL( KURL( history.at(hpos) ) );
+
+ emit updateStatus( backEnable() , forwardEnable() );
+ }
+}
+
+
+void WHTMLPart::back()
+{
+ if (backEnable())
+ {
+ hpos--;
+ openURL(KURL(history.at(hpos)));
+
+ emit updateStatus(backEnable(), forwardEnable());
+ }
+}
+
+
+void WHTMLPart::addToHistory(const QString &url)
+{
+
+ if ( history.count() > 0 )
+ while ( hpos < history.count()-1 )
+ history.removeLast();
+
+ if ( !history.isEmpty() ) hpos++;
+
+ history.append(url);
+
+ hpos = history.count()-1;
+
+ emit updateStatus( backEnable() , forwardEnable() );
+
+}
+
+
+bool WHTMLPart::backEnable()
+{
+ return hpos > 0;
+}
+
+
+bool WHTMLPart::forwardEnable()
+{
+ return hpos < history.count()-1;
+}
+
+KParts::ReadOnlyPart *WHTMLPart::createPart( QWidget * parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const QString &, QString &,
+ QStringList &, const QStringList &)
+{
+ //kdDebug(24000) << "Create WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << endl;
+ return new WHTMLPart(parentWidget, widgetName, m_enableViewSource, parent, name);
+}
+
+bool WHTMLPart::eventFilter(QObject *watched, QEvent *e)
+{
+ if (watched == view() && e->type() == QEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
+ emit previewHasFocus(false);
+ else
+ if (watched == view() && e->type() == QEvent::FocusIn)
+ emit previewHasFocus(true);
+ return false;
+}
+
+void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point)
+{
+ m_contextMenu->popup(point);
+}
+
+void WHTMLPart::slotViewSource()
+{
+ KTempFile *tmpFile = new KTempFile(tmpDir + "-preview-", ".html");
+ QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ tmpFile->setAutoDelete(true);
+ tmpFile->textStream()->setCodec(QTextCodec::codecForName("utf8"));
+ *(tmpFile->textStream()) << documentSource();
+ tmpFile->close();
+ tempFileList.append(tmpFile);
+ emit showPreview(false);
+ emit openFile(KURL::fromPathOrURL(tmpFile->name()), "utf8", true);
+}
+
+#include "whtmlpart.moc"
diff --git a/quanta/parts/preview/whtmlpart.h b/quanta/parts/preview/whtmlpart.h
new file mode 100644
index 00000000..1c0c83c0
--- /dev/null
+++ b/quanta/parts/preview/whtmlpart.h
@@ -0,0 +1,76 @@
+/***************************************************************************
+ whtmlpart.h - description
+ -------------------
+ begin : Fri Aug 18 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2002, 2004, 2005 Andras Mantia <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 WHTMLPART_H
+#define WHTMLPART_H
+
+#include <qstrlist.h>
+
+#include <khtml_part.h>
+
+class KPopupMenu;
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon
+ */
+
+class WHTMLPart : public KHTMLPart {
+ Q_OBJECT
+public:
+ WHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
+ QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+ virtual ~WHTMLPart();
+
+ /** Specify the URL where the preview was started */
+ void setPreviewedURL(const KURL &url);
+ bool backEnable();
+ bool forwardEnable();
+ virtual bool openURL(const KURL &url);
+
+public slots:
+
+/** back(), forward() - navigation, using history.
+ */
+ void forward();
+ void back();
+ void popupMenu(const QString &url, const QPoint &point);
+ void slotViewSource();
+
+ void addToHistory(const QString &url);
+ virtual bool eventFilter(QObject *watched, QEvent *e);
+
+signals:
+ void updateStatus( bool back, bool forward );
+ void previewHasFocus(bool focus);
+ void showPreview(bool show);
+ void openFile(const KURL&, const QString&, bool);
+
+protected:
+ virtual void urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args = KParts::URLArgs());
+ virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget, const char *widgetName,
+ QObject *parent, const char *name,
+ const QString &mimetype, QString &serviceName,
+ QStringList &serviceTypes, const QStringList &params);
+
+private:
+ KURL m_previewedURL;
+ KPopupMenu *m_contextMenu;
+ QStrList history;
+ unsigned int hpos;
+ bool m_enableViewSource;
+};
+
+#endif
diff --git a/quanta/plugins/Makefile.am b/quanta/plugins/Makefile.am
new file mode 100644
index 00000000..bdbdd141
--- /dev/null
+++ b/quanta/plugins/Makefile.am
@@ -0,0 +1,15 @@
+noinst_LTLIBRARIES = libplugins.la
+
+METASOURCES = AUTO
+
+libplugins_la_SOURCES = quantaplugininterface.cpp quantaplugineditor.cpp quantapluginconfig.cpp quantaplugin.cpp plugineditor.ui pluginconfig.ui
+
+AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \
+ -I$(top_srcdir)/quanta/parsers \
+ -I$(top_srcdir)/quanta/src \
+ -I$(top_srcdir)/quanta/project \
+ -I$(top_srcdir)/quanta/messages \
+ -I$(top_srcdir)/lib \
+ $(KMDI_INCLUDES) $(all_includes)
+
+
diff --git a/quanta/plugins/pluginconfig.ui b/quanta/plugins/pluginconfig.ui
new file mode 100644
index 00000000..a4cc6052
--- /dev/null
+++ b/quanta/plugins/pluginconfig.ui
@@ -0,0 +1,270 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>PluginConfig</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+</comment>
+<author>(C) 2002 by Marc Britton &lt;consume@optushome.com.au&gt;, (C) 2003 by Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>PluginConfig</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>560</width>
+ <height>281</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>560</width>
+ <height>280</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Configure Plugin</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>validateCheckBox</cstring>
+ </property>
+ <property name="text">
+ <string>Validate plugin</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>Spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>247</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>GroupBox2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="title">
+ <string>Plugin Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>pluginName</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The plugin name as it appears in the Plugins menu.</string>
+ </property>
+ </widget>
+ <widget class="KIconButton" row="0" column="3">
+ <property name="name">
+ <cstring>iconButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>48</width>
+ <height>48</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Location:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>location</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The exact location of the plugin. If not set the global search paths setting is used.</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>pluginFileName</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The plugin executable or library name (with extension).</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel4_2</cstring>
+ </property>
+ <property name="text">
+ <string>File name:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>outputWindow</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Output window:</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="4">
+ <property name="name">
+ <cstring>locationButton</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>28</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>readOnlyBox</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Read only part</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Input:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="4" column="2" rowspan="1" colspan="3">
+ <item>
+ <property name="text">
+ <string>None</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Current File</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Current File Path</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Project Folder</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>inputBox</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>pluginName</tabstop>
+ <tabstop>iconButton</tabstop>
+ <tabstop>outputWindow</tabstop>
+ <tabstop>location</tabstop>
+ <tabstop>locationButton</tabstop>
+ <tabstop>pluginFileName</tabstop>
+ <tabstop>inputBox</tabstop>
+ <tabstop>readOnlyBox</tabstop>
+ <tabstop>validateCheckBox</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kicondialog.h</include>
+</includes>
+<slots>
+ <slot>pluginType_highlighted(const QString&amp;)</slot>
+ <slot>slotPluginTypeHighlighted(const QString&amp;)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kicondialog.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/plugins/plugineditor.ui b/quanta/plugins/plugineditor.ui
new file mode 100644
index 00000000..104d9923
--- /dev/null
+++ b/quanta/plugins/plugineditor.ui
@@ -0,0 +1,208 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>PluginEditor</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>pluginEditor</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>662</width>
+ <height>306</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>500</width>
+ <height>224</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Edit Plugins</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Search paths:</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>Plugins</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QListView" row="0" column="1" rowspan="5" colspan="1">
+ <column>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Valid</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Location</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>File Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Output Window</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>pluginList</cstring>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="0">
+ <property name="name">
+ <cstring>addButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add...</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>configureButton</cstring>
+ </property>
+ <property name="text">
+ <string>Configure...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="0">
+ <property name="name">
+ <cstring>removeButton</cstring>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>67</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="4" column="0">
+ <property name="name">
+ <cstring>refreshButton</cstring>
+ </property>
+ <property name="text">
+ <string>Refresh</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>addSearchPathButton</cstring>
+ </property>
+ <property name="text">
+ <string>Add...</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>searchPaths</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>searchPaths</tabstop>
+ <tabstop>addSearchPathButton</tabstop>
+ <tabstop>addButton</tabstop>
+ <tabstop>configureButton</tabstop>
+ <tabstop>removeButton</tabstop>
+ <tabstop>refreshButton</tabstop>
+ <tabstop>pluginList</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/plugins/quantaplugin.cpp b/quanta/plugins/quantaplugin.cpp
new file mode 100644
index 00000000..89cde63f
--- /dev/null
+++ b/quanta/plugins/quantaplugin.cpp
@@ -0,0 +1,395 @@
+/***************************************************************************
+ quantaplugin.cpp - Base class for quanta plugins
+ -------------------
+ begin : Mon Sep 16 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kstandarddirs.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kaction.h>
+#include <kparts/componentfactory.h>
+#include <kparts/part.h>
+#include <klocale.h>
+#include <kdockwidget.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+
+/* QT INCLUDES */
+#include <qstring.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qwidget.h>
+#include <qwidgetstack.h>
+#include <qstringlist.h>
+#include <qobject.h>
+
+/* OTHER INCLUDES */
+#include "quantaplugin.h"
+#include "resource.h"
+#include "quanta.h"
+#include "quantaview.h"
+#include "document.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "messageoutput.h"
+#include "project.h"
+
+#include "viewmanager.h"
+
+
+QuantaPlugin::QuantaPlugin()
+ : m_isRunning(false)
+{
+ m_readOnlyPart = true;
+ m_action = 0L;
+ m_icon = "";
+ m_part = 0L;
+ m_view = 0L;
+ m_pluginToolView = 0L;
+ m_targetWidget = 0L;
+}
+
+QuantaPlugin::~QuantaPlugin()
+{
+ unload();
+}
+
+/** Sets the superficial name of the plugin */
+void QuantaPlugin::setPluginName(const QString &a_name)
+{
+ m_name = a_name;
+ if (!m_action)
+ {
+ m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, SLOT(toggle()), quantaApp->actionCollection(), a_name);
+ }
+ m_action->setText(a_name);
+}
+
+QString QuantaPlugin::pluginName() const
+{
+ return m_name;
+}
+
+void QuantaPlugin::setLocation(const QString &a_location)
+{
+ m_location = a_location;
+}
+
+QString QuantaPlugin::location() const
+{
+ return m_location;
+}
+
+bool QuantaPlugin::load()
+{
+ if(isLoaded())
+ return false;
+
+ QString loc = location();
+ if(loc.isEmpty())
+ {
+ KStandardDirs *dirs = QuantaCommon::pluginDirs("lib");
+ loc = dirs->findResource("lib", fileName());
+ delete dirs;
+ }
+ else
+ {
+ loc += QString("/") + fileName();
+ }
+
+ QFileInfo partInfo(loc);
+ QString ow = outputWindow();
+ m_targetWidget = new QWidget(quantaApp);
+ if (m_readOnlyPart)
+ m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadOnlyPart>(partInfo.baseName().latin1(), m_targetWidget, 0, m_targetWidget, 0 );
+ else
+ m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadWritePart>(partInfo.baseName().latin1(), m_targetWidget, 0, m_targetWidget, 0 );
+ if(!m_part)
+ {
+ KMessageBox::error(quantaApp, i18n("<qt>The <b>%1</b> plugin could not be loaded.<br>Possible reasons are:<br> - <b>%2</b> is not installed;<br> - the file <i>%3</i> is not installed or it is not reachable.").arg(m_name).arg(m_name).arg(m_fileName));
+ delete m_targetWidget;
+ m_targetWidget = 0L;
+ return false;
+ }
+ m_part->setName(m_name); // for better debug output
+ m_part->widget()->setName(m_name); //needed to be able to dock the same plugin twice in separate toolviews
+ m_part->widget()->setFocusPolicy(QWidget::ClickFocus);
+ quantaApp->slotNewPart(m_part, false); // register the part in the partmanager
+ return true;
+}
+
+bool QuantaPlugin::run()
+{
+ if(!isLoaded())
+ load();
+
+ if(isLoaded())
+ {
+ bool result = true;
+ QuantaView *view = ViewManager::ref()->activeView();
+ if (view->document())
+ {
+ switch (m_input)
+ {
+ case 1: { result = m_part->openURL(view->document()->url());
+ break;
+ }
+ case 2: { KURL url = view->document()->url();
+ url.setPath(url.directory());
+ url.adjustPath(1);
+ result = m_part->openURL(url);
+ break;
+ }
+ case 3: { KURL url;
+ if ( Project::ref()->hasProject() &&
+ (Project::ref()->contains(view->document()->url()) ||
+ view->document()->isUntitled())
+ )
+ {
+ url = Project::ref()->projectBaseURL();
+ }
+ else
+ {
+ url = view->document()->url();
+ url.setPath(url.directory());
+ url.adjustPath(1);
+ }
+ result = m_part->openURL(url);
+ break;
+ }
+ default: ;
+ }
+ } else
+ {
+ if (m_input == 3 && (Project::ref()->hasProject())) //open project dir
+ result = m_part->openURL(Project::ref()->projectBaseURL());
+ }
+ if (!result)
+ {
+ unload(false);
+ return false;
+ }
+ addWidget();
+ setRunning(true);
+ connect( m_part, SIGNAL(setStatusBarText(const QString &)),
+ quantaApp, SLOT(slotStatusMsg( const QString & )));
+
+
+ emit pluginStarted();
+
+ return true;
+ }
+ return false;
+}
+
+bool QuantaPlugin::toggle()
+{
+ if (isLoaded())
+ {
+ return unload();
+ } else
+ {
+ bool result = run();
+ if (!result)
+ {
+ m_action->blockSignals(true);
+ m_action->setChecked(false);
+ m_action->blockSignals(false);
+ }
+ return result;
+ }
+}
+
+/** Returns the file name of the plugin */
+QString QuantaPlugin::fileName() const
+{
+ return m_fileName;
+}
+
+/** Sets the file name of the plugin */
+void QuantaPlugin::setFileName(const QString &a_fileName)
+{
+ m_fileName = a_fileName;
+}
+
+/** Sets the output window */
+void QuantaPlugin::setOutputWindow(const QString &a_outputWindow)
+{
+ m_outputWindow = a_outputWindow;
+}
+
+/** Gets the output window */
+QString QuantaPlugin::outputWindow() const
+{
+ return m_outputWindow;
+}
+
+bool QuantaPlugin::validatePlugin(QuantaPlugin *a_plugin)
+{
+ if(a_plugin)
+ {
+ return QuantaPlugin::validatePluginInfo(a_plugin->pluginName(),
+ a_plugin->location(), a_plugin->fileName(),
+ a_plugin->outputWindow());
+ }
+ return false;
+}
+
+/** Returns true if the information of a plugin is valid, otherwise false */
+bool QuantaPlugin::validatePluginInfo(const QString & /*a_name*/,
+ const QString &a_location, const QString &a_fileName, const QString &/*a_outputWindow*/)
+{
+ bool valid = true;
+ // look the file up if location is null
+ if(!a_location.isEmpty())
+ {
+ QString path = a_location + QString("/") + a_fileName;
+
+ QFileInfo pluginFile(path);
+ if(!pluginFile.exists())
+ valid = false;
+ /* TODO : What other tests should we perform? Permissions etc? */
+ }
+ else
+ {
+ if (valid)
+ {
+ KStandardDirs *dirs = QuantaCommon::pluginDirs("lib");
+ if(dirs->findResource("lib", a_fileName).isNull())
+ valid = false;
+ delete dirs;
+ }
+ }
+ return valid; // past all tests, valid
+}
+
+/** Returns whether the plugin is loaded or not */
+bool QuantaPlugin::isLoaded()
+{
+ return m_targetWidget != 0L;
+}
+
+bool QuantaPlugin::unload(bool remove)
+{
+ if(!isLoaded())
+ return false;
+
+ disconnect( m_part, SIGNAL(setStatusBarText(const QString &)),
+ quantaApp, SLOT(slotStatusMsg( const QString & )));
+
+ delete (KParts::ReadOnlyPart*) m_part;
+ m_part = 0;
+ delete m_targetWidget;
+ m_targetWidget = 0L;
+ setRunning(false);
+
+ emit pluginStopped();
+
+ m_action->setChecked(false);
+ if (remove)
+ removeWidget();
+ return true;
+}
+
+bool QuantaPlugin::isRunning() const
+{
+ return m_isRunning;
+}
+
+void QuantaPlugin::setRunning(bool a_enable)
+{
+ m_isRunning = a_enable;
+}
+
+/** Sets the plugin's standard attribute */
+void QuantaPlugin::setStandard(bool isStandard)
+{
+ m_standard = isStandard;
+}
+
+/** Gets the plugin's standard attribute */
+bool QuantaPlugin::isStandard() const
+{
+ return m_standard;
+}
+
+/** No descriptions */
+QString QuantaPlugin::standardName()
+{
+ return m_standardName;
+}
+/** No descriptions */
+void QuantaPlugin::setStandardName(const QString& a_stdName)
+{
+ m_standardName = a_stdName;
+}
+/** No descriptions */
+QString QuantaPlugin::icon()
+{
+ return m_icon;
+}
+/** No descriptions */
+void QuantaPlugin::setIcon(const QString& a_icon)
+{
+ m_icon = a_icon;
+ if (m_action) m_action->setIcon(a_icon);
+}
+
+void QuantaPlugin::addWidget()
+{
+ QString ow = outputWindow();
+ if(ow == i18n("Separate Toolview"))
+ {
+ m_part->widget()->setCaption(m_name);
+ m_part->widget()->setIcon(SmallIcon(m_icon));
+ m_pluginToolView = quantaApp->addToolWindow(m_part->widget(), quantaApp->prevDockPosition(m_part->widget(), KDockWidget::DockBottom), quantaApp->getMainDockWidget());
+ m_pluginToolView->show();
+ } else
+ {
+ m_view = ViewManager::ref()->createView();
+ m_view->addPlugin(this);
+ }
+}
+
+void QuantaPlugin::removeWidget()
+{
+ QString ow = outputWindow();
+ if(ow == i18n("Separate Toolview"))
+ {
+ delete m_pluginToolView;
+ m_pluginToolView = 0L;
+ ViewManager::ref()->activeView()->setFocus();
+ } else
+ {
+ ViewManager::ref()->removeView(m_view, true);
+ }
+}
+
+QWidget *QuantaPlugin::widget()
+{
+ if (isLoaded()) {
+ return m_part->widget();
+ } else {
+ return NULL;
+ }
+}
+
+void QuantaPlugin::plugAction(QPopupMenu *menu)
+{
+ m_action->plug(menu);
+}
+
+#include "quantaplugin.moc"
diff --git a/quanta/plugins/quantaplugin.h b/quanta/plugins/quantaplugin.h
new file mode 100644
index 00000000..08b4dbdc
--- /dev/null
+++ b/quanta/plugins/quantaplugin.h
@@ -0,0 +1,128 @@
+/***************************************************************************
+ quantaplugin.h - description
+ -------------------
+ begin : Mon Sep 16 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003-2004 by Andras Mantia <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 QUANTAPLUGIN_H
+#define QUANTAPLUGIN_H
+
+/* KDE INCLUDES */
+#include <kparts/part.h>
+
+/* QT INCLUDES */
+#include <qguardedptr.h>
+#include <qobject.h>
+
+class QString;
+
+/**Base class for quanta plugins
+ *@author Marc Britton
+ */
+
+class KToggleAction;
+class KMdiToolViewAccessor;
+
+class QuantaView;
+
+class QuantaPlugin : public QObject
+{
+ Q_OBJECT
+public:
+ QuantaPlugin();
+ ~QuantaPlugin();
+ virtual bool isRunning() const;
+ /** Gets the superficial plugin name */
+ virtual QString pluginName() const;
+ /** Gets the location of the plugin */
+ virtual QString location() const;
+ /** Gets the plugin's standard attribute */
+ virtual bool isStandard() const;
+ /** Gets the output window */
+ virtual QString outputWindow() const;
+ /** Returns true if the plugin specified by a_plugin is valid, false otherwise */
+ static bool validatePlugin(QuantaPlugin *);
+ /** Returns true if the options of a plugin are valid, otherwise false */
+ static bool validatePluginInfo(const QString &, const QString &,
+ const QString &, const QString &);
+
+ virtual void addWidget();
+ virtual void removeWidget();
+ QWidget *widget();
+ KParts::ReadOnlyPart *part() {return m_part;}
+ QString name() {return m_name;}
+ /** plugs action into menu */
+ void plugAction(QPopupMenu *menu);
+public slots:
+ /** Sets whether the plugin is running or not */
+ virtual void setRunning(bool);
+ /** Loads the plugin */
+ virtual bool load();
+ /** Unloads te plugin. If remove is true, it will also remove the plugin widget. */
+ virtual bool unload(bool remove = true);
+ /** Runs the plugin */
+ virtual bool run();
+ /** Runs the plugin if it's not running yet, unloads otherwise.*/
+ virtual bool toggle();
+ /** Sets the superficial name of the plugin */
+ virtual void setPluginName(const QString &);
+ /** Sets the output window */
+ virtual void setOutputWindow(const QString &);
+ /** Sets the plugin's standard attribute */
+ virtual void setStandard(bool isStandard);
+ /** Sets the location of the plugin */
+ virtual void setLocation(const QString &);
+ /** Sets the file name of the plugin */
+ virtual void setFileName(const QString &);
+ /** Returns the file name of the plugin */
+ virtual QString fileName() const;
+ virtual int input() {return m_input;}
+ virtual void setInput(int a_input) { m_input = a_input;}
+ /** Returns whether the plugin is loaded or not */
+ virtual bool isLoaded();
+ /** No descriptions */
+ void setIcon(const QString& a_icon);
+ /** No descriptions */
+ QString icon();
+ /** No descriptions */
+ void setStandardName(const QString& a_stdName);
+ /** No descriptions */
+ QString standardName();
+ void setReadOnlyPart(bool a_readOnlyPart) {m_readOnlyPart = a_readOnlyPart;}
+ bool readOnlyPart() {return m_readOnlyPart;}
+signals:
+ void pluginStarted();
+ void pluginStopped();
+protected:
+ /** Superficial name of plugin */
+ QString m_fileName;
+ QString m_name;
+ QString m_location;
+ QString m_icon;
+ QString m_outputWindow;
+ int m_input;
+ /** True, if it is not a user added plugin. Special handling code may be necessary for standard plugins. */
+ bool m_standard;
+ bool m_isRunning;
+ QGuardedPtr<KParts::ReadOnlyPart> m_part;
+ bool m_readOnlyPart;
+ QuantaView *m_view;
+ KToggleAction *m_action;
+private: // Private attributes
+ QString m_standardName;
+ KMdiToolViewAccessor* m_pluginToolView;
+ QWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
+};
+
+#endif
diff --git a/quanta/plugins/quantapluginconfig.cpp b/quanta/plugins/quantapluginconfig.cpp
new file mode 100644
index 00000000..a03ffc2c
--- /dev/null
+++ b/quanta/plugins/quantapluginconfig.cpp
@@ -0,0 +1,94 @@
+/***************************************************************************
+ quantapluginconfig.cpp - description
+ -------------------
+ begin : Sat Sep 21 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kdialogbase.h>
+#include <kfiledialog.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kicondialog.h>
+
+/* QT INCLUDES */
+#include <qpushbutton.h>
+#include <qcheckbox.h>
+#include <qlineedit.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qcombobox.h>
+#include <qwidgetstack.h>
+
+/* OTHER INCLUDES */
+#include "quantapluginconfig.h"
+#include "quantaplugin.h"
+#include "pluginconfig.h"
+
+QuantaPluginConfig::QuantaPluginConfig(QWidget *a_parent, const char *a_name)
+ : KDialogBase(a_parent, a_name, true, i18n("Configure Plugin"), KDialogBase::Ok | KDialogBase::Cancel)
+{
+ m_pluginConfigWidget = new PluginConfig(this);
+
+ QStringList windows;
+ i18n("Message Area Tab");
+ windows << i18n("Editor Tab") << i18n("Separate Toolview");
+ m_pluginConfigWidget->outputWindow->insertStringList(windows);
+ m_pluginConfigWidget->iconButton->setStrictIconSize(false);
+
+ connect(m_pluginConfigWidget->pluginName, SIGNAL(textChanged(const QString &)), this, SLOT(nameChanged(const QString &)));
+ connect(m_pluginConfigWidget->locationButton, SIGNAL(clicked()), this, SLOT(selectLocation()));
+
+ setMainWidget(m_pluginConfigWidget);
+}
+
+QuantaPluginConfig::~QuantaPluginConfig()
+{
+}
+
+void QuantaPluginConfig::accept()
+{
+ if(m_pluginConfigWidget->validateCheckBox->isChecked())
+ {
+ bool isValid = QuantaPlugin::validatePluginInfo(m_pluginConfigWidget->pluginName->text(), m_pluginConfigWidget->location->text(), m_pluginConfigWidget->pluginFileName->text(), m_pluginConfigWidget->outputWindow->currentText());
+
+ if(!isValid)
+ {
+ int answer = KMessageBox::questionYesNo(this, i18n("The plugin information you entered appears to be invalid. Are you sure you want to apply these settings?"), i18n("Invalid Plugin"), KStdGuiItem::apply(), i18n("Do Not Apply"));
+
+ if(answer == KMessageBox::No)
+ return;
+ }
+ }
+ KDialogBase::accept();
+}
+
+/** Gets the plugin location */
+void QuantaPluginConfig::selectLocation()
+{
+ QString pluginLocation = KFileDialog::getExistingDirectory(QString::null, this, i18n("Select Plugin Folder"));
+ if(!pluginLocation.isNull())
+ {
+ m_pluginConfigWidget->location->setText(pluginLocation);
+ }
+}
+
+void QuantaPluginConfig::nameChanged(const QString &a_text)
+{
+ QString text = a_text;
+ text = "lib" + text + ".la";
+ m_pluginConfigWidget->pluginFileName->setText(text.lower());
+}
+
+#include "quantapluginconfig.moc"
diff --git a/quanta/plugins/quantapluginconfig.h b/quanta/plugins/quantapluginconfig.h
new file mode 100644
index 00000000..f56142e9
--- /dev/null
+++ b/quanta/plugins/quantapluginconfig.h
@@ -0,0 +1,48 @@
+/***************************************************************************
+ quantapluginconfig.h - description
+ -------------------
+ begin : Sat Sep 21 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003 by Andras Mantia <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 QUANTAPLUGINCONFIG_H
+#define QUANTAPLUGINCONFIG_H
+
+class PluginConfig;
+class KDialogBase;
+
+/**Dialog to configure a plugin's options
+ *@author Marc Britton
+ */
+
+class QString;
+
+class QuantaPluginConfig : public KDialogBase
+{
+ Q_OBJECT
+public:
+ QuantaPluginConfig(QWidget *, const char *);
+ ~QuantaPluginConfig();
+public slots:
+ /** Validates the dialog before accepting */
+ void accept();
+ /** Gets the plugin location */
+ void selectLocation();
+ /** Updates other widgets based on the name */
+ void nameChanged(const QString &);
+
+protected:
+ PluginConfig *m_pluginConfigWidget;
+};
+
+#endif
diff --git a/quanta/plugins/quantaplugineditor.cpp b/quanta/plugins/quantaplugineditor.cpp
new file mode 100644
index 00000000..e7c32ec0
--- /dev/null
+++ b/quanta/plugins/quantaplugineditor.cpp
@@ -0,0 +1,240 @@
+/***************************************************************************
+ quantaplugineditor.cpp - description
+ -------------------
+ begin : Fri Sep 20 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kfiledialog.h>
+#include <kiconloader.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <kicondialog.h>
+#include <kdialogbase.h>
+
+/* QT INCLUDES */
+#include <qwidget.h>
+#include <qobject.h>
+#include <qdict.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qlineedit.h>
+#include <qcombobox.h>
+#include <qlistview.h>
+
+/* OTHER INCLUDES */
+#include "quantaplugineditor.h"
+#include "quantaplugin.h"
+#include "quantapluginconfig.h"
+#include "pluginconfig.h"
+#include "plugineditor.h"
+#include "resource.h"
+
+QuantaPluginEditor::QuantaPluginEditor(QWidget *a_parent, const char *a_name)
+ : KDialogBase(a_parent, a_name, true, i18n("Edit Plugins"), KDialogBase::Ok | KDialogBase::Cancel)
+{
+ // m_plugins.setAutoDelete(true);
+
+ m_pluginEditorWidget = new PluginEditor(this);
+ setMainWidget(m_pluginEditorWidget);
+ m_pluginEditorWidget->pluginList->setSelectionMode(QListView::Single);
+ m_pluginEditorWidget->pluginList->setAllColumnsShowFocus(true);
+ m_pluginEditorWidget->pluginList->setColumnAlignment(2, Qt::AlignHCenter);
+
+ connect(this, SIGNAL(pluginsChanged()), SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->refreshButton, SIGNAL(clicked()), SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->addButton, SIGNAL(clicked()), SLOT(addPlugin()));
+ connect(m_pluginEditorWidget->removeButton, SIGNAL(clicked()), SLOT(removePlugin()));
+ connect(m_pluginEditorWidget->addSearchPathButton, SIGNAL(clicked()), SLOT(addSearchPath()));
+ connect(m_pluginEditorWidget->configureButton, SIGNAL(clicked()), SLOT(configurePlugin()));
+ connect(m_pluginEditorWidget->pluginList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
+ SLOT(configurePlugin(QListViewItem*, const QPoint&, int)));
+}
+
+QuantaPluginEditor::~QuantaPluginEditor()
+{
+}
+
+QDict<QuantaPlugin> QuantaPluginEditor::plugins()
+{
+ return m_plugins;
+}
+
+void QuantaPluginEditor::addPlugin()
+{
+ // new plugin config menu
+ // create new plugin and add to list
+ QuantaPluginConfig *configDlg = new QuantaPluginConfig(this, "pluginConfig");
+ PluginConfig *configWidget = static_cast<PluginConfig*>(configDlg->mainWidget());
+
+ if(configDlg->exec())
+ {
+ // plugin accepted, create the proper type
+ QuantaPlugin *newPlugin = 0;
+ newPlugin = new QuantaPlugin();
+
+ newPlugin->setPluginName(configWidget->pluginName->text());
+ newPlugin->setFileName(configWidget->pluginFileName->text());
+ newPlugin->setLocation(configWidget->location->text());
+ newPlugin->setOutputWindow(configWidget->outputWindow->currentText());
+ newPlugin->setStandard(false);
+ newPlugin->setIcon(configWidget->iconButton->icon());
+ QString pluginName = newPlugin->pluginName();
+ m_plugins.insert(pluginName, newPlugin);
+ emit pluginsChanged();
+ }
+ delete configDlg;
+}
+
+void QuantaPluginEditor::addSearchPath()
+{
+ // Get a dir and append it to the line edit
+ QString appendDir = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select Folder"));
+ if(!appendDir.isNull())
+ {
+ m_pluginEditorWidget->searchPaths->setText(m_pluginEditorWidget->searchPaths->text()+appendDir+":");
+ }
+}
+
+void QuantaPluginEditor::configurePlugin()
+{
+ // create a new config dialog. populate with plugin data
+ QString key;
+ QListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
+ if(item)
+ key = item->text(0);
+
+ if(!key.isNull() && m_plugins.find(key))
+ {
+ QuantaPluginConfig *configDlg = new QuantaPluginConfig(this, "pluginConfig");
+ QuantaPlugin *curPlugin = m_plugins.find(key);
+ PluginConfig *configWidget = static_cast<PluginConfig*>(configDlg->mainWidget());
+
+ configWidget->outputWindow->setCurrentText(curPlugin->outputWindow());
+ configWidget->pluginName->setText(curPlugin->pluginName());
+ configWidget->pluginFileName->setText(curPlugin->fileName());
+ configWidget->location->setText(curPlugin->location());
+ configWidget->iconButton->setIcon(curPlugin->icon());
+ configWidget->inputBox->setCurrentItem(curPlugin->input());
+ configWidget->readOnlyBox->setChecked(curPlugin->readOnlyPart());
+
+ if(configDlg->exec())
+ {
+ curPlugin->setPluginName(configWidget->pluginName->text());
+ curPlugin->setFileName(configWidget->pluginFileName->text());
+ curPlugin->setLocation(configWidget->location->text());
+ curPlugin->setOutputWindow(configWidget->outputWindow->currentText());
+ curPlugin->setIcon(configWidget->iconButton->icon());
+ curPlugin->setInput(configWidget->inputBox->currentItem());
+ curPlugin->setReadOnlyPart(configWidget->readOnlyBox->isChecked());
+ }
+
+ delete configDlg;
+
+ emit pluginsChanged();
+ }
+}
+
+void QuantaPluginEditor::configurePlugin(QListViewItem* item, const QPoint&, int)
+{
+ if (item)
+ configurePlugin();
+}
+
+void QuantaPluginEditor::refreshPlugins()
+{
+ // call validate on all plugins to refresh their status
+ m_pluginEditorWidget->pluginList->clear();
+
+ QDictIterator<QuantaPlugin> it(m_plugins);
+ for(;it.current();++it)
+ {
+ QListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
+ QuantaPlugin *curPlugin = it.current();
+
+ newItem->setText(0, curPlugin->pluginName());
+
+ QPixmap statusIcon;
+ bool isValid = QuantaPlugin::validatePlugin(curPlugin);
+ if(isValid)
+ statusIcon = SmallIcon("ok", KGlobal::instance());
+ else
+ statusIcon = SmallIcon("no", KGlobal::instance());
+ newItem->setPixmap(1, statusIcon);
+
+ newItem->setText(2, curPlugin->location());
+ newItem->setText(3, curPlugin->fileName());
+ newItem->setText(4, curPlugin->outputWindow());
+
+ m_pluginEditorWidget->pluginList->insertItem(newItem);
+ }
+}
+
+void QuantaPluginEditor::removePlugin()
+{
+ QListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
+ if (currentItem)
+ {
+ QuantaPlugin *plugin = m_plugins.find(currentItem->text(0));
+ if(plugin)
+ {
+ m_plugins.remove(plugin->pluginName());
+ delete plugin;
+ emit pluginsChanged();
+ }
+ }
+}
+
+void QuantaPluginEditor::setPlugins(QDict<QuantaPlugin> a_plugins)
+{
+ m_plugins = a_plugins;
+
+ emit pluginsChanged();
+}
+
+PluginEditorItem::PluginEditorItem(QListView *a_parent)
+ : QListViewItem(a_parent)
+{
+}
+
+void PluginEditorItem::paintCell(QPainter *a_painter, const QColorGroup &a_cg, int a_column, int a_width, int a_align)
+{
+/*
+ if(a_column == 2)
+ a_align = Qt::AlignCenter;
+ FIXME : Why won't QT let us align cell contents?
+*/
+ QListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
+}
+
+/** No descriptions */
+void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
+{
+ QString str;
+ for (uint i =0; i < paths.count(); i++)
+ {
+ str += paths[i] +":";
+ }
+ m_pluginEditorWidget->searchPaths->setText(str);
+}
+/** No descriptions */
+QStringList QuantaPluginEditor::searchPathList()
+{
+ QString str = m_pluginEditorWidget->searchPaths->text();
+ QStringList paths = QStringList::split(":",str);
+
+ return paths;
+}
+
+#include "quantaplugineditor.moc"
diff --git a/quanta/plugins/quantaplugineditor.h b/quanta/plugins/quantaplugineditor.h
new file mode 100644
index 00000000..fc028056
--- /dev/null
+++ b/quanta/plugins/quantaplugineditor.h
@@ -0,0 +1,79 @@
+/***************************************************************************
+ quantaplugineditor.h - description
+ -------------------
+ begin : Fri Sep 20 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003 by Andras Mantia <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 QUANTAPLUGINEDITOR_H
+#define QUANTAPLUGINEDITOR_H
+
+/* KDE INCLUDES */
+#include <kdialogbase.h>
+
+/* QT INCLUDES */
+#include <qdict.h>
+#include <qlistview.h>
+
+/* OTHER INCLUDES */
+#include "quantaplugin.h"
+#include "plugineditor.h"
+
+/**Editor for the plugins that manages configuration
+ *@author Marc Britton
+ */
+
+/* FORWARD DECLARATIONS */
+class QWidget;
+class QListView;
+class KDialogBase;
+class PluginEditor;
+
+class QuantaPluginEditor : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ QuantaPluginEditor(QWidget *, const char *);
+ ~QuantaPluginEditor();
+ QDict<QuantaPlugin> plugins();
+ /** No descriptions */
+ QStringList searchPathList();
+ /** No descriptions */
+ void setSearchPaths(const QStringList& paths);
+
+signals:
+ void pluginsChanged();
+
+public slots:
+ void setPlugins(QDict<QuantaPlugin>);
+ void addSearchPath();
+ void addPlugin();
+ void removePlugin();
+ void configurePlugin();
+ void configurePlugin(QListViewItem*, const QPoint&, int);
+ void refreshPlugins();
+
+protected:
+ QDict<QuantaPlugin> m_plugins;
+ PluginEditor *m_pluginEditorWidget;
+};
+
+class PluginEditorItem : public QListViewItem
+{
+public:
+ PluginEditorItem(QListView *);
+ virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+};
+
+#endif
diff --git a/quanta/plugins/quantaplugininterface.cpp b/quanta/plugins/quantaplugininterface.cpp
new file mode 100644
index 00000000..45fb8caa
--- /dev/null
+++ b/quanta/plugins/quantaplugininterface.cpp
@@ -0,0 +1,271 @@
+/***************************************************************************
+ quantaplugininterface.cpp - General interface to the plugin system
+ -------------------
+ begin : Mon Sep 16 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+/* KDE INCLUDES */
+#include <kactioncollection.h>
+#include <kconfig.h>
+#include <kstandarddirs.h>
+#include <kmainwindow.h>
+#include <klocale.h>
+#include <kdebug.h>
+#include <kmessagebox.h>
+
+/* QT INCLUDES */
+#include <qdict.h>
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qfileinfo.h>
+
+/* OTHER INCLUDES */
+#include "quantaplugininterface.h"
+#include "quantaplugineditor.h"
+#include "quantaplugin.h"
+
+#include "resource.h"
+#include "quantacommon.h"
+
+QuantaPluginInterface::QuantaPluginInterface(QWidget *parent)
+{
+ m_parent = parent;
+ (void) new KAction( i18n( "Configure &Plugins..." ), 0, 0,
+ this, SLOT( slotPluginsEdit() ),
+ ((KMainWindow*)parent)->actionCollection(), "configure_plugins" );
+ m_pluginMenu = 0L;
+ // m_plugins.setAutoDelete(true);
+}
+
+QuantaPluginInterface::~QuantaPluginInterface()
+{
+ m_plugins.clear();
+ // TODO : free plugins
+}
+
+void QuantaPluginInterface::readConfigFile(const QString& configFile)
+{
+ KConfig *config = new KConfig(configFile);
+ config->setGroup("General");
+ QStringList pList = config->readListEntry("Plugins");
+ for(QStringList::Iterator it = pList.begin();it != pList.end(); ++it)
+ (*it) = (*it).stripWhiteSpace();
+ //setPluginNames(pList);
+
+ QStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths");
+ for(QStringList::Iterator it = paths.begin();it != paths.end(); ++it)
+ (*it) = (*it).stripWhiteSpace();
+ qConfig.pluginSearchPaths = paths;
+
+ // now that we have a list of the plugins, go through and get the details of them
+ for(QStringList::Iterator it = pList.begin();it != pList.end();++it)
+ {
+ if (m_plugins.find(*it))
+ continue;
+ config->setGroup(*it);
+
+ QuantaPlugin *newPlugin = 0;
+ QString pluginType = config->readEntry("Type", "KPart");
+ bool isStandard = config->readBoolEntry("Standard",false);
+/* if (isStandard)
+ {
+ QString stdName = config->readEntry("Standard Name");
+ if (newPlugin)
+ {
+ newPlugin->setStandardName(stdName);
+ }
+ } else */
+ {
+ if (pluginType == "Command Line")
+ {
+ emit hideSplash();
+ KMessageBox::information(m_parent, i18n("<qt><b>%1</b> is a command line plugin. We have removed support for command-line plugins. However, the functionality has not been lost as script actions can still be used to run command-line tools. </qt>").arg(*it), i18n("Unsupported Plugin Type"), "CommandLinePluginWarning");
+ continue;
+ }
+
+ newPlugin = new QuantaPlugin();
+ }
+ newPlugin->setStandard(isStandard);
+ newPlugin->setPluginName(*it);
+ newPlugin->setFileName(config->readEntry("FileName"));
+ newPlugin->setLocation(config->readEntry("Location"));
+ newPlugin->setIcon(config->readEntry("Icon"));
+ QString type = config->readEntry("OutputWindow");
+ if (type == "Message Frame" || type == "Separate Toolview")
+ type = i18n("Separate Toolview");
+ else
+ type = i18n("Editor Tab");
+ newPlugin->setOutputWindow(type);
+ newPlugin->setInput(config->readNumEntry("Input", 0));
+ newPlugin->setReadOnlyPart(config->readBoolEntry("ReadOnly", true));
+
+ m_plugins.insert(*it, newPlugin);
+ }
+ delete config;
+}
+
+/** Reads the plugin settings from the rc file */
+void QuantaPluginInterface::readConfig()
+{
+ m_plugins.clear();
+
+ // read the local plugins.rc
+ QString configFile = locateLocal("appdata", "plugins.rc");
+ if (QFileInfo(configFile).exists())
+ readConfigFile(configFile);
+ // read the global plugins.rc
+ configFile = qConfig.globalDataDir + resourceDir + "plugins.rc";
+ readConfigFile(configFile);
+}
+
+/** Writes the plugin settings to the rc file */
+void QuantaPluginInterface::writeConfig()
+{
+ // write the plugin settings to the rc file
+ KConfig *config = new KConfig(locateLocal("appdata", "plugins.rc"));
+
+ QStringList names = pluginNames();
+
+ config->setGroup("General");
+ config->writeEntry("Plugins", names);
+ config->writePathEntry("SearchPaths", qConfig.pluginSearchPaths);
+
+ for(QStringList::Iterator it = names.begin();it != names.end(); ++it)
+ {
+ config->setGroup(*it);
+
+ QuantaPlugin *curPlugin = m_plugins[*it];
+ if(curPlugin)
+ {
+ config->writeEntry("FileName", curPlugin->fileName());
+ config->writeEntry("Type", "KPart"); //not used, but just to be compatible
+ config->writeEntry("Location", curPlugin->location());
+ config->writeEntry("Icon", curPlugin->icon());
+ QString type = curPlugin->outputWindow();
+ if (type == i18n("Editor Tab")) type = "Editor Tab";
+ if (type == i18n("Separate Toolview")) type = "Separate Toolview";
+ config->writeEntry("OutputWindow", type);
+ config->writeEntry("Input", curPlugin->input());
+ config->writeEntry("Standard", curPlugin->isStandard());
+ if (curPlugin->isStandard()) config->writeEntry("Standard Name", curPlugin->standardName());
+ config->writeEntry("ReadOnly", curPlugin->readOnlyPart());
+ }
+ }
+ config->sync();
+ if (config->isReadOnly())
+ {
+ kdWarning() << "Plugin config file " << locateLocal("appdata", "plugins.rc") << " is read only! Plugin settings were not saved!" << endl;
+ }
+ delete config;
+}
+
+
+/** Returns true if the plugin is available */
+bool QuantaPluginInterface::pluginAvailable(const QString &a_name)
+{
+ if (a_name.isEmpty())
+ return false;
+ QuantaPlugin *availPlugin = m_plugins.find(a_name);
+ if(availPlugin && QuantaPlugin::validatePlugin(availPlugin))
+ return true;
+
+ return false;
+}
+
+/** Gets the plugin names */
+QStringList QuantaPluginInterface::pluginNames() const
+{
+ QStringList names;
+ QDictIterator<QuantaPlugin> it(m_plugins);
+ for(;it.current();++it)
+ {
+ names << (*it)->pluginName();
+ }
+ return names;
+}
+
+
+/** Gets the plugin specified by a_name */
+QuantaPlugin *QuantaPluginInterface::plugin(const QString &a_name)
+{
+ if (a_name.isEmpty())
+ return 0L;
+ return m_plugins[a_name];
+}
+
+/** Builds the plugins menu */
+void QuantaPluginInterface::buildPluginMenu()
+{
+ m_pluginMenu->clear();
+// m_pluginMenu->setCheckable(true);
+
+ QDictIterator<QuantaPlugin> it(m_plugins);
+ for(;it.current() != 0;++it)
+ {
+ QuantaPlugin *curPlugin = it.current();
+ if(curPlugin)
+ {
+// int id = m_pluginMenu->insertItem(curPlugin->pluginName());
+// if(curPlugin->isRunning())
+// m_pluginMenu->setItemChecked(id, true);
+ curPlugin->plugAction(m_pluginMenu);
+ }
+ }
+}
+
+void QuantaPluginInterface::slotPluginsEdit()
+{
+ QuantaPluginEditor *editor = new QuantaPluginEditor(m_parent, "plugin_editor");
+ editor->setSearchPaths(qConfig.pluginSearchPaths);
+ editor->setPlugins(plugins());
+
+ editor->exec();
+ qConfig.pluginSearchPaths = editor->searchPathList();
+ setPlugins(editor->plugins());
+ writeConfig();
+ buildPluginMenu();
+ slotPluginsValidate();
+}
+
+void QuantaPluginInterface::slotPluginsValidate()
+{
+ QValueList<QuantaPlugin*> invalidPlugins;
+ QDictIterator<QuantaPlugin> it(m_plugins);
+ for(;it.current();++it)
+ {
+ if(!QuantaPlugin::validatePlugin(it.current()))
+ {
+ invalidPlugins.append(it.current());
+ }
+ }
+ uint invalidCount = invalidPlugins.count();
+ if (invalidCount > 0)
+ {
+ QString invalidNames;
+ for (uint i=0; i < invalidCount; i++)
+ {
+ invalidNames += "<br>" + invalidPlugins[i]->name();
+ }
+ int answer = KMessageBox::questionYesNo(m_parent, i18n("<qt>The following plugins seems to be invalid:<b>%1</b>.<br><br>Do you want to edit the plugins?</qt>").arg(invalidNames), i18n("Invalid Plugins"), i18n("Edit Plugins"), i18n("Do Not Edit"));
+ if(answer == KMessageBox::Yes)
+ {
+ slotPluginsEdit();
+ }
+ return;
+ } else
+ emit statusMsg(i18n("All plugins validated successfully."));
+}
+
+
+#include "quantaplugininterface.moc"
diff --git a/quanta/plugins/quantaplugininterface.h b/quanta/plugins/quantaplugininterface.h
new file mode 100644
index 00000000..a3e85030
--- /dev/null
+++ b/quanta/plugins/quantaplugininterface.h
@@ -0,0 +1,103 @@
+/***************************************************************************
+ quantaplugininterface.h - description
+ -------------------
+ begin : Mon Sep 16 2002
+ copyright : (C) 2002 by Marc Britton <consume@optushome.com.au>
+ (C) 2003 by Andras Mantia <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 QUANTAPLUGININTERFACE_H
+#define QUANTAPLUGININTERFACE_H
+
+/* KDE INCLUDES */
+#include <kconfig.h>
+#include <kstandarddirs.h>
+
+/* QT INCLUDES */
+#include <qobject.h>
+#include <qdict.h>
+#include <qstringlist.h>
+#include <qpopupmenu.h>
+
+/* OTHER INCLUDES */
+
+class QuantaPlugin;
+
+/**Provides an interface to the installed plugins
+ *@author Marc Britton
+ */
+class QuantaPluginInterface : public QObject
+{
+ Q_OBJECT
+public:
+ /**
+ * since this class is a singleton you must use this function to access it
+ *
+ * the parameters are only used at the first call to create the class
+ *
+ */
+ static QuantaPluginInterface* const ref(QWidget *parent = 0L)
+ {
+ static QuantaPluginInterface *m_ref;
+ if (!m_ref) m_ref = new QuantaPluginInterface (parent);
+ return m_ref;
+ }
+
+ ~QuantaPluginInterface();
+ /** Reads the rc file */
+ virtual void readConfig();
+ /** Write the rc file */
+ virtual void writeConfig();
+ /* Returns TRUE if the plugin specified by a_name is available for us*/
+ bool pluginAvailable(const QString &);
+ /** Gets the plugins */
+ QDict<QuantaPlugin> plugins() {return m_plugins;};
+ /** Sets the plugins */
+ void setPlugins(QDict<QuantaPlugin> plugins) {m_plugins = plugins;};
+ /** Gets the plugin specified by a_name */
+ virtual QuantaPlugin *plugin(const QString &);
+ /** Gets the plugin menu */
+ virtual QPopupMenu *pluginMenu() {return m_pluginMenu;};
+ void setPluginMenu(QPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
+ /** Builds the plugins menu dynamically */
+ void buildPluginMenu();
+
+private:
+ /** The constructor is privat because we use singleton patter.
+ * If you need the class use QuantaPluginInterface::ref() for
+ * construction and reference
+ */
+ QuantaPluginInterface(QWidget *parent);
+
+protected slots:
+ /** slot for the menu: validate */
+ void slotPluginsValidate();
+ /** slot for the menu: edit */
+ void slotPluginsEdit();
+
+protected:
+ /** Gets the plugin names */
+ virtual QStringList pluginNames() const;
+ void readConfigFile(const QString& configFile);
+
+ QDict<QuantaPlugin> m_plugins;
+
+ QWidget *m_parent;
+
+ QPopupMenu *m_pluginMenu;
+
+signals:
+ void hideSplash();
+ void statusMsg(const QString &);
+};
+
+#endif
diff --git a/quanta/project/Makefile.am b/quanta/project/Makefile.am
new file mode 100644
index 00000000..f9a4248f
--- /dev/null
+++ b/quanta/project/Makefile.am
@@ -0,0 +1,26 @@
+noinst_LTLIBRARIES = libproject.la
+METASOURCES = AUTO
+
+libproject_la_SOURCES = projectoptions.ui projectnewgenerals.ui \
+ projectnewgeneral.cpp projectnewlocals.ui projectnewlocal.cpp rescanprj.cpp rescanprjdir.ui \
+ projectnewfinals.ui projectuploads.ui projectnewfinal.cpp projectupload.cpp project.cpp \
+ projectnewwebs.ui projectnewweb.cpp uploadprofiledlgs.ui projectlist.cpp \
+ membereditdlgs.ui teammembersdlgs.ui teammembersdlg.cpp membereditdlg.cpp \
+ subprojecteditdlgs.ui eventconfigurationdlgs.ui eventeditordlgs.ui eventconfigurationdlg.cpp \
+ eventeditordlg.cpp uploadprofiles.cpp uploadprofilespage.ui projectprivate.cpp
+
+AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \
+ -I$(top_srcdir)/quanta/parsers \
+ -I$(top_srcdir)/quanta/dialogs \
+ -I$(top_srcdir)/quanta/dialogs/tagdialogs \
+ -I$(top_srcdir)/quanta/treeviews \
+ -I$(top_srcdir)/quanta/src \
+ -I$(top_srcdir)/quanta/utility \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/quanta/components/debugger \
+ -I$(top_srcdir)/quanta/components/debugger/interfaces \
+ -I$(top_builddir)/quanta/dialogs \
+ $(KMDI_INCLUDES) $(all_includes)
+
+noinst_HEADERS = teammembersdlg.h membereditdlg.h eventconfigurationdlg.h \
+ eventeditordlg.h
diff --git a/quanta/project/eventconfigurationdlg.cpp b/quanta/project/eventconfigurationdlg.cpp
new file mode 100644
index 00000000..e85ce7f6
--- /dev/null
+++ b/quanta/project/eventconfigurationdlg.cpp
@@ -0,0 +1,151 @@
+/***************************************************************************
+ eventconfigurationdlg.cpp - description
+ -------------------
+ begin : Mon Jul 12 2004
+ copyright : (C) 2004 Andras Mantia <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 <qdom.h>
+
+//kde includes
+#include <kcombobox.h>
+#include <kdialogbase.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+//app includes
+#include "eventconfigurationdlg.h"
+#include "eventeditordlg.h"
+#include "qpevents.h"
+
+EventConfigurationDlg::EventConfigurationDlg(KActionCollection *actionCollection, QWidget* parent, const char* name, WFlags fl)
+: EventConfigurationDlgS(parent,name,fl)
+{
+ m_actionCollection = actionCollection;
+}
+
+EventConfigurationDlg::~EventConfigurationDlg()
+{
+}
+
+void EventConfigurationDlg::initEvents(EventActions *events)
+{
+ QListViewItem *item;
+ for (EventActions::ConstIterator it = events->constBegin(); it != events->constEnd(); ++it)
+ {
+ QValueList<EventAction> evList = it.data();
+ for (QValueList<EventAction>::ConstIterator it2 = evList.constBegin(); it2 != evList.constEnd(); ++it2)
+ {
+ EventAction ev = *it2;
+ item = new QListViewItem(eventsListView, QPEvents::ref()->fullEventName(it.key()), QPEvents::ref()->fullActionName(ev.action));
+ int argcount = ev.arguments.count();
+ if (argcount > 0)
+ item->setText(2, ev.arguments[0]);
+ if (argcount > 1)
+ item->setText(3, ev.arguments[1]);
+ if (argcount > 2)
+ item->setText(4, ev.arguments[2]);
+ if (argcount > 3)
+ item->setText(5, ev.arguments[3]);
+ }
+ }
+}
+
+void EventConfigurationDlg::saveEvents(QDomDocument dom)
+{
+ QDomNode projectNode = dom.firstChild().firstChild();
+ QDomNode eventsNode = projectNode.namedItem("events");
+ projectNode.removeChild(eventsNode);
+ eventsNode = dom.createElement("events");
+ projectNode.appendChild(eventsNode);
+ QDomElement node;
+ QListViewItemIterator it(eventsListView);
+ QListViewItem *item;
+ while (it.current())
+ {
+ item = it.current();
+ node = dom.createElement("event");
+ eventsNode.appendChild(node);
+ QDomElement el = node.toElement();
+ el.setAttribute("name", QPEvents::ref()->eventName(item->text(0)));
+ el.setAttribute("action", QPEvents::ref()->actionName(item->text(1)));
+ if (el.attribute("action") == "script" || el.attribute("action") == "action")
+ el.setAttribute("type", "external");
+ else
+ el.setAttribute("type", "internal");
+ for (uint i = 2; i < 6; i++)
+ {
+ QString s = item->text(i);
+ if (s.isEmpty())
+ s = "--not set--";
+ QDomNode argNode = dom.createElement("argument");
+ node.appendChild(argNode);
+ argNode.appendChild(dom.createTextNode(s));
+ }
+ ++it;
+ }
+}
+
+void EventConfigurationDlg::slotAddEvent()
+{
+ KDialogBase editDlg(this, "add_event", true, i18n("New Event"), KDialogBase::Ok | KDialogBase::Cancel);
+ EventEditorDlg eventDlg(m_actionCollection, &editDlg);
+ editDlg.setMainWidget(&eventDlg);
+ if (editDlg.exec())
+ {
+ QListViewItem *item = new QListViewItem(eventsListView);
+ item->setText(0, eventDlg.eventCombo->currentText());
+ item->setText(1, eventDlg.actionCombo->currentText());
+ item->setText(2, eventDlg.argument1());
+ item->setText(3, eventDlg.argument2());
+ item->setText(4, eventDlg.argument3());
+ item->setText(5, eventDlg.argument4());
+ }
+}
+
+void EventConfigurationDlg::slotEditEvent()
+{
+ QListViewItem *item = eventsListView->currentItem();
+ if (!item) return;
+ KDialogBase editDlg(this, "edit_event", true, i18n("Edit Event"), KDialogBase::Ok | KDialogBase::Cancel);
+ EventEditorDlg eventDlg(m_actionCollection, &editDlg);
+ editDlg.setMainWidget(&eventDlg);
+ eventDlg.setEvent(item->text(0));
+ eventDlg.setAction(item->text(1));
+ QStringList arguments;
+ arguments << item->text(2) << item->text(3) << item->text(4) << item->text(5);
+ eventDlg.setArguments(arguments);
+ if (editDlg.exec())
+ {
+ item->setText(0, eventDlg.eventCombo->currentText());
+ item->setText(1, eventDlg.actionCombo->currentText());
+ item->setText(2, eventDlg.argument1());
+ item->setText(3, eventDlg.argument2());
+ item->setText(4, eventDlg.argument3());
+ item->setText(5, eventDlg.argument4());
+ }
+}
+
+void EventConfigurationDlg::slotDeleteEvent()
+{
+ QListViewItem *item = eventsListView->currentItem();
+ if (!item) return;
+ if (KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure that you want to remove the configuration of the <b>%1</b> event?</qt>").arg(item->text(0)), i18n("Delete Event Configuration"),KStdGuiItem::del()) == KMessageBox::Continue)
+ {
+ delete item;
+ }
+}
+
+#include "eventconfigurationdlg.moc"
+
diff --git a/quanta/project/eventconfigurationdlg.h b/quanta/project/eventconfigurationdlg.h
new file mode 100644
index 00000000..b1e4c14d
--- /dev/null
+++ b/quanta/project/eventconfigurationdlg.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ eventconfigurationdlg.h - description
+ -------------------
+ begin : Mon Jul 12 2004
+ copyright : (C) 2004 Andras Mantia <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 EVENTCONFIGURATIONDLG_H
+#define EVENTCONFIGURATIONDLG_H
+
+#include "eventconfigurationdlgs.h"
+
+class QDomDocument;
+class KActionCollection;
+struct EventAction;
+typedef QMap<QString, QValueList<EventAction> > EventActions;
+
+class EventConfigurationDlg : public EventConfigurationDlgS
+{
+ Q_OBJECT
+
+public:
+ EventConfigurationDlg(KActionCollection *actionCollection, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~EventConfigurationDlg();
+ void initEvents(EventActions *events);
+ void saveEvents(QDomDocument dom);
+
+public slots:
+ void slotEditEvent();
+ void slotAddEvent();
+ void slotDeleteEvent();
+
+protected:
+ KActionCollection *m_actionCollection;
+
+protected slots:
+
+};
+
+#endif
+
diff --git a/quanta/project/eventconfigurationdlgs.ui b/quanta/project/eventconfigurationdlgs.ui
new file mode 100644
index 00000000..329791b8
--- /dev/null
+++ b/quanta/project/eventconfigurationdlgs.ui
@@ -0,0 +1,223 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>EventConfigurationDlgS</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>EventConfigurationDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>enableEventsBox</cstring>
+ </property>
+ <property name="text">
+ <string>Ena&amp;ble the event actions</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Configure Events</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>addButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>editButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Edit</string>
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>172</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KListView" row="0" column="0" rowspan="1" colspan="5">
+ <column>
+ <property name="text">
+ <string>Event</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Action</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Argument 1</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Argument 2</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Argument 3</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Argument 4</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>eventsListView</cstring>
+ </property>
+ </widget>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>150</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="1" column="4">
+ <property name="name">
+ <cstring>deleteButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+</customwidgets>
+<connections>
+ <connection>
+ <sender>addButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EventConfigurationDlgS</receiver>
+ <slot>slotAddEvent()</slot>
+ </connection>
+ <connection>
+ <sender>deleteButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EventConfigurationDlgS</receiver>
+ <slot>slotDeleteEvent()</slot>
+ </connection>
+ <connection>
+ <sender>editButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EventConfigurationDlgS</receiver>
+ <slot>slotEditEvent()</slot>
+ </connection>
+ <connection>
+ <sender>eventsListView</sender>
+ <signal>doubleClicked(QListViewItem*)</signal>
+ <receiver>EventConfigurationDlgS</receiver>
+ <slot>slotEditEvent()</slot>
+ </connection>
+ <connection>
+ <sender>enableEventsBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>groupBox1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>eventsListView</tabstop>
+ <tabstop>addButton</tabstop>
+ <tabstop>editButton</tabstop>
+ <tabstop>deleteButton</tabstop>
+</tabstops>
+<slots>
+ <slot>slotEditEvent()</slot>
+ <slot>slotAddEvent()</slot>
+ <slot>slotDeleteEvent()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klistview.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/eventeditordlg.cpp b/quanta/project/eventeditordlg.cpp
new file mode 100644
index 00000000..d67251f0
--- /dev/null
+++ b/quanta/project/eventeditordlg.cpp
@@ -0,0 +1,407 @@
+/***************************************************************************
+ eventeditordlg.cpp - description
+ -------------------
+ begin : Mon Jul 12 2004
+ copyright : (C) 2004 Andras Mantia <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 <qlabel.h>
+#include <qregexp.h>
+#include <qtooltip.h>
+
+//kde includes
+#include <kaction.h>
+#include <kcombobox.h>
+#include <klocale.h>
+
+ //app includes
+#include "eventeditordlg.h"
+#include "qpevents.h"
+#include "project.h"
+#include "tagaction.h"
+
+extern QString simpleMemberStr;
+extern QString taskLeaderStr;
+extern QString teamLeaderStr;
+extern QString subprojectLeaderStr;
+
+EventEditorDlg::EventEditorDlg(KActionCollection *actionCollection, QWidget* parent, const char* name, WFlags fl)
+: EventEditorDlgS(parent,name,fl)
+{
+ m_actionCollection = actionCollection;
+ eventCombo->insertStringList(QPEvents::ref()->eventNames());
+ actionCombo->insertStringList(QPEvents::ref()->actionNames());
+ slotActionChanged(actionCombo->currentText());
+}
+
+EventEditorDlg::~EventEditorDlg()
+{
+}
+
+void EventEditorDlg::setEvent(const QString &name)
+{
+ for (int i = 0; i < eventCombo->count(); i++)
+ {
+ if (eventCombo->text(i) == name)
+ {
+ eventCombo->setCurrentItem(i);
+ break;
+ }
+ }
+}
+
+void EventEditorDlg::setAction(const QString &name)
+{
+ for (int i = 0; i < actionCombo->count(); i++)
+ {
+ if (actionCombo->text(i) == name)
+ {
+ actionCombo->setCurrentItem(i);
+ slotActionChanged(name);
+ break;
+ }
+ }
+}
+
+QString EventEditorDlg::argument1()
+{
+ if (argument1Combo->isEnabled())
+ {
+ QString s = argument1Combo->currentText();
+ QString actionType = actionCombo->currentText();
+ if (actionType == QPEvents::ref()->fullActionName("email"))
+ {
+ if (s == i18n(teamLeaderStr.utf8()))
+ s = "teamleader";
+ else
+ if (s.startsWith(i18n(taskLeaderStr.utf8()) +" - "))
+ {
+ s.remove(i18n(taskLeaderStr.utf8()) +" - ");
+ s.prepend("taskleader-");
+ } else
+ if (s.startsWith(i18n(subprojectLeaderStr.utf8()) +" - "))
+ {
+ s.remove(i18n(subprojectLeaderStr.utf8()) +" - ");
+ s.prepend("subprojectleader-");
+ }
+ return s;
+ } else
+ if (actionType == QPEvents::ref()->fullActionName("script"))
+ {
+ QString s = argument1Combo->currentText();
+ for (QMap<QString, QString>::ConstIterator it = m_scriptActions.constBegin(); it != m_scriptActions.constEnd(); ++it)
+ {
+ if (it.data() == s)
+ {
+ s = it.key();
+ break;
+ }
+ }
+ return s;
+ } else
+ if (actionType == QPEvents::ref()->fullActionName("action"))
+ {
+ QString s = argument1Combo->currentText();
+ for (QMap<QString, QString>::ConstIterator it = m_otherActions.constBegin(); it != m_otherActions.constEnd(); ++it)
+ {
+ if (it.data() == s)
+ {
+ s = it.key();
+ break;
+ }
+ }
+ return s;
+ } else
+
+ return s;
+ }
+
+ return QString::null;
+}
+
+QString EventEditorDlg::argument2()
+{
+ if (argument2Combo->isEnabled())
+ {
+ QString actionType = actionCombo->currentText();
+ if (actionType == QPEvents::ref()->fullActionName("log"))
+ {
+ int id = argument2Combo->currentItem();
+ if (id == 0)
+ return "full";
+ else
+ return "minimal";
+ } else
+ if (actionType == QPEvents::ref()->fullActionName("script"))
+ {
+ int id = argument2Combo->currentItem();
+ if (id == 0)
+ return "yes";
+ else
+ return "no";
+ }
+ return argument2Combo->currentText();
+ } else
+ return QString::null;
+}
+
+QString EventEditorDlg::argument3()
+{
+ if (argument3Combo->isEnabled())
+ {
+ QString actionType = actionCombo->currentText();
+ if (actionType == QPEvents::ref()->fullActionName("log"))
+ {
+ int id = argument3Combo->currentItem();
+ if (id == 0)
+ return "create_new";
+ else
+ return "append";
+ }
+ return argument3Combo->currentText();
+ } else
+ return QString::null;
+}
+
+QString EventEditorDlg::argument4()
+{
+ if (argument4Combo->isEnabled())
+ {
+ return argument4Combo->currentText();
+ } else
+ return QString::null;
+}
+
+void EventEditorDlg::setArguments(const QStringList& arguments)
+{
+ QString actionType = actionCombo->currentText();
+ if (actionType == QPEvents::ref()->fullActionName("email"))
+ {
+ QString s = arguments[0];
+ if (s == "teamleader")
+ s = i18n(teamLeaderStr.utf8());
+ else
+ if (s.startsWith("taskleader-"))
+ {
+ s.remove("taskleader-");
+ s.prepend(i18n(taskLeaderStr.utf8()) +" - ");
+ } else
+ if (s.startsWith("subprojectleader-"))
+ {
+ s.remove("subprojectleader-");
+ s.prepend(i18n(subprojectLeaderStr.utf8()) +" - ");
+ }
+ if (argument1Combo->contains(s))
+ {
+ for (int i = 0; i < argument1Combo->count(); i++)
+ {
+ if (argument1Combo->text(i) == s)
+ {
+ argument1Combo->setCurrentItem(i);
+ break;
+ }
+ }
+ }
+ else
+ {
+ argument1Combo->insertItem(s, 0);
+ argument1Combo->setCurrentItem(0);
+ }
+ } else
+ if (actionType == QPEvents::ref()->fullActionName("script"))
+ {
+ QString s = arguments[0];
+ if (m_scriptActions.contains(s))
+ s = m_scriptActions[s];
+ if (argument1Combo->contains(s))
+ {
+ for (int i = 0; i < argument1Combo->count(); i++)
+ {
+ if (argument1Combo->text(i) == s)
+ {
+ argument1Combo->setCurrentItem(i);
+ break;
+ }
+ }
+ }
+ else
+ {
+ argument1Combo->insertItem(s, 0);
+ argument1Combo->setCurrentItem(0);
+ }
+ s = arguments[1];
+ if (s == "yes")
+ argument2Combo->setCurrentItem(0);
+ else if (s == "no")
+ argument2Combo->setCurrentItem(1);
+ return; //setup for script arguments completed
+ } else
+ if (actionType == QPEvents::ref()->fullActionName("action"))
+ {
+ QString s = arguments[0];
+ if (m_otherActions.contains(s))
+ s = m_otherActions[s];
+ if (argument1Combo->contains(s))
+ {
+ for (int i = 0; i < argument1Combo->count(); i++)
+ {
+ if (argument1Combo->text(i) == s)
+ {
+ argument1Combo->setCurrentItem(i);
+ break;
+ }
+ }
+ }
+ else
+ {
+ argument1Combo->insertItem(s, 0);
+ argument1Combo->setCurrentItem(0);
+ }
+ } else
+ if (actionType == QPEvents::ref()->fullActionName("log"))
+ {
+ argument1Combo->insertItem(arguments[0], 0);
+ argument1Combo->setCurrentItem(0);
+ QString s = arguments[1];
+ if (s == "full")
+ argument2Combo->setCurrentItem(0);
+ else if (s == "minimal")
+ argument2Combo->setCurrentItem(1);
+ s = arguments[2];
+ if (s == "create_new")
+ argument3Combo->setCurrentItem(0);
+ else if (s == "append")
+ argument3Combo->setCurrentItem(1);
+ return; //setup for log arguments completed
+ } else
+ {
+ argument1Combo->insertItem(arguments[0], 0);
+ argument1Combo->setCurrentItem(0);
+ }
+ argument2Combo->insertItem(arguments[1], 0);
+ argument2Combo->setCurrentItem(0);
+ argument3Combo->insertItem(arguments[2], 0);
+ argument3Combo->setCurrentItem(0);
+ argument4Combo->insertItem(arguments[3], 0);
+ argument4Combo->setCurrentItem(0);
+}
+
+void EventEditorDlg::resetArgumentWidgets(QLabel *label, KComboBox *combo)
+{
+ label->setText(i18n("Argument:"));
+ label->setEnabled(false);
+ combo->setEnabled(false);
+ combo->setEditable(true);
+ combo->clear();
+ QToolTip::remove(combo);
+}
+
+void EventEditorDlg::slotActionChanged(const QString &name)
+{
+ resetArgumentWidgets(argument1Label, argument1Combo);
+ resetArgumentWidgets(argument2Label, argument2Combo);
+ resetArgumentWidgets(argument3Label, argument3Combo);
+ resetArgumentWidgets(argument4Label, argument4Combo);
+ if (name == QPEvents::ref()->fullActionName("email"))
+ {
+ argument1Label->setEnabled(true);
+ argument1Label->setText(i18n("Receiver:"));
+ argument1Combo->setEnabled(true);
+ argument1Combo->insertItem(i18n(teamLeaderStr.utf8()));
+ QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (uint i = 0; i < subprojects->count(); i++)
+ {
+ QString s = (*subprojects)[i].name;
+ if (!Project::ref()->subprojectLeader(s).name.isEmpty())
+ argument1Combo->insertItem(i18n(subprojectLeaderStr.utf8()) + " - " + s);
+ }
+ QStringList tasks = Project::ref()->tasks();
+ for (uint i = 0; i < tasks.count(); i++)
+ {
+ argument1Combo->insertItem(i18n(taskLeaderStr.utf8()) + " - " + tasks[i]);
+ }
+ } else
+ if (name == QPEvents::ref()->fullActionName("log"))
+ {
+ argument1Label->setEnabled(true);
+ argument1Label->setText(i18n("Log file:"));
+ argument1Combo->setEnabled(true);
+ QToolTip::add(argument1Combo, i18n("A relative file to the project folder or a file outside of the project folder in which case the full path must be specified."));
+ argument2Label->setEnabled(true);
+ argument2Label->setText(i18n("Detail:"));
+ argument2Combo->setEnabled(true);
+ argument2Combo->setEditable(false);
+ argument2Combo->insertItem(i18n("Full"), 0);
+ argument2Combo->insertItem(i18n("Minimal"), 1);
+ argument3Label->setEnabled(true);
+ argument3Label->setText(i18n("Behavior:"));
+ argument3Combo->setEnabled(true);
+ argument3Combo->setEditable(false);
+ argument3Combo->insertItem(i18n("Create New Log"), 0);
+ argument3Combo->insertItem(i18n("Append to Existing Log"), 1);
+ } else
+ if (name == QPEvents::ref()->fullActionName("script"))
+ {
+ argument1Label->setEnabled(true);
+ argument1Label->setText(i18n("Action name:"));
+ TagAction *action = 0L;
+ QString s;
+ QStringList items;
+ QRegExp r("\\&(?!\\&)");
+ for (uint i = 0; i < m_actionCollection->count(); i++)
+ {
+ action = dynamic_cast<TagAction*>(m_actionCollection->action(i));
+ if (action && action->type() == "script")
+ {
+ s = action->text().replace(r, "");
+ items.append(s);
+ m_scriptActions[action->name()] = s;
+ }
+ }
+ items.sort();
+ argument1Combo->insertStringList(items);
+ argument1Combo->setEnabled(true);
+ argument2Label->setEnabled(true);
+ argument2Label->setText(i18n("Blocking:"));
+ argument2Combo->setEnabled(true);
+ argument2Combo->setEditable(false);
+ argument2Combo->insertItem(i18n("Yes"), 0);
+ argument2Combo->insertItem(i18n("No"), 1);
+ } else
+ if (name == QPEvents::ref()->fullActionName("action"))
+ {
+ argument1Label->setEnabled(true);
+ argument1Label->setText(i18n("Action name:"));
+ TagAction *action = 0L;
+ QString s;
+ QRegExp r("\\&(?!\\&)");
+ QStringList items;
+ for (uint i = 0; i < m_actionCollection->count(); i++)
+ {
+ KAction *a = m_actionCollection->action(i);
+ action = dynamic_cast<TagAction*>(a);
+ if (!action || action->type() != "script")
+ {
+ s = a->text().replace(r, "");
+ items.append(s);
+ m_otherActions[a->name()] = s;
+ }
+ }
+ items.sort();
+ argument1Combo->insertStringList(items);
+ argument1Combo->setEnabled(true);
+ }
+}
+
+#include "eventeditordlg.moc"
+
diff --git a/quanta/project/eventeditordlg.h b/quanta/project/eventeditordlg.h
new file mode 100644
index 00000000..a8dd6842
--- /dev/null
+++ b/quanta/project/eventeditordlg.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+ eventeditordlg.h - description
+ -------------------
+ begin : Mon Jul 12 2004
+ copyright : (C) 2004 Andras Mantia <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 EVENTEDITORDLG_H
+#define EVENTEDITORDLG_H
+
+#include "eventeditordlgs.h"
+
+class QLabel;
+class KActionCollection;
+class KComboBox;
+
+class EventEditorDlg : public EventEditorDlgS
+{
+ Q_OBJECT
+
+public:
+ EventEditorDlg(KActionCollection *actionCollection, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~EventEditorDlg();
+ void setEvent(const QString &name);
+ void setAction(const QString &name);
+ void setArguments(const QStringList& arguments);
+ QString argument1();
+ QString argument2();
+ QString argument3();
+ QString argument4();
+
+public slots:
+ void slotActionChanged(const QString &name);
+
+protected:
+ void resetArgumentWidgets(QLabel *label, KComboBox *combo);
+
+ QMap<QString, QString> m_scriptActions;
+ QMap<QString, QString> m_otherActions;
+ KActionCollection *m_actionCollection;
+
+protected slots:
+
+};
+
+#endif
+
diff --git a/quanta/project/eventeditordlgs.ui b/quanta/project/eventeditordlgs.ui
new file mode 100644
index 00000000..a19a35d1
--- /dev/null
+++ b/quanta/project/eventeditordlgs.ui
@@ -0,0 +1,236 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>EventEditorDlgS</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>EventEditorDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>544</width>
+ <height>206</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>350</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Event:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>eventCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Action:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>actionCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>argument1Label</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Argument 1:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="2" column="1">
+ <property name="name">
+ <cstring>argument1Combo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>argument2Label</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Argument 2:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="1">
+ <property name="name">
+ <cstring>argument2Combo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>argument3Label</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Argument 3:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>argument4Label</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Argument 4:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="4" column="1">
+ <property name="name">
+ <cstring>argument3Combo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="5" column="1">
+ <property name="name">
+ <cstring>argument4Combo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>actionCombo</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>EventEditorDlgS</receiver>
+ <slot>slotActionChanged(const QString&amp;)</slot>
+ </connection>
+</connections>
+<slots>
+ <slot>slotActionChanged(const QString &amp;name)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/membereditdlg.cpp b/quanta/project/membereditdlg.cpp
new file mode 100644
index 00000000..6e47d044
--- /dev/null
+++ b/quanta/project/membereditdlg.cpp
@@ -0,0 +1,183 @@
+/***************************************************************************
+ membereditdlg.cpp - description
+ -------------------
+ begin : Wed Jul 7 2004
+ copyright : (C) 2004 Andras Mantia <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 <qcheckbox.h>
+
+//kde includes
+#include <kcombobox.h>
+#include <kdialogbase.h>
+#include <kinputdialog.h>
+#include <klineedit.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kpushbutton.h>
+#include <kabc/stdaddressbook.h>
+
+//app includes
+#include "listdlg.h"
+#include "membereditdlg.h"
+#include "subprojecteditdlgs.h"
+#include "project.h"
+
+QString simpleMemberStr = I18N_NOOP("Simple Member");
+QString taskLeaderStr = I18N_NOOP("Task Leader");
+QString teamLeaderStr = I18N_NOOP("Team Leader");
+QString subprojectLeaderStr = I18N_NOOP("Subproject Leader");
+
+
+MemberEditDlg::MemberEditDlg(QWidget *parent, const char *name)
+ : MemberEditDlgS(parent, name)
+{
+ QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (QValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
+ subprojectCombo->insertItem((*it).name);
+ subprojectCombo->setEnabled(false);
+ editSubprojectsButton->setEnabled(false);
+
+ QMap<QString, TeamMember> members = Project::ref()->allMembers();
+ QStringList items;
+ for (QMap<QString, TeamMember>::ConstIterator it = members.constBegin(); it != members.constEnd(); ++it)
+ {
+ nameCombo->insertItem(it.key());
+ }
+ nameCombo->insertItem(QString::null, 0);
+
+ roleCombo->insertItem(i18n(teamLeaderStr.utf8()));
+ roleCombo->insertItem(i18n(subprojectLeaderStr.utf8()));
+ roleCombo->insertItem(i18n(taskLeaderStr.utf8()));
+ roleCombo->insertItem(i18n(simpleMemberStr.utf8()));
+ roleCombo->setCurrentItem(3);
+}
+
+
+MemberEditDlg::~MemberEditDlg()
+{
+}
+
+void MemberEditDlg::slotRoleSelected(const QString &roleName)
+{
+ if (roleName != i18n(subprojectLeaderStr.utf8()))
+ {
+ subprojectCombo->setEnabled(false);
+ editSubprojectsButton->setEnabled(false);
+ } else
+ {
+ subprojectCombo->setEnabled(true);
+ editSubprojectsButton->setEnabled(true);
+ }
+}
+
+void MemberEditDlg::slotEditSubprojects()
+{
+ KDialogBase editDlg(this, "edit_subprojects", true, i18n("Edit Subprojects"), KDialogBase::Ok | KDialogBase::Cancel);
+ SubprojectEditDlgS subprojectDlg(&editDlg);
+ editDlg.setMainWidget(&subprojectDlg);
+ QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ int idx = 0;
+ SubProject subProject;
+ for (uint i = 0; i < subprojects->count(); i++)
+ {
+ subProject = (*subprojects)[i];
+ if (subprojectCombo->currentText() == subProject.name)
+ {
+ subprojectDlg.nameEdit->setText(subProject.name);
+ subprojectDlg.locationEdit->setText(subProject.location);
+ idx = i;
+ break;
+ }
+ }
+ if (subprojects->count() == 0)
+ subprojectDlg.createNew->setChecked(true);
+ if (editDlg.exec())
+ {
+ QString oldName = subProject.name;
+ subProject.name = subprojectDlg.nameEdit->text();
+ subProject.location = subprojectDlg.locationEdit->text();
+ if (subprojectDlg.createNew->isChecked() && (subProject.name != oldName))
+ {
+ subprojects->append(subProject);
+ subprojectCombo->insertItem(subProject.name);
+ subprojectCombo->setCurrentItem(subprojectCombo->count() - 1);
+ } else
+ {
+ (*subprojects)[idx] = subProject;
+ subprojectCombo->setCurrentText(subProject.name);
+ }
+ }
+}
+
+void MemberEditDlg::slotMemberSelected()
+{
+ QString name = nameCombo->currentText();
+ QMap<QString, TeamMember> members = Project::ref()->allMembers();
+ if (members.contains(name))
+ {
+ emailEdit->setText(members[name].email);
+ }
+}
+
+void MemberEditDlg::selectMember(const QString &name)
+{
+ bool found = false;
+ for (int i = 0; i < nameCombo->count(); i++)
+ {
+ if (nameCombo->text(i) == name)
+ {
+ nameCombo->setCurrentItem(i);
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ nameCombo->insertItem(name, 1);
+ nameCombo->setCurrentItem(1);
+ }
+}
+
+void MemberEditDlg::slotSelectFromAddrBook()
+{
+ QMap<QString, QString> uidMap;
+ QString name;
+ QStringList result;
+ KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
+ KABC::AddressBook::ConstIterator it;
+ KABC::AddressBook::ConstIterator end = addressBook->end();
+ for( it = addressBook->begin(); it != end; ++it )
+ {
+ result.append((*it).assembledName());
+ uidMap.insert((*it).assembledName(), (*it).uid());
+ }
+ result.sort();
+
+ if ( result.count() > 0 )
+ {
+ ListDlg listDlg(result);
+ listDlg.setCaption(i18n("Select Member"));
+ if (!listDlg.exec()) return;
+ name = listDlg.getEntry();
+ KABC::Addressee entry = addressBook->findByUid(uidMap[name]);
+ nameCombo->insertItem(name, 1);
+ nameCombo->setCurrentItem(1);
+ emailEdit->setText(entry.emails()[0]);
+ nicknameEdit->setText(entry.nickName());
+ } else
+ {
+ KMessageBox::error(this,i18n("No entries found in the addressbook."));
+ }
+}
+
+#include "membereditdlg.moc"
diff --git a/quanta/project/membereditdlg.h b/quanta/project/membereditdlg.h
new file mode 100644
index 00000000..33669488
--- /dev/null
+++ b/quanta/project/membereditdlg.h
@@ -0,0 +1,40 @@
+/***************************************************************************
+ membereditdlg.h - description
+ -------------------
+ begin : Wed Jul 7 2004
+ copyright : (C) 2004 Andras Mantia <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 MEMBEREDITDLG_H
+#define MEMBEREDITDLG_H
+
+#include <membereditdlgs.h>
+
+/**
+@author Andras Mantia
+*/
+class MemberEditDlg : public MemberEditDlgS
+{
+Q_OBJECT
+public:
+ MemberEditDlg(QWidget *parent = 0, const char *name = 0);
+ ~MemberEditDlg();
+ void selectMember(const QString &name);
+
+public slots:
+ void slotRoleSelected(const QString& roleName);
+ void slotEditSubprojects();
+ void slotMemberSelected();
+ void slotSelectFromAddrBook();
+};
+
+#endif
diff --git a/quanta/project/membereditdlgs.ui b/quanta/project/membereditdlgs.ui
new file mode 100644
index 00000000..487e20bf
--- /dev/null
+++ b/quanta/project/membereditdlgs.ui
@@ -0,0 +1,196 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>MemberEditDlgS</class>
+<author>(C) 2005 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>MemberEditDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>553</width>
+ <height>236</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KComboBox" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>nameCombo</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="0" column="3">
+ <property name="name">
+ <cstring>selectButton</cstring>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>nameCombo</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="5" column="2" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>editSubprojectsButton</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;dit Subprojects</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="3" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>roleCombo</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="4" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>taskEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Tas&amp;k:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>taskEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>textLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Subpro&amp;ject:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>subprojectCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Role:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>roleCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Email:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>emailEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="5" column="1">
+ <property name="name">
+ <cstring>subprojectCombo</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Nickname:</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="2" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>emailEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>nicknameEdit</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>roleCombo</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>MemberEditDlgS</receiver>
+ <slot>slotRoleSelected(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>editSubprojectsButton</sender>
+ <signal>clicked()</signal>
+ <receiver>MemberEditDlgS</receiver>
+ <slot>slotEditSubprojects()</slot>
+ </connection>
+ <connection>
+ <sender>nameCombo</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>MemberEditDlgS</receiver>
+ <slot>slotMemberSelected()</slot>
+ </connection>
+ <connection>
+ <sender>selectButton</sender>
+ <signal>clicked()</signal>
+ <receiver>MemberEditDlgS</receiver>
+ <slot>slotSelectFromAddrBook()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>nameCombo</tabstop>
+ <tabstop>selectButton</tabstop>
+ <tabstop>nicknameEdit</tabstop>
+ <tabstop>emailEdit</tabstop>
+ <tabstop>roleCombo</tabstop>
+ <tabstop>taskEdit</tabstop>
+ <tabstop>subprojectCombo</tabstop>
+ <tabstop>editSubprojectsButton</tabstop>
+</tabstops>
+<slots>
+ <slot>slotRoleSelected(const QString&amp; roleName)</slot>
+ <slot>slotEditSubprojects()</slot>
+ <slot>slotMemberSelected()</slot>
+ <slot>slotSelectFromAddrBook()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>kcombobox.h</includehint>
+ <includehint>klineedit.h</includehint>
+ <includehint>klineedit.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/project.cpp b/quanta/project/project.cpp
new file mode 100644
index 00000000..3601e628
--- /dev/null
+++ b/quanta/project/project.cpp
@@ -0,0 +1,1428 @@
+/***************************************************************************
+ project.cpp - description
+ -------------------
+ begin : Thu Mar 16 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2001-2005 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "project.h"
+
+// unix includes
+#include <time.h>
+#include <unistd.h>
+
+// include QT files
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlayout.h>
+
+// include files for KDE
+#include <kactionclasses.h>
+#include <kapplication.h>
+#include <kcharsets.h>
+#include <kdirwatch.h>
+#include <kio/netaccess.h>
+#include <klineedit.h>
+#include <klocale.h>
+#include <kmainwindow.h>
+#include <kmessagebox.h>
+#include <kparts/componentfactory.h>
+#include <kprogress.h>
+#include <kstringhandler.h>
+#include <kurlrequester.h>
+#include <kurlrequesterdlg.h>
+
+#include <ktexteditor/markinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+
+// application headers
+#include "copyto.h"
+#include "document.h"
+#include "dtds.h"
+#include "dtdselectdialog.h"
+#include "eventconfigurationdlg.h"
+#include "qextfileinfo.h"
+#include "quantacommon.h"
+#include "projectprivate.h"
+#include "projectupload.h"
+#include "projectoptions.h"
+#include "rescanprj.h"
+#include "resource.h"
+#include "teammembersdlg.h"
+#include "uploadprofilespage.h"
+#include "viewmanager.h"
+#include "qpevents.h"
+
+extern QString simpleMemberStr;
+extern QString taskLeaderStr;
+extern QString teamLeaderStr;
+extern QString subprojectLeaderStr;
+
+Project::Project(KMainWindow *parent)
+ : QObject()
+{
+ d = new ProjectPrivate(this);
+ connect(d, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ d->m_mainWindow = parent;
+ d->m_uploadDialog = 0L;
+ keepPasswd = true;
+ d->initActions(parent->actionCollection());
+}
+
+Project::~Project()
+{
+ delete d;
+ d = 0;
+}
+
+
+QStringList Project::fileNameList()
+{
+ QStringList list;
+ ProjectList::Iterator it( d->m_projectFiles );
+ for ( ; it.current(); ++it) {
+ if (! it.current()->fileName(false).isEmpty())
+ list.append(it.current()->url());
+ }
+ list.sort();
+ return list;
+}
+
+KURL::List Project::files()
+{
+ KURL::List list;
+ ProjectList::Iterator it( d->m_projectFiles );
+ for ( ; it.current(); ++it) {
+ if (!it.current()->fileName(false).isEmpty())
+ list.append((*it.current()));
+ }
+ return list;
+}
+
+void Project::insertFile(const KURL& nameURL, bool repaint )
+{
+ if (d->excludeRx.exactMatch(nameURL.path()))
+ return;
+ KURL url = nameURL;
+
+ if ( !d->baseURL.isParentOf(url) )
+ {
+ KURLRequesterDlg *urlRequesterDlg = new KURLRequesterDlg( d->baseURL.prettyURL(), d->m_mainWindow, "");
+ urlRequesterDlg->setCaption(i18n("%1: Copy to Project").arg(nameURL.prettyURL(0, KURL::StripFileProtocol)));
+ urlRequesterDlg->urlRequester()->setMode( KFile::Directory | KFile::ExistingOnly);
+ urlRequesterDlg->exec();
+ KURL destination = urlRequesterDlg->selectedURL();
+ if (destination.isLocalFile())
+ {
+ QDir dir(destination.path());
+ destination.setPath(dir.canonicalPath());
+ }
+ delete urlRequesterDlg;
+ if ( !destination.isEmpty() )
+ {
+ CopyTo *dlg = new CopyTo(d->baseURL);
+ connect(dlg, SIGNAL(deleteDialog(CopyTo*)), d,
+ SLOT(slotDeleteCopytoDlg(CopyTo*)));
+ url = dlg->copy( nameURL, destination );
+ }
+ else // Copy canceled, addition aborted
+ {
+ return;
+ }
+ }
+ QDomElement el;
+ while ( d->baseURL.isParentOf(url) )
+ {
+ if ( !d->m_projectFiles.contains(url) )
+ {
+ el = d->dom.createElement("item");
+ el.setAttribute("url", QuantaCommon::qUrl( QExtFileInfo::toRelative(url, d->baseURL) ));
+ d->dom.firstChild().firstChild().appendChild( el );
+ KURL u = url.upURL();
+ ProjectURL *parentURL = d->m_projectFiles.find(u);
+ int uploadStatus = 1;
+ if (parentURL)
+ uploadStatus = parentURL->uploadStatus;
+ d->m_projectFiles.insert( new ProjectURL(url, "", uploadStatus, false, el) );
+ }
+ url.setPath(url.directory(false));
+ }
+ emit eventHappened("after_project_add", url.url(), QString::null);
+ setModified();
+ if ( repaint )
+ {
+ emit reloadTree( &(d->m_projectFiles), false, QStringList());
+ emit newStatus();
+ }
+}
+
+
+void Project::readConfig(KConfig *config)
+{
+ d->config = config;
+ config->setGroup("General Options");
+ int maxRecentItems = config->readNumEntry("Recent Files Limit", 32);
+ d->m_projectRecent->setMaxItems(maxRecentItems);
+ config->setGroup ("Projects");
+ d->m_projectRecent->loadEntries(config, "RecentProjects");
+}
+
+
+void Project::loadLastProject(bool reload)
+{
+ d->config->setGroup("Projects");
+ QStringList projectList = QuantaCommon::readPathListEntry(d->config, "OpenProjects");
+ QStringList tempList = QuantaCommon::readPathListEntry(d->config, "ProjectTempFiles");
+ QStringList sessionTempList = QuantaCommon::readPathListEntry(d->config, "ProjectSessionTempFiles");
+ // remove all local open projects because project and temp file are the same
+ for (uint i = 0; i < projectList.count(); ++i)
+ {
+ if (KURL::fromPathOrURL( projectList[i] ).isLocalFile())
+ {
+ projectList.remove( projectList.at(i) );
+ QStringList::Iterator it = tempList.at(i);
+ if (it != tempList.end())
+ tempList.remove(it);
+ QStringList::Iterator it2 = sessionTempList.at(i);
+ if (it2 != sessionTempList.end())
+ sessionTempList.remove(it2);
+ --i;
+ }
+ }
+ QString urlPath;
+ KURL url;
+ // have we still a project left ?
+ while (projectList.count() > 0)
+ {
+ urlPath = projectList[0];
+ QuantaCommon::setUrl(url, urlPath);
+ QString tempPath = tempList[0];
+ QString sessionTempPath = sessionTempList[0];
+ // test if the remote project is available
+ if ( KIO::NetAccess::exists(url, false, d->m_mainWindow) )
+ {
+ KURL tempURL = KURL().fromPathOrURL(tempPath);
+ if (KIO::NetAccess::exists(tempURL, false, d->m_mainWindow) &&
+ KMessageBox::questionYesNo(d->m_mainWindow, i18n("<qt>Found a backup for project <b>%1</b>.<br> Do you want to open it?</qt>").arg(url.prettyURL()), i18n("Open Project Backup"), KStdGuiItem::open(), i18n("Do Not Open") )
+ == KMessageBox::Yes)
+ {
+ d->m_tmpProjectFile = tempPath;
+ d->m_tmpSessionFile = sessionTempPath;
+ d->loadProjectFromTemp(url, d->m_tmpProjectFile, d->m_tmpSessionFile);
+ // the lists might have changed
+ d->config->writePathEntry("OpenProjects", projectList);
+ d->config->writePathEntry("ProjectTempFiles", tempList);
+ d->config->writePathEntry("ProjectSessionTempFiles", sessionTempList);
+ d->config->sync();
+ return;
+ }
+ }
+ projectList.remove(projectList.at(0));
+ tempList.remove(tempList.at(0));
+ sessionTempList.remove(sessionTempList.at(0));
+ }
+ // the lists might have changed
+ d->config->writePathEntry("OpenProjects", projectList);
+ d->config->writePathEntry("ProjectTempFiles", tempList);
+ // now we look for the last project
+ urlPath = QuantaCommon::readPathEntry(d->config, "Last Project");
+ QuantaCommon::setUrl(url, urlPath);
+
+ if ( reload && (!urlPath.isEmpty() && url.isValid()))
+ {
+ if (!d->loadProject(url))
+ {
+ d->config->deleteEntry("Last Project");
+ }
+ }
+ d->config->sync();
+}
+
+///////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////
+// SLOTS implementation
+//
+
+void Project::slotOpenProject(const KURL &url)
+{
+ kdDebug(24000) << "Open recent project: " << url <<endl;
+ if ( !url.isEmpty() )
+ {
+ if ( !QExtFileInfo::exists(url, true, d->m_mainWindow) )
+ {
+ emit hideSplash();
+ if (KMessageBox::questionYesNo(d->m_mainWindow,
+ i18n("<qt>The file <b>%1</b> does not exist.<br> Do you want to remove it from the list?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep") )
+ == KMessageBox::Yes)
+ {
+ d->m_projectRecent->removeURL(url);
+ } else
+ d->m_projectRecent->setCurrentItem(0);
+ } else
+ {
+ d->loadProject ( url );
+ emit eventHappened("after_project_open", url.url(), QString::null);
+ }
+ }
+}
+
+
+
+// slot for insert file
+void Project::slotInsertFile( const KURL& url )
+{
+ insertFile( url, true );
+}
+
+
+void Project::slotAddDirectory(const KURL& p_dirURL, bool showDlg)
+{
+ KURL dirURL = p_dirURL;
+ if ( hasProject() && !dirURL.isEmpty() )
+ {
+ dirURL.adjustPath(1);
+ if ( !d->baseURL.isParentOf(dirURL) )
+ {
+ KURL destination = d->baseURL;
+ if (showDlg)
+ {
+ KURLRequesterDlg *urlRequesterDlg = new KURLRequesterDlg( d->baseURL.prettyURL(), d->m_mainWindow, "");
+ urlRequesterDlg->setCaption(i18n("%1: Copy to Project").arg(dirURL.prettyURL(0, KURL::StripFileProtocol)));
+ urlRequesterDlg->urlRequester()->setMode( KFile::Directory | KFile::ExistingOnly);
+ urlRequesterDlg->exec();
+ destination = urlRequesterDlg->selectedURL();
+ delete urlRequesterDlg;
+ }
+ if ( (showDlg == false) ||
+ (!destination.isEmpty()) )
+ {
+ CopyTo *dlg = new CopyTo(d->baseURL);
+ connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
+ SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, SIGNAL(deleteDialog(CopyTo *)), d,
+ SLOT (slotDeleteCopytoDlg(CopyTo *)));
+ //if ( rdir.right(1) == "/" ) rdir.remove( rdir.length()-1,1);
+ dirURL = dlg->copy(dirURL, destination);
+ return;
+ }
+ else
+ {
+ return;
+ }
+ }
+ d->insertFiles( dirURL, "*" );
+ //And again, insert now directly the directory name into the project.
+ //It's important if rdir doesn't contain any files or subdirectories.
+ d->insertFiles(dirURL);
+ emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ }
+}
+
+void Project::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
+{
+ KURL::List::ConstIterator it;
+ KURL url;
+ for (it = a_urlList.begin(); it != a_urlList.end(); ++it)
+ {
+ url = *it;
+ //url.adjustPath(1);
+ d->insertFiles( url, "*" );
+ }
+ emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+}
+
+//rename the elements in the project dom tree
+void Project::slotRenamed(const KURL& oldURL, const KURL& newURL)
+{
+ if ( oldURL == newURL) // just in case
+ return;
+
+ // remove the target if already there
+ // TODO: check if this is correct because it removes a folder but not the content?
+ d->m_projectFiles.removeFromListAndXML(newURL);
+
+ emit statusMsg(i18n("Renaming files..."));
+ progressBar->setTotalSteps(d->m_projectFiles.count());
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(true);
+
+ QDomElement el;
+ bool isFolder = oldURL.fileName(false).isEmpty();
+ ProjectList::Iterator it( d->m_projectFiles );
+ for ( ; it.current(); ++it)
+ {
+ ProjectURL * curUrl = it.current();
+ if ( oldURL == *curUrl || (isFolder && oldURL.isParentOf(*curUrl)) )
+ {
+ curUrl->setPath( curUrl->path().replace(oldURL.path(), newURL.path()) );
+ el = curUrl->domElement;
+ el.setAttribute("url", d->m_projectFiles.toRelative(*curUrl).path());
+// el.setAttribute("upload_time", "");
+ d->m_modified = true;
+ if (! isFolder)
+ break;
+ }
+ progressBar->advance(1);
+ }
+
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+
+ emit statusMsg(QString::null);
+ if (d->m_modified)
+ setModified(); // there happens more than setting the flag !
+
+ emit reloadTree(&(d->m_projectFiles), false, QStringList());
+ emit newStatus();
+}
+
+
+void Project::slotRemove(const KURL& urlToRemove)
+{
+ emit statusMsg(i18n("Removing files..."));
+ progressBar->setTotalSteps(d->m_projectFiles.count());
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(true);
+
+ KURL url;
+ bool isFolder = d->m_projectFiles.isFolder(urlToRemove);
+ ProjectList projectFiles = d->m_projectFiles;
+ ProjectList::Iterator it(projectFiles);
+ for ( ; it.current(); ++it)
+ {
+ url = *(it.current());
+ if (urlToRemove == url || (isFolder && urlToRemove.isParentOf(url)) )
+ {
+ d->m_projectFiles.removeFromListAndXML(url);
+ d->m_modified = true;
+ emit eventHappened("after_project_remove", url.url(), QString::null);
+ if (!isFolder)
+ break;
+ }
+ progressBar->advance(1);
+ }
+
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+
+ emit statusMsg(QString::null);
+
+ if (d->m_modified)
+ setModified(); // there happens more than setting the flag !
+ emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit newStatus();
+
+ QString urlPath = QExtFileInfo::toRelative(urlToRemove, d->baseURL).path();
+ QString nice = urlPath;
+ nice = KStringHandler::lsqueeze(nice, 60);
+ if (KMessageBox::warningContinueCancel(d->m_mainWindow, i18n("<qt>Do you want to remove <br><b>%1</b><br> from the server(s) as well?</qt>").arg(nice), i18n("Remove From Server"), KStdGuiItem::remove(), "RemoveFromServer") == KMessageBox::Continue )
+ {
+ QDomNode profilesNode = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles");
+ QDomNodeList profileList = profilesNode.toElement().elementsByTagName("profile");
+ QDomElement e;
+ QString s;
+ for (uint i = 0; i < profileList.count(); i++)
+ {
+ e = profileList.item(i).toElement();
+ QString path = e.attribute("remote_path","");
+ if (!path.startsWith("/"))
+ path.prepend("/");
+ KURL baseUrl;
+ baseUrl.setProtocol(e.attribute("remote_protocol","ftp"));
+ baseUrl.setPort(e.attribute("remote_port","").toInt());
+ baseUrl.setHost(e.attribute("remote_host",""));
+ baseUrl.setPath(path);
+ baseUrl.setUser(e.attribute("user",""));
+ QString passwd = password(e.attribute("remote_protocol") + "://" + e.attribute("user") + "@" + e.attribute("remote_host"));
+ baseUrl.setPass(passwd);
+ baseUrl.addPath(urlPath);
+ KIO::NetAccess::del(baseUrl, d->m_mainWindow);
+ }
+ }
+}
+
+
+
+void Project::slotOptions()
+{
+ KURL url;
+ KDialogBase optionsDlg(KDialogBase::Tabbed, WStyle_DialogBorder, d->m_mainWindow, "project_options", true, i18n("Project Settings"), KDialogBase::Ok | KDialogBase::Cancel);
+ // optionsDlg.setMainWidget(&optionsPage);
+
+ //add the main options page
+ QFrame *page = optionsDlg.addPage(i18n("Options"));
+ ProjectOptions optionsPage(page);
+ QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout->addWidget(&optionsPage);
+
+ optionsPage.linePrjName->setText( d->projectName );
+ url = QExtFileInfo::toRelative(d->templateURL, d->baseURL);
+ optionsPage.linePrjTmpl->setText(QuantaCommon::qUrl(url));
+ url = QExtFileInfo::toRelative(d->toolbarURL, d->baseURL);
+ optionsPage.linePrjToolbar->setText( QuantaCommon::qUrl(url) );
+
+ optionsPage.lineAuthor->setText( d->author );
+ optionsPage.lineEmail->setText( d->email );
+
+ // Signals to handle debugger settings
+ connect(optionsPage.buttonDebuggerOptions, SIGNAL(clicked()),
+ d, SLOT(slotDebuggerOptions()));
+ connect(optionsPage.comboDebuggerClient, SIGNAL(activated(const QString &)),
+ d, SLOT(slotDebuggerChanged(const QString &)));
+
+
+ // Debuggers Combo
+ KTrader::OfferList offers = KTrader::self()->query("Quanta/Debugger");
+ KTrader::OfferList::ConstIterator iterDbg;
+ optionsPage.comboDebuggerClient->clear();
+ optionsPage.comboDebuggerClient->insertItem(i18n("No Debugger"));
+ int idxDbg = 0;
+ d->m_debuggerClientEdit = d->debuggerClient;
+ optionsPage.buttonDebuggerOptions->setEnabled(false);
+ for(iterDbg = offers.begin(); iterDbg != offers.end(); ++iterDbg)
+ {
+ KService::Ptr service = *iterDbg;
+ optionsPage.comboDebuggerClient->insertItem(service->name());
+ idxDbg++;
+ if(d->debuggerClient == service->name())
+ {
+ optionsPage.comboDebuggerClient->setCurrentItem(idxDbg);
+ optionsPage.buttonDebuggerOptions->setEnabled(true);
+ }
+ }
+ optionsPage.checkDebuggerPersistentBreakpoints->setChecked(d->m_debuggerPersistentBreakpoints);
+ optionsPage.checkDebuggerPersistentWatches->setChecked(d->m_debuggerPersistentWatches);
+
+ QString excludeStr;
+ for (uint i = 0; i < d->excludeList.count(); i++)
+ {
+ excludeStr.append(d->excludeList[i]);
+ excludeStr.append(";");
+ }
+ optionsPage.lineExclude->setText(excludeStr);
+ optionsPage.checkCvsignore->setChecked(d->m_excludeCvsignore);
+
+ optionsPage.linePrefix->setText(d->previewPrefix.prettyURL());
+ QStringList lst = DTDs::ref()->nickNameList(true);
+ uint pos = 0;
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ optionsPage.dtdCombo->insertItem(lst[i]);
+ if (lst[i] == DTDs::ref()->getDTDNickNameFromName(d->m_defaultDTD))
+ pos = i;
+ }
+ optionsPage.dtdCombo->setCurrentItem(pos);
+
+
+ QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ optionsPage.encodingCombo->insertStringList( availableEncodingNames );
+ QStringList::ConstIterator iter;
+ int iIndex = -1;
+ for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
+ {
+ ++iIndex;
+ if ((*iter).lower() == d->m_defaultEncoding.lower())
+ {
+ optionsPage.encodingCombo->setCurrentItem(iIndex);
+ break;
+ }
+ }
+
+
+ QStringList list = d->projectViewList();
+ QString defaultView = d->dom.firstChild().firstChild().namedItem("autoload").toElement().attribute("projectview");
+ if (list.count() > 0)
+ {
+ optionsPage.viewCombo->insertStringList(list);
+ for (uint i = 0; i < list.count(); i++)
+ {
+ if (list[i] == defaultView)
+ {
+ optionsPage.viewCombo->setCurrentItem(i);
+ break;
+ }
+ }
+ } else
+ {
+ optionsPage.viewCombo->insertItem(i18n("No view was saved yet."));
+ optionsPage.viewCombo->setEnabled(false);
+ }
+
+ optionsPage.checkPrefix->setChecked(d->usePreviewPrefix);
+ optionsPage.checkPersistentBookmarks->setChecked(d->m_persistentBookmarks);
+
+//add upload profiles page
+ page = optionsDlg.addPage(i18n("Up&load Profiles"));
+ UploadProfilesPage uploadProfilesPage(page);
+ topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout->addWidget(&uploadProfilesPage);
+ QDomElement uploadEl = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles").toElement();
+ uploadProfilesPage.profileLabel->setText(uploadEl.attribute("defaultProfile"));
+ uploadProfilesPage.checkShowUploadTreeviews->setChecked(d->m_showUploadTreeviews);
+
+//add the team members page
+ page = optionsDlg.addPage(i18n("Team Configuration"));
+ TeamMembersDlg membersPage(page);
+ topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout->addWidget(&membersPage);
+
+ QListViewItem *item;
+ if (!teamLeader().name.isEmpty())
+ {
+ TeamMember member = teamLeader();
+ item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Team Leader"), member.task);
+ membersPage.membersListView->insertItem(item);
+ }
+ for (QMap<QString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
+ {
+ TeamMember member = it.data();
+ item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Subproject Leader"), member.task, it.key());
+ }
+ for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ {
+ TeamMember member = it.data();
+ item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Task Leader"), it.key());
+ }
+ for (QValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
+ {
+ TeamMember member = *it;
+ item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Simple Member"), member.task);
+ }
+ membersPage.mailingListEdit->setText(d->m_mailingList);
+ membersPage.setYourself(d->m_yourself);
+
+//add the event configuration page
+ page = optionsDlg.addPage(i18n("Event Configuration"));
+ EventConfigurationDlg eventsPage(d->m_mainWindow->actionCollection(), page);
+ topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout->addWidget(&eventsPage);
+ eventsPage.initEvents(d->m_events);
+ eventsPage.enableEventsBox->setChecked(d->m_eventsEnabled);
+
+ if ( optionsDlg.exec() )
+ {
+ d->projectName = optionsPage.linePrjName->text();
+ d->author = optionsPage.lineAuthor ->text();
+ d->email = optionsPage.lineEmail ->text();
+
+ // Debugger
+ d->debuggerClient = optionsPage.comboDebuggerClient->currentText();
+ d->m_debuggerPersistentBreakpoints = optionsPage.checkDebuggerPersistentBreakpoints->isChecked();
+ d->m_debuggerPersistentWatches = optionsPage.checkDebuggerPersistentWatches->isChecked();
+
+ d->m_defaultDTD = DTDs::ref()->getDTDNameFromNickName(optionsPage.dtdCombo->currentText()).lower();
+ d->m_defaultEncoding = optionsPage.encodingCombo->currentText();
+
+ QuantaCommon::setUrl(d->templateURL, optionsPage.linePrjTmpl->text());
+ d->templateURL.adjustPath(1);
+ d->templateURL = QExtFileInfo::toAbsolute(d->templateURL, d->baseURL);
+ if (!QExtFileInfo::createDir(d->templateURL, d->m_mainWindow))
+ {
+ QuantaCommon::dirCreationError(d->m_mainWindow, d->templateURL);
+ }
+
+ QuantaCommon::setUrl(d->toolbarURL, optionsPage.linePrjToolbar->text());
+ d->toolbarURL.adjustPath(1);
+ d->toolbarURL = QExtFileInfo::toAbsolute(d->toolbarURL, d->baseURL);
+ if (!QExtFileInfo::createDir(d->toolbarURL, d->m_mainWindow))
+ {
+ QuantaCommon::dirCreationError(d->m_mainWindow, d->toolbarURL);
+ }
+
+ d->previewPrefix = KURL::fromPathOrURL( optionsPage.linePrefix->text() );
+ d->usePreviewPrefix = optionsPage.checkPrefix->isChecked();
+ d->m_persistentBookmarks = optionsPage.checkPersistentBookmarks->isChecked();
+
+ QDomNode projectNode = d->dom.firstChild().firstChild();
+ QDomElement el;
+
+ el = projectNode.toElement();
+ el.setAttribute("name",d->projectName);
+ el.setAttribute("encoding", d->m_defaultEncoding);
+ el = d->m_sessionDom.firstChild().firstChild().toElement();
+ el.setAttribute("previewPrefix", d->previewPrefix.url() );
+ el.setAttribute("usePreviewPrefix", d->usePreviewPrefix );
+ el.setAttribute("usePersistentBookmarks", d->m_persistentBookmarks);
+
+ el = projectNode.namedItem("author").toElement();
+ if (!el.isNull())
+ el.parentNode().removeChild(el);
+ el =d->dom.createElement("author");
+ projectNode.appendChild( el );
+ el.appendChild(d->dom.createTextNode( d->author ) );
+
+ el = projectNode.namedItem("email").toElement();
+ if (!el.isNull())
+ el.parentNode().removeChild(el);
+ el =d->dom.createElement("email");
+ projectNode.appendChild( el );
+ el.appendChild(d->dom.createTextNode( d->email ) );
+
+ // Debugger
+ el =projectNode.namedItem("debuggerclient").toElement();
+ if (!el.isNull())
+ el.parentNode().removeChild(el);
+ el =d->dom.createElement("debuggerclient");
+ projectNode.appendChild( el );
+ el.appendChild(d->dom.createTextNode( d->debuggerClient ) );
+ el.setAttribute("persistentBreakpoints", d->m_debuggerPersistentBreakpoints);
+ el.setAttribute("persistentWatches", d->m_debuggerPersistentWatches);
+
+ d->m_excludeCvsignore = optionsPage.checkCvsignore->isChecked();
+ excludeStr = optionsPage.lineExclude->text();
+ el =projectNode.namedItem("exclude").toElement();
+ if (!el.isNull())
+ el.parentNode().removeChild(el);
+ el =d->dom.createElement("exclude");
+ if (d->m_excludeCvsignore)
+ el.setAttribute("cvsignore", "true");
+ else
+ el.setAttribute("cvsignore", "false");
+ projectNode.appendChild( el );
+ el.appendChild(d->dom.createTextNode( excludeStr ) );
+
+ el =projectNode.namedItem("defaultDTD").toElement();
+ if(el.isNull())
+ {
+ el =d->dom.createElement("defaultDTD");
+ projectNode.appendChild(el);
+ el.appendChild(d->dom.createTextNode(d->m_defaultDTD));
+ }
+ else
+ {
+ el.firstChild().setNodeValue(d->m_defaultDTD);
+ }
+
+ el = projectNode.namedItem("templates").toElement();
+ url = QExtFileInfo::toRelative(d->templateURL, d->baseURL);
+ if(el.isNull())
+ {
+ el =d->dom.createElement("templates");
+ projectNode.appendChild(el);
+ el.appendChild(d->dom.createTextNode(QuantaCommon::qUrl(url)));
+ }
+ else
+ {
+ el.firstChild().setNodeValue(QuantaCommon::qUrl(url));
+ }
+
+ url = QExtFileInfo::toRelative(d->toolbarURL, d->baseURL);
+ el = projectNode.namedItem("toolbars").toElement();
+ if(el.isNull())
+ {
+ el =d->dom.createElement("toolbars");
+ projectNode.appendChild(el);
+ el.appendChild(d->dom.createTextNode(QuantaCommon::qUrl(url)));
+ }
+ else
+ {
+ el.firstChild().setNodeValue(QuantaCommon::qUrl(url));
+ }
+
+ if (optionsPage.viewCombo->isEnabled())
+ {
+ defaultView = optionsPage.viewCombo->currentText();
+ el = projectNode.namedItem("autoload").toElement();
+ if (el.isNull())
+ {
+ el =d->dom.createElement("autoload");
+ el.setAttribute("projectview", defaultView);
+ projectNode.appendChild( el );
+ } else
+ {
+ el.setAttribute("projectview", defaultView);
+ }
+ }
+ uploadEl.setAttribute("showtreeviews", uploadProfilesPage.checkShowUploadTreeviews->isChecked() ? "true" : "false");
+
+ QDomNode teamNode = projectNode.namedItem("teamdata");
+ if (!teamNode.isNull())
+ projectNode.removeChild(teamNode);
+ teamNode = d->dom.createElement("teamdata");
+ QDomNode taskLeadersNode = d->dom.createElement("taskleaders");
+ teamNode.appendChild(taskLeadersNode);
+ QDomNode subLeadersNode = d->dom.createElement("subprojectleaders");
+ teamNode.appendChild(subLeadersNode);
+ QListViewItemIterator it(membersPage.membersListView);
+ QListViewItem *item;
+ QStringList savedSubprojects;
+ while (it.current())
+ {
+ item = it.current();
+ QString role = item->text(3);
+ if (role == i18n(teamLeaderStr.utf8()))
+ {
+ QDomElement leaderEl = d->dom.createElement("leader");
+ teamNode.appendChild(leaderEl);
+ el = d->dom.createElement("name");
+ leaderEl.appendChild(el);
+ el.appendChild(d->dom.createTextNode(item->text(0)));
+ el = d->dom.createElement("nickName");
+ leaderEl.appendChild(el);
+ el.appendChild(d->dom.createTextNode(item->text(1)));
+ el = d->dom.createElement("email");
+ leaderEl.appendChild(el);
+ el.appendChild(d->dom.createTextNode(item->text(2)));
+ } else
+ if (role == i18n(subprojectLeaderStr.utf8()))
+ {
+ QString prjName = item->text(5);
+ savedSubprojects.append(prjName);
+ QDomElement subEl = d->dom.createElement("subproject");
+ for (uint i = 0; i < d->m_subprojects.count(); i++)
+ {
+ if (d->m_subprojects[i].name == prjName)
+ {
+ subEl.setAttribute("location", d->m_subprojects[i].location);
+ break;
+ }
+ }
+ subEl.setAttribute("name", prjName);
+ subLeadersNode.appendChild(subEl);
+ el = d->dom.createElement("subprojectleader");
+ el.setAttribute("name", item->text(0));
+ el.setAttribute("nickName", item->text(1));
+ el.setAttribute("email", item->text(2));
+ subEl.appendChild(el);
+ } else
+ if (role == i18n(taskLeaderStr.utf8()))
+ {
+ el = d->dom.createElement("projecttask");
+ el.setAttribute("tasklead", item->text(0));
+ el.setAttribute("nickName", item->text(1));
+ el.setAttribute("email", item->text(2));
+ el.setAttribute("task", item->text(4));
+ taskLeadersNode.appendChild(el);
+ } else
+ if (role == i18n(simpleMemberStr.utf8()))
+ {
+ QDomElement memberEl = d->dom.createElement("member");
+ memberEl.setAttribute("task", item->text(4));
+ teamNode.appendChild(memberEl);
+ el = d->dom.createElement("name");
+ memberEl.appendChild(el);
+ el.appendChild(d->dom.createTextNode(item->text(0)));
+ el = d->dom.createElement("nickName");
+ memberEl.appendChild(el);
+ el.appendChild(d->dom.createTextNode(item->text(1)));
+ el = d->dom.createElement("email");
+ memberEl.appendChild(el);
+ el.appendChild(d->dom.createTextNode(item->text(2)));
+ }
+ ++it;
+ }
+ //subprojects without a leader
+ for (uint i = 0; i < d->m_subprojects.count(); i++)
+ {
+ if (!savedSubprojects.contains(d->m_subprojects[i].name))
+ {
+ el = d->dom.createElement("subproject");
+ el.setAttribute("name", d->m_subprojects[i].name);
+ el.setAttribute("location", d->m_subprojects[i].location);
+ }
+ }
+
+ el = d->dom.createElement("mailinglist");
+ el.setAttribute("address", membersPage.mailingListEdit->text());
+ teamNode.appendChild(el);
+ projectNode.appendChild(teamNode);
+ teamNode = d->m_sessionDom.firstChild().namedItem("teamdata");
+ if (!teamNode.isNull())
+ d->m_sessionDom.firstChild().removeChild(teamNode);
+ d->m_yourself = membersPage.yourself();
+ el = d->m_sessionDom.createElement("teamdata");
+ el.setAttribute("yourself", d->m_yourself);
+ d->m_sessionDom.firstChild().appendChild(el);
+
+ eventsPage.saveEvents(d->dom);
+ d->m_eventsEnabled = eventsPage.enableEventsBox->isChecked();
+ projectNode.toElement().setAttribute("enableEvents", d->m_eventsEnabled?"true":"false");
+
+ setModified();
+ d->loadProjectXML();
+ }
+}
+
+void Project::slotUpload()
+{
+ if (! ViewManager::ref()->saveAll())
+ return;
+
+ if (!d->m_uploadDialog)
+ {
+ d->m_uploadDialog = new ProjectUpload(KURL(), "", false, false, false, i18n("Upload project items..."));
+ connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ d->m_uploadDialog->show();
+ } else
+ d->m_uploadDialog->raise();
+}
+
+void Project::slotUploadURL(const KURL& urlToUpload, const QString& profileName, bool quickUpload, bool markOnly)
+{
+ if (!ViewManager::ref()->saveAll())
+ return;
+
+ KURL url = QExtFileInfo::toRelative( urlToUpload, d->baseURL);
+ if (!d->m_uploadDialog)
+ {
+ d->m_uploadDialog = new ProjectUpload(url, profileName, false, quickUpload, markOnly, i18n("Upload project items..."));
+ connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ d->m_uploadDialog->show();
+ } else
+ d->m_uploadDialog->raise();
+}
+
+
+void Project::slotGetMessages(const QString& data)
+{
+ emit messages(data);
+}
+
+void Project::slotRescanPrjDir()
+{
+ RescanPrj *dlg = new RescanPrj( d->m_projectFiles, d->baseURL, d->excludeRx,
+ d->m_mainWindow, i18n("New Files in Project's Folder"));
+ if ( dlg->exec() )
+ {
+ d->insertFiles(dlg->files());
+ setModified();
+ emit reloadTree(&(d->m_projectFiles), false, QStringList());
+ }
+ delete dlg;
+}
+/** Returns the relative url with the prefix inserted. */
+KURL Project::urlWithPrefix(const KURL& url)
+{
+ KURL returnUrl = url;
+
+ if (d->usePreviewPrefix)
+ {
+ KURL tempUrl = QExtFileInfo::toRelative(url, d->baseURL );
+ if ( !tempUrl.path().startsWith("/") )
+ {
+ returnUrl = d->previewPrefix;
+ returnUrl.setPath(d->previewPrefix.path(1) + tempUrl.path());
+ }
+ }
+ return returnUrl;
+}
+
+
+/*Returns true if url is already in the project.*/
+bool Project::contains(const KURL& url)
+{
+ if (d->m_projectFiles.isEmpty())
+ d->m_projectFiles.readFromXML(d->dom, d->baseURL, d->templateURL, d->excludeRx);
+ return d->m_projectFiles.contains(url);
+}
+
+void Project::slotFileDescChanged(const KURL& url, const QString& desc)
+{
+ ProjectURL *proUrl = d->m_projectFiles.find(url);
+ if (! proUrl)
+ return;
+
+ QDomElement el = proUrl->domElement;
+ el.setAttribute("desc", desc);
+ proUrl->fileDesc = desc;
+ setModified();
+}
+
+void Project::slotUploadStatusChanged(const KURL& url, int status)
+{
+ if (! d->m_projectFiles.contains(url))
+ return;
+
+ QDomElement el;
+ QString urlStr = url.url();
+ ProjectList::Iterator it( d->m_projectFiles );
+ for ( ; it.current(); ++it)
+ {
+ if ( it.currentKey().startsWith(urlStr) || it.currentKey() + "/" == urlStr)
+ {
+ it.current()->uploadStatus = status;
+ el = it.current()->domElement;
+ el.setAttribute("uploadstatus", status);
+ }
+ }
+ setModified();
+}
+
+void Project::slotChangeDocumentFolderStatus(const KURL &url, bool status)
+{
+ ProjectURL *proUrl = d->m_projectFiles.find(url);
+ if (! proUrl)
+ return;
+
+ QDomElement el = proUrl->domElement;
+ el.setAttribute("documentFolder", (status ? "true" : "false"));
+ proUrl->documentFolder = status;
+ setModified();
+}
+
+
+/** Returns the project's base URL if it exists, the HOME dir if there is no project and no opened document (or the current opened document was not saved yet), and the base URL of the opened document, if it is saved somewhere. */
+KURL Project::projectBaseURL()
+{
+ KURL result;
+ if (hasProject())
+ {
+ result = d->baseURL;
+ } else
+ {
+ Document *w = ViewManager::ref()->activeDocument();
+ if ( !w || w->isUntitled() )
+ {
+ result = QExtFileInfo::home();
+ } else
+ {
+ result = QExtFileInfo::path(w->url());
+ }
+ }
+ return result;
+}
+
+void Project::savePassword(const QString &entry, const QString &passwd, bool store)
+{
+ d->m_passwdList[entry] = passwd;
+ KConfig *config = kapp->config();
+ config->setGroup("Projects");
+ if (store)
+ {
+ config->writeEntry(d->projectName + " | " + entry, KStringHandler::obscure(passwd));
+ //config->writeEntry(projectName + " | " + entry, passwd);
+ }
+ else
+ {
+ config->deleteEntry(d->projectName + " | " + entry);
+ }
+ config->sync();
+}
+
+QString Project::password(const QString &entry)
+{
+ if (d->m_passwdList.contains(entry))
+ return d->m_passwdList[entry];
+ else
+ {
+ KConfig *config = kapp->config();
+ config->setGroup("Projects");
+ QString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
+// QString passwd = config->readEntry(d->projectName + " | " + entry,"");
+ return passwd;
+ }
+}
+
+bool Project::passwordSaved(const QString &entry)
+{
+ KConfig *config = kapp->config();
+ config->setGroup("Projects");
+ QString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
+// QString passwd = config->readEntry(d->projectName + " | " + entry,"");
+ return !passwd.isEmpty();
+}
+
+KURL Project::documentFolderForURL(const KURL& url)
+{
+ KURL docFolderURL = d->baseURL;
+ ProjectList::Iterator it( d->m_projectFiles );
+ for ( ; it.current(); ++it) {
+ if (it.current()->documentFolder && it.current()->isParentOf(url)
+ && docFolderURL.isParentOf(*(it.current())))
+ {
+ docFolderURL = *(it.current());
+ }
+ }
+ return docFolderURL;
+}
+
+void Project::slotReloadProjectDocs()
+{
+ delete d->m_dirWatch;
+ d->m_dirWatch = new KDirWatch(this);
+ connect(d->m_dirWatch, SIGNAL(dirty(const QString &)), SIGNAL(reloadProjectDocs()));
+ connect(d->m_dirWatch, SIGNAL(deleted(const QString &)), SIGNAL(reloadProjectDocs()));
+ if (d->baseURL.isLocalFile())
+ d->m_dirWatch->addDir(d->baseURL.path() + "/doc");
+ KURL url;
+ QString path;
+ ProjectList::Iterator it( d->m_projectFiles );
+ for ( ; it.current(); ++it) {
+ url = *(it.current());
+ path = d->m_projectFiles.toRelative(url).path();
+ if (path.startsWith("doc/") && path.endsWith("/index.html"))
+ {
+ emit addProjectDoc(url);
+ if (url.isLocalFile())
+ d->m_dirWatch->addFile(url.path());
+ }
+ }
+}
+
+
+bool Project::hasProject()
+{
+ return !d->projectName.isNull();
+}
+
+QString Project::projectName()
+{
+ return d->projectName;
+}
+
+const QString& Project::defaultDTD()
+{
+ return d->m_defaultDTD;
+}
+
+
+const QString& Project::defaultEncoding()
+{
+ return d->m_defaultEncoding;
+}
+
+
+KURL Project::toolbarURL()
+{
+ return d->toolbarURL;
+}
+
+
+KURL Project::templateURL()
+{
+ return d->templateURL;
+}
+
+
+QString Project::email()
+{
+ return d->email;
+}
+
+QDomDocument* Project::dom()
+{
+ return &d->dom;
+}
+
+QDomDocument* Project::sessionDom()
+{
+ return &d->m_sessionDom;
+}
+
+QString Project::debuggerClient()
+{
+ return d->debuggerClient;
+}
+
+bool Project::debuggerPersistentBreakpoints( )
+{
+ return d->m_debuggerPersistentBreakpoints;
+}
+
+bool Project::debuggerPersistentWatches( )
+{
+ return d->m_debuggerPersistentWatches;
+}
+
+void Project::setModified(bool b)
+{
+ d->m_modified = b;
+ if (b)
+ d->saveProject();
+}
+
+EventActions* Project::events()
+{
+ if (hasProject())
+ return d->m_events;
+ else
+ return 0L;
+}
+
+QString Project::yourself()
+{
+ return d->m_yourself;
+}
+
+QStringList Project::yourRoles()
+{
+ QStringList roles;
+ if (d->m_yourself.isEmpty())
+ return roles;
+ QString yourNick = d->m_yourself.lower();
+ if (d->m_teamLeader.nickName.lower() == yourNick)
+ roles += "team leader";
+ QValueList<SubProject>::ConstIterator end = d->m_subprojects.constEnd();
+ for (QValueList<SubProject>::ConstIterator it = d->m_subprojects.constBegin(); it != end; ++it)
+ {
+ if (subprojectLeader((*it).name).nickName.lower() == yourNick)
+ roles += "subproject leader:" + (*it).name.lower();
+ }
+
+ for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ {
+ if (it.data().nickName.lower() == yourNick)
+ roles += "task leader:" + it.key().lower();
+ }
+
+ return roles;
+}
+
+TeamMember Project::teamLeader()
+{
+ return d->m_teamLeader;
+}
+
+TeamMember Project::subprojectLeader(const QString &name)
+{
+ if (d->m_subprojectLeaders.contains(name))
+ return d->m_subprojectLeaders[name];
+ else
+ return TeamMember();
+}
+
+TeamMember Project::taskLeader(const QString &name)
+{
+ if (d->m_taskLeaders.contains(name))
+ return d->m_taskLeaders[name];
+ else
+ return TeamMember();
+}
+
+QValueList<TeamMember> Project::simpleMembers()
+{
+ return d->m_simpleMembers;
+}
+
+QString Project::mailingList()
+{
+ return d->m_mailingList;
+}
+
+QValueList<SubProject>* Project::subprojects()
+{
+ return &d->m_subprojects;
+}
+
+QStringList Project::tasks()
+{
+ QStringList result;
+ for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ {
+ result << it.key();
+ }
+ return result;
+}
+
+QMap<QString, TeamMember> Project::allMembers()
+{
+ QMap<QString, TeamMember> members;
+ for (QValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
+ {
+ members[(*it).name] = *it;
+ }
+ if (!d->m_teamLeader.name.isEmpty())
+ members[d->m_teamLeader.name] = d->m_teamLeader;
+ for (QMap<QString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
+ {
+ members[it.data().name] = it.data();
+ }
+ for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ {
+ members[it.data().name] = it.data();
+ }
+
+ return members;
+}
+
+void Project::urlMoved(const KURL& srcURL, const KURL &destURL)
+{
+ emit eventHappened("after_file_move", srcURL.url(), destURL.url());
+}
+
+bool Project::queryClose()
+{
+ bool canExit = true;
+ if (hasProject())
+ {
+ emit eventHappened("before_project_close", d->baseURL.url(), QString::null);
+ d->config->setGroup("Projects");
+ KURL url = d->projectURL.url();
+ url.setPass("");
+ d->config->writePathEntry("Last Project", url.url());
+ canExit = d->uploadProjectFile();
+ if (! canExit)
+ {
+ if (KMessageBox::warningContinueCancel(d->m_mainWindow, i18n("Saving of project failed. Do you want to continue with exit (might cause data loss)?"), i18n("Project Saving Error"),KStdGuiItem::quit()) == KMessageBox::Continue)
+ canExit = true;
+ }
+ if (canExit)
+ {
+ emit eventHappened("after_project_close", d->baseURL.url(), QString::null);
+ // empty dom tree
+ d->dom.clear();
+ d->m_sessionDom.clear();
+ d->m_events->clear();
+ d->init();
+ newProjectLoaded(d->projectName, d->baseURL, d->templateURL);
+ reloadTree( &(d->m_projectFiles), true, QStringList());
+ d->adjustActions();
+ d->m_projectRecent->setCurrentItem(-1);
+ newStatus();
+// kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ }
+ }
+ return canExit;
+}
+
+bool Project::eventsEnabled()
+{
+ return d->m_eventsEnabled;
+}
+
+void Project::slotShowProjectToolbar(bool show)
+{
+ if (d->m_mainWindow && d->m_mainWindow->factory())
+ {
+ QWidget *w = d->m_mainWindow->factory()->container("project_toolbar", d->m_mainWindow);
+ if (w)
+ {
+ if (show && m_projectToolbarVisible)
+ w->setShown(true);
+ else
+ if (!show)
+ {
+ m_projectToolbarVisible = w->isShown();
+ w->setShown(false);
+ }
+ }
+ }
+}
+
+void Project::loadBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf)
+{
+ if (!markIf || !hasProject() || !contains(url) || !d->m_persistentBookmarks)
+ return;
+ QDomNodeList nl = d->dom.elementsByTagName("item");
+ QDomElement el;
+ KURL u = QExtFileInfo::toRelative(url, d->baseURL);
+ for ( uint i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( el.attribute("url") == QuantaCommon::qUrl(u) )
+ {
+ QString markListStr = el.attribute("bookmarks");
+ QStringList markList = QStringList::split(",", markListStr);
+ for (uint j = 0; j < markList.count(); j++)
+ {
+ int line = markList[j].toInt();
+ markIf->setMark(line, KTextEditor::MarkInterface::Bookmark);
+ }
+ break;
+ }
+ }
+}
+
+void Project::saveBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf)
+{
+ if (!markIf || !hasProject() || !contains(url) || !d->m_persistentBookmarks)
+ return;
+ QStringList markList;
+ QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ for (uint i = 0; i < marks.count(); i++)
+ {
+ KTextEditor::Mark *mark = marks.at(i);
+ if (mark->type == KTextEditor::MarkInterface::Bookmark)
+ markList << QString("%1").arg(mark->line);
+ }
+ QDomNodeList nl = d->dom.elementsByTagName("item");
+ QDomElement el;
+ KURL u = QExtFileInfo::toRelative(url, d->baseURL);
+ for ( uint i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( el.attribute("url") == QuantaCommon::qUrl(u) )
+ {
+ el.setAttribute("bookmarks", markList.join(","));
+ break;
+ }
+ }
+}
+
+void Project::loadCursorPosition(const KURL &url, KTextEditor::ViewCursorInterface *viewCursorIf)
+{
+ if (!viewCursorIf || !hasProject() || !contains(url))
+ return;
+ QDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
+ QDomElement el;
+ KURL u = QExtFileInfo::toRelative(url, d->baseURL);
+ for ( uint i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( el.attribute("url") == QuantaCommon::qUrl(u) )
+ {
+ QString s = el.attribute("line");
+ uint line, col;
+ bool ok;
+ line = s.toUInt(&ok, 10);
+ if (ok)
+ {
+ s = el.attribute("column");
+ col = s.toUInt(&ok, 10);
+ if (ok)
+ viewCursorIf->setCursorPositionReal(line, col);
+ }
+ }
+ KURL u2 = d->baseURL;
+ QuantaCommon::setUrl(u2, el.attribute("url"));
+ if (!contains(u2))
+ {
+ el.parentNode().removeChild(el);
+ }
+ }
+}
+
+void Project::saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterface *viewCursorIf)
+{
+ if (!viewCursorIf || !hasProject() || !contains(url))
+ return;
+ QDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
+ QDomElement el;
+ KURL u = QExtFileInfo::toRelative(url, d->baseURL);
+ uint line, col;
+ viewCursorIf->cursorPosition(&line, &col);
+ bool found = false;
+ for ( uint i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( el.attribute("url") == QuantaCommon::qUrl(u) )
+ {
+ el.setAttribute("line", line);
+ el.setAttribute("column", col);
+ found = true;
+ break;
+ }
+ }
+ if (!found)
+ {
+ el = d->m_sessionDom.createElement("item");
+ el.setAttribute("column", col);
+ el.setAttribute("line", line);
+ el.setAttribute("url", QuantaCommon::qUrl(u));
+ QDomNode no = d->m_sessionDom.firstChild().firstChild().namedItem("itemcursorpositions");
+ no.appendChild(el);
+ }
+}
+#include "project.moc"
diff --git a/quanta/project/project.h b/quanta/project/project.h
new file mode 100644
index 00000000..b6775da7
--- /dev/null
+++ b/quanta/project/project.h
@@ -0,0 +1,220 @@
+/***********************************************************************
+ project.h - description
+ -------------------
+ begin : Thu Mar 16 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2001-2005 by Andras Mantia <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 PROJECT_H
+#define PROJECT_H
+
+#include <qobject.h>
+
+#include "projecturl.h"
+
+class QDom;
+class ProjectPrivate;
+class ProjectList;
+namespace KTextEditor{
+ class MarkInterface;
+ class ViewCursorInterface;
+}
+struct EventAction;
+typedef QMap<QString, QValueList<EventAction> > EventActions;
+
+/**project
+ *@author Yacovlev Alexander & Dmitry Poplavsky & Andras Mantia & Jens Herden
+ */
+
+class KConfig;
+class KMainWindow;
+
+struct TeamMember {
+ QString name;
+ QString email;
+ QString nickName;
+ QString task;
+};
+
+struct SubProject {
+ QString name;
+ QString location;
+};
+
+class Project : public QObject {
+ Q_OBJECT
+ friend class ProjectPrivate; // need this because I use the signals
+
+public:
+
+ /**
+ * since this class is a singleton you must use this function to access it
+ *
+ * the parameter is only used at the first call to create the class
+ *
+ */
+ static Project* const ref(KMainWindow *parent = 0L)
+ {
+ static Project *m_ref;
+ if (!m_ref) m_ref = new Project(parent);
+ return m_ref;
+ }
+
+ ~Project();
+
+ bool hasProject();
+ QString projectName();
+
+ QStringList fileNameList();
+ KURL::List files();
+
+ void insertFile( const KURL& nameURL, bool repaint );
+ void readConfig(KConfig *);
+ /** loads the last project again if reload == true
+ but checks in any case if there is a left over project from a crash
+ */
+ void loadLastProject(bool reload);
+ /** Returns the relative url with the prefix inserted. */
+ KURL urlWithPrefix(const KURL& url);
+ bool contains(const KURL &url);
+ /** Read property of QString defaultDTD. */
+ const QString& defaultDTD();
+ const QString& defaultEncoding();
+
+ /** Returns the project's base URL if it exists,
+ * the HOME dir if there is no project and no opened document
+ * (or the current opened document was not saved yet),
+ * and the base URL of the opened document, if it is saved somewhere.
+ */
+ KURL projectBaseURL();
+ KURL documentFolderForURL(const KURL &url);
+
+ /** Saves the password for entry into a list. Stores on disc if store == true */
+ void savePassword(const QString& entry, const QString& passwd, bool store);
+ /** Returns the saved password for entry */
+ QString password(const QString &entry);
+ bool passwordSaved(const QString &entry);
+ QDomDocument *dom();
+ QDomDocument *sessionDom();
+ QString debuggerClient();
+ bool debuggerPersistentBreakpoints();
+ bool debuggerPersistentWatches();
+ bool keepPasswd;
+ QString email();
+ KURL templateURL();
+ KURL toolbarURL();
+ EventActions* events();
+ /**
+ * Get the nickname of the current user (you)
+ * @return the nickname
+ */
+ QString yourself();
+ /**
+ * Get the roles of the current user in the form "role:task".
+ * Examples: "team leader", "project leader:subprojectname", "task leader:taskname".
+ * @return the roles (in lowercase)
+ */
+ QStringList yourRoles();
+ TeamMember teamLeader();
+ TeamMember subprojectLeader(const QString &name);
+ TeamMember taskLeader(const QString &name);
+ QValueList<TeamMember> simpleMembers();
+ QString mailingList();
+ QValueList<SubProject>* subprojects();
+ QStringList tasks();
+ QMap<QString, TeamMember> allMembers();
+ bool eventsEnabled();
+ void setProjectToolbarVisible(bool visible) {m_projectToolbarVisible = visible;}
+
+ /** Called when an url was moved inside the project with drag &drop */
+ void urlMoved(const KURL& srcURL, const KURL &destURL);
+ /**
+ test if application can close
+
+ @return true if close is possible
+ */
+ bool queryClose();
+
+ /** Saves the bookmarks for the url into the project file */
+ void saveBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf);
+ /** Loads the bookmarks for the url from the project file and sets them in the view*/
+ void loadBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf);
+ void saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterface *viewCursorIf);
+ void loadCursorPosition(const KURL &url, KTextEditor::ViewCursorInterface *viewCursorIf);
+
+public slots:
+
+ void slotOpenProject(const KURL&);
+ void slotOptions();
+ void slotUpload();
+ void slotUploadURL(const KURL &urlToUpload, const QString &profileName, bool quickUpload, bool markOnly);
+
+ void slotAddDirectory(const KURL& dirURL, bool showDlg = true);
+ void slotInsertFile(const KURL& url);
+ void slotInsertFilesAfterCopying(const KURL::List& a_url);
+
+ /** if somewhere something was renamed */
+ void slotRenamed(const KURL& oldURL, const KURL& newURL);
+ void slotRemove(const KURL& urlToRemove);
+
+
+ void slotGetMessages(const QString&);
+
+ void slotRescanPrjDir();
+ void slotFileDescChanged(const KURL& url, const QString& desc);
+ void slotUploadStatusChanged(const KURL& url, int status);
+ void slotChangeDocumentFolderStatus(const KURL& url, bool status);
+
+ void slotReloadProjectDocs();
+
+ void slotShowProjectToolbar(bool show);
+
+ void setModified(bool b = true);
+
+signals:
+
+ void openFile( const KURL&, const QString& );
+ void openFiles( const KURL::List&, const QString& );
+ void closeFile( const KURL&);
+ void closeFiles();
+
+ void reloadTree(ProjectList *, bool, const QStringList &);
+
+ void messages(const QString& );
+ void enableMessageWidget();
+
+ void newStatus();
+ void statusMsg(const QString &);
+ /** No descriptions */
+ void newProjectLoaded(const QString &, const KURL &, const KURL &);
+ void reloadProjectDocs();
+ void hideSplash();
+ void addProjectDoc(const KURL &);
+ void getUserToolbarFiles(KURL::List *);
+ void loadToolbarFile(const KURL &);
+ /** ask for the tree status for saving in project */
+ void getTreeStatus(QStringList *);
+ void eventHappened(const QString&, const QString&, const QString& );
+
+private:
+ /** The constructor is privat because we use singleton patter.
+ * If you need the class use Project::ref() for
+ * construction and reference
+ */
+ Project(KMainWindow *parent);
+
+ ProjectPrivate *d;
+ bool m_projectToolbarVisible;
+};
+
+#endif
diff --git a/quanta/project/projectlist.cpp b/quanta/project/projectlist.cpp
new file mode 100644
index 00000000..f5fdc24e
--- /dev/null
+++ b/quanta/project/projectlist.cpp
@@ -0,0 +1,187 @@
+/***********************************************************************
+ projectlist.cpp - List of ProjectURL's
+ -------------------
+ begin : June 19 2004
+ copyright : (C) 2004 by Jens Herden <jens@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. *
+ * *
+ ***************************************************************************/
+
+// qt includes
+#include <qdom.h>
+#include <qstring.h>
+#include <qfileinfo.h>
+
+// kde includes
+#include <kprogress.h>
+
+#include "projectlist.h"
+#include "projecturl.h"
+#include "resource.h"
+#include "quantacommon.h"
+
+
+ProjectList::ProjectList(int size) : ProjectUrlList(size)
+{
+}
+
+
+void ProjectList::clear()
+{
+ m_baseURL = KURL();
+ ProjectUrlList::clear();
+}
+
+bool ProjectList::readFromXML(QDomDocument &dom, const KURL &baseURL,
+ const KURL &/*templateURL*/, const QRegExp &excludeRx)
+{
+ clear(); // empty the list
+ m_baseURL = baseURL; // remember this
+ bool modified = false;
+ QDomElement el;
+ QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ progressBar->setTotalSteps(nl.count() - 1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(true);
+ QString path;
+ QString tmpString;
+ uint nlCount = nl.count();
+ for ( uint i = 0; i < nlCount; i++ )
+ {
+ KURL url = baseURL;
+ el = nl.item(i).toElement();
+ tmpString = el.attribute("url");
+ if (!tmpString.isEmpty())
+ {
+ QuantaCommon::setUrl(url,tmpString);
+ //Compatibility conversion
+ if (tmpString != QuantaCommon::qUrl(url))
+ {
+ el.setAttribute("url", QuantaCommon::qUrl(url));
+ modified = true;
+ }
+ }
+ path = url.path();
+ url = QExtFileInfo::toAbsolute(url, baseURL);
+ if ( el.nodeName() == "item" )
+ {
+ if (excludeRx.exactMatch(path) || find(url.url(-1)))
+ {
+ el.parentNode().removeChild(el);
+ modified = true;
+ i--;
+ } else
+ {
+ bool docFolder = (el.attribute("documentFolder", "false") == "true");
+ int uploadStatus = el.attribute("uploadstatus", "-1").toInt();
+ if (uploadStatus == -1)
+ el.setAttribute("uploadstatus", 1);
+ //remove non-existent local files
+ if ( url.isLocalFile() )
+ {
+ QFileInfo fi( url.path() );
+ if ( !fi.exists() )
+ {
+ el.parentNode().removeChild( el );
+ modified = true;
+ i--;
+ } else
+ {
+ insert(url.url(-1), new ProjectURL(url, el.attribute("desc"), el.attribute("uploadstatus", "1").toInt(),
+ docFolder, el));
+ }
+ } else
+ {
+ insert(url.url(-1), new ProjectURL(url, el.attribute("desc"), el.attribute("uploadstatus", "1").toInt(),
+ docFolder, el));
+ }
+ }
+ }
+ progressBar->advance(1);
+ }
+ ProjectURL *proUrl = find(baseURL);
+ if (!proUrl)
+ {
+ el = dom.createElement("item");
+ el.setAttribute("url", "");
+ el.setAttribute("uploadstatus", "1");
+ dom.firstChild().firstChild().appendChild(el);
+ insert(baseURL.url(-1), new ProjectURL(baseURL, "", ProjectURL::AlwaysUpload,
+ true, el));
+ modified = true;
+ }
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+ return modified;
+}
+
+
+bool ProjectList::removeFromListAndXML(const KURL &url)
+{
+ ProjectURL *p = find(url);
+ if (p) {
+ QDomElement el = p->domElement;
+ el.parentNode().removeChild(el);
+ remove(url.url(-1));
+ return true;
+ }
+ return false;
+}
+
+
+bool ProjectList::contains(const KURL &url) const
+{
+ return ProjectUrlList::find(url.url(-1));
+}
+
+
+ProjectURL * ProjectList::find(const KURL &url) const
+{
+ return ProjectUrlList::find(url.url(-1));
+}
+
+
+void ProjectList::insert(ProjectURL *url)
+{
+ ProjectUrlList::insert(url->url(-1), url);
+}
+
+
+bool ProjectList::isFolder(const KURL &url) const
+{
+ ProjectURL *p = find(url);
+ return ( p && url.url(-1) != (*p).url() );
+}
+
+
+void ProjectList::insert(const QString & key, const ProjectURL * item)
+{
+ ProjectUrlList::insert(key, item);
+}
+
+
+ProjectURL * ProjectList::find ( const QString & key ) const
+{
+ return ProjectUrlList::find(key);
+}
+
+
+bool ProjectList::remove ( const QString & key )
+{
+ return ProjectUrlList::remove(key);
+}
+
+
+void ProjectList::replace(const QString & key, const ProjectURL * item)
+{
+ ProjectUrlList::replace(key, item);
+}
+
diff --git a/quanta/project/projectlist.h b/quanta/project/projectlist.h
new file mode 100644
index 00000000..505fbfd0
--- /dev/null
+++ b/quanta/project/projectlist.h
@@ -0,0 +1,115 @@
+/***********************************************************************
+ projectlist.h - List of ProjectURL's
+ -------------------
+ begin : June 19 2004
+ copyright : (C) 2004 by Jens Herden <jens@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 PROJECTLIST_H
+#define PROJECTLIST_H
+
+#include "projecturl.h"
+#include "qextfileinfo.h"
+
+class QDomDocument;
+
+
+/**
+ @short Container for the project files.
+
+ For fast lookup this container is based on QDict.
+ The key is generated without a trailing '/' so it doesn't matter if you
+ search for a folder in this container with or without trailing '/'
+*/
+
+class ProjectList : public ProjectUrlList
+{
+public:
+ /** 1009 is a guess for maximum files in an average project, this number should be prime (@ref QDict)
+ */
+ ProjectList( int size = 1009 );
+ ~ProjectList() {};
+
+ typedef QDictIterator<ProjectURL> Iterator;
+
+ /** resets @ref m_baseURL */
+ void clear();
+
+ /**
+ reads entries from the dom tree
+ invalid entries gets removed!
+ @return true if an old structure was found
+ */
+ bool readFromXML(QDomDocument &dom, const KURL &baseURL,
+ const KURL &templateURL, const QRegExp &excludeRx);
+ /**
+ @return the relative URL
+ */
+ KURL toRelative(const KURL &url) const
+ {
+ return QExtFileInfo::toRelative(url, m_baseURL, false);
+ }
+
+ /**
+ removes an url from the list and deletes the corresponding node
+
+ @return true if url was in list
+ */
+ bool removeFromListAndXML(const KURL &url);
+
+ /** @return true if url is in container
+ */
+ bool contains(const KURL &url) const;
+
+ /** @return pointer to the entry or 0 if not found
+ */
+ ProjectURL * find(const KURL &url) const;
+
+ /**
+ Attention: never delete the object you have given here because the
+ container takes ownership and deletes it later!
+
+ @param the ProjectURL to add to the container
+ */
+ void insert(ProjectURL *url);
+
+ /** @return true if url is in container and a folder
+ */
+ bool isFolder(const KURL &url) const;
+
+private:
+ KURL m_baseURL;
+
+ /**
+ private because I want to control the key.
+ use insert(ProjectURL *url) instead.
+ */
+ void insert(const QString & key, const ProjectURL * item);
+
+ /**
+ private because I want to control the key.
+ use find(const KURL &url) instead.
+ */
+ ProjectURL *find ( const QString & key ) const;
+
+ /**
+ private because I want to control the key.
+ */
+ bool remove ( const QString & key );
+
+ /**
+ private because I want to control the key.
+ */
+ void replace(const QString & key, const ProjectURL * item);
+};
+
+#endif // PROJECTFILES_H
diff --git a/quanta/project/projectnewfinal.cpp b/quanta/project/projectnewfinal.cpp
new file mode 100644
index 00000000..c1901e69
--- /dev/null
+++ b/quanta/project/projectnewfinal.cpp
@@ -0,0 +1,42 @@
+/***************************************************************************
+ projectnewgeneral.cpp - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001-2002 Andras Mantia <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 <qlabel.h>
+#include <qlayout.h>
+
+// kde includes
+#include <kiconloader.h>
+
+// app includes
+#include "projectnewfinal.h"
+#include "projectnewfinal.moc"
+
+ProjectNewFinal::ProjectNewFinal(QWidget *parent, const char *name )
+ : ProjectNewFinalS(parent,name)
+{
+ imagelabel->setPixmap( UserIcon("wiznewprjfin") );
+}
+
+ProjectNewFinal::~ProjectNewFinal(){
+}
+
+void ProjectNewFinal::setMargin(int i)
+{
+ layout()->setMargin(i);
+}
+
diff --git a/quanta/project/projectnewfinal.h b/quanta/project/projectnewfinal.h
new file mode 100644
index 00000000..5cde0ac5
--- /dev/null
+++ b/quanta/project/projectnewfinal.h
@@ -0,0 +1,36 @@
+/***************************************************************************
+ projectnewgeneral.h - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001-2002 Andras Mantia <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 PROJECTNEWFINAL_H
+#define PROJECTNEWFINAL_H
+
+#include "projectnewfinals.h"
+
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon
+ */
+
+class ProjectNewFinal : public ProjectNewFinalS {
+ Q_OBJECT
+public:
+ ProjectNewFinal(QWidget *parent=0, const char *name=0);
+ ~ProjectNewFinal();
+
+ void setMargin(int);
+};
+
+#endif
diff --git a/quanta/project/projectnewfinals.ui b/quanta/project/projectnewfinals.ui
new file mode 100644
index 00000000..ffaac915
--- /dev/null
+++ b/quanta/project/projectnewfinals.ui
@@ -0,0 +1,296 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ProjectNewFinalS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ProjectNewFinalS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>620</width>
+ <height>418</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>620</width>
+ <height>410</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32000</width>
+ <height>32000</height>
+ </size>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>imagelabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>115</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>115</width>
+ <height>480</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>AlignTop|AlignLeft</set>
+ </property>
+ <property name="vAlign" stdset="0">
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout11</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Prefix:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>lineAuthor</cstring>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>GroupBox4</cstring>
+ </property>
+ <property name="title">
+ <string>Project Defaults</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2_3</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Default DTD:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>encodingCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2_2_2</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Default encoding:</string>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>dtdCombo</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="6" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>insertLocalTemplates</cstring>
+ </property>
+ <property name="text">
+ <string>Insert &amp;local templates</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>insertGlobalTemplates</cstring>
+ </property>
+ <property name="text">
+ <string>Insert &amp;global templates</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>checkPrefix</cstring>
+ </property>
+ <property name="text">
+ <string>Use preview prefi&amp;x</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Author:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="4">
+ <property name="name">
+ <cstring>lineEmail</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="Line" row="4" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>Line4</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>linePrefix</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="3">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Email:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>checkPrefix</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>linePrefix</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkPrefix</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel1</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>lineAuthor</tabstop>
+ <tabstop>lineEmail</tabstop>
+ <tabstop>dtdCombo</tabstop>
+ <tabstop>encodingCombo</tabstop>
+ <tabstop>checkPrefix</tabstop>
+ <tabstop>linePrefix</tabstop>
+ <tabstop>insertGlobalTemplates</tabstop>
+ <tabstop>insertLocalTemplates</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/projectnewgeneral.cpp b/quanta/project/projectnewgeneral.cpp
new file mode 100644
index 00000000..3f5fe547
--- /dev/null
+++ b/quanta/project/projectnewgeneral.cpp
@@ -0,0 +1,254 @@
+/***************************************************************************
+ projectnewgeneral.cpp - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001-2002 by Andras Mantia <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 <qdir.h>
+#include <qevent.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qcombobox.h>
+
+// kde includes
+#include <kfiledialog.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kurl.h>
+#include <kprotocolinfo.h>
+#include <kdeversion.h>
+
+//app includes
+#include "projectnewgeneral.h"
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+
+ProjectNewGeneral::ProjectNewGeneral(QWidget *parent, const char *name )
+ : ProjectNewGeneralS(parent,name)
+{
+ imagelabel->setPixmap( UserIcon("wiznewprjglb") );
+ linePrjName->setFocus();
+
+ QStringList protocols = KProtocolInfo::protocols();
+ protocols.sort();
+ for ( uint i=0; i<protocols.count(); i++ )
+ {
+ KURL p;
+ p.setProtocol(protocols[i]);
+ QString protocol = protocols[i];
+ if ( KProtocolInfo::supportsWriting(p) &&
+ KProtocolInfo::supportsMakeDir(p) &&
+ KProtocolInfo::supportsDeleting(p) &&
+ (protocol != "file" && protocol != "fonts" && protocol != "floppy" && protocol != "newcd" ))
+ {
+ comboProtocol->insertItem(protocol);
+ }
+ }
+ comboProtocol->setCurrentItem(0);
+
+ slotProtocolChanged(i18n("Local"));
+
+ linePrjTmpl->setText("templates");
+ linePrjToolbar->setText("toolbars");
+
+ connect(comboProtocol, SIGNAL(activated(const QString&)), SLOT(slotProtocolChanged(const QString &)));
+ connect( linePrjFile, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotLinePrjFile(const QString &)));
+ connect( linePrjName, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotLinePrjFile(const QString &)));
+ connect( linePrjDir, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotLinePrjFile(const QString &)));
+ connect( buttonDir, SIGNAL(clicked()),
+ this, SLOT(slotButtonDir()));
+ connect( linePrjName, SIGNAL(textChanged(const QString &)),
+ this, SLOT(slotChangeNames(const QString &)));
+ connect( linePrjTmpl, SIGNAL(textChanged(const QString &)), SLOT(slotLinePrjFile(const QString &)));
+ connect( buttonTmpl, SIGNAL(clicked()), SLOT(slotButtonTmpl()));
+ connect( linePrjToolbar, SIGNAL(textChanged(const QString &)), SLOT(slotLinePrjFile(const QString &)));
+ connect( buttonToolbar, SIGNAL(clicked()), SLOT(slotButtonToolbar()));
+
+ linePrjTmpl->installEventFilter(this);
+ linePrjToolbar->installEventFilter(this);
+}
+
+ProjectNewGeneral::~ProjectNewGeneral(){
+}
+
+void ProjectNewGeneral::slotButtonDir()
+{
+ slotLinePrjFile(""); // make sure baseUrl is correct
+ KURL url = KFileDialog::getExistingURL(baseUrl.url(), this,
+ i18n("Select Project Folder"));
+ if (!url.isEmpty())
+ {
+ linePrjDir->setText(url.path());
+ }
+}
+
+void ProjectNewGeneral::slotLinePrjFile( const QString & )
+{
+
+ bool valid = !(linePrjFile->text().isEmpty() ||
+ linePrjName->text().isEmpty() ||
+ linePrjDir ->text().isEmpty() ||
+ linePrjTmpl->text().isEmpty() ||
+ linePrjToolbar->text().isEmpty());
+ KURL url;
+ QString s = lineHost->text();
+ if (! s.isEmpty())
+ url.setHost(s);
+
+ s = lineUser->text();
+ if (! s.isEmpty())
+ url.setUser(s);
+ s = linePasswd->text();
+ if (! s.isEmpty())
+ url.setPass(s);
+
+ s = linePort->text();
+ if (! s.isEmpty())
+ url.setPort(linePort->text().toInt());
+
+ url.setProtocol(comboProtocol->currentText());
+ if (url.protocol() == i18n("Local")) url.setProtocol("file");
+ url.setPath(linePrjDir->text());
+ url.adjustPath(1);
+ if (!url.path().startsWith("/")) url.setPath("/"+url.path());
+
+ if (url.isValid())
+ {
+ emit setBaseURL(url);
+ baseUrl = url;
+ if (baseUrl.isLocalFile())
+ {
+ s = QExtFileInfo::canonicalPath(baseUrl.path());
+ if (!s.isEmpty())
+ baseUrl.setPath(s);
+ }
+ }
+ emit enableNextButton( this, valid );
+}
+
+void ProjectNewGeneral::slotChangeNames( const QString &text )
+{
+ int i;
+ QString fname = text.lower();
+ while( (i=fname.find(" ")) >=0 ) fname.remove(i,1);
+
+ linePrjFile->setText( fname+".webprj" );
+}
+
+QString ProjectNewGeneral::type()
+{
+// if ( radioCvs ->isChecked() ) return "CVS";
+ if ( radioLocal->isChecked() ) return "Local";
+ if ( radioWeb ->isChecked() ) return "Web";
+ return "Local";
+}
+
+void ProjectNewGeneral::setMargin(int i)
+{
+ layout()->setMargin(i);
+}
+
+void ProjectNewGeneral::slotButtonTmpl()
+{
+ slotLinePrjFile(""); // make sure baseUrl is correct
+ KURL url = KFileDialog::getExistingURL(baseUrl.url(), this,
+ i18n("Select Project Template Folder"));
+ if (!url.isEmpty() && baseUrl.isParentOf(url))
+ {
+ linePrjTmpl->setText(KURL::relativeURL(baseUrl, url));
+ } else
+ {
+ KMessageBox::sorry(this, i18n("<qt>The project templates must be stored under the main project folder: <br><br><b>%1</b></qt>").arg(baseUrl.prettyURL(0, KURL::StripFileProtocol)));
+ }
+}
+
+void ProjectNewGeneral::slotButtonToolbar()
+{
+ slotLinePrjFile(""); // make sure baseUrl is correct
+ KURL url = KFileDialog::getExistingURL(baseUrl.url(), this,
+ i18n("Select Project Toolbar & Actions Folder"));
+ if (!url.isEmpty() && baseUrl.isParentOf(url))
+ {
+ linePrjToolbar->setText(KURL::relativeURL(baseUrl, url));
+ }
+ {
+ KMessageBox::sorry(0, i18n("<qt>The project toolbars must be stored under the main project folder: <br><br><b>%1</b></qt>")
+ .arg(baseUrl.prettyURL(0, KURL::StripFileProtocol)));
+ }
+}
+
+
+void ProjectNewGeneral::slotProtocolChanged(const QString& protocol)
+{
+ bool status = true;
+ if (protocol == i18n("Local"))
+ {
+ status = false;
+ }
+ lineHost->setEnabled(status);
+ lineUser->setEnabled(status);
+ linePasswd->setEnabled(status);
+ linePort->setEnabled(status);
+ radioWeb->setEnabled(!status);
+ slotChangeNames(linePrjName->text());
+ if ( !status )
+ lineHost->clear();
+}
+
+bool ProjectNewGeneral::eventFilter ( QObject * watched, QEvent * e )
+{
+ if (e->type() == QEvent::FocusOut)
+ {
+ if (watched == linePrjTmpl)
+ {
+ KURL url = baseUrl;
+ QuantaCommon::setUrl(url, linePrjTmpl->text());
+ url = QExtFileInfo::toAbsolute(url, baseUrl);
+ if (!baseUrl.isParentOf(url))
+ {
+ KMessageBox::sorry(this,i18n("<qt>The project templates must be stored under the main project folder: <br><br><b>%1</b></qt>").arg(baseUrl.prettyURL(0, KURL::StripFileProtocol)));
+ linePrjTmpl->setFocus();
+ emit enableNextButton(this, false);
+ } else
+ emit enableNextButton(this, true);
+ } else
+ if (watched == linePrjToolbar)
+ {
+ KURL url = baseUrl;
+ QuantaCommon::setUrl(url, linePrjToolbar->text());
+ url = QExtFileInfo::toAbsolute(url, baseUrl);
+ if (!baseUrl.isParentOf(url))
+ {
+ KMessageBox::sorry(0,i18n("<qt>The project toolbars must be stored under the main project folder: <br><br><b>%1</b></qt>")
+ .arg(baseUrl.prettyURL(0, KURL::StripFileProtocol)));
+ linePrjToolbar->setFocus();
+ emit enableNextButton(this, false);
+ } else
+ emit enableNextButton(this, true);
+ }
+ }
+ return false;
+}
+
+#include "projectnewgeneral.moc"
+
+
diff --git a/quanta/project/projectnewgeneral.h b/quanta/project/projectnewgeneral.h
new file mode 100644
index 00000000..b167c15c
--- /dev/null
+++ b/quanta/project/projectnewgeneral.h
@@ -0,0 +1,58 @@
+/***************************************************************************
+ projectnewgeneral.h - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001, 2002 by Andras Mantia <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 PROJECTNEWGENERAL_H
+#define PROJECTNEWGENERAL_H
+
+#include "projectnewgenerals.h"
+
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon
+ */
+
+class KURL;
+
+class ProjectNewGeneral : public ProjectNewGeneralS {
+ Q_OBJECT
+public:
+ ProjectNewGeneral(QWidget *parent=0, const char *name=0);
+ ~ProjectNewGeneral();
+
+ QString type();
+ void setMargin(int);
+
+protected:
+ bool eventFilter ( QObject * watched, QEvent * e );
+
+public slots:
+ void slotButtonDir();
+ void slotLinePrjFile(const QString &);
+ void slotChangeNames(const QString &);
+ void slotButtonTmpl();
+ void slotButtonToolbar();
+ void slotProtocolChanged(const QString& protocol);
+
+
+signals:
+ void setBaseURL(const KURL&);
+ void enableNextButton(QWidget *, bool);
+
+private:
+ KURL baseUrl;
+};
+
+#endif
diff --git a/quanta/project/projectnewgenerals.ui b/quanta/project/projectnewgenerals.ui
new file mode 100644
index 00000000..dfc0e55f
--- /dev/null
+++ b/quanta/project/projectnewgenerals.ui
@@ -0,0 +1,454 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ProjectNewGeneralS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ProjectNewGeneralS</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>620</width>
+ <height>418</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>620</width>
+ <height>410</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32000</width>
+ <height>32000</height>
+ </size>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>imagelabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>115</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>115</width>
+ <height>480</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>AlignTop|AlignLeft</set>
+ </property>
+ <property name="vAlign" stdset="0">
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer11</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout12</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>Directory Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="1" column="2">
+ <property name="name">
+ <cstring>linePrjTmpl</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Templates directory:</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="3">
+ <property name="name">
+ <cstring>buttonToolbar</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="2">
+ <property name="name">
+ <cstring>linePrjToolbar</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Toolbars directory:</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>buttonTmpl</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="3">
+ <property name="name">
+ <cstring>buttonDir</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Main directory:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>linePrjDir</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLineEdit" row="0" column="3">
+ <property name="name">
+ <cstring>linePrjFile</cstring>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="3" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>bGroupSources</cstring>
+ </property>
+ <property name="title">
+ <string>Project Sources</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>radioLocal</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add local or remote files</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>radioWeb</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Use wget to download files from a site</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>File:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>GroupBox2</cstring>
+ </property>
+ <property name="title">
+ <string>Server Settings</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property name="text">
+ <string>Protocol: </string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="4">
+ <property name="name">
+ <cstring>TextLabel3_3</cstring>
+ </property>
+ <property name="text">
+ <string>Password:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="7">
+ <property name="name">
+ <cstring>linePort</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="2">
+ <item>
+ <property name="text">
+ <string>Local</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>comboProtocol</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="5">
+ <property name="name">
+ <cstring>linePasswd</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>26</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <family>Lucida Console [Xft]</family>
+ </font>
+ </property>
+ <property name="echoMode">
+ <enum>Password</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="6">
+ <property name="name">
+ <cstring>TextLabel1_2_4</cstring>
+ </property>
+ <property name="text">
+ <string>Port:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="4" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>lineHost</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="3">
+ <property name="name">
+ <cstring>TextLabel4_2</cstring>
+ </property>
+ <property name="text">
+ <string>Host:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>User:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>lineUser</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>linePrjName</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>linePrjName</tabstop>
+ <tabstop>linePrjFile</tabstop>
+ <tabstop>comboProtocol</tabstop>
+ <tabstop>lineHost</tabstop>
+ <tabstop>lineUser</tabstop>
+ <tabstop>linePasswd</tabstop>
+ <tabstop>linePort</tabstop>
+ <tabstop>linePrjDir</tabstop>
+ <tabstop>buttonDir</tabstop>
+ <tabstop>linePrjTmpl</tabstop>
+ <tabstop>buttonTmpl</tabstop>
+ <tabstop>linePrjToolbar</tabstop>
+ <tabstop>buttonToolbar</tabstop>
+ <tabstop>radioLocal</tabstop>
+ <tabstop>radioWeb</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/projectnewlocal.cpp b/quanta/project/projectnewlocal.cpp
new file mode 100644
index 00000000..e037b662
--- /dev/null
+++ b/quanta/project/projectnewlocal.cpp
@@ -0,0 +1,361 @@
+/***************************************************************************
+ projectnewlocal.cpp - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001, 2002 Andras Mantia <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 <qlabel.h>
+#include <qfileinfo.h>
+#include <qlistview.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qradiobutton.h>
+#include <qpushbutton.h>
+#include <qregexp.h>
+
+// kde includes
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kfiledialog.h>
+#include <kprogress.h>
+#include <kmimetype.h>
+#include <kdeversion.h>
+#include <kurlrequesterdlg.h>
+#include <kurlrequester.h>
+
+//app includes
+#include "projectnewlocal.h"
+#include "projectnewgeneral.h"
+#include "copyto.h"
+#include "qextfileinfo.h"
+#include "uploadtreefolder.h"
+#include "uploadtreeview.h"
+#include "resource.h"
+#include "quantacommon.h"
+
+ProjectNewLocal::ProjectNewLocal(QWidget *parent, const char *name )
+ : ProjectNewLocalS(parent,name)
+{
+ imagelabel->setPixmap( UserIcon("wiznewprjloc") );
+
+// listView->setColumnAlignment(1,Qt::AlignRight);
+ listView->setColumnText(1, i18n("Add"));
+ listView->removeColumn(2);
+ listView->removeColumn(2);
+
+ mask->setText("*");
+
+ checkInsertWeb->setChecked( true );
+
+ connect( checkInsert, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
+ connect( checkInsertWeb, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
+ connect( checkInsertWithMask, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
+
+ connect(addFiles, SIGNAL(clicked()),this,SLOT(slotAddFiles()));
+ connect(addFolder, SIGNAL(clicked()),this,SLOT(slotAddFolder()));
+ connect(clearList, SIGNAL(clicked()),this,SLOT(slotClearList()));
+}
+
+ProjectNewLocal::~ProjectNewLocal(){
+}
+
+void ProjectNewLocal::setBaseURL(const KURL& a_baseURL)
+{
+ baseURL = a_baseURL;
+ baseURL.adjustPath(1);
+ checkInsert->setText(i18n("Insert files from %1.").arg(baseURL.prettyURL(0, KURL::StripFileProtocol)));
+ listView->clear();
+ fileList.clear();
+ checkInsert->setChecked(false);
+}
+
+KURL::List ProjectNewLocal::files()
+{
+ //return fileList;
+ KURL::List r;
+
+ QListViewItem *item;
+ QListViewItemIterator it(listView);
+ for ( ; it.current(); ++it )
+ {
+ item = it.current();
+ if ( listView->isSelected( item ))
+ {
+ KURL u;
+ if (dynamic_cast<UploadTreeFolder*>(item))
+ {
+ u = dynamic_cast<UploadTreeFolder*>(item)->url();
+ } else
+ {
+ u = dynamic_cast<UploadTreeFile*>(item)->url();
+ }
+
+ if (!u.isEmpty()) r.append(u);
+ }
+ }
+ return r;
+}
+
+KURL::List ProjectNewLocal::projectFiles()
+{
+ KURL::List list;
+
+ if (!QExtFileInfo::exists(baseURL, false, this) ||
+ !baseURL.path().endsWith("/") ||
+ !checkInsert->isChecked() ) return list;
+
+ QString fmask = "*";
+ if ( checkInsertWeb->isChecked() )
+ {
+ KMimeType::List list = KMimeType::allMimeTypes();
+ KMimeType::List::iterator it;
+ QString name;
+ fmask = "";
+ for ( it = list.begin(); it != list.end(); ++it )
+ {
+ name = (*it)->name();
+ if (qConfig.markupMimeTypes.contains(name) ||
+ qConfig.scriptMimeTypes.contains(name) ||
+ qConfig.imageMimeTypes.contains(name))
+ {
+ QStringList patterns = (*it)->patterns();
+ for (uint i = 0 ; i < patterns.count(); i++)
+ {
+ fmask = fmask+patterns[i]+" ";
+ }
+ }
+ }
+ } else
+ {
+ fmask = mask->text();
+ }
+
+ list = QExtFileInfo::allFilesRelative(baseURL, fmask, this, false);
+
+ return list;
+}
+
+void ProjectNewLocal::slotSetFiles(bool)
+{
+ if ( checkInsert->isChecked() )
+ {
+ KURL::List files = projectFiles();
+ progressBar->setTotalSteps(files.count() - 1);
+ progressBar->setTextEnabled(true);
+ for (uint i = 0; i < files.count(); i++)
+ {
+ if ( !fileList.contains(files[i]))
+ {
+ fileList.append(files[i]);
+ QListViewItem *it = listView->addItem(files[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ if (it) it->setSelected(true);
+ progressBar->setValue(i);
+ }
+ }
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+ listView->checkboxTree();
+ }
+}
+
+void ProjectNewLocal::resizeEvent ( QResizeEvent *t )
+{
+ ProjectNewLocalS::resizeEvent(t);
+ listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
+}
+
+/** No descriptions */
+void ProjectNewLocal::slotAddFiles()
+{
+ QExtFileInfo::createDir(baseURL, this);
+ KURL::List list = KFileDialog::getOpenURLs(
+ baseURL.url(), i18n("*"), this, i18n("Insert Files in Project"));
+
+ if ( !list.isEmpty() )
+ {
+ KURL u = list.first();
+
+ u = QExtFileInfo::toRelative( u, baseURL, false );
+
+ if ( u.path().startsWith("..") || u.path().startsWith("/"))
+ {
+ KURLRequesterDlg *urlRequesterDlg = new KURLRequesterDlg( baseURL.prettyURL(), this, "");
+ urlRequesterDlg->setCaption(i18n("Files: Copy to Project"));
+ urlRequesterDlg->urlRequester()->setMode( KFile::Directory | KFile::ExistingOnly);
+ urlRequesterDlg->exec();
+ KURL destination = urlRequesterDlg->selectedURL();
+ delete urlRequesterDlg;
+
+ if ( !destination.isEmpty())
+ {
+ CopyTo *dlg = new CopyTo( baseURL);
+ connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
+ SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, SIGNAL(deleteDialog(CopyTo *)),
+ SLOT (slotDeleteCopyToDialog(CopyTo *)));
+ list = dlg->copy( list, destination );
+ return;
+ } else
+ {
+ return;
+ }
+ }
+
+ progressBar->setTotalSteps(list.count() - 1);
+ progressBar->setTextEnabled(true);
+ for (uint i = 0; i < list.count(); i++)
+ {
+ list[i] = QExtFileInfo::toRelative(list[i], baseURL, false);
+ if (!fileList.contains(list[i]))
+ {
+ fileList.append(list[i]);
+ QListViewItem *it = listView->addItem(list[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ if (it) it->setSelected(true);
+ progressBar->setValue(i);
+ }
+ }
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+ }
+}
+
+/** No descriptions */
+void ProjectNewLocal::slotAddFolder()
+{
+//TODO/FIXME: This returns null if the selected directory is not on the local disk.
+//I think this is a KDE bug
+ QExtFileInfo::createDir(baseURL, this);
+ KURL dirURL ;
+ dirURL = KFileDialog::getExistingURL(
+ baseURL.url(), this, i18n("Insert Folder in Project"));
+
+ if ( !dirURL.isEmpty() )
+ {
+ dirURL.adjustPath(1);
+
+ KURL sdir = dirURL;
+ sdir = QExtFileInfo::toRelative( sdir, baseURL, false);
+
+ if ( sdir.path().startsWith("..") || sdir.path().startsWith("/") )
+ {
+
+ KURLRequesterDlg *urlRequesterDlg = new KURLRequesterDlg( baseURL.prettyURL(), this, "");
+ urlRequesterDlg->setCaption(i18n("%1: Copy to Project").arg(dirURL.prettyURL(0, KURL::StripFileProtocol)));
+ urlRequesterDlg->urlRequester()->setMode( KFile::Directory | KFile::ExistingOnly);
+ urlRequesterDlg->exec();
+ KURL destination = urlRequesterDlg->selectedURL();
+ delete urlRequesterDlg;
+
+ if ( !destination.isEmpty())
+ {
+ CopyTo *dlg = new CopyTo( baseURL);
+ connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
+ SLOT (slotInsertFolderAfterCopying(const KURL::List&)));
+ connect(dlg, SIGNAL(deleteDialog(CopyTo *)),
+ SLOT (slotDeleteCopyToDialog(CopyTo *)));
+ dirURL = dlg->copy(dirURL, destination);
+ return;
+ } else
+ {
+ return;
+ }
+ }
+
+ slotInsertFolderAfterCopying(dirURL);
+ }
+}
+
+void ProjectNewLocal::slotDeleteCopyToDialog(CopyTo* dlg)
+{
+//The CopyTo dlg is deleted only here!!
+ delete dlg;
+}
+
+void ProjectNewLocal::slotInsertFolderAfterCopying(const KURL::List& a_urlList)
+{
+ KURL::List::ConstIterator it;
+ KURL dirURL;
+ for (it = a_urlList.begin(); it != a_urlList.end(); ++it)
+ {
+ dirURL = *it;
+ // dirURL.adjustPath(1);
+ KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this, false);
+ progressBar->setTotalSteps(files.count() - 1);
+ progressBar->setTextEnabled(true);
+ KURL u;
+ for (uint i = 0; i < files.count(); i++)
+ {
+ u = files[i];
+ if ( !fileList.contains(u) && u.path() != "." && u.path() != ".." )
+ {
+ fileList.append(u);
+ listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ QListViewItem *it = listView->itemByUrl(u);
+ if (it)
+ {
+ it->setSelected(true);
+ listView->slotSelectFile(it);
+ }
+ progressBar->setValue(i);
+ }
+ }
+ //listView->selectAll(false);
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+ }
+}
+
+void ProjectNewLocal::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
+{
+ KURL::List::ConstIterator it;
+ KURL u;
+ progressBar->setTotalSteps(a_urlList.count() - 1);
+ progressBar->setTextEnabled(true);
+ for (it = a_urlList.begin(); it != a_urlList.end(); ++it)
+ {
+ u = QExtFileInfo::toRelative(*it, baseURL, false);
+ if ( !fileList.contains(u))
+ {
+ fileList.append(u);
+ QListViewItem *it = listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ if (it)
+ {
+ it->setSelected(true);
+ listView->slotSelectFile(it);
+ }
+ progressBar->advance(1);
+ }
+ }
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+}
+
+/** No descriptions */
+void ProjectNewLocal::slotClearList()
+{
+ //Really wondering why would we delete the files from baseURL???
+ //I've added this code, but I don't remember the reason. :-(
+ //Anyway, it is quite evil thing to do.
+ //KIO::del( baseURL );
+ listView->clear();
+ fileList.clear();
+ checkInsert->setChecked(false);
+}
+
+#include "projectnewlocal.moc"
diff --git a/quanta/project/projectnewlocal.h b/quanta/project/projectnewlocal.h
new file mode 100644
index 00000000..2d2d6d10
--- /dev/null
+++ b/quanta/project/projectnewlocal.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+ projectnewlocal.h - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001-2003 Andras Mantia <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 PROJECTNEWLOCAL_H
+#define PROJECTNEWLOCAL_H
+
+#include <qwidget.h>
+#include <kurl.h>
+#include <projectnewlocals.h>
+
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon & Andras Mantia
+ */
+
+class CopyTo;
+
+class ProjectNewLocal : public ProjectNewLocalS {
+ Q_OBJECT
+public:
+ ProjectNewLocal(QWidget *parent=0, const char *name=0);
+ ~ProjectNewLocal();
+
+ KURL::List files();
+ KURL::List projectFiles();
+
+public slots:
+ void slotSetFiles(bool);
+ void setBaseURL(const KURL& a_baseURL);
+ void slotAddFolder();
+ void slotAddFiles();
+ void slotClearList();
+ void slotInsertFolderAfterCopying(const KURL::List&);
+ void slotInsertFilesAfterCopying(const KURL::List&);
+ void slotDeleteCopyToDialog(CopyTo*);
+
+ virtual void resizeEvent( QResizeEvent * );
+
+private:
+ KURL baseURL;
+ KURL::List fileList;
+};
+
+#endif
diff --git a/quanta/project/projectnewlocals.ui b/quanta/project/projectnewlocals.ui
new file mode 100644
index 00000000..c752274f
--- /dev/null
+++ b/quanta/project/projectnewlocals.ui
@@ -0,0 +1,344 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ProjectNewLocalS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ProjectNewLocalS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>715</width>
+ <height>418</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>620</width>
+ <height>410</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32000</width>
+ <height>32000</height>
+ </size>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>imagelabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>115</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>115</width>
+ <height>480</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>AlignTop|AlignLeft</set>
+ </property>
+ <property name="vAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>checkInsert</cstring>
+ </property>
+ <property name="text">
+ <string>Insert files from</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel8</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Included files:</string>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>ButtonGroup12</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Filters</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>checkInsertWithMask</cstring>
+ </property>
+ <property name="text">
+ <string>Insert files with the following &amp;mask:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>mask</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>checkInsertWeb</cstring>
+ </property>
+ <property name="text">
+ <string>Insert onl&amp;y markup, script and image files</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="1">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="UploadTreeView" row="0" column="1">
+ <property name="name">
+ <cstring>listView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>85</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>addFiles</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add Files...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>addFolder</cstring>
+ </property>
+ <property name="text">
+ <string>A&amp;dd Folder...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>clearList</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Clear List</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>89</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>16</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>UploadTreeView</class>
+ <header location="local">../treeviews/uploadtreeview.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>checkInsertWithMask</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>mask</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>checkInsert</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ButtonGroup12</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>checkInsert</tabstop>
+ <tabstop>checkInsertWeb</tabstop>
+ <tabstop>mask</tabstop>
+ <tabstop>addFiles</tabstop>
+ <tabstop>addFolder</tabstop>
+ <tabstop>clearList</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>uploadtreeview.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/projectnewweb.cpp b/quanta/project/projectnewweb.cpp
new file mode 100644
index 00000000..20685021
--- /dev/null
+++ b/quanta/project/projectnewweb.cpp
@@ -0,0 +1,245 @@
+/***************************************************************************
+ projectnewweb.cpp - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002, 2003 Andras Mantia <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 <qlabel.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qstringlist.h>
+#include <qlistview.h>
+#include <qfileinfo.h>
+#include <qcombobox.h>
+
+// kde includes
+#include <klocale.h>
+#include <kprocess.h>
+#include <kiconloader.h>
+#include <kio/job.h>
+#include <kmessagebox.h>
+#include <kled.h>
+
+// app includes
+#include "projectnewweb.h"
+#include "qextfileinfo.h"
+#include "quantacommon.h"
+#include "uploadtreeview.h"
+
+ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
+ : ProjectNewWebS(parent,name)
+{
+ button->setEnabled(false);
+ siteUrl->setFocus();
+
+ imagelabel->setPixmap( UserIcon("wiznewprjweb") );
+ listView->removeColumn(1);
+ listView->removeColumn(1);
+ listView->removeColumn(1);
+
+ connect( commandLine, SIGNAL(textChanged(const QString&)),
+ this, SLOT (enableStart(const QString&)));
+ connect( siteUrl, SIGNAL(textChanged(const QString&)),
+ this, SLOT (setCommandL(const QString&)));
+ connect( button, SIGNAL(clicked()),
+ this, SLOT (slotStart()));
+ connect( protocolCombo,SIGNAL(highlighted(const QString&)),
+ this, SLOT (setProtocol(const QString&)));
+
+ start = false;
+ KLed1->setState(KLed::Off);
+ KLed2->setState(KLed::Off);
+}
+
+ProjectNewWeb::~ProjectNewWeb(){
+}
+
+void ProjectNewWeb::enableStart(const QString&)
+{
+ if ( !commandLine->text().isEmpty() ) button->setEnabled(true);
+ else button->setEnabled(false);
+}
+
+void ProjectNewWeb::setCommandL(const QString& url)
+{
+ QString siteurl = url;
+
+ commandLine->setText("wget -c -np -r --level=5 -nH "+ protocolCombo->currentText().lower()+ "://"+siteurl);
+}
+
+/** No descriptions */
+void ProjectNewWeb::setProtocol(const QString& protocol)
+{
+ commandLine->setText("wget -c -np -r --level=5 -nH "+ protocol.lower()+ "://"+siteUrl->text());
+}
+
+
+
+void ProjectNewWeb::setBaseURL(const KURL& a_baseURL)
+{
+ baseURL = a_baseURL;
+ baseURL.adjustPath(1);
+}
+
+void ProjectNewWeb::slotStart()
+{
+ if ( !start )
+ {
+ emit enableMessagesWidget();
+
+ if (QExtFileInfo::createDir(baseURL, this))
+ {
+ if (baseURL.protocol() == "file")
+ {
+ chdir( baseURL.path(1));
+
+ proc = new KProcess();
+ proc ->clearArguments();
+
+ QStringList list = QStringList::split (" ", commandLine->text());
+
+ for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ *proc << *it;
+ }
+
+ connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, SIGNAL(processExited( KProcess *)), this,
+ SLOT( slotGetWgetExited(KProcess *)));
+
+ if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
+ {
+ start = true;
+ button->setText( i18n("Stop") );
+ emit enableNextButton((QWidget *)this->parent(),false);
+ } else
+ {
+ KMessageBox::error(this, i18n("There was an error while trying to run the \"wget\" application.\
+ Check first that it is present on your system and that it is in your PATH."));
+ delete proc;
+ }
+ } else
+ {
+ KMessageBox::sorry(this,i18n("This feature is available only if the project lies on a local disk."));
+ start = false;
+ button->setText( i18n("Start") );
+ emit enableNextButton((QWidget *)this->parent(),true);
+ }
+ } else
+ {
+ QuantaCommon::dirCreationError(this, baseURL);
+ start = false;
+ button->setText( i18n("Start") );
+ emit enableNextButton((QWidget *)this->parent(),true);
+ }
+ } else {
+
+ // STOPPING !!!
+
+ delete proc;
+
+ start = false;
+ button->setText( i18n("Start") );
+ emit enableNextButton((QWidget *)this->parent(),true);
+ }
+}
+
+void ProjectNewWeb::slotGetWgetExited(KProcess*)
+{
+ KLed2->setState(KLed::Off);
+ KLed1->setState(KLed::Off);
+ start = false;
+ button->setText( i18n("Start") );
+ emit messages(i18n("wget finished...\n"));
+ emit enableNextButton((QWidget *)this->parent(),true);
+}
+
+void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
+{
+ QString output = buffer;
+ output = output.left( buflen );
+
+ emit messages(output);
+
+ int pos;
+ QString basePath = baseURL.path(1);
+ while ( (pos = output.find("saved")) != -1 )
+ {
+ if (KLed1->state() == KLed::Off)
+ {
+ KLed1->setState(KLed::On);
+ KLed2->setState(KLed::Off);
+ } else
+ {
+ KLed2->setState(KLed::On);
+ KLed1->setState(KLed::Off);
+ }
+ int begName = output.findRev('`',pos);
+ if ( begName == -1 ) {
+ output = output.remove(0,pos+1);
+ continue;
+ }
+
+ int endName = output.find('\'',begName);
+ if ( endName == -1 || endName > pos ) {
+ output = output.remove(0,pos+1);
+ continue;
+ }
+
+ QString fileName = output.left(endName);
+ fileName = fileName.right( endName - begName-1);
+
+ output = output.remove(0,pos+1);
+
+ KURL u = baseURL;
+ QuantaCommon::setUrl(u, fileName);
+ listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ }
+}
+
+KURL::List ProjectNewWeb::files()
+{
+ //return fileList;
+ KURL::List r;
+
+ KURL u;
+ QListViewItem *item;
+ QListViewItemIterator it(listView);
+ for ( ; it.current(); ++it )
+ {
+ item = it.current();
+ if (dynamic_cast<UploadTreeFolder*>(item))
+ {
+ u = dynamic_cast<UploadTreeFolder*>(item)->url();
+ } else
+ {
+ u = dynamic_cast<UploadTreeFile*>(item)->url();
+ }
+
+ if (!u.isEmpty()) r.append(u);
+ }
+ return r;
+}
+
+void ProjectNewWeb::resizeEvent ( QResizeEvent *t )
+{
+ ProjectNewWebS::resizeEvent(t);
+ // listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
+}
+
+#include "projectnewweb.moc"
diff --git a/quanta/project/projectnewweb.h b/quanta/project/projectnewweb.h
new file mode 100644
index 00000000..62da219f
--- /dev/null
+++ b/quanta/project/projectnewweb.h
@@ -0,0 +1,75 @@
+/***************************************************************************
+ projectnewweb.h - description
+ -------------------
+ begin : Fri Oct 27 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (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 PROJECTNEWWEB_H
+#define PROJECTNEWWEB_H
+
+//qt includes
+#include <qwidget.h>
+#include <qstringlist.h>
+
+//app includes
+#include "projectnewwebs.h"
+
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon
+ */
+
+class KProcess;
+class KURL;
+
+class ProjectNewWeb : public ProjectNewWebS {
+ Q_OBJECT
+public:
+ ProjectNewWeb(QWidget *parent=0, const char *name=0);
+ ~ProjectNewWeb();
+
+public slots:
+ void enableStart(const QString&);
+ void setCommandL(const QString&);
+ void setBaseURL(const KURL& a_baseURL);
+
+ void slotStart();
+
+ KURL::List files();
+
+ void slotGetWgetExited(KProcess *);
+ void slotGetWgetOutput(KProcess *proc, char *buffer, int buflen);
+
+ virtual void resizeEvent( QResizeEvent * );
+
+signals:
+
+ void enableMessagesWidget();
+
+ void messages(const QString& );
+ /** No descriptions */
+ void enableNextButton(QWidget *,bool);
+
+private:
+ KURL baseURL;
+
+ bool start;
+
+ KProcess *proc;
+
+private slots: // Private slots
+ /** No descriptions */
+ void setProtocol(const QString& protocol);
+};
+
+#endif
diff --git a/quanta/project/projectnewwebs.ui b/quanta/project/projectnewwebs.ui
new file mode 100644
index 00000000..b0b726e4
--- /dev/null
+++ b/quanta/project/projectnewwebs.ui
@@ -0,0 +1,292 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ProjectNewWebS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ProjectNewWebS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>620</width>
+ <height>418</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>620</width>
+ <height>410</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32000</width>
+ <height>32000</height>
+ </size>
+ </property>
+ <property name="layoutMargin" stdset="0">
+ </property>
+ <property name="layoutSpacing" stdset="0">
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1">
+ <property name="name">
+ <cstring>imagelabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>4</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>115</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>115</width>
+ <height>480</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ <property name="alignment">
+ <set>AlignTop|AlignLeft</set>
+ </property>
+ <property name="vAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="1">
+ <property name="name">
+ <cstring>layout7</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Fixed</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>309</width>
+ <height>16</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KLed" row="1" column="0">
+ <property name="name">
+ <cstring>KLed1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="shape">
+ <enum>Circular</enum>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="3">
+ <property name="name">
+ <cstring>button</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Start</string>
+ </property>
+ </widget>
+ <widget class="UploadTreeView" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>listView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="KLed" row="1" column="1">
+ <property name="name">
+ <cstring>KLed2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="shape">
+ <enum>Circular</enum>
+ </property>
+ <property name="look">
+ <enum>Raised</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLayoutWidget" row="0" column="1">
+ <property name="name">
+ <cstring>layout6</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel10</cstring>
+ </property>
+ <property name="text">
+ <string>wget's command line:</string>
+ </property>
+ </widget>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>228</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QComboBox" row="1" column="1">
+ <item>
+ <property name="text">
+ <string>HTTP</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>FTP</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>protocolCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>siteUrl</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Protocol:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>commandLine</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel9</cstring>
+ </property>
+ <property name="text">
+ <string>Site source:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>UploadTreeView</class>
+ <header location="local">../treeviews/uploadtreeview.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
+ </image>
+</images>
+<tabstops>
+ <tabstop>siteUrl</tabstop>
+ <tabstop>protocolCombo</tabstop>
+ <tabstop>commandLine</tabstop>
+ <tabstop>button</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kled.h</includehint>
+ <includehint>uploadtreeview.h</includehint>
+ <includehint>kled.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/projectoptions.ui b/quanta/project/projectoptions.ui
new file mode 100644
index 00000000..163f1d4c
--- /dev/null
+++ b/quanta/project/projectoptions.ui
@@ -0,0 +1,540 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>ProjectOptions</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ProjectOptions</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>644</width>
+ <height>438</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Project Options</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="2" column="5">
+ <property name="name">
+ <cstring>buttonToolbar</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="5">
+ <property name="name">
+ <cstring>buttonTmpl</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="4" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineEmail</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>200</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineAuthor</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="4" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>lineExclude</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>linePrjToolbar</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>linePrjTmpl</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>linePrjName</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Project &amp;name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>linePrjName</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Templates folder:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>linePrjTmpl</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_2</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Plain</enum>
+ </property>
+ <property name="text">
+ <string>T&amp;oolbars folder:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>linePrjToolbar</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Author:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineAuthor</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="3">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>E&amp;mail:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineEmail</cstring>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="6" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>GroupBox5</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Project Defaults</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_3</cstring>
+ </property>
+ <property name="text">
+ <string>Default &amp;DTD:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>dtdCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Default &amp;view:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>viewCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel3_2_2_2</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Default &amp;encoding:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>encodingCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>encodingCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>viewCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="2" column="1">
+ <property name="name">
+ <cstring>dtdCombo</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>New files will have the extension and highlighting according to this setting</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;xclude from project:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineExclude</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>checkCvsignore</cstring>
+ </property>
+ <property name="text">
+ <string>Exclude &amp;files listed in .cvsignore</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>The files listed in &lt;i&gt;.cvsignore&lt;/i&gt; files will not appear in the project tree, nor will be shown when you rescan the project folder or upload the project. Files matching the &lt;i&gt;.cvsignore&lt;/i&gt; entries that were already present in the project will be removed from it, but they will not be removed from the disc.&lt;br&gt;
+&lt;b&gt;NOTE:&lt;/b&gt; This feature works only for local projects.</string>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="9" column="0" rowspan="1" colspan="6">
+ <property name="name">
+ <cstring>GroupBox5_debug</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="title">
+ <string>Debugger</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Debu&amp;gger:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>comboDebuggerClient</cstring>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>comboDebuggerClient</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="autoCompletion">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>buttonDebuggerOptions</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Optio&amp;ns</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>checkDebuggerPersistentBreakpoints</cstring>
+ </property>
+ <property name="text">
+ <string>Remember &amp;breakpoints across sessions</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>checkDebuggerPersistentWatches</cstring>
+ </property>
+ <property name="text">
+ <string>Remember watches across sessions</string>
+ </property>
+ <property name="accel">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>checkPersistentBookmarks</cstring>
+ </property>
+ <property name="text">
+ <string>Use persistent boo&amp;kmarks</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>checkPrefix</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Use preview prefix:</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="7" column="2" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>linePrefix</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonTmpl</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectOptions</receiver>
+ <slot>buttonTemplate_clicked()</slot>
+ </connection>
+ <connection>
+ <sender>buttonToolbar</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectOptions</receiver>
+ <slot>buttonToolbar_clicked()</slot>
+ </connection>
+ <connection>
+ <sender>checkPrefix</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>linePrefix</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>comboDebuggerClient</sender>
+ <signal>activated(int)</signal>
+ <receiver>ProjectOptions</receiver>
+ <slot>comboDebuggerClient_activated(int)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>linePrjName</tabstop>
+ <tabstop>linePrjTmpl</tabstop>
+ <tabstop>buttonTmpl</tabstop>
+ <tabstop>linePrjToolbar</tabstop>
+ <tabstop>buttonToolbar</tabstop>
+ <tabstop>lineAuthor</tabstop>
+ <tabstop>lineEmail</tabstop>
+ <tabstop>lineExclude</tabstop>
+ <tabstop>checkCvsignore</tabstop>
+ <tabstop>encodingCombo</tabstop>
+ <tabstop>viewCombo</tabstop>
+ <tabstop>dtdCombo</tabstop>
+ <tabstop>checkPrefix</tabstop>
+ <tabstop>linePrefix</tabstop>
+ <tabstop>checkPersistentBookmarks</tabstop>
+ <tabstop>comboDebuggerClient</tabstop>
+ <tabstop>buttonDebuggerOptions</tabstop>
+</tabstops>
+<includes>
+ <include location="local" impldecl="in implementation">projectoptions.ui.h</include>
+</includes>
+<slots>
+ <slot>buttonTemplate_clicked()</slot>
+ <slot>buttonToolbar_clicked()</slot>
+ <slot>comboDebuggerClient_activated( int idx )</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/projectoptions.ui.h b/quanta/project/projectoptions.ui.h
new file mode 100644
index 00000000..b6fc2202
--- /dev/null
+++ b/quanta/project/projectoptions.ui.h
@@ -0,0 +1,52 @@
+/****************************************************************************
+** 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; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kcombobox.h>
+#include <kfiledialog.h>
+#include <kdeversion.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+
+
+void ProjectOptions::buttonTemplate_clicked()
+{
+ KURL url = KFileDialog::getExistingURL(linePrjTmpl->text(), this,
+ i18n("Select Project Template Folder"));
+ if (!url.isEmpty())
+ {
+ linePrjTmpl->setText(url.url());
+ }
+}
+
+
+
+void ProjectOptions::buttonToolbar_clicked()
+{
+ KURL url = KFileDialog::getExistingURL(linePrjToolbar->text(), this,
+ i18n("Select Project Toolbar & Actions Folder"));
+ if (!url.isEmpty())
+ {
+ linePrjToolbar->setText(url.url());
+ }
+}
+
+void ProjectOptions::comboDebuggerClient_activated( int idx)
+{
+ buttonDebuggerOptions->setEnabled(idx > 0);
+ checkDebuggerPersistentBreakpoints->setEnabled(idx > 0);
+ checkDebuggerPersistentWatches->setEnabled(idx > 0);
+}
diff --git a/quanta/project/projectprivate.cpp b/quanta/project/projectprivate.cpp
new file mode 100644
index 00000000..c74b1dc9
--- /dev/null
+++ b/quanta/project/projectprivate.cpp
@@ -0,0 +1,1675 @@
+/***************************************************************************
+ projectprivate.cpp - description
+ -------------------
+ begin : Mon Oct 4 20:49:39 2004
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2001-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "projectprivate.h"
+
+//qt includes
+#include <qcheckbox.h>
+#include <qdir.h>
+#include <qfile.h>
+#include <qradiobutton.h>
+#include <qwidgetstack.h>
+#include <qwizard.h>
+#include <qeventloop.h>
+
+//kde includes
+#include <kaction.h>
+#include <kapplication.h>
+#include <kcharsets.h>
+#include <kconfig.h>
+#include <kdirwatch.h>
+#include <kfiledialog.h>
+#include <kinputdialog.h>
+#include <kio/netaccess.h>
+#include <klineedit.h>
+#include <klocale.h>
+#include <kmainwindow.h>
+#include <kmessagebox.h>
+#include <kparts/componentfactory.h>
+#include <kprogress.h>
+#include <kstandarddirs.h>
+#include <ktempfile.h>
+#include <kurl.h>
+#include <kurlrequester.h>
+#include <kurlrequesterdlg.h>
+
+//app includes
+#include "copyto.h"
+#include "debuggerclient.h"
+#include "dtds.h"
+#include "project.h"
+#include "projectnewgeneral.h"
+#include "projectnewlocal.h"
+#include "projectnewweb.h"
+#include "projectnewfinal.h"
+#include "qpevents.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "uploadprofiles.h"
+#include "viewmanager.h"
+
+ProjectPrivate::ProjectPrivate(Project *p)
+ : QObject(), config(0L), m_dirWatch(0L), tempFile(0L), sessionTempFile(0L)
+{
+ parent = p;
+ m_projectFiles.setAutoDelete(true);
+ m_showUploadTreeviews = true;
+ m_eventsEnabled = true;
+ m_events = new EventActions();
+ init();
+ m_wizTitle = i18n("<b>Insert Files in Project</b>");
+}
+
+ProjectPrivate::~ProjectPrivate()
+{
+ delete m_events;
+}
+
+/** setup of the actions */
+void ProjectPrivate::initActions(KActionCollection *ac)
+{
+ (void) new KAction( i18n( "&New Project..." ), "window_new", 0,
+ this, SLOT( slotNewProject() ),
+ ac, "project_new" );
+
+ (void) new KAction( i18n( "&Open Project..." ), "project_open", 0,
+ this, SLOT( slotOpenProject() ),
+ ac, "project_open" );
+ m_projectRecent =
+ KStdAction::openRecent(parent, SLOT(slotOpenProject(const KURL&)),
+ ac, "project_open_recent");
+ m_projectRecent->setText(i18n("Open Recent Project"));
+ m_projectRecent->setIcon("project_open");
+ m_projectRecent->setToolTip(i18n("Open/Open recent project"));
+ connect(m_projectRecent, SIGNAL(activated()), this, SLOT(slotOpenProject()));
+
+ closeprjAction = new KAction( i18n( "&Close Project" ), "fileclose", 0,
+ this, SLOT( slotCloseProject() ),
+ ac, "project_close" );
+
+
+ openPrjViewAction = new KSelectAction( i18n( "Open Project &View..." ), 0,
+ ac, "project_view_open" );
+ connect(openPrjViewAction, SIGNAL(activated(const QString &)),
+ this, SLOT(slotOpenProjectView(const QString &)));
+ openPrjViewAction->setToolTip(i18n("Open project view"));
+
+ savePrjViewAction = new KAction( i18n( "&Save Project View" ), "filesave", 0,
+ this, SLOT( slotSaveProjectView() ),
+ ac, "project_view_save" );
+ saveAsPrjViewAction = new KAction( i18n( "Save Project View &As..." ), "filesaveas", 0,
+ this, SLOT( slotSaveAsProjectView() ),
+ ac, "project_view_save_as" );
+ deletePrjViewAction = new KSelectAction( i18n( "&Delete Project View" ), "editdelete", 0,
+ ac, "project_view_delete" );
+ connect(deletePrjViewAction, SIGNAL(activated(const QString &)),
+ this, SLOT(slotDeleteProjectView(const QString &)));
+ deletePrjViewAction->setToolTip(i18n("Close project view"));
+
+
+
+ insertFileAction = new KAction( i18n( "&Insert Files..." ), 0,
+ this, SLOT( slotAddFiles() ),
+ ac, "project_insert_file" );
+
+ insertDirAction = new KAction( i18n( "Inser&t Folder..." ), 0,
+ this, SLOT( slotAddDirectory() ),
+ ac, "project_insert_directory" );
+
+ rescanPrjDirAction = new KAction( i18n( "&Rescan Project Folder..." ), "reload", 0,
+ parent, SLOT( slotRescanPrjDir() ),
+ ac, "project_rescan" );
+
+ uploadProjectAction = new KAction( i18n( "&Upload Project..." ), "up", Key_F8,
+ parent, SLOT( slotUpload() ),
+ ac, "project_upload" );
+
+ projectOptionAction = new KAction( i18n( "&Project Properties" ), "configure", SHIFT + Key_F7,
+ parent, SLOT( slotOptions() ),
+ ac, "project_options" );
+
+ saveAsProjectTemplateAction =
+ new KAction( i18n( "Save as Project Template..." ), 0,
+ m_mainWindow, SLOT( slotFileSaveAsProjectTemplate() ),
+ ac, "save_project_template" );
+
+ saveSelectionAsProjectTemplateAction =
+ new KAction( i18n( "Save Selection to Project Template File..." ), 0,
+ m_mainWindow, SLOT( slotFileSaveSelectionAsProjectTemplate() ),
+ ac, "save_selection_project_template" );
+ adjustActions();
+}
+
+
+void ProjectPrivate::adjustActions()
+{
+ bool projectExists = parent->hasProject();
+ closeprjAction->setEnabled(projectExists);
+ openPrjViewAction->setEnabled(projectExists);
+ savePrjViewAction->setEnabled(projectExists);
+ saveAsPrjViewAction->setEnabled(projectExists);
+ deletePrjViewAction->setEnabled(projectExists);
+
+ insertFileAction->setEnabled(projectExists);
+ insertDirAction->setEnabled(projectExists);
+ rescanPrjDirAction->setEnabled(projectExists);
+ uploadProjectAction->setEnabled(projectExists);
+ projectOptionAction->setEnabled(projectExists);
+ saveAsProjectTemplateAction->setEnabled(projectExists);
+ saveSelectionAsProjectTemplateAction->setEnabled(projectExists);
+
+ adjustViewActions();
+ parent->slotShowProjectToolbar(projectExists);
+}
+
+
+void ProjectPrivate::adjustViewActions()
+{
+ QStringList viewList = projectViewList();
+ QString oldItem = openPrjViewAction->currentText();
+ openPrjViewAction->clear();
+ openPrjViewAction->setItems(viewList);
+ int i = viewList.findIndex(oldItem);
+ if (i > -1)
+ openPrjViewAction->setCurrentItem(i);
+ deletePrjViewAction->clear();
+ deletePrjViewAction->setItems(viewList);
+ bool hasView = !currentProjectView.isEmpty();
+ savePrjViewAction->setEnabled(hasView);
+}
+
+
+QStringList ProjectPrivate::projectViewList()
+{
+ QStringList list;
+ QDomNodeList nl = dom.elementsByTagName("projectview");
+ QDomElement el;
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ el = nl.item(i).cloneNode().toElement();
+ list += el.attribute("name");
+ }
+ list.sort();
+ return list;
+}
+
+void ProjectPrivate::init()
+{
+ projectURL = KURL();
+ templateURL = KURL();
+ projectName = QString::null;
+ m_modified = false;
+ m_defaultDTD = qConfig.defaultDocType;
+ excludeRx.setPattern(".*~$");
+ excludeList.clear();
+ excludeList.append("*~");
+ usePreviewPrefix = false;
+ previewPrefix = KURL();
+ m_persistentBookmarks = false;
+ m_debuggerPersistentBreakpoints = false;
+ m_debuggerPersistentWatches = false;
+ m_excludeCvsignore = false;
+ currentProjectView = QString::null;
+ m_projectFiles.clear();
+ m_mailingList = QString::null;
+ m_teamLeader.name = QString::null;
+ m_teamLeader.email = QString::null;
+ m_taskLeaders.clear();
+ m_subprojectLeaders.clear();
+ m_subprojects.clear();
+ m_simpleMembers.clear();
+ UploadProfiles::ref()->clear();
+}
+
+
+void ProjectPrivate::openCurrentView()
+{
+ if (currentProjectView.isEmpty())
+ return;
+ KURL::List urlsToOpen, urlsInView;
+ QDomNodeList nl = dom.elementsByTagName("projectview");
+ QDomElement el;
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ el = nl.item(i).cloneNode().toElement();
+ if (el.attribute("name") == currentProjectView)
+ {
+ QDomNodeList itemNodes = el.childNodes();
+ for (uint j = 0; j < itemNodes.count(); j++)
+ {
+ QDomElement el2 = itemNodes.item(j).cloneNode().toElement();
+ KURL url = baseURL;
+ QuantaCommon::setUrl(url,el2.attribute("url"));
+ url = QExtFileInfo::toAbsolute(url, baseURL);
+ if (el2.nodeName() == "viewitem")
+ {
+ urlsInView.append(url);
+ if (!ViewManager::ref()->isOpened(url) && QExtFileInfo::exists(url, true, m_mainWindow))
+ urlsToOpen.append(url);
+ } else {
+ if (el2.nodeName() == "viewtoolbar")
+ {
+ parent->loadToolbarFile(url);
+ }
+ }
+ }
+ // first we open what we want, might be that a wanted file is already open!
+ parent->openFiles(urlsToOpen, m_defaultEncoding);
+ // second we close what we don't want
+ KURL::List openURLs = ViewManager::ref()->openedFiles(true); // get open urls
+ KURL::List::Iterator it;
+ for ( it = openURLs.begin(); it != openURLs.end(); ++it )
+ {
+ if (urlsInView.findIndex( *it ) == -1)
+ parent->closeFile (*it);
+ }
+ break;
+ }
+ }
+ QStringList viewList = projectViewList();
+ int i = viewList.findIndex(currentProjectView);
+ if (i > -1)
+ openPrjViewAction->setCurrentItem(i);
+ adjustViewActions();
+}
+
+/** Opens a project view (toolbars & files). */
+void ProjectPrivate::slotOpenProjectView(const QString &view)
+{
+ currentProjectView = view;
+ openCurrentView();
+}
+
+/** insert files */
+void ProjectPrivate::insertFiles( KURL::List files )
+{
+ QDomElement el;
+ QDomNodeList nl = dom.elementsByTagName("item");
+ parent->statusMsg( i18n("Adding files to the project...") );
+ progressBar->setTotalSteps(2 * files.count() - 2);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(true);
+
+ KURL::List::Iterator it;
+ for ( it = files.begin(); it != files.end(); ++it )
+ {
+ if (m_projectFiles.contains(*it))
+ {
+ it = files.erase(it);
+ --it;
+ }
+ progressBar->advance(1);
+ }
+ for ( it = files.begin(); it != files.end(); ++it )
+ {
+ if (! (*it).isEmpty())
+ {
+ KURL url = *it;
+ url.setPath(url.directory(false));
+ while ( baseURL.isParentOf(url) )
+ {
+ if (!m_projectFiles.contains(url))
+ {
+ el = dom.createElement("item");
+ el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false)));
+ dom.firstChild().firstChild().appendChild(el);
+ m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) );
+ emit eventHappened("after_project_add", url.url(), QString::null);
+ m_modified = true;
+ }
+ url.setPath(url.directory(false));
+ }
+ el = dom.createElement("item");
+ url = *it;
+ if (!excludeRx.exactMatch(url.path()))
+ {
+ el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false)));
+ dom.firstChild().firstChild().appendChild(el);
+ m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) );
+ emit eventHappened("after_project_add", url.url(), QString::null);
+ m_modified = true;
+ }
+ }
+ progressBar->advance(1);
+ }
+ progressBar->setTotalSteps(1);
+ progressBar->setValue(0);
+ progressBar->setTextEnabled(false);
+
+ parent->reloadTree(&(m_projectFiles), false, QStringList());
+ parent->newStatus();
+ parent->statusMsg(QString::null);
+}
+
+
+/** insert files from dir recursive */
+void ProjectPrivate::insertFiles(const KURL& pathURL, const QString& mask )
+{
+ KURL::List list;
+
+ list.append(pathURL);
+ list += QExtFileInfo::allFiles(pathURL, mask, m_mainWindow);
+ insertFiles(list);
+}
+
+
+void ProjectPrivate::loadProjectXML()
+{
+//TODO: Optimize reading. For example iterate through all the nodes and handle them
+//according to the found node type
+ parent->statusMsg( i18n("Reading the project file...") );
+ QDomNode no;
+ QDomElement el;
+ KURL url;
+ QDomNode projectNode = dom.firstChild().firstChild();
+ projectName = projectNode.toElement().attribute("name");
+
+ if ( projectNode.isNull() || projectName.isEmpty() )
+ {
+ parent->hideSplash();
+ KMessageBox::sorry(m_mainWindow, i18n("Invalid project file.") );
+ adjustActions();
+ return;
+ }
+
+ m_modified = false;
+ QString tmpString;
+ QDomNode sessionNode;
+
+ if (!m_createSessionDom)
+ {
+ sessionNode = m_sessionDom.firstChild().firstChild();
+ tmpString = sessionNode.toElement().attribute("previewPrefix");
+ if ( !tmpString.isEmpty())
+ {
+ previewPrefix = KURL::fromPathOrURL(tmpString);
+ }
+ usePreviewPrefix = ( sessionNode.toElement().attribute("usePreviewPrefix") == "1");
+ m_persistentBookmarks = (sessionNode.toElement().attribute("usePersistentBookmarks") == "1");
+ } else //TODO: Remove when upgrade from 3.4 is not supported
+ {
+ tmpString = projectNode.toElement().attribute("previewPrefix");
+ if ( !tmpString.isEmpty())
+ {
+ previewPrefix = KURL::fromPathOrURL(tmpString);
+ }
+ usePreviewPrefix = ( projectNode.toElement().attribute("usePreviewPrefix") == "1");
+ m_persistentBookmarks = (projectNode.toElement().attribute("usePersistentBookmarks") == "1");
+
+ sessionNode = m_sessionDom.firstChild().firstChild();
+ sessionNode.toElement().setAttribute("usePreviewPrefix", usePreviewPrefix ? "1" : "0");
+ sessionNode.toElement().setAttribute("previewPrefix", previewPrefix.url());
+ sessionNode.toElement().setAttribute("usePersistentBookmarks", m_persistentBookmarks ? "1" : "0");
+ }
+ no = sessionNode.namedItem("itemcursorpositions");
+ if (no.isNull())
+ {
+ el = m_sessionDom.createElement("itemcursorpositions");
+ sessionNode.appendChild(el);
+ }
+ m_eventsEnabled = projectNode.toElement().attribute("enableEvents", "true") == "true";
+ m_defaultEncoding = projectNode.toElement().attribute("encoding");
+ if (m_defaultEncoding.isEmpty())
+ {
+ m_defaultEncoding = qConfig.defaultEncoding;
+ }
+ no = projectNode.namedItem("author");
+ author = no.firstChild().nodeValue();
+ no = projectNode.namedItem("email");
+ email = no.firstChild().nodeValue();
+ no = projectNode.namedItem("defaultDTD");
+ m_defaultDTD = no.firstChild().nodeValue();
+ if (m_defaultDTD.isEmpty()) m_defaultDTD = qConfig.defaultDocType;
+
+ no = projectNode.namedItem("autoload");
+ currentProjectView = no.toElement().attribute("projectview");
+ if (currentProjectView.isEmpty())
+ {
+ QStringList list = projectViewList();
+ if (list.count() > 0)
+ currentProjectView = list[0];
+ }
+ // Debugger
+ no = projectNode.namedItem("debuggerclient");
+ debuggerClient = no.firstChild().nodeValue();
+ m_debuggerPersistentBreakpoints = (no.toElement().attribute("persistentBreakpoints") == "1");
+ m_debuggerPersistentWatches = (no.toElement().attribute("persistentWatches") == "1");
+
+ no = projectNode.namedItem("templates");
+ tmpString = no.firstChild().nodeValue();
+ templateURL = baseURL;
+ if(no.isNull()) // compatability
+ {
+ templateURL.setPath("templates/");
+ m_modified = true;
+ }
+ else
+ {
+ QuantaCommon::setUrl(templateURL, tmpString);
+ }
+ if (tmpString != QuantaCommon::qUrl(templateURL) )
+ {
+ el = no.toElement();
+ url = QExtFileInfo::toRelative(templateURL, baseURL);
+ if(el.isNull())
+ {
+ el = dom.createElement("templates");
+ dom.firstChild().firstChild().appendChild(el);
+ el.appendChild(dom.createTextNode(QuantaCommon::qUrl(url)));
+ }
+ else
+ {
+ el.firstChild().setNodeValue(QuantaCommon::qUrl(url));
+ }
+ }
+ templateURL = QExtFileInfo::toAbsolute(templateURL, baseURL);
+
+ no = projectNode.namedItem("toolbars");
+ toolbarURL = baseURL;
+ if (no.isNull()) // compatability
+ {
+ toolbarURL.setPath(baseURL.path(1) + "toolbars/");
+ m_modified = true;
+ }
+ else
+ {
+ QuantaCommon::setUrl(toolbarURL,no.firstChild().nodeValue());
+ }
+ if (tmpString != QuantaCommon::qUrl(toolbarURL))
+ {
+ el = no.toElement();
+ url = QExtFileInfo::toRelative(toolbarURL, baseURL);
+ if(el.isNull())
+ {
+ el = dom.createElement("toolbars");
+ dom.firstChild().firstChild().appendChild(el);
+ el.appendChild(dom.createTextNode(QuantaCommon::qUrl(url)));
+ }
+ else
+ {
+ el.firstChild().setNodeValue(QuantaCommon::qUrl(url));
+ }
+ }
+ toolbarURL = QExtFileInfo::toAbsolute(toolbarURL, baseURL);
+
+ no = projectNode.namedItem("exclude");
+ m_excludeCvsignore = (no.toElement().attribute("cvsignore", "false") == "true");
+ QString excludeStr = no.firstChild().nodeValue();
+ QString regExpStr = "";
+ excludeList = QStringList::split(';', excludeStr);
+ for (uint i = 0; i < excludeList.count(); i++)
+ {
+ excludeStr = excludeList[i].stripWhiteSpace();
+ QString str = excludeStr;
+ if (!excludeStr.startsWith("*"))
+ {
+ if (!excludeStr.endsWith("*"))
+ str += "|^" + excludeStr + "/*|*/" + excludeStr + "/*|*/" + excludeStr + "$";
+ else
+ str += "|^" + excludeStr + "|*/" + excludeStr + "$";
+ } else
+ if (!excludeStr.endsWith("*"))
+ str = excludeStr + "/*|"+ excludeStr + "$";
+ str.replace(".","\\.");
+ str.replace("*",".*");
+ str.replace("?",".");
+ regExpStr.append(str);
+ if (i+1 < excludeList.count())
+ regExpStr.append("|");
+ }
+ QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ if (m_excludeCvsignore && projectURL.isLocalFile())
+ {
+ QStringList cvsIgnoreList;
+ uint nlCount = nl.count();
+ for ( uint i = 0; i < nlCount; i++ )
+ {
+ el = nl.item(i).toElement();
+ tmpString = el.attribute("url");
+ if (!tmpString.endsWith("/")) continue;
+ cvsIgnoreList.append(tmpString);
+ }
+ cvsIgnoreList.append("");
+ for (QStringList::ConstIterator it = cvsIgnoreList.constBegin(); it != cvsIgnoreList.constEnd(); ++it)
+ {
+ tmpString = *it;
+ QString rxStr;
+ KURL cvsIgnoreURL;
+ cvsIgnoreURL.setPath(baseURL.path(1) + tmpString + ".cvsignore");
+ QFile f(cvsIgnoreURL.path());
+ if (f.open(IO_ReadOnly))
+ {
+ QTextStream stream(&f);
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ QString line;
+ while (!stream.atEnd())
+ {
+ line = stream.readLine().stripWhiteSpace();
+ line.prepend(tmpString);
+ if (!line.endsWith("*"))
+ line = line + "/*|"+ line + "$";
+ if (!line.startsWith("*"))
+ line.prepend("^");
+ line.replace(".","\\.");
+ line.replace("*",".*");
+ line.replace("?",".");
+ rxStr += line + "|";
+ }
+ regExpStr.prepend(rxStr);
+ f.close();
+ }
+ }
+ }
+ excludeRx.setPattern(regExpStr);
+
+ m_events->clear();
+ nl = projectNode.toElement().elementsByTagName("event");
+ uint nlCount = nl.count();
+ for ( uint i = 0; i < nlCount; i++ )
+ {
+ el = nl.item(i).toElement();
+ EventAction ev;
+ if (el.attribute("type", "internal") == "internal")
+ ev.type = EventAction::Internal;
+ else
+ ev.type = EventAction::External;
+ ev.action = el.attribute("action");
+ QDomNodeList nl2 = el.elementsByTagName("argument");
+ for (uint j = 0; j < nl2.count(); j++)
+ {
+ QString s = nl2.item(j).toElement().text();
+ if (s != "--not set--" && !s.isEmpty())
+ ev.arguments << s;
+ }
+ if (m_events->contains(el.attribute("name")))
+ {
+ (*m_events)[el.attribute("name")].append(ev);
+ } else
+ {
+ QValueList<EventAction> evList;
+ evList.append(ev);
+ m_events->insert(el.attribute("name"), evList);
+ }
+ }
+
+ QDomNode teamNode = projectNode.namedItem("teamdata");
+ no = teamNode.namedItem("leader");
+ if (!no.isNull())
+ {
+ m_teamLeader.name = no.namedItem("name").toElement().text();
+ m_teamLeader.nickName = no.namedItem("nickName").toElement().text();
+ m_teamLeader.email = no.namedItem("email").toElement().text();
+ }
+
+ m_subprojects.clear();
+ m_subprojectLeaders.clear();
+ no = teamNode.namedItem("subprojectleaders");
+ nl = no.toElement().elementsByTagName("subproject");
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ el = nl.item(i).toElement();
+ QDomElement el2 = el.namedItem("subprojectleader").toElement();
+ TeamMember member;
+ member.name = el2.attribute("name");
+ member.nickName = el2.attribute("nickName");
+ member.email = el2.attribute("email");
+ SubProject subproject;
+ subproject.name = el.attribute("name");
+ subproject.location = el.attribute("location");
+ m_subprojects.append(subproject);
+ m_subprojectLeaders[subproject.name] = member;
+ }
+
+ m_taskLeaders.clear();
+ no = teamNode.namedItem("taskleaders");
+ nl = no.toElement().elementsByTagName("projecttask");
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ el = nl.item(i).toElement();
+ TeamMember member;
+ member.name = el.attribute("tasklead");
+ member.nickName = el.attribute("nickName");
+ member.email = el.attribute("email");
+ m_taskLeaders[el.attribute("task")] = member;
+ }
+
+ m_simpleMembers.clear();
+ nl = teamNode.toElement().elementsByTagName("member");
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ el = nl.item(i).toElement();
+ TeamMember member;
+ member.name = el.namedItem("name").toElement().text();
+ member.nickName = el.namedItem("nickName").toElement().text();
+ member.email = el.namedItem("email").toElement().text();
+ member.task = el.attribute("task");
+ m_simpleMembers.append(member);
+ }
+
+ no = teamNode.namedItem("mailinglist");
+ m_mailingList = no.toElement().attribute("address");
+ teamNode = m_sessionDom.firstChild().namedItem("teamdata");
+ m_yourself = teamNode.toElement().attribute("yourself");
+
+ if (m_projectFiles.readFromXML(dom, baseURL, templateURL, excludeRx))
+ m_modified = true;
+ QDomNode uploadNode;
+ if (!m_createSessionDom)
+ {
+ uploadNode = sessionNode.namedItem("uploadprofiles");
+ } else
+ {
+ uploadNode = projectNode.namedItem("uploadprofiles").cloneNode(true);
+ sessionNode.appendChild(uploadNode);
+ }
+
+ QDomElement uploadEl = uploadNode.toElement();
+ m_showUploadTreeviews = uploadEl.attribute("showtreeviews", "true") == "true";
+ if (m_showUploadTreeviews)
+ {
+ // read the profiles and create treeviews for them
+ UploadProfiles::ref()->readFromXML(m_sessionDom);
+ } else
+ UploadProfiles::ref()->clear();
+
+ if (m_createSessionDom)
+ {
+ QDomNode node;
+ node = projectNode.namedItem("treestatus").cloneNode(true);
+ sessionNode.appendChild(node);
+ node = projectNode.namedItem("debuggers").cloneNode(true);
+ sessionNode.appendChild(node);
+ }
+
+
+ parent->statusMsg(QString::null);
+ parent->newProjectLoaded(projectName, baseURL, templateURL);
+ parent->reloadTree(&(m_projectFiles), true, treeStatusFromXML());
+ parent->newStatus();
+ adjustActions();
+}
+
+void ProjectPrivate::slotAcceptCreateProject()
+{
+ bool errorOccured = false;
+
+ projectName = png->linePrjName->text();
+ QString basePath = png->linePrjDir ->text();
+
+ KURL oldBaseURL = baseURL;
+ baseURL = KURL::fromPathOrURL(basePath);
+ if (baseURL.isLocalFile())
+ {
+ QString path = QDir(baseURL.path()).canonicalPath();
+ if (baseURL.path().endsWith("/"))
+ path.append("/");
+ if (!path.isEmpty())
+ baseURL.setPath(path);
+ }
+ /*
+ it is important to set the fields only if there is some input
+ otherwise you set them to an empty string and the treeview will
+ not recognize it as parent url because:
+ QString::Null != ""
+ */
+ if (!png->lineHost->text().isEmpty())
+ baseURL.setHost(png->lineHost->text());
+ if (!png->lineUser->text().isEmpty())
+ baseURL.setUser(png->lineUser->text());
+ if (!png->linePasswd->text().isEmpty())
+ baseURL.setPass(png->linePasswd->text());
+ if (!png->linePort->text().isEmpty())
+ baseURL.setPort(png->linePort->text().toInt());
+ if (!png->comboProtocol->currentText().isEmpty())
+ baseURL.setProtocol(png->comboProtocol->currentText());
+ if (baseURL.protocol() == i18n("Local")) baseURL.setProtocol("file");
+ baseURL.adjustPath(1);
+ if (!baseURL.path().startsWith("/")) baseURL.setPath("/"+ baseURL.path());
+ if (!QExtFileInfo::createDir(baseURL, m_mainWindow))
+ {
+ QuantaCommon::dirCreationError(m_mainWindow, baseURL);
+ baseURL = oldBaseURL;
+ } else
+ {
+ projectURL = baseURL;
+ projectURL.setPath(baseURL.path(1) + png->linePrjFile->text());
+
+ errorOccured = !createEmptyDom();
+ if (!errorOccured)
+ {
+ email = pnf->lineEmail->text();
+ author = pnf->lineAuthor->text();
+ m_defaultDTD = DTDs::ref()->getDTDNameFromNickName(pnf->dtdCombo->currentText());
+ m_defaultEncoding = pnf->encodingCombo->currentText();
+
+ previewPrefix = KURL::fromPathOrURL( pnf->linePrefix->text() );
+ usePreviewPrefix = pnf->checkPrefix->isChecked();
+
+ QDomElement el;
+ KURL url;
+
+ el = dom.firstChild().firstChild().toElement();
+ el.setAttribute("type", png->type());
+ el.setAttribute("name", projectName );
+ el.setAttribute("encoding", m_defaultEncoding);
+
+ el = m_sessionDom.firstChild().firstChild().toElement();
+ el.setAttribute("previewPrefix", previewPrefix.url() );
+ el.setAttribute("usePreviewPrefix",usePreviewPrefix);
+
+ el = dom.createElement("author");
+ dom.firstChild().firstChild().appendChild( el );
+ el.appendChild( dom.createTextNode( author ) );
+
+ el = dom.createElement("email");
+ dom.firstChild().firstChild().appendChild( el );
+ el.appendChild( dom.createTextNode( email ) );
+
+ el = dom.createElement("defaultDTD");
+ dom.firstChild().firstChild().appendChild(el);
+ el.appendChild(dom.createTextNode(m_defaultDTD));
+
+ KURL::List list;
+ if ( png->type() == "Local" ) list = pnl->files();
+ if ( png->type() == "Web" ) list = pnw->files();
+
+ for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ url = *it;//QExtFileInfo::toRelative(*it, baseURL );
+ el = dom.createElement("item");
+ el.setAttribute("url",QuantaCommon::qUrl(url));
+ dom.firstChild().firstChild().appendChild( el );
+ }
+
+ // el = dom.createElement("item");
+ // el.setAttribute("url","templates/");
+ // dom.firstChild().firstChild().appendChild(el);
+
+ //setup the templates directory
+ templateURL = baseURL;
+ bool createTemplateDir = true;
+ if (pnf->insertGlobalTemplates->isChecked())
+ {
+ KURL url;
+ QuantaCommon::setUrl(url, qConfig.globalDataDir + resourceDir + "templates/");
+ parent->slotAddDirectory(url, false);
+ QuantaCommon::setUrl(templateURL, "templates/");
+ createTemplateDir = false;
+ }
+ if (pnf->insertLocalTemplates->isChecked())
+ {
+ KURL url;
+ QuantaCommon::setUrl(url, locateLocal("data", resourceDir + "templates/"));
+ parent->slotAddDirectory(url, false);
+ QuantaCommon::setUrl(templateURL, "templates/");
+ createTemplateDir = false;
+ }
+
+ if (createTemplateDir)
+ {
+ QuantaCommon::setUrl(templateURL, png->linePrjTmpl->text());
+ templateURL.adjustPath(1);
+ templateURL = QExtFileInfo::toAbsolute(templateURL, baseURL);
+ if (!QExtFileInfo::createDir(templateURL, m_mainWindow))
+ {
+ QuantaCommon::dirCreationError(m_mainWindow, templateURL);
+ }
+ }
+ //the nodes are already created in loadProjectXML() called from createEmptyDom()
+ el = dom.firstChild().firstChild().namedItem("templates").toElement();
+ url = QExtFileInfo::toRelative(templateURL, baseURL);
+ el.firstChild().setNodeValue(QuantaCommon::qUrl(url));
+
+ //setup the toolbars directory
+ toolbarURL = baseURL;
+ QuantaCommon::setUrl(toolbarURL,png->linePrjToolbar->text());
+ toolbarURL.adjustPath(1);
+ toolbarURL = QExtFileInfo::toAbsolute(toolbarURL, baseURL);
+ if (!QExtFileInfo::createDir(toolbarURL, m_mainWindow))
+ {
+ QuantaCommon::dirCreationError(m_mainWindow, toolbarURL);
+ }
+ el = dom.firstChild().firstChild().namedItem("toolbars").toElement();
+ url = QExtFileInfo::toRelative(toolbarURL, baseURL);
+ el.firstChild().setNodeValue(QuantaCommon::qUrl(url));
+
+#if KDE_IS_VERSION(3,4,89)
+ m_projectRecent->addURL(projectURL, projectName);
+#else
+ m_projectRecent->addURL(projectURL);
+#endif
+ m_projectRecent->setCurrentItem(0);
+ // remember the project in config
+ writeConfig();
+
+//workaround to load the newly created project items in the treeview
+ KURL u = projectURL;
+ slotCloseProject();
+ loadProject(u);
+ }
+}
+if (errorOccured)
+{
+ slotCloseProject();
+}
+}
+
+
+/** Saves a project view (group of files & toolbars) without asking for a name. */
+void ProjectPrivate::slotSaveProjectView()
+{
+ slotSaveAsProjectView(currentProjectView.isEmpty());
+}
+
+
+/** Deletes a project view */
+void ProjectPrivate::slotDeleteProjectView(const QString &view)
+{
+ QDomNodeList nl = dom.elementsByTagName("projectview");
+ QDomElement el;
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ QDomNode node = nl.item(i);
+ el = node.cloneNode().toElement();
+ if (el.attribute("name") == view)
+ {
+ node.parentNode().removeChild(node);
+ if (currentProjectView == view)
+ currentProjectView = "";
+ parent->setModified();
+ adjustViewActions();
+ break;
+ }
+ }
+}
+
+/** Saves a project view (group of files & toolbars) asking for a name. */
+void ProjectPrivate::slotSaveAsProjectView(bool askForName)
+{
+ if (askForName)
+ {
+ bool ok;
+ QString newProjectView = KInputDialog::getText(i18n("Save Project View As"),
+ i18n("Enter the name of the view:"), "", &ok, m_mainWindow).lower();
+ if (!ok)
+ return;
+ currentProjectView = newProjectView;
+ }
+ QDomNodeList nl = dom.elementsByTagName("projectview");
+ for (uint i = 0 ;i < nl.count(); i++)
+ {
+ QDomNode node = nl.item(i);
+ if (node.toElement().attribute("name") == currentProjectView)
+ {
+ if (!askForName ||
+ KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>A project view named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>")
+ .arg(currentProjectView), QString::null, i18n("Overwrite")) == KMessageBox::Continue)
+ {
+ node.parentNode().removeChild(node);
+ break;
+ } else
+ {
+ return;
+ }
+ }
+ }
+
+ QDomElement el = dom.createElement("projectview");
+ el.setAttribute("name", currentProjectView);
+ QDomElement item;
+ KURL::List openURLs = ViewManager::ref()->openedFiles(true); // get open urls
+ KURL::List::Iterator it;
+ for ( it = openURLs.begin(); it != openURLs.end(); ++it )
+ {
+ KURL url = (*it);
+ if (m_projectFiles.contains(url))
+ {
+ item = dom.createElement("viewitem");
+ item.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL)) );
+ el.appendChild(item);
+ }
+ }
+
+ KURL::List toolbarList;
+ parent->getUserToolbarFiles(&toolbarList);
+ for (uint i =0 ; i < toolbarList.count(); i++)
+ {
+ item = dom.createElement("viewtoolbar");
+ KURL url = toolbarList[i];
+ url = QExtFileInfo::toRelative(url, baseURL);
+ item.setAttribute("url", QuantaCommon::qUrl(url) );
+ el.appendChild(item);
+ }
+
+ dom.firstChild().firstChild().appendChild( el );
+ parent->setModified();
+ adjustViewActions();
+}
+
+
+void ProjectPrivate::slotSelectProjectType(const QString &title)
+{
+ if ( png->radioLocal->isChecked() ) stack->raiseWidget( 0 );
+ if ( png->radioWeb ->isChecked() ) stack->raiseWidget( 1 );
+ if ( title == m_wizTitle )
+ emit setLocalFiles( pnl->checkInsert->isChecked() );
+}
+
+
+bool ProjectPrivate::createEmptyDom()
+{
+ QString str;
+ QTextStream stream(&str, IO_WriteOnly);
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+
+ stream << "<!DOCTYPE webproject ><webproject>" << endl;
+ stream << "\t<project name=\"" << projectName << "\">" << endl;
+ stream << "\t\t<upload />" << endl;
+ stream << "\t</project>" << endl;
+ stream << "</webproject>" << endl;
+
+ QString sessionStr;
+ QTextStream sessionStream(&sessionStr, IO_WriteOnly);
+ sessionStream.setEncoding(QTextStream::UnicodeUTF8);
+
+ sessionStream << "<!DOCTYPE webprojectsession ><webprojectsession>" << endl;
+ sessionStream << "\t<session>" << endl;
+ sessionStream << "\t</session>" << endl;
+ sessionStream << "</webprojectsession>" << endl;
+
+ KURL sessionURL = projectURL;
+ QString fileName = projectURL.fileName();
+ if (fileName.endsWith(".webprj"))
+ fileName.replace(".webprj", ".session");
+ else
+ fileName += ".session";
+ sessionURL.setFileName(fileName);
+
+ bool result = true;
+
+ if (!projectURL.isLocalFile())
+ {
+ tempFile = new KTempFile(tmpDir); // tempFile will get deleted in slotProjectClose()
+ tempFile->setAutoDelete(true);
+ tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ *(tempFile->textStream()) << str;
+ tempFile->close();
+ result = QExtFileInfo::createDir(baseURL, m_mainWindow);
+ if (result)
+ result = KIO::NetAccess::upload(tempFile->name(), projectURL, m_mainWindow);
+ if (result)
+ m_tmpProjectFile = tempFile->name();
+
+ sessionTempFile = new KTempFile(tmpDir); // sessionTempFile will get deleted in slotProjectClose()
+ sessionTempFile->setAutoDelete(true);
+ sessionTempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ *(sessionTempFile->textStream()) << sessionStr;
+ sessionTempFile->close();
+ result = KIO::NetAccess::upload(sessionTempFile->name(), sessionURL, m_mainWindow);
+ if (result)
+ m_tmpSessionFile= sessionTempFile->name();
+ } else
+ {
+ QFile f(projectURL.path());
+ if (f.open( IO_WriteOnly ))
+ {
+ QTextStream fstream(&f);
+ fstream.setEncoding(QTextStream::UnicodeUTF8);
+ fstream << str;
+ m_tmpProjectFile = projectURL.path(); // we are local: the temp file and the projectURL are the same
+ } else
+ {
+ result = false;
+ }
+ f.close();
+ if (result)
+ {
+ f.setName(sessionURL.path());
+ if (f.open(IO_WriteOnly))
+ {
+ QTextStream fstream(&f);
+ fstream.setEncoding(QTextStream::UnicodeUTF8);
+ fstream << sessionStr;
+ m_tmpSessionFile = sessionURL.path(); // we are local: the temp file and the projectURL are the same
+ } else
+ {
+ result = false;
+ }
+ f.close();
+ }
+ }
+
+ if (!result)
+ {
+ parent->hideSplash();
+ KMessageBox::sorry(m_mainWindow, i18n("<qt>Cannot open file <b>%1</b> for writing.</qt>").arg(projectURL.prettyURL(0, KURL::StripFileProtocol)));
+ delete tempFile;
+ tempFile = 0L;
+ delete sessionTempFile;
+ sessionTempFile = 0L;
+ return false;
+ }
+
+ dom.setContent(str);
+ m_sessionDom.setContent(sessionStr);
+ m_projectFiles.clear();
+ return true;
+}
+
+
+QStringList ProjectPrivate::treeStatusFromXML()
+{
+ QStringList folderList;
+ QDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
+ if (nl.count() > 0) {
+ nl = nl.item(0).childNodes();
+ for ( unsigned int i = 0; i < nl.count(); i++ )
+ {
+ QString urlString = nl.item(i).toElement().attribute("url");
+ folderList.append( baseURL.url(1) + urlString);
+ }
+ }
+ return folderList;
+}
+
+
+void ProjectPrivate::getStatusFromTree()
+{
+ // remove old status
+ QDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
+ QDomElement el;
+ for ( unsigned int i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ el.parentNode().removeChild( el );
+ i--;
+ }
+ QStringList folderList;
+ parent->getTreeStatus( &folderList );
+ // toplevel folder is always open in a project and QExtFileInfo::toRelative
+ // creates strange output -> we remove the toplevel folder
+ if (folderList.count() > 0)
+ folderList.remove(folderList.begin());
+ if (folderList.count() > 0) {
+ // create the root element
+ QDomElement root = m_sessionDom.createElement("treestatus");
+ m_sessionDom.firstChild().firstChild().appendChild(root);
+ for (QStringList::Iterator it = folderList.begin(); it != folderList.end(); ++it) {
+ el = m_sessionDom.createElement("openfolder");
+ el.setAttribute("url", QuantaCommon::qUrl( QExtFileInfo::toRelative(KURL(*it), baseURL) ) );
+ root.appendChild( el );
+ }
+ }
+}
+
+
+/** create new project */
+void ProjectPrivate::slotNewProject()
+{
+ QWizard *wiz = new QWizard(m_mainWindow, "new", true);
+ wiz->setCaption(i18n("New Project Wizard"));
+ wiz->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+
+ png = new ProjectNewGeneral(0L);
+
+ stack = new QWidgetStack(0L);
+
+ pnl = new ProjectNewLocal(stack);
+ pnw = new ProjectNewWeb(stack);
+ pnf = new ProjectNewFinal(0L);
+
+ stack->addWidget( pnl, 0);
+ stack->addWidget( pnw, 1 );
+
+ wiz->addPage( png, i18n("<b>General Project Settings</b>"));
+ wiz->addPage( stack, m_wizTitle );
+ wiz->addPage( pnf, i18n("<b>More Project Settings</b>"));
+
+ wiz->setNextEnabled ( png, false );
+ wiz->setBackEnabled ( stack, true );
+ wiz->setNextEnabled ( stack, true );
+ wiz->setNextEnabled ( pnf, false );
+ wiz->setFinishEnabled( pnf, true );
+
+ connect( png, SIGNAL(enableNextButton(QWidget *,bool)),
+ wiz, SLOT(setNextEnabled(QWidget*,bool)));
+ connect( png, SIGNAL(setBaseURL(const KURL&)),
+ pnl, SLOT( setBaseURL(const KURL&)));
+ connect( png, SIGNAL(setBaseURL(const KURL&)),
+ pnw, SLOT( setBaseURL(const KURL&)));
+ connect( this,SIGNAL(setLocalFiles(bool)),
+ pnl, SLOT(slotSetFiles(bool)));
+
+ connect(wiz, SIGNAL(selected(const QString &)),
+ this, SLOT (slotSelectProjectType(const QString &)));
+ connect(wiz, SIGNAL(helpClicked()), SLOT(slotNewProjectHelpClicked()));
+
+ connect( pnw, SIGNAL(enableMessagesWidget()),
+ parent, SIGNAL(enableMessageWidget()));
+ connect( pnw, SIGNAL(messages(const QString&)),
+ parent, SLOT (slotGetMessages(const QString&)));
+ connect( pnw, SIGNAL(enableNextButton(QWidget *,bool)),
+ wiz, SLOT(setNextEnabled(QWidget*,bool)));
+ connect( pnw, SIGNAL(enableNextButton(QWidget *,bool)),
+ wiz, SLOT(setBackEnabled(QWidget*,bool)));
+
+ QStringList lst = DTDs::ref()->nickNameList(true);
+ pnf->dtdCombo->insertStringList(lst);
+ QString defaultDTDName = DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType.lower());
+ int pos = lst.findIndex(defaultDTDName);
+ if (pos >= 0)
+ pnf->dtdCombo->setCurrentItem(pos);
+
+ QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ pnf->encodingCombo->insertStringList( availableEncodingNames );
+ QStringList::ConstIterator iter;
+ int iIndex = -1;
+ for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
+ {
+ ++iIndex;
+ if ((*iter).lower() == qConfig.defaultEncoding.lower())
+ {
+ pnf->encodingCombo->setCurrentItem(iIndex);
+ break;
+ }
+ }
+
+ png->linePrjName->setFocus();
+ if (wiz->exec())
+ {
+ slotCloseProject();
+ slotAcceptCreateProject();
+ }
+ delete wiz;
+
+ adjustActions();
+ parent->newStatus();
+}
+
+/** close project and edited files */
+void ProjectPrivate::slotCloseProject()
+{
+ if (!parent->hasProject()) return;
+ connect(ViewManager::ref(), SIGNAL(filesClosed(bool)), this, SLOT(slotProceedWithCloseProject(bool)));
+ parent->closeFiles();
+}
+
+void ProjectPrivate::slotProceedWithCloseProject(bool success)
+{
+ disconnect(ViewManager::ref(), SIGNAL(filesClosed(bool)), this, SLOT(slotProceedWithCloseProject(bool)));
+ if (!success) return;
+ emit eventHappened("before_project_close", baseURL.url(), QString::null);
+ if (!uploadProjectFile())
+ {
+ if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("Saving of project failed. Do you want to continue with closing (might cause data loss)?"), i18n("Project Saving Error"), KStdGuiItem::close()) == KMessageBox::Cancel)
+ return;
+ }
+ emit eventHappened("after_project_close", baseURL.url(), QString::null);
+ // empty dom tree
+ dom.clear();
+ m_sessionDom.clear();
+ m_events->clear();
+ config->setGroup("Projects");
+ config->writePathEntry("Last Project", QString::null);
+ init();
+ parent->newProjectLoaded(projectName, baseURL, templateURL);
+ parent->reloadTree( &(m_projectFiles), true, QStringList());
+ adjustActions();
+ m_projectRecent->setCurrentItem(-1);
+ parent->newStatus();
+ kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+}
+
+
+/** open project file */
+void ProjectPrivate::slotOpenProject()
+{
+ KURL url = KFileDialog::getOpenURL( QString::null,
+ "*.wpj *.webprj"+i18n("|Project Files\n*|All Files"), m_mainWindow,
+ i18n("Open Project"));
+
+ if( !url.isEmpty() )
+ {
+ loadProject ( url );
+ }
+}
+
+
+/* save project file */
+bool ProjectPrivate::saveProject()
+{
+ if ( !parent->hasProject() ) return false;
+ bool result = true;
+ // remove old opened files
+ QDomElement el;
+ QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+
+ for ( unsigned int i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( el.nodeName() == "openfile" )
+ {
+ el.parentNode().removeChild( el );
+ i--;
+ }
+ }
+ getStatusFromTree();
+ QFile f(m_tmpProjectFile);
+ if (f.open(IO_WriteOnly))
+ {
+ QTextStream stream( &f );
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ dom.save(stream, 2);
+ f.close();
+ f.setName(m_tmpSessionFile);
+ if (f.open(IO_WriteOnly))
+ {
+ QTextStream stream(&f);
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ m_sessionDom.save(stream, 2);
+ f.close();
+ }
+ m_modified = false;
+ parent->statusMsg(i18n( "Wrote project file %1" ).arg(m_tmpProjectFile));
+ } else
+ {
+ parent->hideSplash();
+ KMessageBox::error(m_mainWindow, i18n("<qt>Cannot open the file <b>%1</b> for writing.</qt>").arg(m_tmpProjectFile));
+ result = false;
+ }
+ return result;
+}
+
+
+void ProjectPrivate::loadProjectFromTemp(const KURL &url, const QString &tempFile, const QString &sessionTempFile)
+{
+ m_createSessionDom = true;
+ m_tmpProjectFile = tempFile;
+ if (!sessionTempFile.isEmpty())
+ m_tmpSessionFile = sessionTempFile;
+ projectURL = url;
+ QFile f(tempFile);
+ if (f.open(IO_ReadOnly))
+ {
+ baseURL = url;
+ baseURL.setPath(url.directory(true, true));
+ if (baseURL.isLocalFile())
+ {
+ QDir dir(baseURL.path());
+ baseURL.setPath(dir.canonicalPath());
+ baseURL.adjustPath(-1);
+ }
+ dom.setContent(&f);
+ f.close();
+ if (!sessionTempFile.isEmpty())
+ {
+ f.setName(sessionTempFile);
+ if (f.open(IO_ReadOnly))
+ {
+ m_sessionDom.setContent(&f);
+ m_createSessionDom = false;
+ f.close();
+ }
+ }
+ loadProjectXML();
+ openCurrentView();
+#if KDE_IS_VERSION(3,4,89)
+ kdDebug(24000) << "Add recent project: " << url << " : projectName= " << projectName << endl;
+ m_projectRecent->addURL(url, projectName);
+#else
+ m_projectRecent->addURL( url );
+#endif
+ m_projectRecent->setCurrentItem(0);
+ // remember the project in config
+ writeConfig();
+ } else
+ {
+ parent->hideSplash();
+ KMessageBox::error(m_mainWindow, i18n("<qt>Cannot open the file <b>%1</b> for reading.</qt>").arg(tempFile));
+ }
+}
+
+/** load project from file: url */
+bool ProjectPrivate::loadProject(const KURL &url)
+{
+ if (projectURL == url)
+ return true;
+ if (!url.isValid())
+ {
+ parent->hideSplash();
+ KMessageBox::sorry(m_mainWindow, i18n("<qt>Malformed URL: <b>%1</b></qt>").arg(url.prettyURL()));
+ return false;
+ }
+ if ( projectAlreadyOpen(url.url()) )
+ {
+ parent->hideSplash();
+ if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>The project<br><b>%1</b><br> seems to be used by another Quanta instance.<br>You may end up with data loss if you open the same project in two instances, modify and save them in both.<br><br>Do you want to proceed with open?</qt>").arg(url.prettyURL()), QString::null, KStdGuiItem::open()) == KMessageBox::Cancel)
+ return false;
+ }
+ QString projectTmpFile;
+ QString sessionTmpFile;
+
+ // test if url is writeable and download to local file
+ if (KIO::NetAccess::exists(url, false, m_mainWindow) &&
+ KIO::NetAccess::download(url, projectTmpFile, m_mainWindow))
+ {
+ if (parent->hasProject())
+ {
+ slotCloseProject();
+ }
+ KURL sessionURL = url;
+ QString fileName = url.fileName();
+ if (fileName.endsWith(".webprj"))
+ fileName.replace(".webprj", ".session");
+ else
+ fileName += ".session";
+ sessionURL.setFileName(fileName);
+ if (KIO::NetAccess::exists(sessionURL, false, m_mainWindow))
+ KIO::NetAccess::download(sessionURL, sessionTmpFile, m_mainWindow);
+ else
+ {
+ QString sessionStr;
+ QTextStream sessionStream(&sessionStr, IO_WriteOnly);
+ sessionStream.setEncoding(QTextStream::UnicodeUTF8);
+
+ sessionStream << "<!DOCTYPE webprojectsession ><webprojectsession>" << endl;
+ sessionStream << "\t<session>" << endl;
+ sessionStream << "\t</session>" << endl;
+ sessionStream << "</webprojectsession>" << endl;
+ if (!sessionURL.isLocalFile())
+ {
+ sessionTempFile = new KTempFile(tmpDir); // sessionTempFile will get deleted in slotProjectClose()
+ sessionTempFile->setAutoDelete(true);
+ sessionTempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ *(sessionTempFile->textStream()) << sessionStr;
+ sessionTempFile->close();
+ m_tmpSessionFile = sessionTempFile->name();
+ } else
+ {
+ QFile f(sessionURL.path());
+ if (f.open(IO_WriteOnly))
+ {
+ QTextStream fstream(&f);
+ fstream.setEncoding(QTextStream::UnicodeUTF8);
+ fstream << sessionStr;
+ m_tmpSessionFile = sessionURL.path(); // we are local: the temp file and the projectURL are the same
+ }
+ f.close();
+ }
+ m_sessionDom.setContent(sessionStr);
+ }
+ loadProjectFromTemp(url, projectTmpFile, sessionTmpFile);
+ } else
+ {
+ parent->hideSplash();
+ KMessageBox::error(m_mainWindow, i18n("<qt>Cannot access the project file <b>%1</b>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
+ return false;
+ }
+ return true;
+}
+
+
+/** dialog for add files */
+void ProjectPrivate::slotAddFiles()
+{
+ KURL::List list = KFileDialog::getOpenURLs(
+ baseURL.url(), i18n("*"), m_mainWindow, i18n("Insert Files in Project"));
+
+ if ( !list.isEmpty() )
+ {
+ KURL firstURL = list.first();
+ firstURL = QExtFileInfo::toRelative( firstURL, baseURL );
+
+ if ( firstURL.path().startsWith("/") || firstURL.path().startsWith("."))
+ {
+ KURLRequesterDlg *urlRequesterDlg = new KURLRequesterDlg( baseURL.prettyURL(), m_mainWindow, "");
+ urlRequesterDlg->setCaption(i18n("Files: Copy to Project"));
+ urlRequesterDlg->urlRequester()->setMode( KFile::Directory | KFile::ExistingOnly);
+ urlRequesterDlg->exec();
+ KURL destination = urlRequesterDlg->selectedURL();
+ delete urlRequesterDlg;
+
+ if ( !destination.isEmpty())
+ {
+ CopyTo *dlg = new CopyTo( baseURL);
+ connect(dlg, SIGNAL(deleteDialog(CopyTo*)),
+ SLOT (slotDeleteCopytoDlg(CopyTo*)));
+ connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)), parent,
+ SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ list = dlg->copy( list, destination );
+ return;
+ }
+ else {
+ return;
+ }
+ }
+
+ insertFiles( list );
+ //Take care also of the selected dirs
+ KURL dirURL;
+ for (uint i = 0; i < list.count(); i++)
+ {
+ dirURL = list[i];
+ if (dirURL.path().endsWith("/"))
+ {
+ insertFiles( dirURL, "*" );
+ }
+ }
+
+ parent->reloadTree( &(m_projectFiles), false, QStringList());
+ }
+}
+
+
+void ProjectPrivate::slotDeleteCopytoDlg(CopyTo *dlg)
+{
+//The CopyTo dlg is deleted only here!!
+ delete dlg;
+}
+
+
+void ProjectPrivate::slotAddDirectory()
+{
+ KURL url = KURL();
+ url = KFileDialog::getExistingURL(baseURL.prettyURL(), m_mainWindow,
+ i18n("Insert Folder in Project"));
+ parent->slotAddDirectory(url);
+}
+
+
+void ProjectPrivate::slotDebuggerOptions()
+{
+ // Debuggers Combo
+ 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(m_debuggerClientEdit == service->name())
+ {
+ DebuggerClient *dbg = 0L;
+ int errCode = 0;
+//Workaround for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2
+//The correct way should be a simple:
+// DebuggerClient *dbg = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, QStringList(), &errCode);
+ QObject* obj = KParts::ComponentFactory::createInstanceFromService<QObject>(service, this, 0, QStringList(), &errCode);
+ if (obj && obj->inherits("DebuggerClient"))
+ dbg = static_cast<DebuggerClient *>(obj);
+ if (dbg)
+ {
+ QDomNode projectNode = m_sessionDom.firstChild().firstChild();
+ QDomNode nodeThisDbg;
+ QDomNode nodeDbg = projectNode.namedItem("debuggers");
+ if(nodeDbg.isNull())
+ {
+ nodeDbg = m_sessionDom.createElement("debuggers");
+ projectNode.appendChild(nodeDbg);
+ }
+
+ nodeThisDbg = nodeDbg.namedItem(service->name());
+ if(nodeThisDbg.isNull())
+ {
+ nodeThisDbg = m_sessionDom.createElement(service->name());
+ nodeDbg.appendChild(nodeThisDbg);
+ }
+ dbg->showConfig(nodeThisDbg);
+ delete dbg;
+ }
+ else
+ {
+ parent->hideSplash();
+ KMessageBox::error(NULL, i18n("<qt>Unable to load the debugger plugin, error code %1 was returned: <b>%2</b>.</qt>").arg(errCode).arg(KLibLoader::self()->lastErrorMessage()), i18n("Debugger Error"));
+ }
+ }
+ }
+}
+
+void ProjectPrivate::slotDebuggerChanged(const QString &debugger)
+{
+ m_debuggerClientEdit = debugger;
+}
+
+
+void ProjectPrivate::writeConfig()
+{
+ config->reparseConfiguration();
+ config->setGroup("Projects");
+ // remember the last project in config
+ KURL url = projectURL.url();
+ url.setPass("");
+ config->writePathEntry("Last Project", url.url());
+ // add project to list
+ if (!projectURL.isEmpty())
+ {
+ QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ if (projectList.contains( projectURL.url() ) == 0)
+ {
+ projectList.append( projectURL.url() );
+ config->writePathEntry("OpenProjects", projectList);
+ // add the temp file to list
+ projectList = QuantaCommon::readPathListEntry(config, "ProjectTempFiles");
+ projectList.append(KURL::fromPathOrURL(m_tmpProjectFile).url());
+ config->writePathEntry("ProjectTempFiles", projectList);
+ projectList = QuantaCommon::readPathListEntry(config, "ProjectSessionTempFiles");
+ projectList.append(KURL::fromPathOrURL(m_tmpSessionFile).url());
+ config->writePathEntry("ProjectSessionTempFiles", projectList);
+ }
+ }
+ // save recent projects
+ config->deleteGroup("RecentProjects");
+ m_projectRecent->saveEntries(config, "RecentProjects");
+ config->sync();
+}
+
+
+void ProjectPrivate::removeFromConfig(const QString & urlStr)
+{
+ config->reparseConfiguration();
+ config->setGroup("Projects");
+ QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ int i = projectList.findIndex( urlStr );
+ if ( i > -1)
+ {
+ projectList.remove(projectList.at(i));
+ config->writePathEntry("OpenProjects", projectList);
+ // remove the temp file from list
+ projectList = QuantaCommon::readPathListEntry(config, "ProjectTempFiles");
+ projectList.remove(projectList.at(i));
+ config->writePathEntry("ProjectTempFiles", projectList);
+ projectList = QuantaCommon::readPathListEntry(config, "ProjectSessionTempFiles");
+ if (projectList.count() > (uint)i)
+ {
+ projectList.remove(projectList.at(i));
+ config->writePathEntry("ProjectSessionTempFiles", projectList);
+ }
+ }
+ config->sync();
+}
+
+
+bool ProjectPrivate::projectAlreadyOpen(const QString & urlStr)
+{
+ config->reparseConfiguration();
+ config->setGroup("Projects");
+ QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ return (projectList.contains(urlStr) != 0);
+}
+
+
+/* uploads project file */
+bool ProjectPrivate::uploadProjectFile()
+{
+ if (m_tmpProjectFile.isNull() || !saveProject())
+ return false;
+ KURL sessionURL = projectURL;
+ QString fileName = projectURL.fileName();
+ if (fileName.endsWith(".webprj"))
+ fileName.replace(".webprj", ".session");
+ else
+ fileName += ".session";
+ sessionURL.setFileName(fileName);
+
+ // no need to upload a local file because it is the same as the tempFile
+ if (projectURL.isLocalFile())
+ {
+ removeFromConfig( projectURL.url() ); // remove the project from the list of open projects
+ // delete all temp files we used
+ delete tempFile;
+ tempFile = 0L;
+ delete sessionTempFile;
+ sessionTempFile = 0L;
+ m_tmpProjectFile = QString::null;
+ return true;
+ }
+ if (KIO::NetAccess::upload(m_tmpProjectFile, projectURL, m_mainWindow) && KIO::NetAccess::upload(m_tmpSessionFile, sessionURL, m_mainWindow))
+ {
+ removeFromConfig(projectURL.url()); // remove the project from the list of open projects
+ if (quantaApp)
+ parent->statusMsg(i18n( "Uploaded project file %1" ).arg( projectURL.prettyURL()));
+ // delete all temp files we used
+ // first the one from creating a new project
+ delete tempFile;
+ tempFile = 0L;
+ delete sessionTempFile;
+ sessionTempFile = 0L;
+ // second the one from downloading a project
+ KIO::NetAccess::removeTempFile(m_tmpProjectFile);
+ KIO::NetAccess::removeTempFile(m_tmpSessionFile);
+ // third if we recovered after crash
+ KIO::NetAccess::del(KURL().fromPathOrURL(m_tmpProjectFile), m_mainWindow);
+ KIO::NetAccess::del(KURL().fromPathOrURL(m_tmpSessionFile), m_mainWindow);
+ m_tmpProjectFile = "";
+ m_tmpSessionFile = "";
+ }
+ else
+ {
+ if (quantaApp)
+ {
+ parent->statusMsg(QString::null );
+ KMessageBox::error(m_mainWindow, KIO::NetAccess::lastErrorString());
+ }
+ return false;
+ }
+ return true;
+}
+
+void ProjectPrivate::slotNewProjectHelpClicked()
+{
+ kapp->invokeHelp("create-new-project-3-2", "quanta");
+}
+
+#include "projectprivate.moc"
diff --git a/quanta/project/projectprivate.h b/quanta/project/projectprivate.h
new file mode 100644
index 00000000..3ab1a20a
--- /dev/null
+++ b/quanta/project/projectprivate.h
@@ -0,0 +1,255 @@
+/***************************************************************************
+ projectprivate.h - description
+ -------------------
+ begin : Thu Mar 16 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2001-2004 by Andras Mantia <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 PROJECTPRIVATE_H
+#define PROJECTPRIVATE_H
+
+//qt includes
+#include <qmap.h>
+#include <qregexp.h>
+#include <qguardedptr.h>
+
+//app includes
+#include "project.h"
+#include "projectlist.h"
+#include "projectupload.h"
+
+class QWidgetStack;
+
+class KAction;
+class KActionCollection;
+class KConfig;
+class KDirWatch;
+class KRecentFilesAction;
+class KSelectAction;
+class KTempFile;
+
+class CopyTo;
+class ProjectNewGeneral;
+class ProjectNewLocal;
+class ProjectNewWeb;
+class ProjectNewFinal;
+class ProjectList;
+struct EventAction;
+typedef QMap<QString, QValueList<EventAction> > EventActions;
+
+class ProjectPrivate
+ : public QObject
+{
+ Q_OBJECT
+public:
+ ProjectPrivate(Project *p);
+
+ ~ProjectPrivate();
+
+ Project *parent;
+ /** Point to the .webprj file */
+ KURL projectURL;
+ QString projectName;
+ /** Points to the directory of the .webprj file */
+ KURL baseURL;
+/** Points to the document root inside the project. Item under this folder
+are treated as the actual documents belonging to the site. They are automatically selected
+for upload, searching in project default to this directory, etc. Items outside of the
+document root are treated as external, control files and they are by default not selected for
+upload.*/
+
+ KURL previewPrefix;
+ bool usePreviewPrefix;
+ bool m_persistentBookmarks;
+ QString author;
+ KRecentFilesAction *m_projectRecent;
+
+ ProjectNewGeneral *png;
+ ProjectNewLocal *pnl;
+ ProjectNewWeb *pnw;
+ ProjectNewFinal *pnf;
+
+ QWidgetStack *stack;
+ QString currentProjectView;
+
+ KConfig *config;
+ bool m_modified;
+ bool m_excludeCvsignore;
+ /** Default DTD for this project. */
+ QString m_defaultDTD;
+ QString m_defaultEncoding;
+ QRegExp excludeRx;
+ QStringList excludeList;
+ KMainWindow *m_mainWindow;
+ QString m_debuggerClientEdit;
+ QMap<QString, QString> m_passwdList;
+ ProjectList m_projectFiles; ///< the list with the _absolute_ URL's of the project
+ KDirWatch *m_dirWatch; ///< watches some project directories for modification
+ KURL toolbarURL;
+ KURL templateURL;
+ QString email;
+ QDomDocument dom;
+ QDomDocument m_sessionDom;
+ QString debuggerClient;
+ bool m_debuggerPersistentBreakpoints;
+ bool m_debuggerPersistentWatches;
+ QGuardedPtr<ProjectUpload> m_uploadDialog;
+
+ TeamMember m_teamLeader;
+ QMap<QString, TeamMember> m_subprojectLeaders;
+ QMap<QString, TeamMember> m_taskLeaders;
+ QValueList<TeamMember> m_simpleMembers;
+ QValueList<SubProject> m_subprojects;
+ QString m_yourself;
+ QString m_mailingList;
+ bool m_showUploadTreeviews;
+ bool m_eventsEnabled;
+
+ KAction
+ *closeprjAction, *insertFileAction, *insertDirAction,
+ *uploadProjectAction, *rescanPrjDirAction,
+ *projectOptionAction, *saveAsProjectTemplateAction,
+ *saveSelectionAsProjectTemplateAction,
+ *savePrjViewAction, *saveAsPrjViewAction;
+
+ KSelectAction *openPrjViewAction, *deletePrjViewAction;
+ /** the filename of the local webprj file after download */
+ QString m_tmpProjectFile;
+ QString m_tmpSessionFile;
+ /** used for creating a new project */
+ KTempFile *tempFile;
+ KTempFile *sessionTempFile;
+ EventActions *m_events;
+
+ /** setup of the actions */
+ void initActions(KActionCollection *ac);
+
+ void adjustActions();
+
+ void adjustViewActions();
+
+ QStringList projectViewList();
+
+ void init();
+
+ void openCurrentView();
+ /** insert files */
+ void insertFiles( KURL::List files );
+
+ /** insert files from dir recursive */
+ void insertFiles(const KURL& pathURL, const QString& mask );
+
+ void loadProjectXML();
+
+ void slotAcceptCreateProject();
+
+ bool createEmptyDom();
+
+ /** load project file
+ @param url the url of the project file
+ */
+ bool loadProject(const KURL &url);
+
+ /** load project from temp file
+ @param url the url of the project file
+ @param tempFile the path of the already downloaded temp file
+ @param sessionTempFile the path of the downloaded project session file. Empty if no such file was downloaded
+ */
+ void loadProjectFromTemp(const KURL &url, const QString &tempFile, const QString &sessionTempFile);
+
+
+ void getStatusFromTree();
+
+ /** save project file to local file @ref tmpFileName
+ @return false if there was nothing to save or an error occured during save
+ */
+ bool saveProject();
+
+ /**
+ adds information about the current open project into config
+ */
+ void writeConfig();
+
+ /**
+ removes the project from the list of open projects in config
+
+ @param the url string of the project to remove
+ */
+ void removeFromConfig(const QString & urlStr);
+
+ /**
+ test if a project is in the list of open projects in config
+
+ @param the url string of the project to test
+ */
+ bool projectAlreadyOpen(const QString & urlStr);
+
+ /** uploads the project file
+ @return false if there was nothing to upload or an error occured during upload
+ */
+ bool uploadProjectFile();
+
+public slots:
+
+ void slotDebuggerOptions();
+
+ void slotDebuggerChanged(const QString &debugger);
+
+ /** create new project */
+ void slotNewProject();
+
+ /** open project file */
+ void slotOpenProject();
+
+ /** iniate closing of the project and the edited files */
+ void slotCloseProject();
+
+ /** Proceed with project closing.*/
+ void slotProceedWithCloseProject(bool success);
+
+ void slotAddDirectory();
+
+ void slotAddFiles();
+
+ /** Deletes a project view */
+ void slotDeleteProjectView(const QString &view);
+
+ /** Saves a project view (group of files & toolbars) asking for a name. */
+ void slotSaveAsProjectView(bool askForName = true);
+
+ /** Saves a project view (group of files & toolbars) without asking for a name. */
+ void slotSaveProjectView();
+
+ /** Opens a project view (toolbars & files). */
+ void slotOpenProjectView(const QString &view);
+
+ /** for the new project wizard */
+ void slotSelectProjectType(const QString &title);
+
+ void slotDeleteCopytoDlg(CopyTo *dlg);
+
+private slots:
+ void slotNewProjectHelpClicked();
+
+signals:
+ void setLocalFiles(bool);
+ void eventHappened(const QString&, const QString&, const QString& );
+
+private:
+ QStringList treeStatusFromXML();
+ QString m_wizTitle ;
+ bool m_createSessionDom;
+};
+
+
+#endif
diff --git a/quanta/project/projectupload.cpp b/quanta/project/projectupload.cpp
new file mode 100644
index 00000000..e95f9446
--- /dev/null
+++ b/quanta/project/projectupload.cpp
@@ -0,0 +1,819 @@
+/***************************************************************************
+ projectupload.cpp - description
+ -------------------
+ begin : Wed Nov 15 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (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. *
+ * *
+ ***************************************************************************/
+
+
+
+//qt includes
+#include <qlistview.h>
+#include <qeventloop.h>
+#include <qfileinfo.h>
+#include <qlineedit.h>
+#include <qpushbutton.h>
+#include <qstringlist.h>
+#include <qregexp.h>
+#include <qlabel.h>
+#include <qcombobox.h>
+#include <qurl.h>
+#include <qcheckbox.h>
+#include <qtimer.h>
+#include <qframe.h>
+#include <qtooltip.h>
+
+//kde includes
+#include <kapplication.h>
+#include <kurl.h>
+#include <kio/job.h>
+#include <kmessagebox.h>
+#include <kprotocolinfo.h>
+#include <kdebug.h>
+#include <kinputdialog.h>
+#include <kio/netaccess.h>
+#include <klocale.h>
+#include <klineedit.h>
+#include <kcombobox.h>
+#include <kprogress.h>
+#include <kpassdlg.h>
+#include <kpushbutton.h>
+#include <ktempfile.h>
+#include <kuser.h>
+
+//standard includes
+#include <time.h>
+
+//own includes
+#include "uploadprofiledlgs.h"
+#include "projectupload.h"
+#include "project.h"
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+#include "resource.h"
+
+ProjectUpload::ProjectUpload(const KURL& url, const QString& profileName, bool showOnlyProfiles, bool quickUpload, bool markOnly, const char* name)
+ :ProjectUploadS( 0L, name, false, Qt::WDestructiveClose)
+{
+ m_quickUpload = quickUpload;
+ m_profilesOnly = showOnlyProfiles;
+ list->hide();
+ m_project = Project::ref();
+ initProjectInfo(profileName);
+ startUrl = url;
+ if (m_profilesOnly)
+ {
+ clearWFlags(Qt::WDestructiveClose);
+ uploadFrame->hide();
+ buttonCancel->hide();
+ adjustSize();
+ buttonUpload->setText(i18n("&Close"));
+ setCaption(i18n("Upload Profiles"));
+ } else
+ {
+ if (markOnly)
+ markAsUploaded->setChecked(true);
+ QTimer::singleShot(10, this, SLOT(slotBuildTree()));
+ currentItem = 0L;
+ }
+}
+
+
+ProjectUpload::~ProjectUpload()
+{
+ m_project->setModified(true);
+ delete baseUrl;
+}
+
+void ProjectUpload::initProjectInfo(const QString& defaultProfile)
+{
+ baseUrl = new KURL();
+
+// list->setMultiSelection(true);
+ QDomDocument *dom = m_project->sessionDom();
+ m_profilesNode = dom->firstChild().firstChild().namedItem("uploadprofiles");
+ if (m_profilesNode.isNull()) //compat code, remove when upgrade from 3.2 is not supported
+ {
+ m_currentProfileElement = dom->firstChild().firstChild().namedItem("upload").toElement();
+ m_defaultProfile = m_currentProfileElement.attribute("user","") + "@" + m_currentProfileElement.attribute("remote_host","");
+ QDomElement e = dom->createElement("uploadprofiles");
+ e.setAttribute("defaultProfile", m_defaultProfile);
+ QDomElement el = dom->createElement("profile");
+ el.setAttribute("remote_host", m_currentProfileElement.attribute("remote_host",""));
+ el.setAttribute("user", m_currentProfileElement.attribute("user",""));
+ el.setAttribute("remote_path", m_currentProfileElement.attribute("remote_path",""));
+ el.setAttribute("remote_port", m_currentProfileElement.attribute("remote_port",""));
+ el.setAttribute("remote_protocol", m_currentProfileElement.attribute("remote_protocol","ftp"));
+ el.setAttribute("name", m_defaultProfile);
+ e.appendChild(el);
+// m_project->dom.firstChild().firstChild().removeChild(m_currentProfileElement);
+ m_currentProfileElement = el;
+ dom->firstChild().firstChild().appendChild(e);
+ m_profilesNode = e;
+ comboProfile->insertItem(m_defaultProfile);
+ m_project->setModified(true);
+ } else
+ {
+ if (defaultProfile.isEmpty())
+ m_defaultProfile = m_profilesNode.toElement().attribute("defaultProfile");
+ else
+ m_defaultProfile = defaultProfile;
+ QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ QDomElement e;
+ m_currentProfileElement = profileList.item(0).toElement();
+ QString s;
+ int defaultIdx = 0;
+ for (uint i = 0; i < profileList.count(); i++)
+ {
+ e = profileList.item(i).toElement();
+ s = e.attribute("name");
+ comboProfile->insertItem(s);
+ if (s == m_defaultProfile)
+ {
+ defaultIdx = i;
+ m_currentProfileElement = e;
+ }
+ }
+ comboProfile->setCurrentItem(defaultIdx);
+ }
+ buttonRemoveProfile->setEnabled(comboProfile->count() > 1);
+ keepPasswords->setChecked(m_project->keepPasswd);
+ uploadInProgress = false;
+ connect( this, SIGNAL( uploadNext() ), SLOT( slotUploadNext() ) );
+ setProfileTooltip();
+}
+
+/** No descriptions */
+void ProjectUpload::slotBuildTree()
+{
+ emit eventHappened("upload_requested", m_project->projectBaseURL().url(), "");
+ loadRemoteUploadInfo();
+ KIO::UDSEntry entry;
+ QString strUrl = QuantaCommon::qUrl(startUrl);
+ bool isDirectory = strUrl.endsWith("/");
+ bool forceUpload = !startUrl.isEmpty();
+ QString s;
+ QDomElement el;
+ QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ totalProgress->setTotalSteps(nl.count() - 1 );
+ totalProgress->setValue(0);
+ totalText->setText(i18n("Scanning project files..."));
+
+ KURL u = m_project->projectBaseURL();
+ if (!startUrl.isEmpty())
+ {
+ u = QExtFileInfo::toAbsolute(startUrl, u);
+ }
+ QDict<KFileItem> projectDirFiles;
+
+ if (startUrl.isEmpty() || strUrl.endsWith("/")) //upload a folder
+ {
+ projectDirFiles = QExtFileInfo::allFilesDetailed(u, "*", this);
+ } else
+ {
+ projectDirFiles.insert(u.url(), new KFileItem(KFileItem::Unknown, KFileItem::Unknown, u, true));
+ }
+
+ QTime t;
+ t.start();
+
+ u = m_project->projectBaseURL();
+ KURL absUrl = u;
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ el = nl.item(i).toElement();
+ s = el.attribute("url");
+ if (startUrl.isEmpty() || (s.startsWith(strUrl) && isDirectory) || s == strUrl)
+ {
+ QuantaCommon::setUrl(u, s);
+ absUrl.setPath(m_project->projectBaseURL().path(1)+u.path(-1));
+/* if (!QExtFileInfo::exists(absUrl))
+ continue; */
+ KFileItem *p_item = projectDirFiles.find(absUrl.url());
+ if (!p_item)
+ continue;
+ KFileItem item(*p_item);
+ UploadTreeFile *it = list->addItem(u, item);
+ if ( it != 0 )
+ {
+ int uploadedTime = -1;
+ if (m_uploadTimeList.contains(s))
+ uploadedTime = m_uploadTimeList[s];
+ int modifiedTime = item.time(KIO::UDS_MODIFICATION_TIME);
+ el.setAttribute("modified_time", modifiedTime);
+ int uploadStatus = el.attribute("uploadstatus", "1").toInt();
+ if (m_quickUpload || (forceUpload && uploadStatus == 0))
+ uploadStatus = 1;
+ if (m_quickUpload || (uploadedTime != modifiedTime && uploadStatus != 0))
+ {
+ modified.append( u );
+ it->setSelected(true);
+ }
+ if (uploadStatus == 2)
+ it->setConfirmUpload(true);
+ totalProgress->setValue(i);
+ }
+ }
+ }
+ projectDirFiles.setAutoDelete(true);
+ projectDirFiles.clear();
+ totalText->setText(i18n("Building the tree..."));
+ list->checkboxTree();
+ if (!startUrl.isEmpty())
+ expandAll();
+ list->show();
+ totalText->setText(i18n("Total:"));
+ totalProgress->setTotalSteps(1);
+ totalProgress->setValue(0);
+ //hack to force repainting of the treeview
+ resize(width() + 1, height());
+ resize(width() - 1, height());
+ if (m_quickUpload)
+ startUpload();
+}
+
+
+void ProjectUpload::buildSelectedItemList()
+{
+ QListViewItem *item;
+ QListViewItemIterator it(list);
+ toUpload.clear();
+ needsConfirmation.clear();
+ for ( ; it.current(); ++it )
+ {
+ item = it.current();
+ if ( list->isSelected( item ))
+ {
+ KURL u;
+ if (dynamic_cast<UploadTreeFolder*>(item))
+ {
+ u = dynamic_cast<UploadTreeFolder*>(item)->url();
+ } else
+ {
+ UploadTreeFile* fileItem = dynamic_cast<UploadTreeFile*>(item);
+ u = fileItem->url();
+ if (fileItem->confirmUpload() && !u.isEmpty())
+ needsConfirmation.append(item);
+ }
+
+ if (!u.isEmpty())
+ toUpload.append(item);
+ }
+ }
+}
+
+void ProjectUpload::initBaseUrl()
+{
+ QString path = m_currentProfileElement.attribute("remote_path","");
+ if (!path.startsWith("/"))
+ path.prepend("/");
+
+ baseUrl->setProtocol(m_currentProfileElement.attribute("remote_protocol","ftp"));
+ baseUrl->setPort(m_currentProfileElement.attribute("remote_port","").toInt());
+ baseUrl->setHost(m_currentProfileElement.attribute("remote_host",""));
+ baseUrl->setPath(path);
+ baseUrl->setUser(m_currentProfileElement.attribute("user",""));
+ QString password;
+ if (keepPasswords->isChecked())
+ {
+ m_project->keepPasswd = true;
+ password = m_project->password(m_currentProfileElement.attribute("remote_protocol") + "://" + m_currentProfileElement.attribute("user") + "@" + m_currentProfileElement.attribute("remote_host"));
+ } else
+ {
+ m_project->keepPasswd = false;
+ if (m_currentProfileElement != m_lastEditedProfileElement)
+ {
+ m_lastPassword = "";
+ }
+ password = m_lastPassword;
+ }
+ baseUrl->setPass(password);
+}
+
+void ProjectUpload::startUpload()
+{
+ if (m_profilesOnly)
+ {
+ QDialog::accept();
+ return;
+ }
+ stopUpload = false;
+ initBaseUrl();
+ if (markAsUploaded->isChecked())
+ {
+ QStringList selectedList;
+ QListViewItem *item;
+ QListViewItemIterator it(list);
+ for ( ; it.current(); ++it )
+ {
+ item = it.current();
+ if ( list->isSelected( item ))
+ {
+ KURL u;
+ if (dynamic_cast<UploadTreeFolder*>(item))
+ {
+ u = dynamic_cast<UploadTreeFolder*>(item)->url();
+ } else
+ {
+ u = dynamic_cast<UploadTreeFile*>(item)->url();
+ }
+
+ if (!u.isEmpty())
+ selectedList.append(QuantaCommon::qUrl(u));
+ }
+ }
+ //update upload time
+ QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ QDomElement el;
+ for ( uint i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( selectedList.contains(el.attribute("url")))
+ {
+ m_uploadTimeList[el.attribute("url")] = el.attribute("modified_time").toInt();
+ }
+ }
+ saveRemoteUploadInfo();
+ accept();
+ } else
+ {
+ buildSelectedItemList();
+ int confirmCount = needsConfirmation.count();
+ if (confirmCount > 0)
+ {
+ QValueList<QListViewItem*>::Iterator it;
+ QStringList confirmList;
+ for (it = needsConfirmation.begin(); it != needsConfirmation.end(); ++it)
+ {
+ confirmList.append(((UploadTreeFile*)(*it))->url().prettyURL(0, KURL::StripFileProtocol));
+ }
+ bool ok;
+ QStringList confirmedList = KInputDialog::getItemList(i18n("Confirm Upload"), i18n("Confirm that you want to upload the following files (unselect the files you do not want to upload):"), confirmList, confirmList, true, &ok, this);
+ if (!ok) return;
+ for (it = needsConfirmation.begin(); it != needsConfirmation.end(); ++it)
+ {
+ if (!confirmedList.contains(((UploadTreeFile*)(*it))->url().prettyURL(0, KURL::StripFileProtocol)))
+ toUpload.remove(*it);
+ }
+
+ }
+ int selectedNum = toUpload.count();
+ totalProgress->setProgress(0);
+ totalProgress->setTotalSteps(selectedNum);
+ uploadInProgress = true;
+ suspendUpload = false;
+ buttonUpload->setEnabled(false);
+ KURL u = *baseUrl;
+ u.setPath(u.protocol() == "file" ? "/" : "");
+ if (QExtFileInfo::exists(u, false, this) || (u.protocol() == "webdav" && QExtFileInfo::exists(*baseUrl, false, this)))
+ {
+ upload();
+ return;
+ } else
+ {
+ if (KMessageBox::warningContinueCancel(this, i18n("<qt><b>%1</b> seems to be unaccessible.<br>Do you want to proceed with upload?</qt>")
+ .arg(u.prettyURL(0, KURL::StripFileProtocol)),QString::null,KStdGuiItem::cont()) == KMessageBox::Continue)
+ {
+ upload();
+ return;
+ }
+ }
+ }
+ buttonUpload->setEnabled(true);
+ uploadInProgress = false;
+}
+
+void ProjectUpload::upload()
+{
+ if (stopUpload)
+ {
+ saveRemoteUploadInfo();
+ return;
+ }
+ KURL dir;
+ KURL to;
+ UploadTreeFile *fileItem;
+ UploadTreeFolder *folderItem;
+
+ if (toUpload.isEmpty())
+ {
+ saveRemoteUploadInfo();
+ accept();
+ return;
+ }
+ currentItem = toUpload.at(0);
+ if (dynamic_cast<UploadTreeFile*>(currentItem))
+ {
+ fileItem = static_cast<UploadTreeFile*>(currentItem);
+ folderItem = 0L;
+ currentURL = fileItem->url();
+ } else
+ {
+ fileItem = 0L;
+ folderItem = static_cast<UploadTreeFolder*>(currentItem);
+ currentURL = folderItem->url();
+ }
+
+
+ KURL from = QExtFileInfo::toAbsolute(currentURL, m_project->projectBaseURL());
+ to = *baseUrl;
+ to.addPath( currentURL.path() );
+ if (to.fileName(false).isEmpty())
+ {
+ dir = to;
+ }
+ else
+ {
+ dir = to.upURL() ;
+ }
+
+ if ( !madeDirs.contains(dir) )
+ {
+ madeDirs.append( dir );
+ if (!QExtFileInfo::createDir(dir, this))
+ {
+ QuantaCommon::dirCreationError(this, KURL( dir.prettyURL(0, KURL::StripFileProtocol) ));
+ buttonUpload->setEnabled(true);
+ uploadInProgress = false;
+ saveRemoteUploadInfo();
+ return;
+ }
+ }
+
+ // qDebug("%s -> %s", from.url().data(), to.url().data() );
+ if (!from.fileName(false).isEmpty() && fileItem)
+ {
+ emit eventHappened("before_upload", from.url(), to.url());
+ KIO::FileCopyJob *job = KIO::file_copy( from, to, fileItem->permissions(), true, false, false );
+
+ connect( job, SIGNAL( result( KIO::Job * ) ),this,
+ SLOT( uploadFinished( KIO::Job * ) ) );
+ connect( job, SIGNAL( percent( KIO::Job *,unsigned long ) ),
+ this, SLOT( uploadProgress( KIO::Job *,unsigned long ) ) );
+ connect( job, SIGNAL( infoMessage( KIO::Job *,const QString& ) ),
+ this, SLOT( uploadMessage( KIO::Job *,const QString& ) ) );
+
+ labelCurFile->setText(i18n("Current: %1").arg(currentURL.fileName()));
+ currentProgress->setProgress( 0 );
+ return;
+ } else //it is a dir, so just go to the next item
+ {
+ emit uploadNext();
+ return;
+ }
+ saveRemoteUploadInfo();
+ buttonUpload->setEnabled(true);
+ uploadInProgress = false;
+ reject();
+}
+
+void ProjectUpload::uploadFinished( KIO::Job *job )
+{
+ if ( !job ) return;
+
+ if ( job->error() )
+ {
+ job->showErrorDialog( this );
+ uploadInProgress = false;
+ buttonUpload->setEnabled(true);
+ saveRemoteUploadInfo();
+ return;
+ }
+ KIO::FileCopyJob *fJob = dynamic_cast<KIO::FileCopyJob *>(job);
+ if (fJob)
+ emit eventHappened("after_upload", fJob->srcURL().url(), fJob->destURL().url());
+ slotUploadNext();
+}
+
+void ProjectUpload::uploadProgress ( KIO::Job *, unsigned long percent )
+{
+ currentProgress->setProgress( percent );
+}
+
+void ProjectUpload::uploadMessage ( KIO::Job *, const QString & msg )
+{
+ labelCurFile->setText( currentURL.fileName() + " : " + msg );
+}
+
+void ProjectUpload::selectAll()
+{
+ list->selectAll(true);
+ list->checkboxTree();
+}
+
+void ProjectUpload::selectModified()
+{
+ for ( KURL::List::Iterator file = modified.begin(); file != modified.end(); ++file )
+ {
+ QListViewItem *it = list->findItem( (*file).path() );
+ it->setSelected(true);
+ it->repaint();
+ }
+ list->checkboxTree();
+}
+
+void ProjectUpload::clearSelection()
+{
+ list->selectAll(false);
+ list->checkboxTree();
+}
+
+void ProjectUpload::invertSelection()
+{
+ list->invertAll();
+ list->checkboxTree();
+}
+
+void ProjectUpload::expandAll()
+{
+ list->expandAll();
+}
+
+void ProjectUpload::collapseAll()
+{
+ list->collapseAll();
+}
+
+void ProjectUpload::resizeEvent ( QResizeEvent *t )
+{
+ ProjectUploadS::resizeEvent(t);
+ list->setColumnWidth(0,list->width()-list->columnWidth(1)-list->columnWidth(2)-20);
+}
+
+/** No descriptions */
+void ProjectUpload::slotUploadNext()
+{
+ if (!suspendUpload)
+ {
+ totalProgress->setProgress(totalProgress->progress()+1);
+ // QListViewItem *it = list->findItem( currentURL.path() );
+ QListViewItem *it = currentItem;
+ if (it)
+ {
+ it->setSelected(false);
+ UploadTreeFile *itf = dynamic_cast<UploadTreeFile*>(it);
+ if (itf)
+ itf->setWhichPixmap( "check_clear" );
+ it->repaint();
+ }
+ toUpload.remove( it );
+
+ //update upload time
+ QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ QDomElement el;
+ for ( uint i = 0; i < nl.count(); i++ )
+ {
+ el = nl.item(i).toElement();
+ if ( el.attribute("url") == QuantaCommon::qUrl(currentURL) )
+ {
+ m_uploadTimeList[el.attribute("url")] = el.attribute("modified_time").toInt();
+ break;
+ }
+ }
+
+ upload();
+ }
+}
+
+void ProjectUpload::clearProjectModified()
+{
+ QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ for ( unsigned int i=0; i<nl.count(); i++ )
+ {
+ QDomElement el = nl.item(i).toElement();
+ m_uploadTimeList[el.attribute("url")] = el.attribute("modified_time").toInt();
+ }
+ modified.clear();
+ list->clearSelection();
+ list->checkboxTree();
+}
+
+void ProjectUpload::slotNewProfile()
+{
+ UploadProfileDlgS *profileDlg = new UploadProfileDlgS(this);
+ QDomElement el = m_currentProfileElement;
+ m_currentProfileElement = m_project->dom()->createElement("profile");
+ fillProfileDlg(profileDlg);
+ if (profileDlg->exec())
+ {
+ readProfileDlg(profileDlg);
+ m_profilesNode.appendChild(m_currentProfileElement);
+ m_project->setModified(true);
+ comboProfile->insertItem(m_currentProfileElement.attribute("name"), 0);
+ setProfileTooltip();
+ } else
+ m_currentProfileElement = el;
+ delete profileDlg;
+ buttonRemoveProfile->setEnabled(comboProfile->count() > 1);
+}
+
+void ProjectUpload::slotEditProfile()
+{
+ UploadProfileDlgS *profileDlg = new UploadProfileDlgS(this);
+ fillProfileDlg(profileDlg);
+ if (profileDlg->exec())
+ {
+ readProfileDlg(profileDlg);
+ m_project->setModified(true);
+ comboProfile->changeItem(profileDlg->lineProfileName->text(), comboProfile->currentItem());
+ setProfileTooltip();
+ }
+ delete profileDlg;
+}
+
+void ProjectUpload::slotRemoveProfile()
+{
+ if (comboProfile->count() == 1)
+ {
+ KMessageBox::error(this, i18n("You cannot remove the last profile."), i18n("Profile Removal Error") );
+ } else
+ {
+ QString profileName = comboProfile->currentText();
+ if (KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> upload profile?</qt>").arg(profileName),
+ i18n("Profile Removal"), KStdGuiItem::del()) == KMessageBox::Continue)
+ {
+ m_profilesNode.removeChild(m_currentProfileElement);
+ int idx = comboProfile->currentItem();
+ int newIdx = idx + 1;
+ if (newIdx >= comboProfile->count())
+ newIdx = idx - 1;
+ comboProfile->setCurrentItem(newIdx);
+ QString currentProfile = comboProfile->currentText();
+ slotNewProfileSelected(currentProfile);
+ if (profileName == defaultProfile())
+ {
+ KMessageBox::information(this, i18n("<qt>You have removed your default profile.<br>The new default profile will be <b>%1</b>.</qt>").arg(currentProfile), i18n("Profile Removal"));
+ m_profilesNode.toElement().setAttribute("defaultProfile", currentProfile);
+ }
+ comboProfile->removeItem(idx);
+ m_project->setModified(true);
+ }
+ }
+ buttonRemoveProfile->setEnabled(comboProfile->count() > 1);
+}
+
+void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
+{
+ profileDlg->lineProfileName->setText(m_currentProfileElement.attribute("name",""));
+ profileDlg->lineHost->setText(m_currentProfileElement.attribute("remote_host",""));
+ profileDlg->lineUser->setText(m_currentProfileElement.attribute("user",""));
+ profileDlg->linePath->setText(m_currentProfileElement.attribute("remote_path",""));
+ profileDlg->port->setText( m_currentProfileElement.attribute("remote_port","") );
+ QString def_p = m_currentProfileElement.attribute("remote_protocol","ftp");
+
+ QStringList protocols = KProtocolInfo::protocols();
+ protocols.sort();
+ for ( uint i=0; i<protocols.count(); i++ )
+ {
+ QString protocol = protocols[i];
+ KURL p;
+ p.setProtocol(protocol);
+ if ( KProtocolInfo::supportsWriting(p) &&
+ KProtocolInfo::supportsMakeDir(p) &&
+ KProtocolInfo::supportsDeleting(p) )
+ {
+ profileDlg->comboProtocol->insertItem(protocol);
+ if ( protocol == def_p )
+ profileDlg->comboProtocol->setCurrentItem(profileDlg->comboProtocol->count()-1 );
+ }
+ }
+ QString entry = profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text();
+ if (m_project->keepPasswd || m_project->passwordSaved(entry))
+ {
+ profileDlg->linePasswd->insert(m_project->password(entry));
+ profileDlg->keepPasswd->setChecked(m_project->passwordSaved(entry));
+ } else
+ {
+ profileDlg->linePasswd->clear();
+ profileDlg->keepPasswd->setChecked(false);
+ }
+ if (m_profilesNode.toElement().attribute("defaultProfile") == profileDlg->lineProfileName->text())
+ profileDlg->defaultProfile->setChecked(true);
+}
+
+void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
+{
+ QString path = profileDlg->linePath->text();
+ if (path.startsWith("~/"))
+ {
+ KUser user;
+ path = user.homeDir() + path.mid(1);
+ }
+ m_currentProfileElement.setAttribute("name", profileDlg->lineProfileName->text());
+ m_currentProfileElement.setAttribute("remote_host", profileDlg->lineHost->text());
+ m_currentProfileElement.setAttribute("user", profileDlg->lineUser->text());
+ m_currentProfileElement.setAttribute("remote_path", path);
+ m_currentProfileElement.setAttribute("remote_port", profileDlg->port->text());
+ m_currentProfileElement.setAttribute("remote_protocol", profileDlg->comboProtocol->currentText());
+ QString passwd = QString(profileDlg->linePasswd->password());
+ m_project->savePassword(profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text(), passwd, profileDlg->keepPasswd->isChecked());
+ m_lastEditedProfileElement = m_currentProfileElement;
+ m_lastPassword = passwd;
+ if (profileDlg->defaultProfile->isChecked())
+ m_profilesNode.toElement().setAttribute("defaultProfile", profileDlg->lineProfileName->text());
+}
+
+void ProjectUpload::slotNewProfileSelected(const QString& profileName)
+{
+ QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ QDomElement e;
+ QString s;
+ for (uint i = 0; i < profileList.count(); i++)
+ {
+ e = profileList.item(i).toElement();
+ s = e.attribute("name");
+ if (s == profileName)
+ {
+ m_currentProfileElement = e;
+ break;
+ }
+ }
+ m_project->setModified(true);
+ setProfileTooltip();
+ if (!m_profilesOnly)
+ {
+ list->clear();
+ slotBuildTree();
+ }
+}
+
+QString ProjectUpload::defaultProfile()
+{
+ return m_profilesNode.toElement().attribute("defaultProfile");
+}
+
+void ProjectUpload::reject()
+{
+ if (uploadInProgress && !m_profilesOnly)
+ {
+ suspendUpload = true;
+ //TODO when message freeze if lift: i18n("Upload") -> i18n("Continue") or "Continue upload"
+ if (KMessageBox::questionYesNo(this,i18n("Do you really want to abort the upload?"),
+ i18n("Abort Upload"), i18n("Abort the uploading", "Abort"), i18n("Upload")) == KMessageBox::No)
+ {
+ suspendUpload = false;
+ emit uploadNext();
+ return;
+ }
+ }
+
+ QDialog::reject();
+}
+
+
+void ProjectUpload::setProfileTooltip()
+{
+ QString tip = m_currentProfileElement.attribute("remote_protocol","ftp") + "://";
+ QString user = m_currentProfileElement.attribute("user","");
+ if (! user.isEmpty()) {
+ tip += user + "@";
+ }
+ tip += m_currentProfileElement.attribute("remote_host","");
+ QString port = m_currentProfileElement.attribute("remote_port","");
+ if (! port.isEmpty()) {
+ tip += ":" + port;
+ }
+ tip += m_currentProfileElement.attribute("remote_path","");
+
+ QToolTip::add(comboProfile, tip);
+}
+
+void ProjectUpload::loadRemoteUploadInfo()
+{
+ QDomNodeList nl = m_currentProfileElement.elementsByTagName("uploadeditem");
+ for (uint i = 0; i < nl.count(); i++)
+ {
+ QDomElement el = nl.item(i).toElement();
+ m_uploadTimeList[el.attribute("url")] = el.attribute("upload_time").toInt();
+ }
+}
+
+void ProjectUpload::saveRemoteUploadInfo()
+{
+ QDomNode parent = m_currentProfileElement.parentNode();
+ QDomNode profileNode = m_currentProfileElement.cloneNode(false);
+ parent.removeChild(m_currentProfileElement);
+ parent.appendChild(profileNode);
+ QMap<QString, int>::ConstIterator it;
+ for (it = m_uploadTimeList.constBegin(); it != m_uploadTimeList.constEnd(); ++it)
+ {
+ QDomElement el = m_uploadStatusDom.createElement("uploadeditem");
+ el.setAttribute("url", it.key());
+ el.setAttribute("upload_time", it.data());
+ profileNode.appendChild(el);
+ }
+ m_project->setModified(true);
+}
+
+
+#include "projectupload.moc"
diff --git a/quanta/project/projectupload.h b/quanta/project/projectupload.h
new file mode 100644
index 00000000..375898ec
--- /dev/null
+++ b/quanta/project/projectupload.h
@@ -0,0 +1,118 @@
+/***************************************************************************
+ projectupload.h - description
+ -------------------
+ begin : Wed Nov 15 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002, 2004 Andras Mantia <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 PROJECTUPLOAD_H
+#define PROJECTUPLOAD_H
+
+#include "projectuploads.h"
+#include "project.h"
+
+#include <qdom.h>
+#include <qptrlist.h>
+#include <qstringlist.h>
+
+#include <kio/job.h>
+
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Andras Mantia
+ */
+
+class KURL;
+class Project;
+class UploadProfileDlgS;
+
+class ProjectUpload : public ProjectUploadS
+{
+ Q_OBJECT
+public:
+ /** Initializes the dialog. If showOnlyProfiles is true, the dialog
+ displays only the list of profiles, no real upload can be performed.
+ If quickUpload is true, the upload starts immediately without checking
+ for modifications or confirmation from the user. The url will be
+ uploaded to the default profile */
+ ProjectUpload(const KURL& url, const QString& profileName = QString::null, bool showOnlyProfiles = false, bool quickUpload = false, bool markOnly = false, const char * name = 0);
+ ~ProjectUpload();
+ QString defaultProfile();
+
+public slots: // Public slots
+ /** No descriptions */
+ void slotBuildTree();
+
+protected slots:
+ void startUpload();
+ void upload();
+ void uploadFinished( KIO::Job *job );
+ void uploadProgress ( KIO::Job *job, unsigned long percent );
+ void uploadMessage ( KIO::Job *, const QString & msg );
+ void slotUploadNext();
+
+ void clearSelection();
+ void selectAll();
+ void selectModified();
+ void invertSelection();
+ void expandAll();
+ void collapseAll();
+ void clearProjectModified();
+
+ void slotNewProfile();
+ void slotEditProfile();
+ void slotRemoveProfile();
+ void slotNewProfileSelected(const QString &profileName);
+
+ virtual void resizeEvent( QResizeEvent * );
+ virtual void reject();
+
+
+signals: // Signals
+ /** No descriptions */
+ void uploadNext();
+ void eventHappened(const QString&, const QString&, const QString&);
+
+private:
+ void buildSelectedItemList();
+ void fillProfileDlg(UploadProfileDlgS *profileDlg);
+ void readProfileDlg(UploadProfileDlgS *profileDlg);
+ void setProfileTooltip();
+ void loadRemoteUploadInfo();
+ void saveRemoteUploadInfo();
+ void initProjectInfo(const QString& defaultProfile);
+ void initBaseUrl(); /// Reads the current profile setting and initialize the baseUrl from it
+
+ KURL::List modified; // modified files
+ QValueList<QListViewItem*> needsConfirmation;
+ QPtrList<QListViewItem> toUpload; // list of files , still didn't uploaded
+ QListViewItem *currentItem;
+ KURL currentURL;
+ KURL::List madeDirs;
+ KURL *baseUrl;
+ KURL startUrl;
+ bool stopUpload;
+ bool uploadInProgress;
+ bool suspendUpload;
+ QString m_lastPassword;
+ Project *m_project;
+ QString m_defaultProfile;
+ QDomElement m_currentProfileElement;
+ QDomElement m_lastEditedProfileElement;
+ QDomNode m_profilesNode;
+ QDomDocument m_uploadStatusDom;
+ QMap<QString, int> m_uploadTimeList;
+ bool m_profilesOnly;
+ bool m_quickUpload;
+};
+
+#endif
diff --git a/quanta/project/projectuploads.ui b/quanta/project/projectuploads.ui
new file mode 100644
index 00000000..19a2328c
--- /dev/null
+++ b/quanta/project/projectuploads.ui
@@ -0,0 +1,497 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>ProjectUploadS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2002-2004 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>ProjectUploadS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>595</width>
+ <height>584</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>32767</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Upload Project Files</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>false</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Profile &amp;name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>comboProfile</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox">
+ <property name="name">
+ <cstring>comboProfile</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer4_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>buttonNewProfile</cstring>
+ </property>
+ <property name="text">
+ <string>New...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>buttonEditProfile</cstring>
+ </property>
+ <property name="text">
+ <string>Edit...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton">
+ <property name="name">
+ <cstring>buttonRemoveProfile</cstring>
+ </property>
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>buttonUpload</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Proceed</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="3" column="2">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="3" column="0">
+ <property name="name">
+ <cstring>spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>400</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>keepPasswords</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Keep passwords in memory</string>
+ </property>
+ </widget>
+ <widget class="QFrame" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>uploadFrame</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Raised</enum>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>buttonInvert</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Invert</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>buttonClear</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;None</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="6" column="1">
+ <property name="name">
+ <cstring>buttonCollapse</cstring>
+ </property>
+ <property name="text">
+ <string>C&amp;ollapse All</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="7" column="1">
+ <property name="name">
+ <cstring>buttonUpdate</cstring>
+ </property>
+ <property name="text">
+ <string>U&amp;pdate All</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>This will cause all files to appear already uploaded</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>buttonModified</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Modified</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>buttonExpand</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;xpand All</string>
+ </property>
+ </widget>
+ <widget class="UploadTreeView" row="0" column="0" rowspan="8" colspan="1">
+ <property name="name">
+ <cstring>list</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Selection:</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>buttonAll</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;All</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="8" column="0">
+ <property name="name">
+ <cstring>markAsUploaded</cstring>
+ </property>
+ <property name="text">
+ <string>Mark the selected files as uploaded instead of uploading them</string>
+ </property>
+ </widget>
+ <widget class="KProgress" row="12" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>totalProgress</cstring>
+ </property>
+ </widget>
+ <widget class="KProgress" row="10" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>currentProgress</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="9" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>labelCurFile</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Current: [none]</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QLabel" row="11" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>totalText</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Total:</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>UploadTreeView</class>
+ <header location="local">../treeviews/uploadtreeview.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="PNG" length="1110">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000041d49444154789c8d95c18b1c4514c67fbb29e5b54ea05b26da1d36b08d09a6c508138cb8c13d647141163de49043bca9f1628eb9294810f24f88c15b728b07617358888785d980427290b4a8d00b19a8821da8228cf42316ac87eed9247ac95c9aeaeef9eaabdffb5ebf85f178ccfcf7f5b79fec07a7280a08a008f25ceb7c29e5da573716e65a0be3f198ef6f5ededff9b9e1b34faf90882092a1ea21428b9220ffbf46054055b19386ba6970ae6665b5e0d2c5eb0b066067bbe1f21757c88f5504eff0c192189081303a5582b16854fccce2fe041f00cdd0a8103b874556405476b62d972ec2c2b90ff3fd8df5cb946549d80b34aea15ccaa94625450e2d0e558b460b7371a734b5e027251a155545678ab62d7eea90b4c504078908c107acb354cb251b1f8f08b1c18631aabbb4d18211404804f22545863561d2f060fb34aa8a18d0086204e72c46a32292e1a796f278c1da7a859d8da9a737506db04d0a24103d8949480b214d3bbee952a05c1d536f9d2684160c744f048311543d459eb1b65ee1754cedae13a64abd5d6127053c9d0281f22d4f75c6a2118a5c09272d7ab740638bf4ef2dd2174032d0d8d04c6fe19c32bedd8bc65e342aa3f785e2784bfd6bc1bd9db24b05505616a4edd67d5a8c1801a03a9962754c504bf34b8986acfb9be91cac7d54315a15541b36b134f74bd2dc53940115a5381e087bc25c6f71be831a8baa234cc1ee3eeb74ed83116beb2b8849d108a3730e8ce27e2bfb82419a7b407ac7c222fd0e6280a8078ce64e47ef54ac9d5be9aaae0162e0de568a44a18d3df90845d919c4f01463406340a44f40efb43a99b371618488e2670d1a2d7ee6f1d3be39342104e937ed85fb86599c33e9ee0be9a004946259d8b858909880d59aa00daa0d3280b5f39e34074c4b3a5434029a76a9e9f5cc0163b5c80024158a1cfc4cb1d3061d5834066cb0a403c008599a70f6bc27b8d03106ea3ae91987278c5b143b015547224ab5e24185cd9b81665273e7b6e7cecd82ddbf8098002de94049737bc09828cf3036f31c3735c8b0e98eb704672f348c7f7c93cd1fb2ae905119ff54e0dff3542b0e9dd983dcea2cc5eea6cf303e74ec687af5c41b6fa38f5e203c7ec8e1238ef85831a214afef21060ea781ec68247b65c6916353cc8b73d1ae79354606af2a930709aa118da1636c274dd7e3774b884a79aa6b5711a538d33cf9c01c1c9b83bc6a1f55c91ccb23b05b1deb43a7decdaffefd2862f61366aa8449c69e33642f012f2bb208fa98eeda1f3346f076c8eeef19475e9be115423364f78f84105a8643d34d90cfbfdcd8cf872589a45dc7f54cf3134a36f4e495c23f9da8db15bccb708d4014f2ca512cb5d4f7c13e84300d5cff6eb39b202bab053bdb9674f0648609427d0f8402ddeac30f4fcd3ced3efc3b422d406c09b340bedc1571e1bfc3d44dc281634c5fe5e758e7395cfbe6d6c130fd17d92372d2cb00c6470000000049454e44ae426082</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>reject()</slot>
+ </connection>
+ <connection>
+ <sender>buttonUpload</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>startUpload()</slot>
+ </connection>
+ <connection>
+ <sender>buttonNewProfile</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>slotNewProfile()</slot>
+ </connection>
+ <connection>
+ <sender>buttonEditProfile</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>slotEditProfile()</slot>
+ </connection>
+ <connection>
+ <sender>buttonRemoveProfile</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>slotRemoveProfile()</slot>
+ </connection>
+ <connection>
+ <sender>comboProfile</sender>
+ <signal>activated(const QString&amp;)</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>slotNewProfileSelected(const QString&amp;)</slot>
+ </connection>
+ <connection>
+ <sender>buttonAll</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>selectAll()</slot>
+ </connection>
+ <connection>
+ <sender>buttonModified</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>selectModified()</slot>
+ </connection>
+ <connection>
+ <sender>buttonInvert</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>invertSelection()</slot>
+ </connection>
+ <connection>
+ <sender>buttonClear</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>clearSelection()</slot>
+ </connection>
+ <connection>
+ <sender>buttonExpand</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>expandAll()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCollapse</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>collapseAll()</slot>
+ </connection>
+ <connection>
+ <sender>buttonUpdate</sender>
+ <signal>clicked()</signal>
+ <receiver>ProjectUploadS</receiver>
+ <slot>clearProjectModified()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>comboProfile</tabstop>
+ <tabstop>buttonNewProfile</tabstop>
+ <tabstop>buttonEditProfile</tabstop>
+ <tabstop>buttonRemoveProfile</tabstop>
+ <tabstop>buttonUpload</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in declaration">../treeviews/uploadtreeview.h</include>
+</includes>
+<slots>
+ <slot>clearSelection()</slot>
+ <slot>startUpload()</slot>
+ <slot>selectAll()</slot>
+ <slot>selectModified()</slot>
+ <slot>invertSelection()</slot>
+ <slot>expandAll()</slot>
+ <slot>collapseAll()</slot>
+ <slot>clearProjectModified()</slot>
+ <slot>slotNewProfile()</slot>
+ <slot>slotEditProfile()</slot>
+ <slot>slotRemoveProfile()</slot>
+ <slot>slotNewProfileSelected(const QString&amp;)</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>uploadtreeview.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/projecturl.h b/quanta/project/projecturl.h
new file mode 100644
index 00000000..67299d90
--- /dev/null
+++ b/quanta/project/projecturl.h
@@ -0,0 +1,64 @@
+/***********************************************************************
+ projecturl.h - ProjectURL class definition
+ -------------------
+ begin : Wed Feb 18 2004
+ copyright : (C) 2004 by Andrei Berezin <aberezin@comcast.net>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 PROJECT_URL_H
+#define PROJECT_URL_H
+
+#include <qdom.h>
+#include <qdict.h>
+#include <qstring.h>
+
+#include <kurl.h>
+
+
+/**
+ * Project item.
+ * Consists of URL and description text.
+ */
+class ProjectURL : public KURL
+{
+public:
+ QString fileDesc;
+ int uploadStatus; ///< The upload state, see UploadStatus
+ bool documentFolder;
+ QDomElement domElement;
+
+ ProjectURL()
+ : KURL(), uploadStatus(1), documentFolder(false) {}
+
+ ProjectURL(const KURL& url)
+ : KURL(url), uploadStatus(1), documentFolder(false) {}
+
+ ProjectURL(const KURL& url, const QString& desc, int status, bool docFolder)
+ : KURL(url), fileDesc(desc), uploadStatus(status), documentFolder(docFolder) {}
+
+ ProjectURL(const KURL& url, const QString& desc, int status, bool docFolder, QDomElement el)
+ : KURL(url), fileDesc(desc), uploadStatus(status), documentFolder(docFolder), domElement(el) {}
+
+ virtual ~ProjectURL() {}
+
+ /** The default state for a file when uploading */
+ enum UploadStatus
+ {
+ NeverUpload = 0, ///< the files is not selected for upload, even if it was modified
+ AlwaysUpload, ///< the file is automatically selected for upload if it was modified
+ ConfirmUpload ///<the file is selected for upload, but the user must confirm the upload
+ };
+};
+
+typedef QDict<ProjectURL> ProjectUrlList;
+
+#endif // PROJECT_URL_H
diff --git a/quanta/project/rescanprj.cpp b/quanta/project/rescanprj.cpp
new file mode 100644
index 00000000..fe0bb588
--- /dev/null
+++ b/quanta/project/rescanprj.cpp
@@ -0,0 +1,249 @@
+/***************************************************************************
+ rescanprj.cpp - description
+ -------------------
+ begin : ?
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002, 2003 Andras Mantia <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 <qlistview.h>
+#include <qpushbutton.h>
+#include <qlayout.h>
+#include <qlabel.h>
+
+// kde includes
+#include <kdebug.h>
+#include <kurl.h>
+#include <klocale.h>
+#include <kfileitem.h>
+#include <kglobal.h>
+#include <kprogress.h>
+
+// app includes
+#include "rescanprj.h"
+#include "qextfileinfo.h"
+#include "quantacommon.h"
+#include "uploadtreefolder.h"
+#include "uploadtreeview.h"
+#include "resource.h"
+#include "projectlist.h"
+
+
+RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const QRegExp &p_excludeRx,
+ QWidget *parent, const char *name, bool modal )
+ : RescanPrjDir(parent,name,modal)
+{
+ setCaption(name);
+
+ listView->setColumnText(1, i18n("Add"));
+ baseURL = p_baseURL;
+ baseURL.adjustPath(1);
+
+ prjFileList = p_prjFileList;
+ excludeRx = p_excludeRx;
+
+ progressText->setText(i18n("Reading folder:"));
+ KIO::ListJob *job = KIO::listRecursive( baseURL, false );
+ m_listJobCount = 1;
+
+ connect( job, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( job, SIGNAL(result(KIO::Job *)),
+ this,SLOT (slotListDone(KIO::Job *)));
+
+
+ connect( buttonSelect, SIGNAL(clicked()),
+ this, SLOT(slotSelect()));
+ connect( buttonDeselect, SIGNAL(clicked()),
+ this, SLOT(slotDeselect()));
+ connect( buttonInvert, SIGNAL(clicked()),
+ this, SLOT(slotInvert()));
+ connect( buttonExpand, SIGNAL(clicked()),
+ this, SLOT(slotExpand()));
+ connect( buttonCollapse, SIGNAL(clicked()),
+ this, SLOT(slotCollapse()));
+}
+
+RescanPrj::~RescanPrj()
+{
+ for (uint i = 0; i < urlList.count(); i++)
+ {
+ delete urlList[i].fileItem;
+ }
+ urlList.clear();
+}
+
+void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
+{
+ KURL url = static_cast<KIO::ListJob *>(job)->url();
+ url.adjustPath(-1);
+ // avoid creating these QStrings again and again
+ static const QString& dot = KGlobal::staticQString(".");
+ static const QString& dotdot = KGlobal::staticQString("..");
+
+ KIO::UDSEntryListConstIterator it = list.begin();
+ KIO::UDSEntryListConstIterator end = list.end();
+ KURL itemURL;
+ URLListEntry urlEntry;
+ QString name;
+ QPtrList<KFileItem> linkItems;
+ linkItems.setAutoDelete(true);
+ for ( ; it != end; ++it )
+ {
+ KFileItem item( *it, url, false, true );
+ name = item.name();
+ if (item.isDir() && item.isLink())
+ {
+ QString linkDest = item.linkDest();
+ kdDebug(24000) << "Got link: " << name << " Points to:" << linkDest << endl;
+ KURL u = item.url();
+ if (linkDest.startsWith("."))
+ {
+ u.setPath(u.directory(false, true) + linkDest);
+ u.cleanPath();
+ }
+ else
+ u.setPath(linkDest);
+ u.adjustPath(+1);
+ KURL u2 = QExtFileInfo::toRelative(u, baseURL);
+ bool found = false;
+ for (uint i = 0; i < urlList.count(); i++)
+ if (urlList[i].url == u2)
+ {
+ found = true;
+ break;
+ }
+ if (!prjFileList.contains(u) && !found)
+ {
+ linkItems.append(new KFileItem(item));
+ } else
+ {
+ kdDebug(24000) << "Recursive link - points to a place inside the project" << endl;
+ continue;
+ }
+ }
+ if (!name.isEmpty() && name != dot && name != dotdot && !excludeRx.exactMatch(name))
+ {
+ itemURL = item.url();
+ if (item.isDir())
+ itemURL.adjustPath(+1);
+ ProjectURL *proUrl = prjFileList.find(itemURL);
+ if (!proUrl)
+ {
+ urlEntry.url = prjFileList.toRelative(itemURL);
+ urlEntry.fileItem = new KFileItem(item);
+ urlList.append(urlEntry);
+ }
+ }
+ }
+ for (QPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ {
+ KIO::ListJob *ljob = KIO::listRecursive( (*it)->url(), false );
+ m_listJobCount++;
+
+ connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( ljob, SIGNAL(result(KIO::Job *)),
+ this,SLOT (slotListDone(KIO::Job *)));
+ }
+}
+
+void RescanPrj::resizeEvent ( QResizeEvent *t )
+{
+ RescanPrjDir::resizeEvent(t);
+// listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
+// MainLayout->setGeometry(childrenRect());
+}
+
+void RescanPrj::slotSelect()
+{
+ listView->selectAll(true);
+ listView->checkboxTree();
+}
+
+void RescanPrj::slotDeselect()
+{
+ listView->selectAll(false);
+ listView->checkboxTree();
+}
+
+void RescanPrj::slotInvert()
+{
+ listView->invertAll();
+ listView->checkboxTree();
+}
+
+void RescanPrj::slotExpand()
+{
+ listView->expandAll();
+}
+
+void RescanPrj::slotCollapse()
+{
+ listView->collapseAll();
+}
+
+KURL::List RescanPrj::files()
+{
+ KURL::List r;
+
+ QListViewItem *item;
+ QListViewItemIterator it(listView);
+ for ( ; it.current(); ++it )
+ {
+ item = it.current();
+ if ( listView->isSelected( item ))
+ {
+ KURL u;
+ if (dynamic_cast<UploadTreeFolder*>(item))
+ {
+ u = dynamic_cast<UploadTreeFolder*>(item)->url();
+ } else
+ {
+ u = dynamic_cast<UploadTreeFile*>(item)->url();
+ }
+
+ if (!u.isEmpty())
+ r.append( QExtFileInfo::toAbsolute(u, baseURL) );
+ }
+ }
+ return r;
+}
+/** No descriptions */
+void RescanPrj::slotListDone(KIO::Job *)
+{
+ m_listJobCount--;
+ // kdDebug(24000) << "slotListDone " << m_listJobCount << endl;
+ if (m_listJobCount == 0)
+ {
+ progressText->setText(i18n("Building tree:"));
+ progressText->repaint();
+ progress->setTotalSteps(urlList.count());
+ progress->setValue(0);
+ URLListEntry urlEntry;
+ for (uint i = 0; i < urlList.count(); i++)
+ {
+ urlEntry = urlList[i];
+ listView->addItem(urlEntry.url, *(urlEntry.fileItem));
+ progress->advance(1);
+ }
+
+ progress->setTotalSteps(1);
+ progress->setValue(0);
+ progress->setTextEnabled(false);
+ progressText->setText(i18n("Progress:"));
+ slotSelect();
+ }
+}
+
+#include "rescanprj.moc"
diff --git a/quanta/project/rescanprj.h b/quanta/project/rescanprj.h
new file mode 100644
index 00000000..1eb32d50
--- /dev/null
+++ b/quanta/project/rescanprj.h
@@ -0,0 +1,68 @@
+/***************************************************************************
+ rescanprj.h - description
+ -------------------
+ begin : ?
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2002,2003 Andras Mantia <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 RESCANPRJ_H
+#define RESCANPRJ_H
+
+#include <qregexp.h>
+#include <kio/job.h>
+
+
+#include "rescanprjdir.h"
+#include "projectlist.h"
+
+class KFileItem;
+
+struct URLListEntry{
+ KURL url;
+ KFileItem* fileItem;
+ };
+
+class RescanPrj : public RescanPrjDir {
+ Q_OBJECT
+public:
+ RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const QRegExp &p_excludeRx,
+ QWidget *parent=0, const char *name=0, bool modal = true);
+ ~RescanPrj();
+
+public slots:
+ void slotSelect();
+ void slotDeselect();
+ void slotInvert();
+ void slotExpand();
+ void slotCollapse();
+
+ virtual void resizeEvent( QResizeEvent * );
+
+ KURL::List files();
+
+ void addEntries(KIO::Job *,const KIO::UDSEntryList &);
+
+private:
+ KURL baseURL;
+ ProjectList prjFileList;
+ QRegExp excludeRx;
+ QValueList<URLListEntry> urlList;
+ int m_listJobCount;
+
+protected slots: // Protected slots
+ /** No descriptions */
+ void slotListDone(KIO::Job *);
+};
+
+#endif
+
diff --git a/quanta/project/rescanprjdir.ui b/quanta/project/rescanprjdir.ui
new file mode 100644
index 00000000..d4fdf556
--- /dev/null
+++ b/quanta/project/rescanprjdir.ui
@@ -0,0 +1,255 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>RescanPrjDir</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>RescanPrjDir</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>620</width>
+ <height>540</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>3</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>620</width>
+ <height>540</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>MyDialog</string>
+ </property>
+ <property name="sizeGripEnabled">
+ <bool>true</bool>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KProgress" row="12" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>progress</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="11" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>progressText</cstring>
+ </property>
+ <property name="text">
+ <string>Progress:</string>
+ </property>
+ </widget>
+ <widget class="UploadTreeView" row="2" column="0" rowspan="9" colspan="1">
+ <property name="name">
+ <cstring>listView</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>7</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;b&gt;Add New Files in Project&lt;/b&gt;</string>
+ </property>
+ </widget>
+ <widget class="Line" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Line2</cstring>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>4</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>32767</width>
+ <height>4</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>HLine</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>Sunken</enum>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="9" column="1">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="8" column="1">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="6" column="1">
+ <property name="name">
+ <cstring>buttonCollapse</cstring>
+ </property>
+ <property name="text">
+ <string>Co&amp;llapse All</string>
+ </property>
+ </widget>
+ <spacer row="7" column="1">
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>144</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton" row="2" column="1">
+ <property name="name">
+ <cstring>buttonSelect</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;All</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="3" column="1">
+ <property name="name">
+ <cstring>buttonDeselect</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;None</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="5" column="1">
+ <property name="name">
+ <cstring>buttonExpand</cstring>
+ </property>
+ <property name="text">
+ <string>E&amp;xpand All</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="10" column="1">
+ <property name="name">
+ <cstring>buttonHelp</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Help</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QPushButton" row="4" column="1">
+ <property name="name">
+ <cstring>buttonInvert</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Invert</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<customwidgets>
+ <customwidget>
+ <class>UploadTreeView</class>
+ <header location="local">../treeviews/uploadtreeview.h</header>
+ <sizehint>
+ <width>-1</width>
+ <height>-1</height>
+ </sizehint>
+ <container>0</container>
+ <sizepolicy>
+ <hordata>5</hordata>
+ <verdata>5</verdata>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ <pixmap>image0</pixmap>
+ </customwidget>
+</customwidgets>
+<images>
+ <image name="image0">
+ <data format="XPM.GZ" length="4350">789c6dd7594f23471007f0f7fd14d6d6db2aaaf58c3db647511eb831b7317794879ac30760cc61c010e5bba7dcf5af5688167664fdb66bbaababbb67cccf1f8dab93c3c68f9fdf5e16b298968d7222cf8d1fd5eb6cf6f1e75f7ffcfded7b9a3656ff9aad46fafdb76fdf078b46d9389a3fd42bf04841699e964933b830b79a7019dd0b96955b895b5a703bcd572e08eea576ff6570ae0eedd477b792103f854b8b2fc6d1163f77237e646e37113f89b6f8307e3bf1785a8b0eedbc696eb7ad9db7e01ee6476ee4ffe0c6fd158c7c69182cde4eec6e87fea50dfbf8176e6ba7d07f96669999cfa325ccaf862bcc97a36dbccf60f178cee11cde706761f16917ae30fe6b7488a7851bf14d7327417f676eb4f756eea41e2f57e6d83e83919f6cba117f04235fd9765b3b0fa36dfc398cf973edc67a6fb951ffe768ab6765ee26b8dff213ef5f4630e2b9e7463ea7ee8ee5ff60ee2618af8eb6fe3238437eb91bf1299cdbfacad3cadd5617f5a11738c7fe4adcb8ffd68d7aeec15e8fc3683b9f62ee2518ef33dafa3f75e3bc957086f86eb4d56f3db8e8e6dd56f01a5cc1bbe65e629673d8ebd18d0efdc9058cf9f2c08df9e630ce037db8719ec37c7a9a7fb708f10267b65e7cef46fb3e9ca3fd23dad6ef0cf67abe99f304f95ec3a8871cbb71be52d8d777e8b6fee412f6f958be3adf5ea817b561afe7d86ded7c67ce13c46fc37ede2766c17a17059cd9f38e466e8c3f8eb6fd700f0b9ef7095c37cd3d37de178f2be76dcf876fa343bd790267f012f67a77cc319f69b4ed872e2ca8e732daeabfe3c6fa9cc235f21f9b8bd4f2a5cd687bfedbfd659ee7ede017b842becf6eb44fa3cbd0df8559b0ffe808ceb0ff37e01afba3652e52cc87a26dbe276ecca7097790ff73b4cdef0616ac4fdf6df1c2d1d67ee8c6f80318eb4bd1180ff529513f0ecf7b694b62f5a002ceccb2662e523c2fb7605f9f0fd8fbbf75e3bc2dcd3e9ebcb9f17ce8c05e8f83685bcf701e44eb2db65e4fd1b65eebe62245be53b8c6f3ffdd8dfd3933fbf884761f5f0edcd88f951bf118bf44bde926dae24fe01ae7af76e3f9169e2f45bb143c0f5fdcf6fea23b18f773eac6f3e63ddac6db75e37df5e8c6fbae65aebcde6d37beaf84f528aa52f03c9dc3359ea79939c627d136deab1befaf75b883ef23e76e3ccfaea36d7dc2f795322b05ebfb0ad738af7db7ad371f99fd7e59b8b13f276e9cdf1318f5e54337e6d78cb67cf761ec170efba1acaa1afd9db92d3f3a36d729ea77efc6f33cbccf2beddfe6478fe6d85e45dbfd851bf1577007f5d877e3bc86f5a9ea3a2d6cffdfc1debe116df5db73a39e37b0e777191dda257c7fa83b6e8a2eaae00eeceb13d6b7d69f325b79b058fd32b170c1a55ebffaac2ccae2b9e6118f79c253bd6ef9ee3fd7587fef79c60f7acf3cc617fcc84ffcac6d8ffcc20b7ee5377ee7257ff027aff1bac66ff0269716cf5b1ab7cd3bbcabb17ddee37d3ee0433ee2633ee1019ff290cff89c2ff89229c48b66f1ac3d5df135df7093134eb9c56dcef4b3c35dee71ce393111dbfa8c784a4205955451cd1d1ad1982634a55bbad3f80eddd38c1ef882e66cf52ab5ff2b8d7ea4277aa6175ad06bb866f446efb4d4df0ffad4fed762ffb7b44e1b9cd2266dd142c75e5ddb3cd0bb3e347a477bd9d5f83ee245e3f7689f0ee830f67d44c77412ee186946033aa5e197fecfe85c7bf7be2fe892aee89a6ea84989f6bfa434f4eff9df52c509b5d0779b32ea684d13ea528f728d1e882ebfce37f6cf077422b4ea5b440ad14af1a15452ab473aee52c65ff39789b64fe955f44eb9937b5d858c5b32d377c0c32a7fee7ecd5fe61aff284ff22c2fb290577993775db1443fb53ef2219f5ff2bf93356d5b970dd9d41eb77820dbb223bbab155ed55ffab2f725ffb1eccb81aed6931cca116ab490633909d10339fd5ffdef795d869ae7923bc27226e772415d5986b51d683663b9d4fcfbb1ff190fe54aaec35aeaa577ee20f24673e94b531249a585fc2b69ebfe3ed7dae91f75ba964b5c03e9d344ba1add93bce0826c3f87f3b2a9fb6f18aeba10ba2f563f25eb1b563771a5d17531e2513c5fba538b3111cd690dd73c7ef6a95f4c8aa99de12fe77da4951de9ffffea730be7fd9fdfbffd0b690edc6c</data>
+ </image>
+</images>
+<connections>
+ <connection>
+ <sender>buttonOk</sender>
+ <signal>clicked()</signal>
+ <receiver>RescanPrjDir</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>buttonCancel</sender>
+ <signal>clicked()</signal>
+ <receiver>RescanPrjDir</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>buttonSelect</tabstop>
+ <tabstop>buttonDeselect</tabstop>
+ <tabstop>buttonInvert</tabstop>
+ <tabstop>buttonExpand</tabstop>
+ <tabstop>buttonCollapse</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+ <tabstop>buttonHelp</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kprogress.h</includehint>
+ <includehint>uploadtreeview.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/subprojecteditdlgs.ui b/quanta/project/subprojecteditdlgs.ui
new file mode 100644
index 00000000..422bf2b8
--- /dev/null
+++ b/quanta/project/subprojecteditdlgs.ui
@@ -0,0 +1,73 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>SubprojectEditDlgS</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>SubprojectEditDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>403</width>
+ <height>111</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel9</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>nameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>locationEdit</cstring>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The relative path of the subproject folder inside the project.</string>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>nameEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel10</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Location:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>locationEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>createNew</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Create new subproject</string>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Check this if you want to create a new subproject with the above entered data.</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>nameEdit</tabstop>
+ <tabstop>locationEdit</tabstop>
+ <tabstop>createNew</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/teammembersdlg.cpp b/quanta/project/teammembersdlg.cpp
new file mode 100644
index 00000000..bd159186
--- /dev/null
+++ b/quanta/project/teammembersdlg.cpp
@@ -0,0 +1,263 @@
+/***************************************************************************
+ teammembersdlg.cpp - description
+ -------------------
+ begin : Wed Jul 7 2004
+ copyright : (C) 2004 Andras Mantia <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 <qlabel.h>
+
+//kde includes
+#include <kcombobox.h>
+#include <kdialogbase.h>
+#include <klineedit.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+//app includes
+#include "teammembersdlg.h"
+#include "membereditdlg.h"
+#include "project.h"
+
+#define NAME_COL 0
+#define NICKNAME_COL 1
+#define EMAIL_COL 2
+#define ROLE_COL 3
+#define TASK_COL 4
+#define SUBPROJECT_COL 5
+
+
+extern QString simpleMemberStr;
+extern QString taskLeaderStr;
+extern QString teamLeaderStr;
+extern QString subprojectLeaderStr;
+
+TeamMembersDlg::TeamMembersDlg(QWidget *parent, const char *name)
+ : TeamMembersDlgS(parent, name)
+{
+ m_yourself = "";
+}
+
+
+TeamMembersDlg::~TeamMembersDlg()
+{
+}
+
+void TeamMembersDlg::slotAddMember()
+{
+ KDialogBase addDlg(this, "add_member", true, i18n("New Member"), KDialogBase::Ok | KDialogBase::Cancel);
+ MemberEditDlg memberDlg(&addDlg);
+ addDlg.setMainWidget(&memberDlg);
+ bool result;
+ do {
+ result = addDlg.exec();
+ if (result)
+ {
+ QString name = memberDlg.nameCombo->currentText();
+ QString role = memberDlg.roleCombo->currentText();
+ QString task = memberDlg.taskEdit->text();
+ QString subProject = memberDlg.subprojectCombo->currentText();
+ QString nickName = memberDlg.nicknameEdit->text();
+ QString email = memberDlg.emailEdit->text();
+ if (name.isEmpty())
+ {
+ KMessageBox::error(this, i18n("The member name cannot be empty."));
+ addDlg.show();
+ } else
+ if (nickName.isEmpty())
+ {
+ KMessageBox::error(this, i18n("The nickname cannot be empty as it is used as a unique identifier."));
+ addDlg.show();
+ } else
+ if (!checkDuplicates(0L, name, nickName, email, role, task, subProject))
+ {
+ addDlg.show();
+ } else
+ {
+ QListViewItem *item = new QListViewItem(membersListView, name, nickName, email, role, task);
+ if (memberDlg.subprojectCombo->isEnabled())
+ item->setText(SUBPROJECT_COL, subProject);
+ result = false;
+ }
+ }
+ } while (result);
+}
+
+void TeamMembersDlg::slotEditMember()
+{
+ QListViewItem *item =membersListView->currentItem();
+ if (!item) return;
+ KDialogBase editDlg(this, "edit_member", true, i18n("Edit Member"), KDialogBase::Ok | KDialogBase::Cancel);
+ MemberEditDlg memberDlg(&editDlg);
+ memberDlg.selectMember(item->text(NAME_COL));
+ memberDlg.nicknameEdit->setText(item->text(NICKNAME_COL));
+ memberDlg.emailEdit->setText(item->text(EMAIL_COL));
+ QString role = item->text(ROLE_COL);
+ for (int i = 0; i < memberDlg.roleCombo->count(); i++)
+ {
+ if (memberDlg.roleCombo->text(i) == role)
+ {
+ memberDlg.roleCombo->setCurrentItem(i);
+ memberDlg.slotRoleSelected(role);
+ break;
+ }
+ }
+ memberDlg.taskEdit->setText(item->text(TASK_COL));
+ int idx = 0;
+ int subprojectIdx = 0;
+ QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (QValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
+ {
+ if (item->text(SUBPROJECT_COL) == (*it).name)
+ {
+ subprojectIdx = idx;
+ break;
+ }
+ idx++;
+ }
+ memberDlg.subprojectCombo->setCurrentItem(subprojectIdx);
+
+ editDlg.setMainWidget(&memberDlg);
+ bool result;
+ do {
+ result = editDlg.exec();
+ if (result)
+ {
+ QString name = memberDlg.nameCombo->currentText();
+ QString nickName = memberDlg.nicknameEdit->text();
+ QString email = memberDlg.emailEdit->text();
+ QString role = memberDlg.roleCombo->currentText();
+ QString task = memberDlg.taskEdit->text();
+ QString subProject = memberDlg.subprojectCombo->currentText();
+ if (name.isEmpty())
+ {
+ KMessageBox::error(this, i18n("The member name cannot be empty."));
+ editDlg.show();
+ } else
+ if (nickName.isEmpty())
+ {
+ KMessageBox::error(this, i18n("The nickname cannot be empty as it is used as a unique identifier."));
+ editDlg.show();
+ } else
+ if (!checkDuplicates(item, name, nickName, email, role, task, subProject))
+ {
+ editDlg.show();
+ } else
+ {
+ item->setText(NAME_COL, name);
+ item->setText(NICKNAME_COL, nickName);
+ item->setText(EMAIL_COL, email);
+ item->setText(ROLE_COL, role);
+ item->setText(TASK_COL, task);
+ if (memberDlg.subprojectCombo->isEnabled())
+ item->setText(SUBPROJECT_COL, subProject);
+ result = false;
+ }
+ }
+ } while (result);
+}
+
+void TeamMembersDlg::slotDeleteMember()
+{
+ QListViewItem *item =membersListView->currentItem();
+ if (!item) return;
+
+ bool deleteYourself = (item->text(NICKNAME_COL) == m_yourself);
+ QListViewItemIterator it(membersListView);
+ while ( it.current() )
+ {
+ if (item != it.current() && it.current()->text(NICKNAME_COL) == m_yourself)
+ {
+ deleteYourself = false;
+ break;
+ }
+ ++it;
+ }
+
+ if (deleteYourself)
+ {
+ if (KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure that you want to remove yourself (<b>%1</b>) from the project team?<br>If you do so, you should select another member as yourself.</qt>").arg(item->text(NAME_COL)), i18n("Delete Member"), KStdGuiItem::del()) == KMessageBox::Continue)
+ {
+ delete item;
+ setYourself("");
+ }
+ } else
+ if (KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure that you want to remove <b>%1</b> from the project team?</qt>").arg(item->text(NAME_COL)), i18n("Delete Member"), KStdGuiItem::del()) == KMessageBox::Continue)
+ {
+ delete item;
+ }
+}
+
+bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, const QString &nickName, const QString &email, const QString &role, const QString &task, const QString &subProject)
+{
+ QString s;
+ QString nick;
+ QListViewItemIterator it(membersListView);
+ while ( it.current() )
+ {
+ s = it.current()->text(ROLE_COL);
+ nick = it.current()->text(NICKNAME_COL);
+ if (item != it.current() && s == role &&
+ (role == i18n(teamLeaderStr.utf8()) ||
+ (role == i18n(taskLeaderStr.utf8()) && it.current()->text(TASK_COL) == task) ||
+ (role == i18n(subprojectLeaderStr.utf8()) && it.current()->text(SUBPROJECT_COL) == subProject)
+ ) )
+ {
+ if (KMessageBox::warningYesNo(this, i18n("<qt>The <b>%1</b> role is already assigned to <b>%2</b>. Do you want to reassign it to the current member?</qt>").arg(role).arg(it.current()->text(NAME_COL)), QString::null, i18n("Reassign"), i18n("Do Not Reassign")) == KMessageBox::Yes)
+ {
+ it.current()->setText(ROLE_COL, i18n(simpleMemberStr.utf8()));
+ return true;
+ }
+ else
+ return false;
+ } else
+ if (nick.lower() == nickName.lower() && it.current() != item && (it.current()->text(EMAIL_COL) != email || it.current()->text(NAME_COL) != name))
+ {
+ KMessageBox::error(this, i18n("<qt>The <b>%1</b> nickname is already assigned to <b>%2 &lt;%3&gt;</b>.</qt>").arg(nickName).arg(it.current()->text(NAME_COL)).arg(it.current()->text(EMAIL_COL)));
+ return false;
+ }
+ ++it;
+ }
+ return true;
+}
+
+void TeamMembersDlg::slotSetToYourself()
+{
+ QListViewItem *item =membersListView->currentItem();
+ if (!item) return;
+ yourselfLabel->setText(item->text(NAME_COL) + " <" + item->text(EMAIL_COL) + ">");
+ m_yourself = item->text(NICKNAME_COL);
+}
+
+void TeamMembersDlg::setYourself(const QString &name)
+{
+ m_yourself = name;
+ if (name.isEmpty())
+ {
+ yourselfLabel->setText(i18n("Please select your identity from the member list."));
+ return;
+ }
+ QListViewItemIterator it(membersListView);
+ while ( it.current() )
+ {
+ if (it.current()->text(NICKNAME_COL).lower() == name.lower())
+ {
+ yourselfLabel->setText(it.current()->text(NAME_COL)+ " <" + it.current()->text(EMAIL_COL) + ">");
+ break;
+ }
+ ++it;
+ }
+}
+
+#include "teammembersdlg.moc"
+
diff --git a/quanta/project/teammembersdlg.h b/quanta/project/teammembersdlg.h
new file mode 100644
index 00000000..c3281e23
--- /dev/null
+++ b/quanta/project/teammembersdlg.h
@@ -0,0 +1,52 @@
+/***************************************************************************
+ teammembersdlg.h - description
+ -------------------
+ begin : Wed Jul 7 2004
+ copyright : (C) 2004 Andras Mantia <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 TEAMMEMBERSDLG_H
+#define TEAMMEMBERSDLG_H
+
+#include "teammembersdlgs.h"
+
+/**
+@author Andras Mantia
+*/
+class TeamMembersDlg : public TeamMembersDlgS
+{
+Q_OBJECT
+public:
+ TeamMembersDlg(QWidget *parent = 0, const char *name = 0);
+
+ ~TeamMembersDlg();
+ void setYourself(const QString &name);
+ QString yourself() {return m_yourself;}
+
+public slots:
+ void slotAddMember();
+ void slotEditMember();
+ void slotDeleteMember();
+ void slotSetToYourself();
+
+private:
+ /** Check if the selected role conflicts with an already existing role or not, for
+ example a Team Leader is selected, while a team leader already exists. In case
+ of duplicate entries, it shows a dialog and if the user answer yes, the old
+ teamleader is set to Simple Member and the new member is set to teamleader
+ and the method returns true, otherwise it returns false. */
+ bool checkDuplicates(QListViewItem *item, const QString &name, const QString &nickName, const QString &email, const QString &role, const QString &task, const QString &subProject);
+
+ QString m_yourself;
+};
+
+#endif
diff --git a/quanta/project/teammembersdlgs.ui b/quanta/project/teammembersdlgs.ui
new file mode 100644
index 00000000..eb2689dc
--- /dev/null
+++ b/quanta/project/teammembersdlgs.ui
@@ -0,0 +1,249 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>TeamMembersDlgS</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>TeamMembersDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>579</width>
+ <height>492</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Mailing list:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>mailingListEdit</cstring>
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>mailingListEdit</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>You are:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="1">
+ <property name="name">
+ <cstring>yourselfLabel</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Please select your identity from the member list.</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter</set>
+ </property>
+ </widget>
+ <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>groupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>&amp;Team Members</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="KPushButton" row="1" column="0">
+ <property name="name">
+ <cstring>addMemberButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Add...</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="1">
+ <property name="name">
+ <cstring>editMemberButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Edit...</string>
+ </property>
+ </widget>
+ <widget class="KListView" row="0" column="0" rowspan="1" colspan="5">
+ <column>
+ <property name="text">
+ <string>Name</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Nickname</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Email</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Role</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Task</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Subproject</string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>membersListView</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="1" column="2">
+ <property name="name">
+ <cstring>deleteMemberButton</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Delete</string>
+ </property>
+ </widget>
+ <spacer row="1" column="3">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>100</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KPushButton" row="1" column="4">
+ <property name="name">
+ <cstring>setToYourselfButton</cstring>
+ </property>
+ <property name="text">
+ <string>Set to &amp;Yourself</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>addMemberButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TeamMembersDlgS</receiver>
+ <slot>slotAddMember()</slot>
+ </connection>
+ <connection>
+ <sender>deleteMemberButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TeamMembersDlgS</receiver>
+ <slot>slotDeleteMember()</slot>
+ </connection>
+ <connection>
+ <sender>editMemberButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TeamMembersDlgS</receiver>
+ <slot>slotEditMember()</slot>
+ </connection>
+ <connection>
+ <sender>membersListView</sender>
+ <signal>doubleClicked(QListViewItem*)</signal>
+ <receiver>TeamMembersDlgS</receiver>
+ <slot>slotEditMember()</slot>
+ </connection>
+ <connection>
+ <sender>setToYourselfButton</sender>
+ <signal>clicked()</signal>
+ <receiver>TeamMembersDlgS</receiver>
+ <slot>slotSetToYourself()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>mailingListEdit</tabstop>
+ <tabstop>membersListView</tabstop>
+ <tabstop>addMemberButton</tabstop>
+ <tabstop>editMemberButton</tabstop>
+ <tabstop>deleteMemberButton</tabstop>
+ <tabstop>setToYourselfButton</tabstop>
+</tabstops>
+<slots>
+ <slot>slotAddMember()</slot>
+ <slot>slotEditMember()</slot>
+ <slot>slotDeleteMember()</slot>
+ <slot>slotSetToYourself()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>klineedit.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>klistview.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+ <includehint>kpushbutton.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/project/uploadprofiledlgs.ui b/quanta/project/uploadprofiledlgs.ui
new file mode 100644
index 00000000..851a133c
--- /dev/null
+++ b/quanta/project/uploadprofiledlgs.ui
@@ -0,0 +1,310 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+<class>UploadProfileDlgS</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2004 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>UploadProfileDlgS</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>710</width>
+ <height>215</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Upload Profile</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLineEdit" row="3" column="1" rowspan="1" colspan="10">
+ <property name="name">
+ <cstring>linePath</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Host:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineHost</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;User:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineUser</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Pa&amp;th:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>linePath</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Profile &amp;name:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>lineProfileName</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>defaultProfile</cstring>
+ </property>
+ <property name="text">
+ <string>Use as &amp;default profile</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>lineUser</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="3">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Pass&amp;word:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>linePasswd</cstring>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="5" column="9" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>cancelButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="5" column="7" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>okButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>90</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="5" column="0" rowspan="1" colspan="7">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>445</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>lineHost</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QComboBox" row="1" column="5" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>comboProtocol</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="1" column="10">
+ <property name="name">
+ <cstring>port</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>4</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="8" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Po&amp;rt:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>port</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="6" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>keepPasswd</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;Store password on disc</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Keep the password in a file. DANGEROUS! Read the "What's This?" text.</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>&lt;qt&gt;If you check this box, the password will be saved in the local Quanta configuration file, so every time you start Quanta and load this project, the password will be loaded and you don't have to enter it. Altough the local configuration file is readable only by you and the password
+is obscured, saving the password in any file is a security risk. Use this option at your own risk.&lt;br&gt;
+&lt;i&gt;Note:&lt;/i&gt; due to the security concerns, the password is not present in the project file, and moving the project files to another computer or uploading the project to a server will not move/upload the password to the new place.&lt;/qt&gt;</string>
+ </property>
+ </widget>
+ <widget class="KPasswordEdit" row="2" column="4" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>linePasswd</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="4">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Protocol:</string>
+ </property>
+ <property name="alignment">
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>comboProtocol</cstring>
+ </property>
+ <property name="hAlign" stdset="0">
+ </property>
+ </widget>
+ <widget class="KLineEdit" row="0" column="2" rowspan="1" colspan="9">
+ <property name="name">
+ <cstring>lineProfileName</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>UploadProfileDlgS</receiver>
+ <slot>accept()</slot>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>UploadProfileDlgS</receiver>
+ <slot>reject()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>lineProfileName</tabstop>
+ <tabstop>lineHost</tabstop>
+ <tabstop>comboProtocol</tabstop>
+ <tabstop>port</tabstop>
+ <tabstop>lineUser</tabstop>
+ <tabstop>linePasswd</tabstop>
+ <tabstop>keepPasswd</tabstop>
+ <tabstop>linePath</tabstop>
+ <tabstop>defaultProfile</tabstop>
+ <tabstop>okButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/uploadprofiles.cpp b/quanta/project/uploadprofiles.cpp
new file mode 100644
index 00000000..d32596ed
--- /dev/null
+++ b/quanta/project/uploadprofiles.cpp
@@ -0,0 +1,120 @@
+/***********************************************************************
+ uploadprofiles.cpp - extended Map of UploadProfiles
+ -------------------
+ begin : July 11 2004
+ copyright : (C) 2004 by Jens Herden <jens@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. *
+ * *
+ ***************************************************************************/
+
+// qt includes
+#include <qobject.h>
+
+// KDE includes
+#include <kiconloader.h>
+#include <klocale.h>
+
+// app includes
+#include "servertreeview.h"
+#include "uploadprofiles.h"
+#include "quanta.h"
+#include "resource.h"
+#include "project.h"
+
+
+UploadProfiles::UploadProfiles() : UploadProfileMap()
+{
+}
+
+
+void UploadProfiles::readFromXML(const QDomDocument &dom)
+{
+ clear(); // empty the list
+ m_profilesNode = dom.firstChild().firstChild().namedItem("uploadprofiles");
+ if (m_profilesNode.isNull())
+ return;
+
+ QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ UploadProfile newProfile;
+ for (uint i = 0; i < profileList.count(); i++)
+ {
+ newProfile.domElement = profileList.item(i).toElement();
+ newProfile.name = newProfile.domElement.attribute("name");
+ newProfile.treeview = createTreeview(newProfile);
+ insert(newProfile.name, newProfile);
+ }
+}
+
+
+bool UploadProfiles::removeFromMapAndXML(const QString &name)
+{
+ UploadProfiles::Iterator it = find(name);
+ if ( it == end() )
+ return false;
+ // ok now remove
+ QDomElement el = (*it).domElement;
+ el.parentNode().removeChild(el);
+ erase(name);
+ return true;
+}
+
+void UploadProfiles::clear()
+{
+ // remove all treeviews
+ for (UploadProfiles::iterator it = begin(); it != end(); ++it)
+ {
+ if ( (*it).treeview )
+ {
+ quantaApp->deleteToolWindow( (*it).treeview );
+ }
+ }
+ // clear the map
+ UploadProfileMap::clear();
+}
+
+QWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
+{
+ QWidget *widget = 0L;
+ KURL kurl = url(profile.domElement);
+ if (kurl.isValid() && ! kurl.isEmpty())
+ {
+ widget = new ServerTreeView(quantaApp->config(), quantaApp, kurl, "ServerTreeView" + profile.name);
+ widget->setIcon(SmallIcon("up"));
+ widget->setCaption( i18n("Upload Profile") + ": " + profile.name );
+ quantaApp->addToolWindow(widget, quantaApp->prevDockPosition(widget, KDockWidget::DockRight), quantaApp->getMainDockWidget());
+ }
+ return widget;
+}
+
+
+KURL UploadProfiles::url(const QDomElement &e)
+{
+ QString protocol = e.attribute("remote_protocol","ftp") + "://";
+ QString s = protocol;
+ QString host = e.attribute("remote_host","");
+ s += host;
+ QString port = e.attribute("remote_port","");
+ if (! port.isEmpty()) {
+ s += ":" + port;
+ }
+ s += e.attribute("remote_path","");
+ KURL url = KURL::fromPathOrURL(s);
+ QString user = e.attribute("user","");
+ if (!user.isEmpty()) {
+ url.setUser(user);
+ }
+ // check if we know the password
+ if ( !user.isEmpty() && Project::ref()->keepPasswd )
+ {
+ QString password = Project::ref()->password(protocol + user + "@" + host);
+ url.setPass(password);
+ }
+ return url;
+}
diff --git a/quanta/project/uploadprofiles.h b/quanta/project/uploadprofiles.h
new file mode 100644
index 00000000..20d77b80
--- /dev/null
+++ b/quanta/project/uploadprofiles.h
@@ -0,0 +1,108 @@
+//
+// C++ Interface: UploadProfiles
+//
+// Description:
+//
+//
+// Author: Jens Herden <jens@kdewebdev.org>, (C) 2004
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef UPLOADPROFILES_H
+#define UPLOADPROFILES_H
+
+// QT includes
+#include <qmap.h>
+#include <qdom.h>
+#include <qguardedptr.h>
+
+// KDE includes
+#include <kurl.h>
+
+
+class QObject;
+
+/**
+ @short The internal representation of upload profiles.
+
+*/
+
+
+struct UploadProfile
+{
+ QString name; ///< name of profile
+ QDomElement domElement; ///< domtree element of this profile
+ QGuardedPtr<QWidget> treeview; ///< treeview for this url
+};
+
+/** a map for the upload profiles */
+typedef QMap<QString, UploadProfile> UploadProfileMap;
+
+
+class UploadProfiles : public UploadProfileMap
+{
+public:
+ /**
+ * since this class is a singleton you must use this function to access it
+ */
+ static UploadProfiles* const ref()
+ {
+ static UploadProfiles *m_ref;
+ if (!m_ref) m_ref = new UploadProfiles();
+ return m_ref;
+ }
+
+ ~UploadProfiles();
+
+ /**
+ reads the available profiles from the tree and fills the map
+
+ @param the dom document to parse
+ */
+ void readFromXML(const QDomDocument &dom);
+
+ /**
+ removes a profile from the map and the dom tree
+
+ @param the profile to remove
+
+ @return true if profile was found and removed
+ */
+ bool removeFromMapAndXML(const QString &name);
+
+ /**
+ clears the map and removes all treeviews
+ */
+ void clear();
+
+private:
+ /** The constructor is privat because we use singleton pattern.
+ * If you need the class use UploadProfiles::ref() for
+ * construction and reference
+ */
+ UploadProfiles();
+
+ /**
+ creates a treeview for a profile and adds it to the right toolviews
+
+ @param profile the profile
+
+ @return the pointer to the treeview
+ */
+ QWidget * createTreeview(const UploadProfile &profile);
+
+ /**
+ creates a KURL from a QDomElement
+
+ @param e a QDomElement where the path is saved
+
+ @return KURL of the location
+ */
+ KURL url(const QDomElement &e);
+
+ QDomNode m_profilesNode; ///< under this node the profiles are saved in the dom tree
+};
+
+#endif
diff --git a/quanta/project/uploadprofilespage.ui b/quanta/project/uploadprofilespage.ui
new file mode 100644
index 00000000..745e0ba4
--- /dev/null
+++ b/quanta/project/uploadprofilespage.ui
@@ -0,0 +1,125 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>UploadProfilesPage</class>
+<comment>
+ /***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2004 by Andras Mantia</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>UploadProfilesPage</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>layout2</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>pLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Default profile:</string>
+ </property>
+ </widget>
+ <widget class="KPushButton" row="0" column="2">
+ <property name="name">
+ <cstring>buttonEditProfiles</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Edit Profiles</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="1">
+ <property name="name">
+ <cstring>profileLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>3</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>x</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>checkShowUploadTreeviews</cstring>
+ </property>
+ <property name="text">
+ <string>Show a &amp;treeview for each profile</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>buttonEditProfiles</sender>
+ <signal>clicked()</signal>
+ <receiver>UploadProfilesPage</receiver>
+ <slot>buttonEditProfiles_clicked()</slot>
+ </connection>
+</connections>
+<includes>
+ <include location="local" impldecl="in implementation">uploadprofilespage.ui.h</include>
+</includes>
+<slots>
+ <slot>buttonEditProfiles_clicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/project/uploadprofilespage.ui.h b/quanta/project/uploadprofilespage.ui.h
new file mode 100644
index 00000000..cb7aad06
--- /dev/null
+++ b/quanta/project/uploadprofilespage.ui.h
@@ -0,0 +1,31 @@
+/****************************************************************************
+** 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.
+*****************************************************************************/
+/***********************************************************************
+ begin : Wed Jul 28 2004
+ copyright : (C) 2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "projectupload.h"
+
+void UploadProfilesPage::buttonEditProfiles_clicked()
+{
+ ProjectUpload* dlg = new ProjectUpload(KURL(), "", true);
+ dlg->exec();
+ profileLabel->setText(dlg->defaultProfile());
+ delete dlg;
+}
diff --git a/quanta/quanta.kdevelop b/quanta/quanta.kdevelop
new file mode 100644
index 00000000..d68df86b
--- /dev/null
+++ b/quanta/quanta.kdevelop
@@ -0,0 +1,338 @@
+<!DOCTYPE kdevelop>
+<kdevelop>
+ <general>
+ <author>Andras Mantia</author>
+ <email>amantia@kde.org</email>
+ <projectmanagement>KDevKDEAutoProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <keywords>
+ <keyword>KDE</keyword>
+ <keyword>Qt</keyword>
+ </keywords>
+ <version>3.2-CVS-1</version>
+ <description>Quanta Plus Web Development Environment</description>
+ <ignoreparts>
+ <part>kdevvalgrind</part>
+ </ignoreparts>
+ <projectdirectory>.</projectdirectory>
+ <absoluteprojectpath>false</absoluteprojectpath>
+ <secondaryLanguages/>
+ <versioncontrol/>
+ <defaultencoding/>
+ <projectname>quanta</projectname>
+ </general>
+ <kdevautoproject>
+ <general>
+ <mainprogram>quanta</mainprogram>
+ <useconfiguration>default</useconfiguration>
+ <activetarget>src/quanta</activetarget>
+ </general>
+ <configure>
+ <configargs>--prefix=/opt/kde3 --enable-debug\s</configargs>
+ </configure>
+ <make>
+ <abortonerror>true</abortonerror>
+ <numberofjobs>2</numberofjobs>
+ <dontact>false</dontact>
+ <makebin/>
+ <envvars>
+ <envvar value="no" name="UNSERMAKE" />
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </envvars>
+ <prio>0</prio>
+ <runmultiplejobs>true</runmultiplejobs>
+ </make>
+ <compiler>
+ <cflags/>
+ <cxxflags>\s-O0 -g3 -Wall</cxxflags>
+ </compiler>
+ <run>
+ <mainprogram>/data/development/build/kde-3.5/kdewebdev/quanta/src/quanta</mainprogram>
+ <programargs/>
+ <terminal>false</terminal>
+ <envvars/>
+ <directoryradio>build</directoryradio>
+ <customdirectory>/</customdirectory>
+ <autocompile>true</autocompile>
+ <autoinstall>false</autoinstall>
+ <autokdesu>false</autokdesu>
+ <globaldebugarguments/>
+ <globalcwd>/data/development/build/kde-3.5/kdewebdev</globalcwd>
+ <useglobalprogram>true</useglobalprogram>
+ <runarguments>
+ <quanta/>
+ </runarguments>
+ <debugarguments>
+ <quanta/>
+ </debugarguments>
+ <cwd>
+ <quanta>/data/development/build/kde-3.5/kdewebdev/quanta/src</quanta>
+ </cwd>
+ </run>
+ <envvars/>
+ <configurations>
+ <default>
+ <configargs>--enable-debug=full --prefix=/opt/kde-35 --enable-editors</configargs>
+ <builddir>/data/development/build/kde-3.5/kdewebdev</builddir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT</cflags>
+ <cxxflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT -DDEBUG_PARSER</cxxflags>
+ <f77flags/>
+ <topsourcedir>/data/development/sources/kde-3.5/kdewebdev</topsourcedir>
+ <cppflags/>
+ <ldflags/>
+ <envvars>
+ <envvar value="kommander klinkstatus kfilereplace kxsldbg kimagemapeditor" name="DO_NOT_COMPILE2" />
+ </envvars>
+ </default>
+ <withkommander>
+ <configargs>--enable-debug=full --prefix=/opt/kde3</configargs>
+ <builddir>/data/development/build/kde-head/kdewebdev</builddir>
+ <topsourcedir/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-DKDE_NO_COMPAT</cflags>
+ <cxxflags>-DKDE_NO_COMPAT</cxxflags>
+ <f77flags/>
+ <cppflags/>
+ <ldflags/>
+ </withkommander>
+ <all>
+ <configargs>--enable-debug=full --prefix=/opt/kde3 --enable-editors</configargs>
+ <builddir>/data/development/build/kde-head/kdewebdev</builddir>
+ <topsourcedir>/data/development/sources/kde-head/kdewebdev</topsourcedir>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-DKDE_NO_COMPAT</cflags>
+ <cxxflags>-DKDE_NO_COMPAT -DDEBUG_PARSER</cxxflags>
+ <f77flags/>
+ <cppflags/>
+ <ldflags/>
+ </all>
+ <withoutkafka>
+ <configargs>--enable-debug=full --without-kommander --without-kafkapart --prefix=/opt/kde3</configargs>
+ <builddir>/data/development/build/kde-head/kdewebdev-simple</builddir>
+ <topsourcedir/>
+ <cppflags/>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags/>
+ <cxxflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT</cxxflags>
+ <f77flags/>
+ </withoutkafka>
+ <final>
+ <configargs>--enable-debug=full --without-kommander --prefix=/opt/kde3 --enable-final</configargs>
+ <builddir>/data/development/build/kde-head/kdewebdev-final</builddir>
+ <topsourcedir>/data/development/sources/kde-head/kdewebdev</topsourcedir>
+ <cppflags/>
+ <ldflags/>
+ <ccompiler>kdevgccoptions</ccompiler>
+ <cxxcompiler>kdevgppoptions</cxxcompiler>
+ <f77compiler>kdevpgf77options</f77compiler>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT</cflags>
+ <cxxflags>-DKDE_NO_COMPAT -DQT_NO_COMPAT</cxxflags>
+ <f77flags/>
+ </final>
+ </configurations>
+ <makeenvvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </makeenvvars>
+ <subclassing>
+ <subclass uifile="/project/eventconfigurationdlgs.ui" sourcefile="/project/eventconfigurationdlg.cpp" />
+ <subclass uifile="/project/eventconfigurationdlgs.ui" sourcefile="/project/eventconfigurationdlg.h" />
+ <subclass uifile="/project/eventeditordlgs.ui" sourcefile="/project/eventeditordlg.cpp" />
+ <subclass uifile="/project/eventeditordlgs.ui" sourcefile="/project/eventeditordlg.h" />
+ </subclassing>
+ </kdevautoproject>
+ <kdevfileview>
+ <groups>
+ <group pattern="description.rc" name="Tag descriptions" />
+ <group pattern=".h;.hxx;.hpp;.H" name="Headers" />
+ <group pattern=".cpp;.c;.cc;.C;.cxx;.ec;.ecpp;.lxx;.l++;.ll;.l" name="Sources" />
+ <group pattern=".ui;.rc;" name="User Interface" />
+ <group pattern="AUTHORS;COPYING;ChangeLog;INSTALL;README;TODO;NEWS" name="GNU" />
+ <group pattern=".ts;.po" name="Translations" />
+ <group pattern=".png;.jpg;.gif;.tiff;.tif;.jpg;.xpm" name="Images" />
+ <group pattern=".desktop" name="Desktop" />
+ <group pattern=".tag" name="Tags" />
+ <group pattern="*" name="Others" />
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidepatterns/>
+ <showvcsfields>true</showvcsfields>
+ </tree>
+ </kdevfileview>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>gtk</toc>
+ <toc>gnustep</toc>
+ <toc>python</toc>
+ <toc>php</toc>
+ <toc>perl</toc>
+ </ignoretocs>
+ <projectdoc>
+ <userdocDir/>
+ <apidocDir/>
+ </projectdoc>
+ <ignoreqt_xml/>
+ <ignoredoxygen/>
+ <ignorekdocs/>
+ <ignoredevhelp/>
+ </kdevdoctreeview>
+ <kdevdebugger>
+ <general>
+ <dbgshell/>
+ <programargs/>
+ <gdbpath>/usr/bin/gdb</gdbpath>
+ <breakonloadinglibs>true</breakonloadinglibs>
+ <separatetty>false</separatetty>
+ <floatingtoolbar>false</floatingtoolbar>
+ <runappinappdirectory>true</runappinappdirectory>
+ <configGdbScript/>
+ <runShellScript/>
+ <runGdbScript/>
+ <raiseGDBOnStart>false</raiseGDBOnStart>
+ </general>
+ <display>
+ <staticmembers>false</staticmembers>
+ <demanglenames>true</demanglenames>
+ <outputradix>10</outputradix>
+ </display>
+ </kdevdebugger>
+ <cppsupportpart>
+ <codecompletion>
+ <codehinting outputview="1" enablech="1" selectview="0" />
+ </codecompletion>
+ <classstore>
+ <enablepcs>false</enablepcs>
+ <enablepp>false</enablepp>
+ <preparsing/>
+ </classstore>
+ <filetemplates>
+ <choosefiles>false</choosefiles>
+ <interfaceURL/>
+ <implementationURL/>
+ <interfacesuffix>.h</interfacesuffix>
+ <implementationsuffix>.cpp</implementationsuffix>
+ <lowercasefilenames>true</lowercasefilenames>
+ </filetemplates>
+ </cppsupportpart>
+ <kdevclassview>
+ <folderhierarchy>true</folderhierarchy>
+ <depthoffolders>2</depthoffolders>
+ </kdevclassview>
+ <kdevcvs>
+ <cvsoptions>-f</cvsoptions>
+ <commitoptions/>
+ <updateoptions>-dP</updateoptions>
+ <addoptions/>
+ <removeoptions>-f</removeoptions>
+ <diffoptions>-u3 -p</diffoptions>
+ <logoptions/>
+ <rshoptions/>
+ <revertoptions>-C -d -P</revertoptions>
+ </kdevcvs>
+ <kdevfilecreate>
+ <filetypes>
+ <type icon="" ext="h" name="C++ header" create="template" >
+ <descr>Quanta speicfic header</descr>
+ </type>
+ <type icon="source_cpp" ext="cpp" name="C++ source" create="template" >
+ <descr>A new empty C++ file.</descr>
+ </type>
+ </filetypes>
+ <useglobaltypes/>
+ </kdevfilecreate>
+ <kdevcppsupport>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>true</includeTypedefs>
+ <automaticCodeCompletion>false</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ <showOnlyAccessibleItems>false</showOnlyAccessibleItems>
+ <completionBoxItemOrder>0</completionBoxItemOrder>
+ <howEvaluationContextMenu>true</howEvaluationContextMenu>
+ <showCommentWithArgumentHint>true</showCommentWithArgumentHint>
+ <statusBarTypeEvaluation>false</statusBarTypeEvaluation>
+ <namespaceAliases>std=_GLIBCXX_STD</namespaceAliases>
+ <processPrimaryTypes>true</processPrimaryTypes>
+ <processFunctionArguments>false</processFunctionArguments>
+ <preProcessAllHeaders>false</preProcessAllHeaders>
+ <parseMissingHeaders>false</parseMissingHeaders>
+ <resolveIncludePaths>true</resolveIncludePaths>
+ <alwaysParseInBackground>true</alwaysParseInBackground>
+ <usePermanentCaching>true</usePermanentCaching>
+ <alwaysIncludeNamespaces>false</alwaysIncludeNamespaces>
+ <includePaths>.;</includePaths>
+ <parseMissingHeadersExperimental>false</parseMissingHeadersExperimental>
+ <resolveIncludePathsUsingMakeExperimental>false</resolveIncludePathsUsingMakeExperimental>
+ </codecompletion>
+ <references/>
+ <creategettersetter>
+ <prefixGet/>
+ <prefixSet>set</prefixSet>
+ <prefixVariable>m_,_</prefixVariable>
+ <parameterName>theValue</parameterName>
+ <inlineGet>true</inlineGet>
+ <inlineSet>true</inlineSet>
+ </creategettersetter>
+ <qt>
+ <used>true</used>
+ <version>3</version>
+ <root>/usr/lib/qt3</root>
+ <includestyle>3</includestyle>
+ <designerintegration>ExternalDesigner</designerintegration>
+ <qmake>/usr/lib/qt3/bin/qmake</qmake>
+ <designer>/usr/lib/qt3/bin/designer</designer>
+ <designerprefix/>
+ <designerpluginpaths/>
+ </qt>
+ <designerintegration>
+ <qtdesigner/>
+ </designerintegration>
+ <splitheadersource>
+ <enabled>false</enabled>
+ <synchronize>true</synchronize>
+ <orientation>Vertical</orientation>
+ </splitheadersource>
+ </kdevcppsupport>
+ <kdevcvsservice>
+ <recursivewhenupdate>true</recursivewhenupdate>
+ <prunedirswhenupdate>true</prunedirswhenupdate>
+ <createdirswhenupdate>true</createdirswhenupdate>
+ <recursivewhencommitremove>true</recursivewhencommitremove>
+ <revertoptions>-C</revertoptions>
+ </kdevcvsservice>
+</kdevelop>
diff --git a/quanta/quanta.lsm b/quanta/quanta.lsm
new file mode 100644
index 00000000..f67203cd
--- /dev/null
+++ b/quanta/quanta.lsm
@@ -0,0 +1,14 @@
+Begin3
+Title: Quanta
+Version: 3.5.9
+Entered-date: 2008-02-13
+Description: Powerful markup and script language editor for KDE3
+Keywords: HTML,JS,PHP,Embeded Preview,KDE,Quanta
+Author: Eric Laffoon & Andras Mantia <sequitur@kde.org,amantia@kde.org>; originally by Dmitry Poplavsky & Alexander Yakovlev <dima@kde.org,yshurik@kde.org>
+Maintained-by: Eric Laffoon & Andras Mantia <sequitur@kde.org,amantia@kde.org>
+Primary-site: http://kdewebdev.org
+Home-page: http://kdewebdev.org
+Original-site: http://kdewebdev.org
+Platforms: Linux and other Unices
+Copying-policy: GNU Public License
+End
diff --git a/quanta/quanta_uml.xmi b/quanta/quanta_uml.xmi
new file mode 100644
index 00000000..4dd81e39
--- /dev/null
+++ b/quanta/quanta_uml.xmi
@@ -0,0 +1,3425 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI xmlns:UML="org.omg/standards/UML" verified="false" timestamp="" xmi.version="1.2" >
+ <XMI.header>
+ <XMI.documentation>
+ <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+ <XMI.exporterVersion>1.1.5</XMI.exporterVersion>
+ </XMI.documentation>
+ <XMI.model xmi.name="quanta_uml" href="/home/andris/cvs-developement/head/quanta/quanta_uml.xmi" />
+ <XMI.metamodel xmi.name="UML" href="UML.xml" xmi.version="1.3" />
+ </XMI.header>
+ <XMI.content>
+ <docsettings viewid="1561" documentation="" uniqueid="1614" />
+ <umlobjects>
+ <UML:Class stereotype="" package="" xmi.id="74" abstract="0" documentation="This should contain a &quot;view&quot; of the document. This is not clearly implemented. The class contains a set of tabs, and each tab can hold one Document object. I think the tab (and such the MDI) handling should go to the QuantaApp class and here only the document view related things should be. Just as the Document/View model requests." name="QuantaView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="86" type="" abstract="0" documentation="" name="QuantaView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="87" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="88" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="89" type="void" abstract="0" documentation="" name="addWrite" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="90" value="" type="Document *" abstract="0" documentation="" name="w" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="91" value="" type="QString" abstract="0" documentation="" name="label" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="92" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="93" type="virtual void" abstract="0" documentation="" name="dragEnterEvent" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="94" value="" type="QDragEnterEvent *" abstract="0" documentation="" name="e" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="95" type="virtual void" abstract="0" documentation="" name="dropEvent" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="96" value="" type="QDropEvent *" abstract="0" documentation="" name="e" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="97" type="QTabWidget *" abstract="0" documentation="" name="getToolbarTab" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="98" type="void" abstract="0" documentation="" name="initActions" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="99" type="void" abstract="0" documentation="" name="initMenu" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="100" type="void" abstract="0" documentation="" name="insertNewTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="101" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="102" value="" type="QString" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="103" value="" type="bool" abstract="0" documentation="" name="insertInLine" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="104" type="void" abstract="0" documentation="" name="insertTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="105" value="" type="const char *" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="106" type="Document *" abstract="0" documentation="" name="removeWrite" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="107" type="void" abstract="0" documentation="" name="resizeEvent" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="108" value="" type="QResizeEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="109" type="Document *" abstract="0" documentation="" name="write" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="110" type="bool" abstract="0" documentation="" name="writeExists" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="111" type="" abstract="0" documentation="" name="~QuantaView" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="75" value="" type="bool" abstract="0" documentation="" name="beginOfScriptError" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="76" value="" type="bool" abstract="0" documentation="" name="beginOfScriptOutput" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="77" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="78" value="" type="QuantaDoc *" abstract="0" documentation="" name="doc" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="79" value="" type="QString" abstract="0" documentation="" name="dontShowSavePreview" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="80" value="" type="Document *" abstract="0" documentation="" name="oldWrite" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="81" value="" type="QString" abstract="0" documentation="" name="scriptErrorDest" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="82" value="" type="QString" abstract="0" documentation="" name="scriptOutputDest" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="83" value="" type="QString" abstract="0" documentation="" name="space" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="84" value="" type="QTabWidget *" abstract="0" documentation="" name="toolbarTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="85" value="" type="QTabWidget *" abstract="0" documentation="" name="writeTab" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="112" abstract="0" documentation="The main application class. This should react to the most user events and coordinate the other classes." name="QuantaApp" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="205" type="" abstract="0" documentation="Some initializations goes here." name="QuantaApp" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="206" type="QDomDocument *" abstract="0" documentation="" name="actions" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="207" type="bool" abstract="0" documentation="Returns true if the current DTD does not have any toolbars, or if all of the toolbars are removed or if the &quot;Shov DTD Toolbar&quot; is unchecked." name="allToolbarsHidden" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="208" type="QWidget *" abstract="0" documentation="" name="createContainer" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="209" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="210" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="211" value="" type="const QDomElement &amp;" abstract="0" documentation="" name="element" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="212" value="" type="int &amp;" abstract="0" documentation="" name="id" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="213" type="QString" abstract="0" documentation="Returns the project default encoding if a project is loaded, otherwise it returns the global default encoding." name="defaultEncoding" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="214" type="virtual void" abstract="0" documentation="Sets the focus to the editor window and checkes for changes in the edited file when the application gets back the focus." name="focusInEvent" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="215" value="" type="QFocusEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="216" type="QuantaDoc *" abstract="0" documentation="" name="getDoc" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="217" type="MessageOutput *" abstract="0" documentation="" name="getMessages" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="218" type="Project *" abstract="0" documentation="" name="getProject" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="219" type="QuantaView *" abstract="0" documentation="" name="getView" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="220" type="WHTMLPart *" abstract="0" documentation="" name="htmlPart" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="221" type="void" abstract="0" documentation="" name="initActions" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="222" type="void" abstract="0" documentation="" name="initDocument" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="223" type="void" abstract="0" documentation="" name="initPlugins" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="224" type="void" abstract="0" documentation="" name="initProject" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="225" type="void" abstract="0" documentation="" name="initQuanta" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="226" type="void" abstract="0" documentation="" name="initStatusBar" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="227" type="void" abstract="0" documentation="" name="initTagDict" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="228" type="void" abstract="0" documentation="" name="initView" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="229" type="void" abstract="0" documentation="" name="loadInitialProject" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="230" value="" type="QString" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="231" type="void" abstract="0" documentation="" name="loadToolbarForDTD" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="232" value="" type="const QString &amp;" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="233" type="QString" abstract="0" documentation="" name="newFileType" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="234" type="KDockWidget *" abstract="0" documentation="" name="outputDockWidget" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="235" type="QPopupMenu *" abstract="0" documentation="" name="pluginMenu" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="236" type="void" abstract="0" documentation="" name="processDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="237" value="" type="QString" abstract="0" documentation="" name="documentType" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="238" type="KURL" abstract="0" documentation="" name="projectBaseURL" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="239" type="virtual bool" abstract="0" documentation="" name="queryClose" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="240" type="void" abstract="0" documentation="" name="readOptions" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="241" type="void" abstract="0" documentation="" name="readTagDir" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="242" value="" type="QString &amp;" abstract="0" documentation="" name="dirName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="243" type="uint" abstract="0" documentation="" name="readTagFile" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="244" value="" type="QString" abstract="0" documentation="" name="fileName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="245" value="" type="DTDStruct *" abstract="0" documentation="" name="parentDTD" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="246" value="" type="QTagList *" abstract="0" documentation="" name="tagList" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="247" type="void" abstract="0" documentation="" name="removeContainer" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="248" value="" type="QWidget *" abstract="0" documentation="" name="container" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="249" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="250" value="" type="QDomElement &amp;" abstract="0" documentation="" name="element" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="251" value="" type="int" abstract="0" documentation="" name="id" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="252" type="void" abstract="0" documentation="" name="removeToolbar" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="253" value="" type="const QString &amp;" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="254" type="void" abstract="0" documentation="" name="saveAsTemplate" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="255" value="" type="bool" abstract="0" documentation="" name="projectTemplate" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="256" value="" type="bool" abstract="0" documentation="" name="selectionOnly" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="257" type="void" abstract="0" documentation="" name="saveModifiedToolbars" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="258" type="void" abstract="0" documentation="" name="saveOptions" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="259" type="KURL" abstract="0" documentation="" name="saveToolBar" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="260" value="" type="const QString &amp;" abstract="0" documentation="" name="toolbarName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="261" value="" type="const KURL &amp;" abstract="0" documentation="" name="destFile" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="262" type="void" abstract="0" documentation="" name="setAttributes" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="263" value="" type="QDomNode *" abstract="0" documentation="" name="dom" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="264" value="" type="QTag *" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="265" type="void" abstract="0" documentation="" name="showToolbarFile" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="266" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="267" type="QPopupMenu *" abstract="0" documentation="" name="tagsMenu" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="268" type="ToolbarEntry *" abstract="0" documentation="" name="toolbarByURL" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="269" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="270" type="QPopupMenu *" abstract="0" documentation="" name="toolbarMenu" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="271" value="" type="const QString &amp;" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="272" type="QWidgetStack *" abstract="0" documentation="" name="widgetStackOfHtmlPart" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="273" type="" abstract="0" documentation="" name="~QuantaApp" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="113" value="" type="KAction *" abstract="0" documentation="" name="bookmarkClear" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="114" value="" type="KAction *" abstract="0" documentation="" name="bookmarkToggle" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="115" value="" type="KDockWidget *" abstract="0" documentation="" name="bottdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="116" value="" type="QWidgetStack *" abstract="0" documentation="" name="bottomWidgetStack" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="117" value="" type="KAction *" abstract="0" documentation="" name="closeprjAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="118" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="119" value="" type="QString" abstract="0" documentation="" name="currentToolbarDTD" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="120" value="" type="DocTreeView *" abstract="0" documentation="" name="dTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="121" value="" type="PHP3Debugger *" abstract="0" documentation="" name="dbg3" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="122" value="" type="PHP4Debugger *" abstract="0" documentation="" name="dbg4" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="123" value="" type="QString" abstract="0" documentation="" name="debuggerStyle" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="124" value="" type="QuantaDoc *" abstract="0" documentation="" name="doc" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="125" value="" type="KDockWidget *" abstract="0" documentation="" name="dtabdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="126" value="" type="KAction *" abstract="0" documentation="" name="editRedo" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="127" value="" type="KAction *" abstract="0" documentation="" name="editTagAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="128" value="" type="KAction *" abstract="0" documentation="" name="editUndo" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="129" value="" type="bool" abstract="0" documentation="" name="exitingFlag" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="130" value="" type="FilesListView *" abstract="0" documentation="" name="fLTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="131" value="" type="FilesTreeView *" abstract="0" documentation="" name="fTTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="132" value="" type="QWidgetStack *" abstract="0" documentation="" name="fTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="133" value="" type="KRecentFilesAction *" abstract="0" documentation="" name="fileRecent" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="134" value="" type="KDockWidget *" abstract="0" documentation="" name="ftabdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="135" value="" type="GrepDialog *" abstract="0" documentation="" name="grepDialog" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="136" value="" type="WHTMLPart *" abstract="0" documentation="" name="htmlPartDoc" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="137" value="" type="WHTMLPart *" abstract="0" documentation="" name="htmlpart" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="138" value="" type="KAction *" abstract="0" documentation="" name="insertDirAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="139" value="" type="KAction *" abstract="0" documentation="" name="insertFileAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="140" value="" type="KDockWidget *" abstract="0" documentation="" name="leftdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="141" value="" type="QDomDocument *" abstract="0" documentation="" name="m_actions" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="142" value="" type="KDockWidget *" abstract="0" documentation="" name="m_oldTreeViewWidget" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="143" value="" type="QuantaPluginInterface *" abstract="0" documentation="" name="m_pluginInterface" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="144" value="" type="QPopupMenu *" abstract="0" documentation="" name="m_pluginMenu" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="145" value="" type="QPopupMenu *" abstract="0" documentation="" name="m_tagsMenu" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="146" value="" type="KDockWidget *" abstract="0" documentation="" name="maindock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="147" value="" type="QPtrList" abstract="0" documentation="" name="markList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="148" value="" type="MessageOutput *" abstract="0" documentation="" name="messageOutput" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="149" value="" type="KAction *" abstract="0" documentation="" name="newPrjAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="150" value="" type="KAction *" abstract="0" documentation="" name="openPrjAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="151" value="" type="KAction *" abstract="0" documentation="" name="openPrjViewAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="152" value="" type="ProjectTreeView *" abstract="0" documentation="" name="pTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="153" value="" type="int" abstract="0" documentation="" name="phpDebugPort" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="154" value="" type="QPopupMenu *" abstract="0" documentation="" name="pm_bookmark" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="155" value="" type="QPopupMenu *" abstract="0" documentation="" name="pm_set" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="156" value="" type="bool" abstract="0" documentation="" name="previewCopyMade" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="157" value="" type="KTempFile *" abstract="0" documentation="" name="previewTmpFile" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="158" value="" type="Project *" abstract="0" documentation="" name="project" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="159" value="" type="KAction *" abstract="0" documentation="" name="projectOptionAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="160" value="" type="KRecentFilesAction *" abstract="0" documentation="" name="projectToolbarFiles" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="161" value="" type="KDockWidget *" abstract="0" documentation="" name="ptabdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="162" value="" type="bool" abstract="0" documentation="" name="quantaStarted" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="163" value="" type="KAction *" abstract="0" documentation="" name="redoAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="164" value="" type="QTimer *" abstract="0" documentation="" name="refreshTimer" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="165" value="" type="KAction *" abstract="0" documentation="" name="rescanPrjDirAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="166" value="" type="QWidgetStack *" abstract="0" documentation="" name="rightWidgetStack" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="167" value="" type="StructTreeView *" abstract="0" documentation="" name="sTab" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="168" value="" type="KAction *" abstract="0" documentation="" name="saveAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="169" value="" type="KAction *" abstract="0" documentation="" name="saveAllAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="170" value="" type="KAction *" abstract="0" documentation="" name="saveAsLocalTemplateAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="171" value="" type="KAction *" abstract="0" documentation="" name="saveAsPrjViewAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="172" value="" type="KAction *" abstract="0" documentation="" name="saveAsProjectTemplateAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="173" value="" type="KAction *" abstract="0" documentation="" name="savePrjViewAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="174" value="" type="KAction *" abstract="0" documentation="" name="saveSelectionAsLocalTemplateAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="175" value="" type="KAction *" abstract="0" documentation="" name="saveSelectionAsProjectTemplateAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="176" value="" type="KAction *" abstract="0" documentation="" name="saveprjAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="177" value="" type="QString" abstract="0" documentation="" name="scriptBeginRxStr" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="178" value="" type="QString" abstract="0" documentation="" name="scriptEndRxStr" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="179" value="" type="KSelectAction *" abstract="0" documentation="" name="setEndOfLine" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="180" value="" type="KToggleAction *" abstract="0" documentation="" name="showDTDToolbar" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="181" value="" type="KToggleAction *" abstract="0" documentation="" name="showDTabAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="182" value="" type="KToggleAction *" abstract="0" documentation="" name="showFTabAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="183" value="" type="KToggleAction *" abstract="0" documentation="" name="showMessagesAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="184" value="" type="KToggleAction *" abstract="0" documentation="" name="showPTabAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="185" value="" type="KToggleAction *" abstract="0" documentation="" name="showPreviewAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="186" value="" type="KToggleAction *" abstract="0" documentation="" name="showSTabAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="187" value="" type="KToggleAction *" abstract="0" documentation="" name="showStatusbarAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="188" value="" type="KToggleAction *" abstract="0" documentation="" name="showTTabAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="189" value="" type="KToggleAction *" abstract="0" documentation="" name="showToolbarAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="190" value="" type="KToggleAction *" abstract="0" documentation="" name="showTreeAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="191" value="" type="SpellChecker *" abstract="0" documentation="" name="spellChecker" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="192" value="" type="KDockWidget *" abstract="0" documentation="" name="stabdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="193" value="" type="QTimer *" abstract="0" documentation="" name="statusbarTimer" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="194" value="" type="TemplatesTreeView *" abstract="0" documentation="" name="tTab" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="195" value="" type="QPtrList" abstract="0" documentation="" name="tempFileList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="196" value="" type="QDict" abstract="0" documentation="" name="toolbarList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="197" value="" type="KDockWidget *" abstract="0" documentation="" name="ttabdock" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="198" value="" type="KAction *" abstract="0" documentation="" name="undoAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="199" value="" type="KAction *" abstract="0" documentation="" name="uploadProjectAction" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="200" value="" type="uint" abstract="0" documentation="" name="userToolbarsCount" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="201" value="" type="QuantaView *" abstract="0" documentation="" name="view" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="202" value="" type="KToggleAction *" abstract="0" documentation="" name="viewBorder" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="203" value="" type="KToggleAction *" abstract="0" documentation="" name="viewDynamicWordWrap" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="204" value="" type="KToggleAction *" abstract="0" documentation="" name="viewLineNumbers" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="274" abstract="0" documentation="The document handling class. This is somewhat weird, as the Document class should handle all the document related things. The job is distrivute now between this the QuantaView and the QuantaApp class. This must be clearly seperated...
+See the operations in order to get a picture what's here." name="QuantaDoc" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="276" type="" abstract="0" documentation="" name="QuantaDoc" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="277" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="278" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="279" type="void" abstract="0" documentation="" name="changeFileTabName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="280" value="" type="KURL" abstract="0" documentation="" name="newURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="281" type="void" abstract="0" documentation="" name="closeDocument" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="282" type="bool" abstract="0" documentation="" name="isModified" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="283" type="bool" abstract="0" documentation="" name="isModifiedAll" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="284" type="Document *" abstract="0" documentation="" name="isOpened" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="285" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="286" type="bool" abstract="0" documentation="" name="newDocument" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="287" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="288" type="Document *" abstract="0" documentation="" name="newWrite" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="289" type="void" abstract="0" documentation="" name="nextDocument" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="290" type="void" abstract="0" documentation="" name="openDocument" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="291" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="292" value="" type="QString" abstract="0" documentation="" name="encoding" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="293" type="void" abstract="0" documentation="" name="prevDocument" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="294" type="void" abstract="0" documentation="" name="readConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="295" value="" type="KConfig *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="296" type="bool" abstract="0" documentation="" name="saveAll" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="297" value="" type="bool" abstract="0" documentation="" name="dont_ask" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="298" type="void" abstract="0" documentation="" name="saveDocument" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="299" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="300" type="bool" abstract="0" documentation="" name="saveModified" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="301" type="void" abstract="0" documentation="" name="setModified" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="302" value="" type="bool" abstract="0" documentation="" name="flag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="303" type="Document *" abstract="0" documentation="" name="write" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="304" type="void" abstract="0" documentation="" name="writeConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="305" value="" type="KConfig *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="306" type="" abstract="0" documentation="" name="~QuantaDoc" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="275" value="" type="KPopupMenu *" abstract="0" documentation="" name="attribMenu" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="307" abstract="0" documentation="Common static functions used everywhere in the code. " name="QuantaCommon" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="308" type="" abstract="0" documentation="" name="QuantaCommon" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="309" type="QString" abstract="0" documentation="" name="attrCase" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="310" value="" type="const QString" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="311" type="bool" abstract="0" documentation="" name="checkExactMimeType" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="312" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="313" value="" type="const QString &amp;" abstract="0" documentation="" name="type" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="314" type="bool" abstract="0" documentation="" name="checkMimeGroup" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="315" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="316" value="" type="const QString &amp;" abstract="0" documentation="" name="type" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="317" type="bool" abstract="0" documentation="" name="checkMimeType" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="318" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="319" value="" type="const QString &amp;" abstract="0" documentation="" name="type" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="320" type="KURL" abstract="0" documentation="" name="convertToPath" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="321" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="322" type="void" abstract="0" documentation="" name="dirCreationError" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="323" value="" type="QWidget *" abstract="0" documentation="" name="widget" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="324" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="325" type="QString" abstract="0" documentation="" name="getDTDNameFromNickName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="326" value="" type="QString" abstract="0" documentation="" name="nickName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="327" type="QString" abstract="0" documentation="" name="getDTDNickNameFromName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="328" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="329" type="QString" abstract="0" documentation="" name="i18n2normal" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="330" value="" type="const QString &amp;" abstract="0" documentation="" name="a_str" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="331" type="int" abstract="0" documentation="" name="isBetween" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="332" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="333" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="334" value="" type="int" abstract="0" documentation="" name="bLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="335" value="" type="int" abstract="0" documentation="" name="bCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="336" value="" type="int" abstract="0" documentation="" name="eLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="337" value="" type="int" abstract="0" documentation="" name="eCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="338" type="bool" abstract="0" documentation="" name="isKnownTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="339" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="340" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="341" type="bool" abstract="0" documentation="" name="isOptionalTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="342" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="343" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="344" type="bool" abstract="0" documentation="" name="isSingleTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="345" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="346" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="347" type="QString" abstract="0" documentation="" name="makeRxCompatible" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="348" value="" type="const QString" abstract="0" documentation="" name="s" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="349" type="KStandardDirs *" abstract="0" documentation="" name="pluginDirs" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="350" value="" type="const char *" abstract="0" documentation="" name="type" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="351" type="QString" abstract="0" documentation="" name="qUrl" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="352" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="353" type="void" abstract="0" documentation="" name="setUrl" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="354" value="" type="KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="355" value="" type="QString" abstract="0" documentation="" name="urlString" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="356" type="QStringList *" abstract="0" documentation="" name="tagAttributeValues" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="357" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="358" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="359" value="" type="QString" abstract="0" documentation="" name="attribute" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="360" type="AttributeList *" abstract="0" documentation="" name="tagAttributes" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="361" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="362" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="363" type="QString" abstract="0" documentation="" name="tagCase" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="364" value="" type="const QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="365" type="QTag *" abstract="0" documentation="" name="tagFromDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="366" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="367" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="368" type="QTag *" abstract="0" documentation="" name="tagFromDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="369" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="370" value="" type="QString" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="371" type="QString" abstract="0" documentation="" name="xmlFromAttributes" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="372" value="" type="AttributeList *" abstract="0" documentation="" name="attributes" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="373" type="" abstract="0" documentation="" name="~QuantaCommon" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="374" abstract="0" documentation="Common, file-operation related static functions." name="QExtFileInfo" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="379" type="" abstract="0" documentation="" name="QExtFileInfo" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="380" type="KURL" abstract="0" documentation="" name="cdUp" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="381" value="" type="const KURL &amp;" abstract="0" documentation="" name="dir" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="382" type="bool" abstract="0" documentation="" name="createDir" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="383" value="" type="const KURL &amp;" abstract="0" documentation="" name="path" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="384" type="void" abstract="0" documentation="" name="enter_loop" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="385" type="bool" abstract="0" documentation="" name="exists" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="386" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="387" type="KURL" abstract="0" documentation="" name="home" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="388" type="bool" abstract="0" documentation="" name="internalExists" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="389" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="390" type="KURL" abstract="0" documentation="" name="path" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="391" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="392" type="QString" abstract="0" documentation="" name="shortName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="393" value="" type="const QString &amp;" abstract="0" documentation="" name="fname" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="394" type="KURL" abstract="0" documentation="" name="toAbsolute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="395" value="" type="const KURL &amp;" abstract="0" documentation="" name="urlToConvert" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="396" value="" type="const KURL &amp;" abstract="0" documentation="" name="baseURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="397" type="KURL" abstract="0" documentation="" name="toRelative" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="398" value="" type="const KURL &amp;" abstract="0" documentation="" name="urlToConvert" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="399" value="" type="const KURL &amp;" abstract="0" documentation="" name="baseURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="400" type="" abstract="0" documentation="" name="~QExtFileInfo" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="375" value="" type="bool" abstract="0" documentation="" name="bJobOK" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="376" value="" type="QString" abstract="0" documentation="" name="lastErrorMsg" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="377" value="" type="QPtrList" abstract="0" documentation="" name="lstFilters" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="378" value="" type="QTimer *" abstract="0" documentation="" name="timer" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="401" abstract="0" documentation="Contains the common initialization part, as argument handling, splash screen display and so. It is used both when Quanta is started with --unique switch, or when it is started normally." name="KQApplicationPrivate" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="404" type="" abstract="0" documentation="" name="KQApplicationPrivate" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="405" type="void" abstract="0" documentation="" name="init" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="406" type="" abstract="0" documentation="" name="~KQApplicationPrivate" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="402" value="" type="KCmdLineArgs *" abstract="0" documentation="" name="args" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="403" value="" type="KSplash *" abstract="0" documentation="" name="splash" static="0" scope="202" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="407" abstract="0" documentation="The class for a document. This is the editor widget, which contains the KTextEditor KPart and other editor related functions, such code completion, text inserting and so." name="Document" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="426" type="" abstract="0" documentation="" name="Document" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="427" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_baseURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="428" value="" type="KTextEditor :: Document *" abstract="0" documentation="" name="doc" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="429" value="" type="Project *" abstract="0" documentation="" name="project" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="430" value="" type="QuantaPluginInterface *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="431" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="432" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="433" value="" type="WFlags" abstract="0" documentation="" name="f" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="434" type="void" abstract="0" documentation="" name="changeTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="435" value="" type="Tag *" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="436" value="" type="QDict &lt; QString > *" abstract="0" documentation="" name="dict" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="437" type="void" abstract="0" documentation="" name="checkDirtyStatus" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="438" type="int" abstract="0" documentation="" name="checkOverwrite" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="439" value="" type="KURL" abstract="0" documentation="" name="u" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="440" type="void" abstract="0" documentation="" name="clearTempFile" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="441" type="int" abstract="0" documentation="" name="closeTempFile" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="442" type="void" abstract="0" documentation="" name="codeCompletionHintRequested" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="443" type="void" abstract="0" documentation="" name="codeCompletionRequested" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="444" type="int" abstract="0" documentation="" name="createTempFile" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="445" type="DTDStruct *" abstract="0" documentation="" name="currentDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="446" value="" type="bool" abstract="0" documentation="" name="fallback" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="447" type="DTDStruct *" abstract="0" documentation="" name="defaultDTD" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="448" type="bool" abstract="0" documentation="" name="dirty" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="449" type="bool" abstract="0" documentation="" name="evenQuotes" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="450" value="" type="const QString &amp;" abstract="0" documentation="" name="text" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="451" type="QString" abstract="0" documentation="" name="find" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="452" value="" type="const QRegExp &amp;" abstract="0" documentation="" name="rx" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="453" value="" type="int" abstract="0" documentation="" name="sLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="454" value="" type="int" abstract="0" documentation="" name="sCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="455" value="" type="int &amp;" abstract="0" documentation="" name="fbLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="456" value="" type="int &amp;" abstract="0" documentation="" name="fbCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="457" value="" type="int &amp;" abstract="0" documentation="" name="feLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="458" value="" type="int &amp;" abstract="0" documentation="" name="feCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="459" type="QString" abstract="0" documentation="" name="findDTDName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="460" value="" type="Tag * *" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="461" type="QString" abstract="0" documentation="" name="findRev" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="462" value="" type="const QRegExp &amp;" abstract="0" documentation="" name="rx" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="463" value="" type="int" abstract="0" documentation="" name="sLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="464" value="" type="int" abstract="0" documentation="" name="sCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="465" value="" type="int &amp;" abstract="0" documentation="" name="fbLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="466" value="" type="int &amp;" abstract="0" documentation="" name="fbCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="467" value="" type="int &amp;" abstract="0" documentation="" name="feLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="468" value="" type="int &amp;" abstract="0" documentation="" name="feCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="469" type="QString" abstract="0" documentation="" name="findWordRev" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="470" value="" type="const QString &amp;" abstract="0" documentation="" name="textToSearch" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="471" type="Tag *" abstract="0" documentation="" name="findXMLTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="472" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="473" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="474" value="" type="bool" abstract="0" documentation="" name="forwardOnly" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="475" value="" type="bool" abstract="0" documentation="" name="useSimpleRx" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="476" type="QValueList *" abstract="0" documentation="" name="getAttributeCompletions" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="477" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="478" value="" type="QString" abstract="0" documentation="" name="tagName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="479" value="" type="QString" abstract="0" documentation="" name="startsWith" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="480" type="QValueList *" abstract="0" documentation="" name="getAttributeValueCompletions" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="481" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="482" value="" type="QString" abstract="0" documentation="" name="tagName" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="483" value="" type="QString" abstract="0" documentation="" name="attribute" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="484" value="" type="QString" abstract="0" documentation="" name="startsWith" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="485" type="QValueList *" abstract="0" documentation="" name="getCharacterCompletions" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="486" type="QString" abstract="0" documentation="" name="getDTDIdentifier" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="487" type="QPoint" abstract="0" documentation="" name="getGlobalCursorPos" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="488" type="QValueList *" abstract="0" documentation="" name="getTagCompletions" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="489" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="490" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="491" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="492" type="QString" abstract="0" documentation="" name="getTagNameAt" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="493" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="494" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="495" type="QValueList *" abstract="0" documentation="" name="getVariableCompletions" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="496" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="497" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="498" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="499" type="void" abstract="0" documentation="" name="insertFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="500" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="501" type="void" abstract="0" documentation="" name="insertTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="502" value="" type="QString" abstract="0" documentation="" name="s1" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="503" value="" type="QString" abstract="0" documentation="" name="s2" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="504" type="void" abstract="0" documentation="" name="insertText" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="505" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="506" value="" type="bool" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="507" type="bool" abstract="0" documentation="" name="isModified" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="508" type="bool" abstract="0" documentation="" name="isUntitled" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="509" type="void" abstract="0" documentation="" name="parseVariables" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="510" type="QString" abstract="0" documentation="" name="parsingDTD" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="511" type="void" abstract="0" documentation="" name="readConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="512" value="" type="KConfig *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="513" type="void" abstract="0" documentation="" name="replaceSelected" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="514" value="" type="QString" abstract="0" documentation="" name="s" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="515" type="void" abstract="0" documentation="" name="resizeEvent" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="516" value="" type="QResizeEvent *" abstract="0" documentation="" name="e" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="517" type="void" abstract="0" documentation="" name="save" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="518" type="bool" abstract="0" documentation="" name="saveIt" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="519" type="bool" abstract="0" documentation="" name="scriptAutoCompletion" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="520" value="" type="DTDStruct *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="521" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="522" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="523" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="524" type="bool" abstract="0" documentation="" name="scriptCodeCompletion" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="525" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="526" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="527" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="528" type="void" abstract="0" documentation="" name="selectText" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="529" value="" type="int" abstract="0" documentation="" name="x1" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="530" value="" type="int" abstract="0" documentation="" name="y1" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="531" value="" type="int" abstract="0" documentation="" name="x2" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="532" value="" type="int" abstract="0" documentation="" name="y2" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="533" type="void" abstract="0" documentation="" name="setDTDIdentifier" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="534" value="" type="QString" abstract="0" documentation="" name="id" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="535" type="void" abstract="0" documentation="" name="setDirtyStatus" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="536" value="" type="bool" abstract="0" documentation="" name="status" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="537" type="void" abstract="0" documentation="" name="setModified" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="538" value="" type="bool" abstract="0" documentation="" name="flag" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="539" type="void" abstract="0" documentation="" name="setParsingDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="540" value="" type="const QString &amp;" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="541" type="void" abstract="0" documentation="" name="setUntitledUrl" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="542" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="543" type="void" abstract="0" documentation="" name="showCodeCompletions" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="544" value="" type="QValueList &lt; KTextEditor :: CompletionEntry > *" abstract="0" documentation="" name="completions" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="545" type="QString" abstract="0" documentation="" name="tempFileName" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="546" type="QString" abstract="0" documentation="" name="text" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="547" value="" type="int" abstract="0" documentation="" name="bLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="548" value="" type="int" abstract="0" documentation="" name="bCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="549" value="" type="int" abstract="0" documentation="" name="eLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="550" value="" type="int" abstract="0" documentation="" name="eCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="551" type="KURL" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="552" type="void" abstract="0" documentation="" name="writeConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="553" value="" type="KConfig *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="554" type="bool" abstract="0" documentation="" name="xmlAutoCompletion" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="555" value="" type="DTDStruct *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="556" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="557" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="558" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="559" type="bool" abstract="0" documentation="" name="xmlCodeCompletion" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="560" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="561" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="562" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="563" type="" abstract="0" documentation="" name="~Document" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="408" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="409" value="" type="bool" abstract="0" documentation="" name="busy" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="410" value="" type="bool" abstract="0" documentation="" name="completionInProgress" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="411" value="" type="QString" abstract="0" documentation="" name="dtdName" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="412" value="" type="QStringList" abstract="0" documentation="" name="includeList" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="413" value="" type="bool" abstract="0" documentation="" name="m_dirty" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="414" value="" type="QString" abstract="0" documentation="" name="m_parsingDTD" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="415" value="" type="QuantaPluginInterface *" abstract="0" documentation="" name="m_pluginInterface" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="416" value="" type="Project *" abstract="0" documentation="" name="m_project" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="417" value="" type="QString" abstract="0" documentation="" name="m_tempFileName" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="418" value="" type="bool" abstract="0" documentation="" name="oldstat" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="419" value="" type="int" abstract="0" documentation="" name="spellMoved" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="420" value="" type="QValueList *" abstract="0" documentation="" name="spellPos" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="421" value="" type="QString" abstract="0" documentation="" name="spellText" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="422" value="" type="KTempFile *" abstract="0" documentation="" name="tempFile" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="423" value="" type="QString" abstract="0" documentation="" name="untitledUrl" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="424" value="" type="QTagList" abstract="0" documentation="" name="userTagList" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="425" value="" type="QStringList" abstract="0" documentation="" name="variableList" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="564" abstract="0" documentation="" name="KQApplication" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="565" type="" abstract="0" documentation="" name="KQApplication" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="566" type="" abstract="0" documentation="" name="~KQApplication" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="567" abstract="0" documentation="" name="KQUniqueApplication" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="568" type="" abstract="0" documentation="" name="KQUniqueApplication" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="569" type="int" abstract="0" documentation="" name="newInstance" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="570" type="" abstract="0" documentation="" name="~KQUniqueApplication" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="571" abstract="0" documentation="" name="KSplash" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="572" type="" abstract="0" documentation="" name="KSplash" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="573" type="" abstract="0" documentation="" name="~KSplash" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="574" abstract="0" documentation="" name="Node" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="583" type="" abstract="0" documentation="" name="Node" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="584" value="" type="Node *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="585" type="" abstract="0" documentation="" name="~Node" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="575" value="" type="Node *" abstract="0" documentation="" name="child" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="576" value="" type="QListViewItem *" abstract="0" documentation="" name="listItem" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="577" value="" type="Node *" abstract="0" documentation="" name="next" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="578" value="" type="bool" abstract="0" documentation="" name="opened" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="579" value="" type="Node *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="580" value="" type="Node *" abstract="0" documentation="" name="prev" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="581" value="" type="bool" abstract="0" documentation="" name="removeAll" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="582" value="" type="Tag *" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="586" abstract="0" documentation="" name="Tag" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="602" type="Tag" abstract="0" documentation="" name="=" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="603" value="" type="const Tag &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="604" type="" abstract="0" documentation="" name="Tag" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="605" type="" abstract="0" documentation="" name="Tag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="606" value="" type="const Tag &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="607" type="QString" abstract="0" documentation="" name="attribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="608" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="609" type="int" abstract="0" documentation="" name="attributeIndex" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="610" value="" type="QString" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="611" type="int" abstract="0" documentation="" name="attributeIndexAtPos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="612" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="613" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="614" type="void" abstract="0" documentation="" name="attributeNamePos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="615" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="616" value="" type="int &amp;" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="617" value="" type="int &amp;" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="618" type="QString" abstract="0" documentation="" name="attributeValue" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="619" value="" type="QString" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="620" type="QString" abstract="0" documentation="" name="attributeValue" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="621" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="622" type="void" abstract="0" documentation="" name="attributeValuePos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="623" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="624" value="" type="int &amp;" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="625" value="" type="int &amp;" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="626" type="void" abstract="0" documentation="" name="beginPos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="627" value="" type="int &amp;" abstract="0" documentation="" name="bLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="628" value="" type="int &amp;" abstract="0" documentation="" name="bCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="629" type="void" abstract="0" documentation="" name="endPos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="630" value="" type="int &amp;" abstract="0" documentation="" name="eLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="631" value="" type="int &amp;" abstract="0" documentation="" name="eCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="632" type="bool" abstract="0" documentation="" name="hasAttribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="633" value="" type="const QString &amp;" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="634" type="bool" abstract="0" documentation="" name="isQuotedAttribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="635" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="636" type="void" abstract="0" documentation="" name="parse" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="637" value="" type="const QString &amp;" abstract="0" documentation="" name="p_tagStr" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="638" value="" type="Document *" abstract="0" documentation="" name="p_write" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="639" type="void" abstract="0" documentation="" name="parseAttr" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="640" value="" type="QString" abstract="0" documentation="" name="text" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="641" value="" type="int &amp;" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="642" value="" type="int &amp;" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="643" type="void" abstract="0" documentation="" name="setStr" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="644" value="" type="const QString &amp;" abstract="0" documentation="" name="p_tagStr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="645" type="void" abstract="0" documentation="" name="setTagPosition" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="646" value="" type="int" abstract="0" documentation="" name="bLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="647" value="" type="int" abstract="0" documentation="" name="bCol" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="648" value="" type="int" abstract="0" documentation="" name="eLine" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="649" value="" type="int" abstract="0" documentation="" name="eCol" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="650" type="void" abstract="0" documentation="" name="setWrite" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="651" value="" type="Document *" abstract="0" documentation="" name="p_write" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="652" type="QString" abstract="0" documentation="" name="tagStr" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="653" type="int" abstract="0" documentation="" name="valueIndexAtPos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="654" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="655" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="656" type="Document *" abstract="0" documentation="" name="write" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="657" type="" abstract="0" documentation="" name="~Tag" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="587" value="" type="int" abstract="0" documentation="" name="attrCount" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="588" value="" type="TagAttr []" abstract="0" documentation="" name="attrs" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="589" value="" type="int" abstract="0" documentation="" name="beginCol" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="590" value="" type="int" abstract="0" documentation="" name="beginLine" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="591" value="" type="QString" abstract="0" documentation="" name="cleanStr" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="592" value="" type="bool" abstract="0" documentation="" name="closingMissing" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="593" value="" type="DTDStruct *" abstract="0" documentation="" name="dtd" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="594" value="" type="int" abstract="0" documentation="" name="endCol" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="595" value="" type="int" abstract="0" documentation="" name="endLine" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="596" value="" type="QString" abstract="0" documentation="" name="m_tagStr" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="597" value="" type="Document *" abstract="0" documentation="" name="m_write" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="598" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="599" value="" type="bool" abstract="0" documentation="" name="single" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="600" value="" type="QString" abstract="0" documentation="" name="structBeginStr" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="601" value="" type="int" abstract="0" documentation="" name="type" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="658" abstract="0" documentation="" name="QTag" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="669" type="QTag" abstract="0" documentation="" name="=" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="670" value="" type="QTag &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="671" type="" abstract="0" documentation="" name="QTag" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="672" type="" abstract="0" documentation="" name="QTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="673" value="" type="QTag &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="674" type="void" abstract="0" documentation="" name="addAttribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="675" value="" type="Attribute *" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="676" type="Attribute *" abstract="0" documentation="" name="attribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="677" value="" type="QString &amp;" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="678" type="Attribute *" abstract="0" documentation="" name="attributeAt" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="679" value="" type="int" abstract="0" documentation="" name="index" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="680" type="int" abstract="0" documentation="" name="attributeCount" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="681" type="AttributeList *" abstract="0" documentation="" name="attributes" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="682" type="QString" abstract="0" documentation="" name="fileName" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="683" type="bool" abstract="0" documentation="" name="isOptional" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="684" type="bool" abstract="0" documentation="" name="isSingle" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="685" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="686" type="void" abstract="0" documentation="" name="setFileName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="687" value="" type="QString &amp;" abstract="0" documentation="" name="fileName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="688" type="void" abstract="0" documentation="" name="setName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="689" value="" type="const QString &amp;" abstract="0" documentation="" name="theName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="690" type="void" abstract="0" documentation="" name="setOptional" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="691" value="" type="bool" abstract="0" documentation="" name="isOptional" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="692" type="void" abstract="0" documentation="" name="setSingle" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="693" value="" type="bool" abstract="0" documentation="" name="isSingle" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="694" type="" abstract="0" documentation="" name="~QTag" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="659" value="" type="AttributeList" abstract="0" documentation="" name="attrs" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="660" value="" type="QStringList" abstract="0" documentation="" name="commonGroups" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="661" value="" type="QString" abstract="0" documentation="" name="m_fileName" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="662" value="" type="bool" abstract="0" documentation="" name="optional" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="663" value="" type="DTDStruct *" abstract="0" documentation="" name="parentDTD" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="664" value="" type="QString" abstract="0" documentation="" name="returnType" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="665" value="" type="bool" abstract="0" documentation="" name="single" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="666" value="" type="QStringList" abstract="0" documentation="" name="stoppingTags" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="667" value="" type="QString" abstract="0" documentation="" name="tagName" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="668" value="" type="QString" abstract="0" documentation="" name="type" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="695" abstract="0" documentation="" name="Parser" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="704" type="" abstract="0" documentation="" name="Parser" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="705" type="void" abstract="0" documentation="" name="clear" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="706" type="void" abstract="0" documentation="" name="coutTree" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="707" value="" type="Node *" abstract="0" documentation="" name="node" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="708" value="" type="int" abstract="0" documentation="" name="indent" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="709" type="DTDStruct *" abstract="0" documentation="" name="currentDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="710" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="711" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="712" type="Node *" abstract="0" documentation="" name="nodeAt" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="713" value="" type="int" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="714" value="" type="int" abstract="0" documentation="" name="col" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="715" value="" type="bool" abstract="0" documentation="" name="findDeepest" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="716" type="Node *" abstract="0" documentation="" name="parse" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="717" value="" type="Document *" abstract="0" documentation="" name="w" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="718" type="Node *" abstract="0" documentation="" name="rebuild" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="719" value="" type="Document *" abstract="0" documentation="" name="w" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="720" type="bool" abstract="0" documentation="" name="scriptParser" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="721" value="" type="Node *" abstract="0" documentation="" name="startNode" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="722" type="void" abstract="0" documentation="" name="specialAreaParser" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="723" value="" type="Node *" abstract="0" documentation="" name="startNode" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="724" type="" abstract="0" documentation="" name="~Parser" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="696" value="" type="QValueList" abstract="0" documentation="" name="dtdList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="697" value="" type="DTDStruct *" abstract="0" documentation="" name="m_dtd" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="698" value="" type="QString" abstract="0" documentation="" name="m_dtdName" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="699" value="" type="Node *" abstract="0" documentation="" name="m_node" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="700" value="" type="QString" abstract="0" documentation="" name="m_text" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="701" value="" type="int" abstract="0" documentation="" name="maxLines" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="702" value="" type="int" abstract="0" documentation="" name="oldMaxLines" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="703" value="" type="Document *" abstract="0" documentation="" name="write" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="725" abstract="0" documentation="" name="QuantaCmdPlugin" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="728" type="" abstract="0" documentation="" name="QuantaCmdPlugin" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="729" type="virtual bool" abstract="0" documentation="" name="isLoaded" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="730" type="virtual bool" abstract="0" documentation="" name="load" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="731" type="QString" abstract="0" documentation="" name="makeQString" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="732" value="" type="const char *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="733" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="734" type="virtual bool" abstract="0" documentation="" name="run" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="735" type="virtual bool" abstract="0" documentation="" name="toggle" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="736" type="virtual bool" abstract="0" documentation="" name="unload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="737" type="" abstract="0" documentation="" name="~QuantaCmdPlugin" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="726" value="" type="bool" abstract="0" documentation="" name="m_firstOutput" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="727" value="" type="KProcess *" abstract="0" documentation="" name="m_process" static="0" scope="202" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="738" abstract="0" documentation="" name="PluginEditorItem" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="739" type="" abstract="0" documentation="" name="PluginEditorItem" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="740" value="" type="QListView *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="741" type="virtual void" abstract="0" documentation="" name="paintCell" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="742" value="" type="QPainter *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="743" value="" type="const QColorGroup &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="744" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="745" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="746" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="747" abstract="0" documentation="Editor for the plugins that manages configuration" name="QuantaPluginEditor" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="749" type="" abstract="0" documentation="" name="QuantaPluginEditor" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="750" value="" type="QWidget *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="751" value="" type="const char *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="752" type="QDict" abstract="0" documentation="" name="plugins" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="753" type="QStringList" abstract="0" documentation="" name="searchPathList" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="754" type="void" abstract="0" documentation="" name="setSearchPaths" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="755" value="" type="const QStringList &amp;" abstract="0" documentation="" name="paths" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="756" type="" abstract="0" documentation="" name="~QuantaPluginEditor" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="748" value="" type="QDict" abstract="0" documentation="" name="m_plugins" static="0" scope="202" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="757" abstract="0" documentation="" name="CervisiaPlugin" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="758" type="" abstract="0" documentation="" name="CervisiaPlugin" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="759" type="virtual bool" abstract="0" documentation="" name="run" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="760" type="virtual bool" abstract="0" documentation="" name="unload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="761" type="" abstract="0" documentation="" name="~CervisiaPlugin" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="762" abstract="0" documentation="Dialog to configure a plugin's options" name="QuantaPluginConfig" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="763" type="" abstract="0" documentation="" name="QuantaPluginConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="764" value="" type="QWidget *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="765" value="" type="const char *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="766" type="" abstract="0" documentation="" name="~QuantaPluginConfig" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="767" abstract="0" documentation="This class handles the spellchecking. It should work with all KTextEditor's, not only Kate.
+ This is not a real plugin. The code is based on SpellPlugin for Kate." name="SpellChecker" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="771" type="" abstract="0" documentation="" name="SpellChecker" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="772" value="" type="QObject *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="773" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="774" type="void" abstract="0" documentation="" name="locatePosition" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="775" value="" type="uint" abstract="0" documentation="" name="pos" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="776" value="" type="uint &amp;" abstract="0" documentation="" name="line" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="777" value="" type="uint &amp;" abstract="0" documentation="" name="col" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="778" type="void" abstract="0" documentation="" name="readConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="779" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="780" type="void" abstract="0" documentation="" name="spellCheck" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="781" value="" type="KTextEditor :: Document *" abstract="0" documentation="" name="document" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="782" type="void" abstract="0" documentation="" name="writeConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="783" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="784" type="" abstract="0" documentation="" name="~SpellChecker" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="768" value="" type="KSpell *" abstract="0" documentation="" name="m_kspell" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="769" value="" type="int" abstract="0" documentation="" name="m_mispellCount" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="770" value="" type="int" abstract="0" documentation="" name="m_replaceCount" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="785" abstract="0" documentation="" name="QuantaKPartPlugin" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="786" type="" abstract="0" documentation="" name="QuantaKPartPlugin" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="787" type="virtual bool" abstract="0" documentation="" name="isLoaded" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="788" type="virtual bool" abstract="0" documentation="" name="load" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="789" type="virtual bool" abstract="0" documentation="" name="run" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="790" type="virtual bool" abstract="0" documentation="" name="toggle" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="791" type="virtual bool" abstract="0" documentation="" name="unload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="792" type="" abstract="0" documentation="" name="~QuantaKPartPlugin" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="793" abstract="0" documentation="" name="QuantaPlugin" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="805" type="" abstract="0" documentation="" name="QuantaPlugin" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="806" type="" abstract="0" documentation="" name="QuantaPlugin" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="807" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="808" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="809" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="810" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="811" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="812" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="813" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="814" type="virtual QString" abstract="0" documentation="" name="arguments" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="815" type="virtual QString" abstract="0" documentation="" name="fileName" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="816" type="virtual bool" abstract="0" documentation="" name="isLoaded" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="817" type="virtual bool" abstract="0" documentation="" name="isRunning" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="818" type="virtual bool" abstract="0" documentation="" name="isStandard" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="819" type="virtual bool" abstract="0" documentation="" name="load" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="820" type="virtual QString" abstract="0" documentation="" name="location" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="821" type="virtual QString" abstract="0" documentation="" name="outputWindow" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="822" type="virtual QString" abstract="0" documentation="" name="pluginName" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="823" type="virtual bool" abstract="0" documentation="" name="run" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="824" type="virtual void" abstract="0" documentation="" name="setArguments" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="825" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="826" type="virtual void" abstract="0" documentation="" name="setFileName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="827" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="828" type="virtual void" abstract="0" documentation="" name="setLocation" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="829" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="830" type="virtual void" abstract="0" documentation="" name="setOutputWindow" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="831" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="832" type="virtual void" abstract="0" documentation="" name="setPluginName" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="833" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="834" type="virtual void" abstract="0" documentation="" name="setRunning" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="835" value="" type="bool" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="836" type="virtual void" abstract="0" documentation="" name="setStandard" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="837" value="" type="bool" abstract="0" documentation="" name="isStandard" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="838" type="virtual void" abstract="0" documentation="" name="setType" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="839" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="840" type="virtual bool" abstract="0" documentation="" name="toggle" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="841" type="virtual QString" abstract="0" documentation="" name="type" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="842" type="virtual bool" abstract="0" documentation="" name="unload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="843" type="bool" abstract="0" documentation="" name="validatePlugin" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="844" value="" type="QuantaPlugin *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="845" type="bool" abstract="0" documentation="" name="validatePluginInfo" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="846" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="847" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="848" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="849" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="850" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="851" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="852" type="" abstract="0" documentation="" name="~QuantaPlugin" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="794" value="" type="KToggleAction *" abstract="0" documentation="" name="m_action" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="795" value="" type="QString" abstract="0" documentation="" name="m_arguments" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="796" value="" type="QString" abstract="0" documentation="" name="m_fileName" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="797" value="" type="QString" abstract="0" documentation="" name="m_icon" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="798" value="" type="bool" abstract="0" documentation="" name="m_isRunning" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="799" value="" type="QString" abstract="0" documentation="" name="m_location" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="800" value="" type="QString" abstract="0" documentation="" name="m_name" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="801" value="" type="QString" abstract="0" documentation="" name="m_outputWindow" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="802" value="" type="bool" abstract="0" documentation="" name="m_standard" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="803" value="" type="QString" abstract="0" documentation="" name="m_standardName" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="804" value="" type="QString" abstract="0" documentation="" name="m_type" static="0" scope="202" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="853" abstract="0" documentation="Provides an interface to the installed plugins. " name="QuantaPluginInterface" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="856" type="" abstract="0" documentation="" name="QuantaPluginInterface" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="857" type="QStringList" abstract="0" documentation="" name="outputWindows" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="858" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="859" type="virtual QuantaPlugin *" abstract="0" documentation="" name="plugin" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="860" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="861" type="bool" abstract="0" documentation="" name="pluginAvailable" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="862" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="863" type="virtual QStringList" abstract="0" documentation="" name="pluginNames" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="864" type="QStringList" abstract="0" documentation="" name="pluginTypes" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="865" type="QDict" abstract="0" documentation="" name="plugins" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="866" type="virtual void" abstract="0" documentation="" name="readConfig" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="867" type="virtual QStringList" abstract="0" documentation="" name="searchPaths" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="868" type="virtual void" abstract="0" documentation="" name="setPluginNames" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="869" value="" type="QStringList" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="870" type="void" abstract="0" documentation="" name="setPlugins" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="871" value="" type="QDict &lt; QuantaPlugin >" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="872" type="virtual void" abstract="0" documentation="" name="setSearchPaths" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="873" value="" type="QStringList" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="874" type="virtual void" abstract="0" documentation="" name="writeConfig" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="875" type="" abstract="0" documentation="" name="~QuantaPluginInterface" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="854" value="" type="QStringList" abstract="0" documentation="" name="m_pluginNames" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="855" value="" type="QDict" abstract="0" documentation="" name="m_plugins" static="0" scope="202" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="876" abstract="0" documentation="" name="Project" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="907" type="" abstract="0" documentation="" name="Project" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="908" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="909" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="910" type="bool" abstract="0" documentation="" name="createEmptyDom" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="911" type="virtual const QString &amp;" abstract="0" documentation="" name="defaultDTD" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="912" type="virtual const QString &amp;" abstract="0" documentation="" name="defaultEncoding" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="913" type="bool" abstract="0" documentation="" name="hasProject" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="914" type="void" abstract="0" documentation="" name="insertFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="915" value="" type="const KURL &amp;" abstract="0" documentation="" name="nameURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="916" value="" type="bool" abstract="0" documentation="" name="repaint" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="917" type="void" abstract="0" documentation="" name="insertFiles" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="918" value="" type="KURL :: List" abstract="0" documentation="" name="files" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="919" type="void" abstract="0" documentation="" name="insertFiles" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="920" value="" type="const KURL &amp;" abstract="0" documentation="" name="pathURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="921" value="" type="const QString &amp;" abstract="0" documentation="" name="mask" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="922" type="bool" abstract="0" documentation="" name="isModified" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="923" type="void" abstract="0" documentation="" name="loadProjectXML" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="924" type="virtual const QString &amp;" abstract="0" documentation="" name="newFileType" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="925" type="void" abstract="0" documentation="" name="openCurrentView" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="926" type="void" abstract="0" documentation="" name="readConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="927" value="" type="KConfig *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="928" type="void" abstract="0" documentation="" name="readLastConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="929" value="" type="KConfig *" abstract="0" documentation="" name="c" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="930" type="virtual void" abstract="0" documentation="" name="setDefaultDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="931" value="" type="const QString &amp;" abstract="0" documentation="" name="p_defaultDTD" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="932" type="KURL" abstract="0" documentation="" name="urlWithPrefix" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="933" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="934" type="void" abstract="0" documentation="" name="writeConfig" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="935" value="" type="KConfig *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="936" type="" abstract="0" documentation="" name="~Project" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="877" value="" type="QString" abstract="0" documentation="" name="author" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="878" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="879" value="" type="QBuffer" abstract="0" documentation="" name="buff" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="880" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="881" value="" type="QString" abstract="0" documentation="" name="currentProjectView" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="882" value="" type="QDomDocument" abstract="0" documentation="" name="dom" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="883" value="" type="QString" abstract="0" documentation="" name="email" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="884" value="" type="bool" abstract="0" documentation="" name="keepPasswd" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="885" value="" type="QString" abstract="0" documentation="" name="m_defaultDTD" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="886" value="" type="QString" abstract="0" documentation="" name="m_defaultEncoding" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="887" value="" type="QString" abstract="0" documentation="" name="m_newFileType" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="888" value="" type="bool" abstract="0" documentation="" name="modified" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="889" value="" type="KURL" abstract="0" documentation="" name="newURL" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="890" value="" type="KURL" abstract="0" documentation="" name="oldURL" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="891" value="" type="bool" abstract="0" documentation="" name="olfwprj" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="892" value="" type="QString" abstract="0" documentation="" name="passwd" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="893" value="" type="ProjectNewFinal *" abstract="0" documentation="" name="pnf" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="894" value="" type="ProjectNewGeneral *" abstract="0" documentation="" name="png" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="895" value="" type="ProjectNewLocal *" abstract="0" documentation="" name="pnl" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="896" value="" type="ProjectNewWeb *" abstract="0" documentation="" name="pnw" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="897" value="" type="KURL" abstract="0" documentation="" name="previewPrefix" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="898" value="" type="QString" abstract="0" documentation="" name="projectName" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="899" value="" type="KRecentFilesAction *" abstract="0" documentation="" name="projectRecent" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="900" value="" type="KURL" abstract="0" documentation="" name="projectURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="901" value="" type="KURL" abstract="0" documentation="" name="remoteDir" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="902" value="" type="QWidgetStack *" abstract="0" documentation="" name="stack" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="903" value="" type="KURL" abstract="0" documentation="" name="templateURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="904" value="" type="KURL" abstract="0" documentation="" name="toolbarURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="905" value="" type="bool" abstract="0" documentation="" name="usePreviewPrefix" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="906" value="" type="QWizard *" abstract="0" documentation="" name="wiz" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="937" abstract="0" documentation="" name="FilesListView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="940" type="" abstract="0" documentation="" name="FilesListView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="941" value="" type="QString" abstract="0" documentation="" name="dir" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="942" value="" type="QStringList" abstract="0" documentation="" name="topList" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="943" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="944" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="945" type="virtual QString" abstract="0" documentation="" name="currentFileName" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="946" type="void" abstract="0" documentation="" name="loadDir" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="947" value="" type="QString" abstract="0" documentation="" name="path" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="948" type="virtual void" abstract="0" documentation="" name="slotReload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="949" type="" abstract="0" documentation="" name="~FilesListView" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="938" value="" type="QString" abstract="0" documentation="" name="dir" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="939" value="" type="QStringList" abstract="0" documentation="" name="dirList" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="950" abstract="0" documentation="An extended KListViewItem for folders." name="FilesTreeFolder" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="955" type="" abstract="0" documentation="" name="FilesTreeFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="956" value="" type="QListView *" abstract="0" documentation="" name="parentListView" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="957" value="" type="FilesTreeFolder *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="958" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="959" type="" abstract="0" documentation="" name="FilesTreeFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="960" value="" type="QListView *" abstract="0" documentation="" name="parentListView" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="961" value="" type="const QString &amp;" abstract="0" documentation="" name="p_name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="962" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="963" type="virtual bool" abstract="0" documentation="" name="acceptDrop" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="964" value="" type="const QMimeSource *" abstract="0" documentation="" name="mime" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="965" type="virtual void" abstract="0" documentation="" name="dropped" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="966" value="" type="QDropEvent *" abstract="0" documentation="" name="e" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="967" type="virtual QString" abstract="0" documentation="" name="fullName" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="968" type="void" abstract="0" documentation="" name="init" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="969" type="virtual QString" abstract="0" documentation="" name="key" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="970" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="971" value="" type="bool" abstract="0" documentation="" name="ascending" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="972" type="virtual void" abstract="0" documentation="" name="setOpen" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="973" value="" type="bool" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="974" type="void" abstract="0" documentation="" name="setup" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="975" type="virtual void" abstract="0" documentation="" name="sortChildItems" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="976" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="977" value="" type="bool" abstract="0" documentation="" name="ascending" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="978" type="QString" abstract="0" documentation="" name="text" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="979" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="980" type="virtual " abstract="0" documentation="" name="~FilesTreeFolder" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="951" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="952" value="" type="FilesTreeFolder *" abstract="0" documentation="" name="parentFolder" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="953" value="" type="FilesTreeView *" abstract="0" documentation="" name="parentView" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="954" value="" type="KURL" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="981" abstract="0" documentation="An extended KLIstViewItem for files." name="FilesTreeFile" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="984" type="" abstract="0" documentation="" name="FilesTreeFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="985" value="" type="FilesTreeFolder *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="986" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="987" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="988" type="" abstract="0" documentation="" name="FilesTreeFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="989" value="" type="QListView *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="990" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="991" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="992" type="void" abstract="0" documentation="" name="setDirIcon" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="993" type="void" abstract="0" documentation="" name="setIcon" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="994" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="995" type="virtual void" abstract="0" documentation="" name="sortChildItems" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="996" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="997" value="" type="bool" abstract="0" documentation="" name="ascending" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="998" type="" abstract="0" documentation="" name="~FilesTreeFile" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="982" value="" type="bool" abstract="0" documentation="" name="isDir" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="983" value="" type="KURL" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="999" abstract="0" documentation="" name="DocItem" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1002" type="" abstract="0" documentation="" name="DocItem" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1003" value="" type="QListView *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1004" value="" type="QString" abstract="0" documentation="" name="_name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1005" value="" type="QString" abstract="0" documentation="" name="_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1006" type="" abstract="0" documentation="" name="DocItem" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1007" value="" type="QListViewItem *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1008" value="" type="QString" abstract="0" documentation="" name="_name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1009" value="" type="QString" abstract="0" documentation="" name="_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1010" type="QString" abstract="0" documentation="" name="text" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1011" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1012" type="" abstract="0" documentation="" name="~DocItem" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1000" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1001" value="" type="QString" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1013" abstract="0" documentation="" name="DocFolder" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1017" type="" abstract="0" documentation="" name="DocFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1018" value="" type="QListView *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1019" value="" type="QString" abstract="0" documentation="" name="_name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1020" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1021" value="" type="QString" abstract="0" documentation="" name="basePath" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1022" type="" abstract="0" documentation="" name="DocFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1023" value="" type="QListViewItem *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1024" value="" type="QString" abstract="0" documentation="" name="_name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1025" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1026" value="" type="QString" abstract="0" documentation="" name="basePath" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1027" type="void" abstract="0" documentation="" name="setOpen" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1028" value="" type="bool" abstract="0" documentation="" name="o" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1029" type="void" abstract="0" documentation="" name="setup" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1030" type="QString" abstract="0" documentation="" name="text" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1031" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1032" type="" abstract="0" documentation="" name="~DocFolder" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1014" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1015" value="" type="bool" abstract="0" documentation="" name="topLevel" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1016" value="" type="QString" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1033" abstract="0" documentation="" name="UploadTreeFolder" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1036" type="" abstract="0" documentation="" name="UploadTreeFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1037" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1038" value="" type="QListView *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1039" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1040" type="" abstract="0" documentation="" name="UploadTreeFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1041" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1042" value="" type="UploadTreeFolder *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1043" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1044" type="QString" abstract="0" documentation="" name="fullName" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1045" type="virtual QString" abstract="0" documentation="" name="key" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1046" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1047" value="" type="bool" abstract="0" documentation="" name="ascending" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1048" type="virtual void" abstract="0" documentation="" name="setOpen" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1049" value="" type="bool" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1050" type="void" abstract="0" documentation="" name="setWhichPixmap" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1051" value="" type="QString" abstract="0" documentation="" name="pixmap" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1052" type="void" abstract="0" documentation="" name="setup" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1053" type="KURL" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1054" type="virtual " abstract="0" documentation="" name="~UploadTreeFolder" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1034" value="" type="KURL" abstract="0" documentation="" name="m_url" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1035" value="" type="UploadTreeFolder *" abstract="0" documentation="" name="parentFolder" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1055" abstract="0" documentation="Item for project folders." name="ProjectTreeFolder" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1059" type="" abstract="0" documentation="" name="ProjectTreeFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1060" value="" type="QListView *" abstract="0" documentation="" name="parentListView" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1061" value="" type="ProjectTreeFolder *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1062" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1063" type="" abstract="0" documentation="" name="ProjectTreeFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1064" value="" type="QListView *" abstract="0" documentation="" name="parentListView" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1065" value="" type="const QString &amp;" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1066" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1067" type="bool" abstract="0" documentation="" name="contains" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1068" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1069" type="void" abstract="0" documentation="" name="insertItem" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1070" value="" type="ProjectTreeFile *" abstract="0" documentation="" name="item" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1071" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1072" type="virtual void" abstract="0" documentation="" name="paintCell" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1073" value="" type="QPainter *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1074" value="" type="const QColorGroup &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1075" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1076" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1077" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1078" type="virtual void" abstract="0" documentation="" name="setOpen" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1079" value="" type="bool" abstract="0" documentation="" name="open" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1080" type="void" abstract="0" documentation="" name="setup" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1081" type="" abstract="0" documentation="" name="~ProjectTreeFolder" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1056" value="" type="QPtrList" abstract="0" documentation="" name="filesTreeList" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1057" value="" type="ProjectTreeView *" abstract="0" documentation="" name="parentView" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1058" value="" type="QString" abstract="0" documentation="" name="path" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1082" abstract="0" documentation="Item for project files. It's different from a standard file as the project files are basically XML tag elements." name="ProjectTreeFile" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1084" type="" abstract="0" documentation="" name="ProjectTreeFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1085" value="" type="ProjectTreeFolder *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1086" value="" type="QString" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1087" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1088" type="" abstract="0" documentation="" name="~ProjectTreeFile" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1083" value="" type="QString" abstract="0" documentation="" name="fname" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1089" abstract="0" documentation="" name="DocTreeView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1091" type="" abstract="0" documentation="" name="DocTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1092" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1093" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1094" type="QString *" abstract="0" documentation="" name="contextHelp" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1095" value="" type="QString" abstract="0" documentation="" name="keyword" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1096" type="" abstract="0" documentation="" name="~DocTreeView" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1090" value="" type="QDict *" abstract="0" documentation="" name="contextHelpDict" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1097" abstract="0" documentation="A tree view used to display a set of files/directories explicitly added to it. It is used in several dialogs, e.g in Project Upload dialog, Rescan Project dialog, add files/folders to project dialogs." name="UploadTreeView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1098" type="" abstract="0" documentation="" name="UploadTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1099" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1100" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1101" type="UploadTreeFile *" abstract="0" documentation="" name="addItem" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1102" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1103" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1104" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1105" type="int" abstract="0" documentation="" name="checkboxTree" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1106" value="" type="QListViewItem *" abstract="0" documentation="" name="it" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1107" type="void" abstract="0" documentation="" name="collapseAll" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1108" value="" type="QListViewItem *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1109" type="void" abstract="0" documentation="" name="expandAll" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1110" value="" type="QListViewItem *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1111" type="UploadTreeFolder *" abstract="0" documentation="" name="findFolder" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1112" value="" type="UploadTreeFolder *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1113" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1114" type="QListViewItem *" abstract="0" documentation="" name="findItem" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1115" value="" type="const QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1116" type="void" abstract="0" documentation="" name="invertAll" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1117" value="" type="QListViewItem *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1118" type="QListViewItem *" abstract="0" documentation="" name="itemByUrl" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1119" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1120" type="UploadTreeFolder *" abstract="0" documentation="" name="printTree" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1121" value="" type="UploadTreeFolder *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1122" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1123" type="virtual void" abstract="0" documentation="" name="selectAll" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1124" value="" type="bool" abstract="0" documentation="" name="select" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1125" type="" abstract="0" documentation="" name="~UploadTreeView" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1126" abstract="0" documentation="Treeview to display the document structure. Inherits from KListView." name="StructTreeView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1144" type="" abstract="0" documentation="" name="StructTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1145" value="" type="Parser *" abstract="0" documentation="" name="parser" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1146" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1147" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1148" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1149" type="void" abstract="0" documentation="" name="buildTree" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1150" value="" type="Node *" abstract="0" documentation="" name="baseNode" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1151" value="" type="int" abstract="0" documentation="" name="openLevel" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1152" type="void" abstract="0" documentation="" name="deleteList" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1153" type="bool" abstract="0" documentation="" name="followCursor" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1154" type="void" abstract="0" documentation="" name="setFollowCursor" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1155" value="" type="bool" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1156" type="void" abstract="0" documentation="" name="setOpenSubTree" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1157" value="" type="QListViewItem *" abstract="0" documentation="" name="it" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1158" value="" type="bool" abstract="0" documentation="" name="open" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1159" type="void" abstract="0" documentation="" name="setParsingDTD" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1160" value="" type="const QString" abstract="0" documentation="" name="dtdName" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1161" type="virtual void" abstract="0" documentation="" name="showEvent" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1162" value="" type="QShowEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1163" type="void" abstract="0" documentation="" name="showTagAtPos" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1164" value="" type="int" abstract="0" documentation="" name="x" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1165" value="" type="int" abstract="0" documentation="" name="y" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1166" type="" abstract="0" documentation="" name="~StructTreeView" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1127" value="" type="KConfig *" abstract="0" documentation="" name="config" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1128" value="" type="QStringList" abstract="0" documentation="" name="dtdList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1129" value="" type="QPopupMenu *" abstract="0" documentation="" name="dtdMenu" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1130" value="" type="bool" abstract="0" documentation="" name="followCursorFlag" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1131" value="" type="int" abstract="0" documentation="" name="followCursorId" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1132" value="" type="bool []" abstract="0" documentation="" name="groupOpened" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1133" value="" type="StructTreeTag * []" abstract="0" documentation="" name="groups" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1134" value="" type="uint" abstract="0" documentation="" name="groupsCount" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1135" value="" type="StructTreeTag *" abstract="0" documentation="" name="lastTag" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1136" value="" type="DTDStruct *" abstract="0" documentation="" name="m_parsingDTD" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1137" value="" type="Parser *" abstract="0" documentation="" name="parser" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1138" value="" type="QPopupMenu *" abstract="0" documentation="" name="popupMenu" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1139" value="" type="QTime" abstract="0" documentation="" name="timer" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1140" value="" type="StructTreeTag *" abstract="0" documentation="" name="top" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1141" value="" type="bool" abstract="0" documentation="" name="topOpened" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1142" value="" type="bool" abstract="0" documentation="" name="useOpenLevelSetting" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1143" value="" type="Document *" abstract="0" documentation="" name="write" static="0" scope="202" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1167" abstract="0" documentation="" name="UploadTreeFile" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1170" type="" abstract="0" documentation="" name="UploadTreeFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1171" value="" type="QListView *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1172" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1173" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1174" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1175" type="" abstract="0" documentation="" name="UploadTreeFile" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1176" value="" type="UploadTreeFolder *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1177" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1178" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1179" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1180" type="virtual QString" abstract="0" documentation="" name="key" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1181" value="" type="int" abstract="0" documentation="" name="column" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1182" value="" type="bool" abstract="0" documentation="" name="ascending" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1183" type="void" abstract="0" documentation="" name="setWhichPixmap" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1184" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1185" type="KURL" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1186" type="" abstract="0" documentation="" name="~UploadTreeFile" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1168" value="" type="bool" abstract="0" documentation="" name="isDir" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1169" value="" type="KURL" abstract="0" documentation="" name="m_url" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1187" abstract="0" documentation="TreeView for templates. As the templates are standard directories, it inherits from FilesTreeView." name="TemplatesTreeView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1195" type="" abstract="0" documentation="" name="TemplatesTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1196" value="" type="const KURL &amp;" abstract="0" documentation="" name="projectBaseURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1197" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1198" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1199" type="void" abstract="0" documentation="" name="contentsDropEvent" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1200" value="" type="QDropEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1201" type="virtual QDragObject *" abstract="0" documentation="" name="dragObject" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1202" type="void" abstract="0" documentation="" name="readDirInfo" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1203" value="" type="QString" abstract="0" documentation="" name="startDir" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1204" type="virtual void" abstract="0" documentation="" name="slotInsertTag" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1205" type="virtual void" abstract="0" documentation="" name="slotProperties" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1206" type="virtual void" abstract="0" documentation="" name="slotPropertiesApplied" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1207" type="virtual void" abstract="0" documentation="" name="slotReload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1208" type="void" abstract="0" documentation="" name="writeDirInfo" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1209" value="" type="QString" abstract="0" documentation="" name="dirInfoFile" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1210" type="" abstract="0" documentation="" name="~TemplatesTreeView" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1188" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1189" value="" type="int" abstract="0" documentation="" name="deleteMenuId" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1190" value="" type="FilesTreeFolder *" abstract="0" documentation="" name="globalDir" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1191" value="" type="FilesTreeFolder *" abstract="0" documentation="" name="localDir" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1192" value="" type="int" abstract="0" documentation="" name="openId" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1193" value="" type="FilesTreeFolder *" abstract="0" documentation="" name="projectDir" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1194" value="" type="QuantaPropertiesPageDlg *" abstract="0" documentation="" name="quantaProperties" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1211" abstract="0" documentation="KListViewItem specific for the structure tree." name="StructTreeTag" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1213" type="" abstract="0" documentation="" name="StructTreeTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1214" value="" type="QListView *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1215" value="" type="const QString" abstract="0" documentation="" name="a_title" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1216" type="" abstract="0" documentation="" name="StructTreeTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1217" value="" type="StructTreeTag *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1218" value="" type="Node *" abstract="0" documentation="" name="a_node" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1219" value="" type="const QString" abstract="0" documentation="" name="a_title" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1220" value="" type="QListViewItem *" abstract="0" documentation="" name="after" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1221" type="" abstract="0" documentation="" name="StructTreeTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1222" value="" type="StructTreeTag *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1223" value="" type="const QString" abstract="0" documentation="" name="a_title" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1224" type="" abstract="0" documentation="" name="~StructTreeTag" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1212" value="" type="Node *" abstract="0" documentation="" name="node" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1225" abstract="0" documentation="A project specific KListView." name="ProjectTreeView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1231" type="" abstract="0" documentation="" name="ProjectTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1232" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1233" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1234" type="virtual KURL" abstract="0" documentation="" name="currentURL" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1235" type="virtual void" abstract="0" documentation="" name="itemRenamed" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1236" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1237" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1238" type="void" abstract="0" documentation="" name="openFolder" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1239" value="" type="ProjectTreeFolder *" abstract="0" documentation="" name="folder" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1240" type="virtual " abstract="0" documentation="" name="~ProjectTreeView" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1226" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1227" value="" type="int" abstract="0" documentation="" name="openInQuantaId" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1228" value="" type="ProjectTreeFolder *" abstract="0" documentation="" name="projectDir" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1229" value="" type="QPopupMenu *" abstract="0" documentation="" name="projectMenu" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1230" value="" type="QString" abstract="0" documentation="" name="projectName" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1241" abstract="0" documentation="Extended FileManage to handle remote and local directory structures in a tree." name="FilesTreeView" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1242" type="" abstract="0" documentation="" name="FilesTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1243" value="" type="KURL :: List" abstract="0" documentation="" name="topList" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1244" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1245" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1246" type="" abstract="0" documentation="" name="FilesTreeView" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1247" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1248" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1249" type="void" abstract="0" documentation="" name="addFileInfoPage" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1250" value="" type="KPropertiesDialog *" abstract="0" documentation="" name="propDlg" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1251" type="virtual KURL" abstract="0" documentation="" name="currentURL" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1252" type="QPtrList" abstract="0" documentation="" name="getItems" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1253" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1254" type="virtual void" abstract="0" documentation="" name="itemRenamed" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1255" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1256" value="" type="const KURL &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1257" type="void" abstract="0" documentation="" name="readDir" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1258" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1259" type="virtual void" abstract="0" documentation="" name="slotDirListDeleteItem" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1260" value="" type="KFileItem *" abstract="0" documentation="" name="item" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1261" type="virtual void" abstract="0" documentation="" name="slotDirListNewItems" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1262" value="" type="const KFileItemList &amp;" abstract="0" documentation="" name="items" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1263" type="virtual void" abstract="0" documentation="" name="slotInsertTag" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1264" type="virtual void" abstract="0" documentation="" name="slotProperties" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1265" type="virtual void" abstract="0" documentation="" name="slotReload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1266" type="" abstract="0" documentation="" name="~FilesTreeView" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1267" abstract="0" documentation="A treeview which has some common file managing methods. It inherits from KListView." name="FileManage" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1272" type="" abstract="0" documentation="" name="FileManage" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1273" type="" abstract="0" documentation="" name="FileManage" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1274" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1275" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1276" type="virtual KURL" abstract="0" documentation="" name="currentURL" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1277" type="int" abstract="0" documentation="" name="denyBinaryInsert" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1278" type="virtual void" abstract="0" documentation="" name="slotDirListClear" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1279" type="virtual void" abstract="0" documentation="" name="slotDirListClearURL" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1280" value="" type="const KURL &amp;" abstract="0" documentation="" name="_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1281" type="virtual void" abstract="0" documentation="" name="slotDirListCompleted" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1282" value="" type="const KURL &amp;" abstract="0" documentation="" name="_url" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1283" type="virtual void" abstract="0" documentation="" name="slotDirListDeleteItem" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1284" value="" type="KFileItem *" abstract="0" documentation="" name="item" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1285" type="virtual void" abstract="0" documentation="" name="slotDirListNewItems" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1286" value="" type="const KFileItemList &amp;" abstract="0" documentation="" name="items" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1287" type="virtual void" abstract="0" documentation="" name="slotDirListRefreshItesm" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1288" value="" type="const KFileItemList &amp;" abstract="0" documentation="" name="items" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1289" type="virtual void" abstract="0" documentation="" name="slotInsertTag" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1290" type="virtual void" abstract="0" documentation="" name="slotProperties" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1291" type="virtual void" abstract="0" documentation="" name="slotPropertiesApplied" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1292" type="virtual void" abstract="0" documentation="" name="slotReload" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1293" type="" abstract="0" documentation="" name="~FileManage" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1268" value="" type="DirInfo" abstract="0" documentation="" name="dirInfo" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1269" value="" type="KDirLister *" abstract="0" documentation="" name="dirLister" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1270" value="" type="QPopupMenu *" abstract="0" documentation="" name="fileMenu" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1271" value="" type="QPopupMenu *" abstract="0" documentation="" name="folderMenu" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1298" abstract="0" documentation="" name="KApplication" static="0" scope="200" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="274" roleb="307" multia="" multib="" package="" xmi.id="1311" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="74" roleb="307" multia="" multib="" package="" xmi.id="1312" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="695" roleb="307" multia="" multib="" package="" xmi.id="1313" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="793" roleb="307" multia="" multib="" package="" xmi.id="1314" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="725" roleb="307" multia="" multib="" package="" xmi.id="1315" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="785" roleb="307" multia="" multib="" package="" xmi.id="1316" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="876" roleb="307" multia="" multib="" package="" xmi.id="1317" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1318" abstract="0" documentation="Upload the project handling class." name="ProjectUpload" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1326" type="" abstract="0" documentation="" name="ProjectUpload" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1327" value="" type="Project *" abstract="0" documentation="" name="p" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1328" value="" type="const KURL &amp;" abstract="0" documentation="" name="url" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1329" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1330" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1331" value="" type="bool" abstract="0" documentation="" name="modal" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1332" value="" type="WFlags" abstract="0" documentation="" name="fl" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1333" type="void" abstract="0" documentation="" name="buildSelectedItemList" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1334" type="void" abstract="0" documentation="" name="initProjectInfo" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1335" value="" type="Project *" abstract="0" documentation="" name="p" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1336" type="virtual void" abstract="0" documentation="" name="reject" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1337" type="virtual void" abstract="0" documentation="" name="resizeEvent" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1338" value="" type="QResizeEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1339" type="" abstract="0" documentation="" name="~ProjectUpload" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1319" value="" type="KURL *" abstract="0" documentation="" name="baseUrl" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1320" value="" type="KURL" abstract="0" documentation="" name="currentURL" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1321" value="" type="Project *" abstract="0" documentation="" name="p" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1322" value="" type="KURL" abstract="0" documentation="" name="startUrl" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1323" value="" type="bool" abstract="0" documentation="" name="stopUpload" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1324" value="" type="bool" abstract="0" documentation="" name="suspendUpload" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1325" value="" type="bool" abstract="0" documentation="" name="uploadInProgress" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1340" abstract="0" documentation="Create a new project from kio accessible files and folders." name="ProjectNewLocal" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1342" type="" abstract="0" documentation="" name="ProjectNewLocal" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1343" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1344" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1345" type="virtual void" abstract="0" documentation="" name="resizeEvent" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1346" value="" type="QResizeEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1347" type="" abstract="0" documentation="" name="~ProjectNewLocal" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1341" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1348" abstract="0" documentation="Rescan the project handling class." name="RescanPrj" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1351" type="" abstract="0" documentation="" name="RescanPrj" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1352" value="" type="KURL :: List" abstract="0" documentation="" name="p_prjFileList" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1353" value="" type="const KURL &amp;" abstract="0" documentation="" name="p_baseURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1354" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1355" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1356" value="" type="bool" abstract="0" documentation="" name="modal" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1357" type="virtual void" abstract="0" documentation="" name="resizeEvent" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1358" value="" type="QResizeEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1359" type="" abstract="0" documentation="" name="~RescanPrj" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1349" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1350" value="" type="QValueList" abstract="0" documentation="" name="urlList" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1360" abstract="0" documentation="" name="ProjectNewFinal" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1361" type="" abstract="0" documentation="" name="ProjectNewFinal" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1362" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1363" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1364" type="void" abstract="0" documentation="" name="setMargin" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1365" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1366" type="" abstract="0" documentation="" name="~ProjectNewFinal" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1367" abstract="0" documentation="Create a new project with the help of wget." name="ProjectNewWeb" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1372" type="" abstract="0" documentation="" name="ProjectNewWeb" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1373" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1374" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1375" type="virtual void" abstract="0" documentation="" name="resizeEvent" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1376" value="" type="QResizeEvent *" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1377" type="" abstract="0" documentation="" name="~ProjectNewWeb" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1368" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1369" value="" type="QStringList" abstract="0" documentation="" name="filesList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1370" value="" type="KProcess *" abstract="0" documentation="" name="proc" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1371" value="" type="bool" abstract="0" documentation="" name="start" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1378" abstract="0" documentation="" name="ProjectNewGeneral" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1379" type="" abstract="0" documentation="" name="ProjectNewGeneral" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1380" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1381" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1382" type="void" abstract="0" documentation="" name="setMargin" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1383" value="" type="int" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1384" type="QString" abstract="0" documentation="" name="type" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1385" type="" abstract="0" documentation="" name="~ProjectNewGeneral" static="0" scope="200" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1378" roleb="307" multia="" multib="" package="" xmi.id="1386" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1340" roleb="307" multia="" multib="" package="" xmi.id="1387" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1367" roleb="307" multia="" multib="" package="" xmi.id="1388" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1318" roleb="307" multia="" multib="" package="" xmi.id="1389" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1390" abstract="0" documentation="" name="CSSSelectorEditor" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1391" type="" abstract="0" documentation="" name="CSSSelectorEditor" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1392" value="" type="QString" abstract="0" documentation="" name="code" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1393" value="" type="bool" abstract="0" documentation="" name="editSelector" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1394" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1395" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1396" type="QString" abstract="0" documentation="" name="code" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1397" type="void" abstract="0" documentation="" name="splitValueTRBL" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1398" value="" type="QString" abstract="0" documentation="" name="value" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1399" value="" type="QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1400" value="" type="QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1401" value="" type="QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1402" value="" type="QString &amp;" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1403" type="void" abstract="0" documentation="" name="widgetFromCode" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1404" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1405" type="" abstract="0" documentation="" name="~CSSSelectorEditor" static="0" scope="200" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1390" roleb="307" multia="" multib="" package="" xmi.id="1406" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1407" abstract="0" documentation="" name="TagDialog" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1415" type="" abstract="0" documentation="" name="TagDialog" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1416" value="" type="QTag *" abstract="0" documentation="" name="dtdTag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1417" value="" type="QString" abstract="0" documentation="" name="attrs" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1418" value="" type="KURL" abstract="0" documentation="" name="a_baseURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1419" type="" abstract="0" documentation="" name="TagDialog" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1420" value="" type="QTag *" abstract="0" documentation="" name="dtdTag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1421" value="" type="Tag *" abstract="0" documentation="" name="tag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1422" value="" type="KURL" abstract="0" documentation="" name="a_baseURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1423" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1424" type="QString" abstract="0" documentation="" name="getAttribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1425" value="" type="QString" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1426" type="QString" abstract="0" documentation="" name="getAttributeString" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1427" type="QDict *" abstract="0" documentation="" name="getAttributes" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1428" type="void" abstract="0" documentation="" name="init" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1429" value="" type="QTag *" abstract="0" documentation="" name="dtdTag" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1430" value="" type="KURL" abstract="0" documentation="" name="a_baseURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1431" type="void" abstract="0" documentation="" name="insertAttribute" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1432" value="" type="QString *" abstract="0" documentation="" name="attr" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1433" value="" type="QString *" abstract="0" documentation="" name="value" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1434" type="void" abstract="0" documentation="" name="insertTag" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1435" value="" type="Document *" abstract="0" documentation="" name="w" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1436" value="" type="bool" abstract="0" documentation="" name="insertInLine" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1437" type="void" abstract="0" documentation="" name="parseAttributes" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1438" value="" type="QString" abstract="0" documentation="" name="attrs" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1439" type="void" abstract="0" documentation="" name="parseTag" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1440" type="" abstract="0" documentation="" name="~TagDialog" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1408" value="" type="bool" abstract="0" documentation="" name="deleteTag" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1409" value="" type="QDict *" abstract="0" documentation="" name="dict" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1410" value="" type="QTag *" abstract="0" documentation="" name="dtdTag" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1411" value="" type="QPtrList *" abstract="0" documentation="" name="extraPageList" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1412" value="" type="KURL" abstract="0" documentation="" name="m_baseURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1413" value="" type="Tag *" abstract="0" documentation="" name="m_tag" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1414" value="" type="QWidget *" abstract="0" documentation="" name="mainDlg" static="0" scope="200" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1407" roleb="307" multia="" multib="" package="" xmi.id="1441" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1442" abstract="0" documentation="" name="TagImgDlg" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1465" type="" abstract="0" documentation="" name="TagImgDlg" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1466" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1467" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1468" type="void" abstract="0" documentation="" name="initDialog" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1469" type="" abstract="0" documentation="" name="~TagImgDlg" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1443" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_10" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1444" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_4" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1445" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_5" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1446" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_6" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1447" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_7" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1448" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_8" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1449" value="" type="QLabel *" abstract="0" documentation="" name="QLabel_9" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1450" value="" type="QPushButton *" abstract="0" documentation="" name="buttonCancel" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1451" value="" type="QPushButton *" abstract="0" documentation="" name="buttonImgSource" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1452" value="" type="QPushButton *" abstract="0" documentation="" name="buttonOk" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1453" value="" type="QPushButton *" abstract="0" documentation="" name="buttonRecalcImgSize" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1454" value="" type="QComboBox *" abstract="0" documentation="" name="comboAlign" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1455" value="" type="QImage *" abstract="0" documentation="" name="img" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1456" value="" type="QLabel *" abstract="0" documentation="" name="labelImgSource" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1457" value="" type="KLineEdit *" abstract="0" documentation="" name="lineAltText" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1458" value="" type="KLineEdit *" abstract="0" documentation="" name="lineHSpace" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1459" value="" type="KLineEdit *" abstract="0" documentation="" name="lineHeight" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1460" value="" type="KLineEdit *" abstract="0" documentation="" name="lineImgSource" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1461" value="" type="KLineEdit *" abstract="0" documentation="" name="lineVSpace" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1462" value="" type="KLineEdit *" abstract="0" documentation="" name="lineWidth" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1463" value="" type="QSpinBox *" abstract="0" documentation="" name="spinBorder" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1464" value="" type="PictureView *" abstract="0" documentation="" name="widgetImg" static="0" scope="200" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1470" abstract="0" documentation="" name="TagQuickTable" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1472" type="" abstract="0" documentation="" name="TagQuickTable" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1473" value="" type="Document *" abstract="0" documentation="" name="write" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1474" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1475" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1476" type="" abstract="0" documentation="" name="~TagQuickTable" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1471" value="" type="Document *" abstract="0" documentation="" name="write" static="0" scope="201" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1442" roleb="307" multia="" multib="" package="" xmi.id="1477" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1470" roleb="307" multia="" multib="" package="" xmi.id="1478" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1479" abstract="0" documentation="" name="TagAction" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1487" type="" abstract="0" documentation="" name="TagAction" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1488" value="" type="QDomElement *" abstract="0" documentation="" name="element" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1489" type="" abstract="0" documentation="" name="TagAction" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1490" value="" type="QDomElement *" abstract="0" documentation="" name="element" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1491" value="" type="QuantaView *" abstract="0" documentation="" name="a_view" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1492" type="QDomElement" abstract="0" documentation="" name="data" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1493" type="virtual void" abstract="0" documentation="" name="insertTag" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1494" type="virtual void" abstract="0" documentation="" name="scriptDone" static="0" scope="202" />
+ <UML:Operation stereotype="" package="" xmi.id="1495" type="virtual void" abstract="0" documentation="" name="slotGetScriptError" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1496" value="" type="KProcess *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1497" value="" type="char *" abstract="0" documentation="" name="buffer" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1498" value="" type="int" abstract="0" documentation="" name="buflen" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1499" type="virtual void" abstract="0" documentation="" name="slotGetScriptOutput" static="0" scope="202" >
+ <UML:Parameter stereotype="" package="" xmi.id="1500" value="" type="KProcess *" abstract="0" documentation="" name="" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1501" value="" type="char *" abstract="0" documentation="" name="buffer" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1502" value="" type="int" abstract="0" documentation="" name="buflen" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1503" type="virtual " abstract="0" documentation="" name="~TagAction" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1480" value="" type="bool" abstract="0" documentation="" name="firstError" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1481" value="" type="bool" abstract="0" documentation="" name="firstOutput" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1482" value="" type="QuantaView *" abstract="0" documentation="" name="m_view" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1483" value="" type="KProcess *" abstract="0" documentation="" name="proc" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1484" value="" type="QString" abstract="0" documentation="" name="scriptErrorDest" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1485" value="" type="QString" abstract="0" documentation="" name="scriptOutputDest" static="0" scope="201" />
+ <UML:Attribute stereotype="" package="" xmi.id="1486" value="" type="QDomElement" abstract="0" documentation="" name="tag" static="0" scope="201" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1479" roleb="307" multia="" multib="" package="" xmi.id="1504" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="937" roleb="307" multia="" multib="" package="" xmi.id="1505" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1241" roleb="307" multia="" multib="" package="" xmi.id="1506" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1225" roleb="307" multia="" multib="" package="" xmi.id="1507" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1126" roleb="307" multia="" multib="" package="" xmi.id="1508" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1187" roleb="307" multia="" multib="" package="" xmi.id="1509" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1097" roleb="307" multia="" multib="" package="" xmi.id="1510" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1512" abstract="0" documentation="" name="CopyTo" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1515" type="" abstract="0" documentation="" name="CopyTo" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1516" value="" type="const KURL &amp;" abstract="0" documentation="" name="dirURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1517" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1518" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1519" type="KURL" abstract="0" documentation="" name="copy" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1520" value="" type="const KURL &amp;" abstract="0" documentation="" name="sourceURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1521" type="" abstract="0" documentation="" name="~CopyTo" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1513" value="" type="KURL" abstract="0" documentation="" name="copiedURL" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1514" value="" type="KURL" abstract="0" documentation="" name="mInitialDirUrl" static="0" scope="201" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1512" roleb="307" multia="" multib="" package="" xmi.id="1522" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1512" roleb="374" multia="" multib="" package="" xmi.id="1523" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="876" roleb="374" multia="" multib="" package="" xmi.id="1524" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1340" roleb="374" multia="" multib="" package="" xmi.id="1525" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1318" roleb="374" multia="" multib="" package="" xmi.id="1526" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1348" roleb="374" multia="" multib="" package="" xmi.id="1527" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="112" roleb="374" multia="" multib="" package="" xmi.id="1528" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1442" roleb="374" multia="" multib="" package="" xmi.id="1529" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1530" abstract="0" documentation="" name="TagQuickStart" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1532" type="" abstract="0" documentation="" name="TagQuickStart" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1533" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_baseURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1534" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1535" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1536" type="" abstract="0" documentation="" name="~TagQuickStart" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1531" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="201" />
+ </UML:Class>
+ <UML:Class stereotype="" package="" xmi.id="1537" abstract="0" documentation="" name="FileCombo" static="0" scope="200" >
+ <UML:Operation stereotype="" package="" xmi.id="1542" type="" abstract="0" documentation="" name="FileCombo" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1543" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1544" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1545" type="" abstract="0" documentation="" name="FileCombo" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1546" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_baseURL" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1547" value="" type="QWidget *" abstract="0" documentation="" name="parent" static="0" scope="200" />
+ <UML:Parameter stereotype="" package="" xmi.id="1548" value="" type="const char *" abstract="0" documentation="" name="name" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1549" type="void" abstract="0" documentation="" name="setBaseURL" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1550" value="" type="const KURL &amp;" abstract="0" documentation="" name="a_baseURL" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1551" type="void" abstract="0" documentation="" name="setReturnAbsolutePath" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1552" value="" type="bool" abstract="0" documentation="" name="absolutePath" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1553" type="void" abstract="0" documentation="" name="setText" static="0" scope="200" >
+ <UML:Parameter stereotype="" package="" xmi.id="1554" value="" type="QString" abstract="0" documentation="" name="" static="0" scope="200" />
+ </UML:Operation>
+ <UML:Operation stereotype="" package="" xmi.id="1555" type="QString" abstract="0" documentation="" name="text" static="0" scope="200" />
+ <UML:Operation stereotype="" package="" xmi.id="1556" type="" abstract="0" documentation="" name="~FileCombo" static="0" scope="200" />
+ <UML:Attribute stereotype="" package="" xmi.id="1538" value="" type="KURL" abstract="0" documentation="" name="baseURL" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1539" value="" type="QPushButton *" abstract="0" documentation="" name="button" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1540" value="" type="QComboBox *" abstract="0" documentation="" name="combo" static="0" scope="202" />
+ <UML:Attribute stereotype="" package="" xmi.id="1541" value="" type="bool" abstract="0" documentation="" name="m_absolutePath" static="0" scope="202" />
+ </UML:Class>
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1537" roleb="374" multia="" multib="" package="" xmi.id="1557" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1530" roleb="374" multia="" multib="" package="" xmi.id="1558" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1225" roleb="374" multia="" multib="" package="" xmi.id="1559" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1187" roleb="374" multia="" multib="" package="" xmi.id="1560" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="association" rolea="74" roleb="274" multia="" multib="" package="" xmi.id="1562" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="association" rolea="74" roleb="112" multia="" multib="" package="" xmi.id="1563" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="association" rolea="112" roleb="274" multia="" multib="" package="" xmi.id="1564" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="association" rolea="74" roleb="407" multia="" multib="" package="" xmi.id="1568" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Class stereotype="" package="" xmi.id="1570" abstract="0" documentation="" name="KListView" static="0" scope="200" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="1241" roleb="1267" multia="" multib="" package="" xmi.id="1572" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="981" roleb="1241" multia="" multib="" package="" xmi.id="1573" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="950" roleb="1241" multia="" multib="" package="" xmi.id="1574" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="1082" roleb="981" multia="" multib="" package="" xmi.id="1575" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="1055" roleb="950" multia="" multib="" package="" xmi.id="1576" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="1225" roleb="1241" multia="" multib="" package="" xmi.id="1577" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="1082" roleb="1225" multia="" multib="" package="" xmi.id="1578" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="1055" roleb="1225" multia="" multib="" package="" xmi.id="1579" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="1211" roleb="1126" multia="" multib="" package="" xmi.id="1580" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="1187" roleb="1241" multia="" multib="" package="" xmi.id="1582" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="1033" roleb="1097" multia="" multib="" package="" xmi.id="1584" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="1167" roleb="1097" multia="" multib="" package="" xmi.id="1585" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="uniassociation" rolea="1318" roleb="1097" multia="" multib="" package="" xmi.id="1586" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="uniassociation" rolea="1348" roleb="1097" multia="" multib="" package="" xmi.id="1587" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="uniassociation" rolea="1340" roleb="1097" multia="" multib="" package="" xmi.id="1588" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="uniassociation" rolea="1367" roleb="1097" multia="" multib="" package="" xmi.id="1590" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1340" roleb="1033" multia="" multib="" package="" xmi.id="1591" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="1348" roleb="1033" multia="" multib="" package="" xmi.id="1592" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="785" roleb="793" multia="" multib="" package="" xmi.id="1594" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="725" roleb="793" multia="" multib="" package="" xmi.id="1595" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="757" roleb="785" multia="" multib="" package="" xmi.id="1596" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="aggregation" rolea="762" roleb="747" multia="" multib="" package="" xmi.id="1597" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="567" roleb="401" multia="" multib="" package="" xmi.id="1606" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="567" roleb="1298" multia="" multib="" package="" xmi.id="1607" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="564" roleb="1298" multia="" multib="" package="" xmi.id="1608" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="association" rolea="567" roleb="571" multia="" multib="" package="" xmi.id="1609" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="association" rolea="571" roleb="564" multia="" multib="" package="" xmi.id="1610" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="generalization" rolea="564" roleb="401" multia="" multib="" package="" xmi.id="1611" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="401" roleb="307" multia="" multib="" package="" xmi.id="1612" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="112" roleb="307" multia="" multib="" package="" xmi.id="1613" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ <UML:Association nameb="" stereotype="" assoctype="dependency" rolea="407" roleb="307" multia="" multib="" package="" xmi.id="1614" abstract="0" documentation="" name="" static="0" scope="200" namea="" />
+ </umlobjects>
+ <diagrams>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="0" xmi.id="73" documentation="" type="402" showops="0" showpackage="0" name="class diagram" localid="30000" showstereotype="0" showscope="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="58" showattsigs="601" usesdiagramusefillcolour="1" x="98" linecolour="none" y="243" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="574" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="64" showattsigs="601" usesdiagramusefillcolour="1" x="101" linecolour="none" y="352" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="695" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="58" showattsigs="601" usesdiagramusefillcolour="1" x="101" linecolour="none" y="278" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="658" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="58" showattsigs="601" usesdiagramusefillcolour="1" x="98" linecolour="none" y="313" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="586" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="140" showattsigs="601" usesdiagramusefillcolour="1" x="43" linecolour="none" y="952" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="738" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="152" showattsigs="601" usesdiagramusefillcolour="1" x="423" linecolour="none" y="949" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="725" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="160" showattsigs="601" usesdiagramusefillcolour="1" x="422" linecolour="none" y="909" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="785" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="117" showattsigs="601" usesdiagramusefillcolour="1" x="420" linecolour="none" y="868" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="793" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="167" showattsigs="601" usesdiagramusefillcolour="1" x="43" linecolour="none" y="913" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="762" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="162" showattsigs="601" usesdiagramusefillcolour="1" x="43" linecolour="none" y="873" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="747" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="183" showattsigs="601" usesdiagramusefillcolour="1" x="43" linecolour="none" y="831" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="853" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="114" showattsigs="601" usesdiagramusefillcolour="1" x="422" linecolour="none" y="987" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="767" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="67" showattsigs="601" usesdiagramusefillcolour="1" x="100" linecolour="none" y="427" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="876" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="92" showattsigs="601" usesdiagramusefillcolour="1" x="41" linecolour="none" y="574" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1013" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="124" showattsigs="601" usesdiagramusefillcolour="1" x="422" linecolour="none" y="1030" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="757" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="77" showattsigs="601" usesdiagramusefillcolour="1" x="41" linecolour="none" y="540" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="999" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="115" showattsigs="601" usesdiagramusefillcolour="1" x="38" linecolour="none" y="502" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1089" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="101" showattsigs="601" usesdiagramusefillcolour="1" x="349" linecolour="none" y="502" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1267" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="111" showattsigs="601" usesdiagramusefillcolour="1" x="197" linecolour="none" y="536" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="981" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="132" showattsigs="601" usesdiagramusefillcolour="1" x="195" linecolour="none" y="570" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="950" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="121" showattsigs="601" usesdiagramusefillcolour="1" x="191" linecolour="none" y="500" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1241" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="128" showattsigs="601" usesdiagramusefillcolour="1" x="33" linecolour="none" y="696" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1082" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="149" showattsigs="601" usesdiagramusefillcolour="1" x="36" linecolour="none" y="738" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1055" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="138" showattsigs="601" usesdiagramusefillcolour="1" x="35" linecolour="none" y="654" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1225" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="121" showattsigs="601" usesdiagramusefillcolour="1" x="473" linecolour="none" y="551" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1211" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="130" showattsigs="601" usesdiagramusefillcolour="1" x="474" linecolour="none" y="502" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1126" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="163" showattsigs="601" usesdiagramusefillcolour="1" x="629" linecolour="none" y="499" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1187" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="128" showattsigs="601" usesdiagramusefillcolour="1" x="250" linecolour="none" y="736" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1167" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="149" showattsigs="601" usesdiagramusefillcolour="1" x="253" linecolour="none" y="696" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1033" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="138" showattsigs="601" usesdiagramusefillcolour="1" x="249" linecolour="none" y="656" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1097" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations/>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="0" xmi.id="1307" documentation="" type="402" showops="0" showpackage="0" name="1 Startup Classes" localid="30000" showstereotype="0" showscope="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="175" showattsigs="601" usesdiagramusefillcolour="1" x="345" linecolour="none" y="183" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="401" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="176" showattsigs="601" usesdiagramusefillcolour="1" x="43" linecolour="none" y="183" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="567" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="78" showattsigs="601" usesdiagramusefillcolour="1" x="395" linecolour="none" y="340" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="571" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="122" showattsigs="601" usesdiagramusefillcolour="1" x="662" linecolour="none" y="186" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="564" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="110" showattsigs="601" usesdiagramusefillcolour="1" x="376" linecolour="none" y="0" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1298" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="401" widgetaid="567" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="219" starty="197" />
+ <endpoint endx="345" endy="197" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="1298" widgetaid="567" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="131" starty="183" />
+ <endpoint endx="412" endy="28" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="1298" widgetaid="564" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="723" starty="186" />
+ <endpoint endx="449" endy="28" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="571" widgetaid="567" documentation="" type="503" >
+ <linepath>
+ <startpoint startx="131" starty="211" />
+ <endpoint endx="421" endy="340" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="564" widgetaid="571" documentation="" type="503" >
+ <linepath>
+ <startpoint startx="447" starty="340" />
+ <endpoint endx="723" endy="214" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="401" widgetaid="564" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="662" starty="200" />
+ <endpoint endx="520" endy="197" />
+ </linepath>
+ </UML:AssocWidget>
+ </associations>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="0" xmi.id="1309" documentation="" type="402" showops="0" showpackage="0" name="2 QuantaCommon and QExtFileInfo Class Dependencies" localid="30000" showstereotype="0" showscope="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="99" showattsigs="601" usesdiagramusefillcolour="1" x="134" linecolour="none" y="714" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="112" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="139" showattsigs="601" usesdiagramusefillcolour="1" x="358" linecolour="none" y="310" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="307" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="99" showattsigs="601" usesdiagramusefillcolour="1" x="15" linecolour="none" y="474" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="274" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="106" showattsigs="601" usesdiagramusefillcolour="1" x="11" linecolour="none" y="399" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="74" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="175" showattsigs="601" usesdiagramusefillcolour="1" x="5" linecolour="none" y="331" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="401" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="108" showattsigs="601" usesdiagramusefillcolour="1" x="401" linecolour="none" y="926" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="374" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="64" showattsigs="601" usesdiagramusefillcolour="1" x="6" linecolour="none" y="261" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="695" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="117" showattsigs="601" usesdiagramusefillcolour="1" x="5" linecolour="none" y="196" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="793" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="152" showattsigs="601" usesdiagramusefillcolour="1" x="4" linecolour="none" y="141" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="725" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="160" showattsigs="601" usesdiagramusefillcolour="1" x="7" linecolour="none" y="53" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="785" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="67" showattsigs="601" usesdiagramusefillcolour="1" x="350" linecolour="none" y="719" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="876" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="160" showattsigs="601" usesdiagramusefillcolour="1" x="660" linecolour="none" y="14" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1378" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="142" showattsigs="601" usesdiagramusefillcolour="1" x="705" linecolour="none" y="726" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1340" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="135" showattsigs="601" usesdiagramusefillcolour="1" x="725" linecolour="none" y="77" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1367" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="120" showattsigs="601" usesdiagramusefillcolour="1" x="1" linecolour="none" y="715" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1318" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="155" showattsigs="601" usesdiagramusefillcolour="1" x="707" linecolour="none" y="184" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1390" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="90" showattsigs="601" usesdiagramusefillcolour="1" x="750" linecolour="none" y="319" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1407" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="95" showattsigs="601" usesdiagramusefillcolour="1" x="433" linecolour="none" y="720" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1442" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="127" showattsigs="601" usesdiagramusefillcolour="1" x="729" linecolour="none" y="260" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1470" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="91" showattsigs="601" usesdiagramusefillcolour="1" x="752" linecolour="none" y="375" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1479" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="121" showattsigs="601" usesdiagramusefillcolour="1" x="237" linecolour="none" y="9" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1241" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="115" showattsigs="601" usesdiagramusefillcolour="1" x="113" linecolour="none" y="8" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="937" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="138" showattsigs="601" usesdiagramusefillcolour="1" x="546" linecolour="none" y="722" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1225" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="130" showattsigs="601" usesdiagramusefillcolour="1" x="363" linecolour="none" y="7" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1126" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="163" showattsigs="601" usesdiagramusefillcolour="1" x="881" linecolour="none" y="729" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1187" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="138" showattsigs="601" usesdiagramusefillcolour="1" x="503" linecolour="none" y="7" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1097" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="92" showattsigs="601" usesdiagramusefillcolour="1" x="19" linecolour="none" y="543" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="407" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="74" showattsigs="601" usesdiagramusefillcolour="1" x="251" linecolour="none" y="716" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1512" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="92" showattsigs="601" usesdiagramusefillcolour="1" x="639" linecolour="none" y="1093" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1348" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="97" showattsigs="601" usesdiagramusefillcolour="1" x="117" linecolour="none" y="1085" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1537" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="121" showattsigs="601" usesdiagramusefillcolour="1" x="398" linecolour="none" y="1095" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1530" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="307" widgetaid="401" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="180" starty="345" />
+ <endpoint endx="358" endy="324" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="4" widgetbid="307" widgetaid="112" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="183" starty="714" />
+ <endpoint endx="408" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="2" widgetbid="307" widgetaid="274" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="64" starty="474" />
+ <endpoint endx="383" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="307" widgetaid="74" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="64" starty="399" />
+ <endpoint endx="358" endy="331" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="307" widgetaid="695" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="70" starty="275" />
+ <endpoint endx="358" endy="317" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="2" widgetbid="307" widgetaid="793" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="63" starty="224" />
+ <endpoint endx="381" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="1" widgetbid="307" widgetaid="725" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="80" starty="169" />
+ <endpoint endx="369" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="3" widgetbid="307" widgetaid="785" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="87" starty="81" />
+ <endpoint endx="392" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="6" widgetbid="307" widgetaid="876" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="383" starty="719" />
+ <endpoint endx="433" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="8" widgetbid="307" widgetaid="1378" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="740" starty="42" />
+ <endpoint endx="450" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="9" widgetbid="307" widgetaid="1340" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="776" starty="726" />
+ <endpoint endx="471" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="10" widgetbid="307" widgetaid="1367" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="792" starty="105" />
+ <endpoint endx="473" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="1" widgetbid="307" widgetaid="1318" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="61" starty="715" />
+ <endpoint endx="370" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="9" widgetbid="307" widgetaid="1390" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="784" starty="212" />
+ <endpoint endx="462" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="307" widgetaid="1407" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="750" starty="333" />
+ <endpoint endx="497" endy="319" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="7" widgetbid="307" widgetaid="1442" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="480" starty="720" />
+ <endpoint endx="446" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="11" widgetbid="307" widgetaid="1470" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="729" starty="274" />
+ <endpoint endx="485" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="307" widgetaid="1479" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="752" starty="389" />
+ <endpoint endx="497" endy="328" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="4" widgetbid="307" widgetaid="937" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="170" starty="36" />
+ <endpoint endx="404" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="5" widgetbid="307" widgetaid="1241" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="297" starty="37" />
+ <endpoint endx="415" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="8" widgetbid="307" widgetaid="1225" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="615" starty="722" />
+ <endpoint endx="459" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="6" widgetbid="307" widgetaid="1126" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="428" starty="35" />
+ <endpoint endx="427" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="10" widgetbid="307" widgetaid="1187" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="962" starty="729" />
+ <endpoint endx="484" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="12" indexb="7" widgetbid="307" widgetaid="1097" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="572" starty="35" />
+ <endpoint endx="439" endy="310" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="3" widgetbid="307" widgetaid="407" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="65" starty="543" />
+ <endpoint endx="395" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="11" indexb="5" widgetbid="307" widgetaid="1512" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="288" starty="716" />
+ <endpoint endx="421" endy="338" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="3" widgetbid="374" widgetaid="1512" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="288" starty="744" />
+ <endpoint endx="437" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="4" widgetbid="374" widgetaid="876" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="383" starty="747" />
+ <endpoint endx="449" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="7" widgetbid="374" widgetaid="1340" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="776" starty="754" />
+ <endpoint endx="485" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="1" widgetbid="374" widgetaid="1318" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="61" starty="743" />
+ <endpoint endx="413" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="3" widgetbid="374" widgetaid="1348" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="685" starty="1093" />
+ <endpoint endx="482" endy="954" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="2" widgetbid="374" widgetaid="112" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="183" starty="742" />
+ <endpoint endx="425" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="5" widgetbid="374" widgetaid="1442" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="480" starty="748" />
+ <endpoint endx="461" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="374" widgetaid="1537" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="165" starty="1085" />
+ <endpoint endx="428" endy="954" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="374" widgetaid="1530" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="458" starty="1095" />
+ <endpoint endx="455" endy="954" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="6" widgetbid="374" widgetaid="1225" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="615" starty="750" />
+ <endpoint endx="473" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="9" indexb="8" widgetbid="374" widgetaid="1187" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="962" starty="757" />
+ <endpoint endx="497" endy="926" />
+ </linepath>
+ </UML:AssocWidget>
+ </associations>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="0" xmi.id="1561" documentation="" type="402" showops="0" showpackage="0" name="3. The main classes" localid="30000" showstereotype="0" showscope="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="99" showattsigs="601" usesdiagramusefillcolour="0" x="129" linecolour="#ff0000" y="310" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="112" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="99" showattsigs="601" usesdiagramusefillcolour="0" x="343" linecolour="#ff0000" y="417" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="274" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="106" showattsigs="601" usesdiagramusefillcolour="0" x="516" linecolour="#ff0000" y="310" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="74" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="92" showattsigs="601" usesdiagramusefillcolour="0" x="523" linecolour="#ff0000" y="139" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="407" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="274" widgetaid="74" documentation="" type="503" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="550" linecolour="none" y="340" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="411" linecolour="none" y="393" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="489" linecolour="none" y="377" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="569" starty="338" />
+ <endpoint endx="409" endy="417" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="112" widgetaid="74" documentation="There is only one QuantaApp and QuantaView class." type="503" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="497" linecolour="none" y="326" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="230" linecolour="none" y="326" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="372" linecolour="none" y="324" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="516" starty="324" />
+ <endpoint endx="228" endy="324" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="274" widgetaid="112" documentation="There is only one QuantaApp and QuantaDoc class." type="503" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="180" linecolour="none" y="340" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="357" linecolour="none" y="393" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="277" linecolour="none" y="377" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="178" starty="338" />
+ <endpoint endx="376" endy="417" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="407" widgetaid="74" documentation="The QuantaView can have several Document objects placed on the writeTab." type="503" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="550" linecolour="none" y="286" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="553" linecolour="none" y="169" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="569" linecolour="none" y="238" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="569" starty="310" />
+ <endpoint endx="569" endy="167" />
+ </linepath>
+ </UML:AssocWidget>
+ </associations>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="0" xmi.id="1569" documentation="" type="402" showops="0" showpackage="0" name="4. Treeviews" localid="30000" showstereotype="0" showscope="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="101" showattsigs="601" usesdiagramusefillcolour="0" x="346" linecolour="#ff0000" y="21" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1267" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="111" showattsigs="601" usesdiagramusefillcolour="0" x="98" linecolour="#ff0000" y="147" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="981" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="132" showattsigs="601" usesdiagramusefillcolour="0" x="603" linecolour="#ff0000" y="147" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="950" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="121" showattsigs="601" usesdiagramusefillcolour="0" x="356" linecolour="#ff0000" y="147" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1241" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="128" showattsigs="601" usesdiagramusefillcolour="0" x="89" linecolour="#ff0000" y="224" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1082" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="149" showattsigs="601" usesdiagramusefillcolour="0" x="595" linecolour="#ff0000" y="224" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1055" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="138" showattsigs="601" usesdiagramusefillcolour="0" x="347" linecolour="#ff0000" y="224" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1225" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="130" showattsigs="601" usesdiagramusefillcolour="0" x="361" linecolour="#ff0000" y="287" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1126" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="121" showattsigs="601" usesdiagramusefillcolour="0" x="89" linecolour="#ff0000" y="287" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1211" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="163" showattsigs="601" usesdiagramusefillcolour="0" x="588" linecolour="#ff0000" y="57" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1187" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="138" showattsigs="601" usesdiagramusefillcolour="0" x="362" linecolour="#ff0000" y="449" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1097" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="149" showattsigs="601" usesdiagramusefillcolour="1" x="601" linecolour="none" y="449" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1033" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="128" showattsigs="601" usesdiagramusefillcolour="1" x="107" linecolour="none" y="449" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1167" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="142" showattsigs="601" usesdiagramusefillcolour="0" x="518" linecolour="#ff0000" y="626" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1340" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="120" showattsigs="601" usesdiagramusefillcolour="0" x="118" linecolour="#ff0000" y="628" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1318" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="92" showattsigs="601" usesdiagramusefillcolour="0" x="585" linecolour="#ff0000" y="334" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="1348" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="135" showattsigs="601" usesdiagramusefillcolour="1" x="307" linecolour="none" y="629" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="1367" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations>
+ <UML:AssocWidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="1267" widgetaid="1241" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="396" starty="147" />
+ <endpoint endx="396" endy="49" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1241" widgetaid="981" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="211" linecolour="none" y="163" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="337" linecolour="none" y="163" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="282" linecolour="none" y="161" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="209" starty="161" />
+ <endpoint endx="356" endy="161" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1241" widgetaid="950" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="587" linecolour="none" y="163" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="479" linecolour="none" y="163" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="540" linecolour="none" y="161" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="603" starty="161" />
+ <endpoint endx="477" endy="161" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="981" widgetaid="1082" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="153" starty="224" />
+ <endpoint endx="153" endy="175" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="950" widgetaid="1055" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="669" starty="224" />
+ <endpoint endx="669" endy="175" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1241" widgetaid="1225" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="416" starty="224" />
+ <endpoint endx="416" endy="175" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1225" widgetaid="1082" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="219" linecolour="none" y="240" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="328" linecolour="none" y="240" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="282" linecolour="none" y="238" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="217" starty="238" />
+ <endpoint endx="347" endy="238" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1225" widgetaid="1055" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="579" linecolour="none" y="240" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="487" linecolour="none" y="240" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="540" linecolour="none" y="238" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="595" starty="238" />
+ <endpoint endx="485" endy="238" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1126" widgetaid="1211" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="212" linecolour="none" y="303" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="342" linecolour="none" y="303" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="285" linecolour="none" y="301" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="210" starty="301" />
+ <endpoint endx="361" endy="301" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="1241" widgetaid="1187" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="669" starty="85" />
+ <endpoint endx="436" endy="147" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1097" widgetaid="1033" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="585" linecolour="none" y="465" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="502" linecolour="none" y="465" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="550" linecolour="none" y="463" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="601" starty="463" />
+ <endpoint endx="500" endy="463" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="1097" widgetaid="1167" documentation="" type="501" >
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="237" linecolour="none" y="465" operation="" usesdiagramlinecolour="1" role="701" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="*" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="343" linecolour="none" y="465" operation="" usesdiagramlinecolour="1" role="702" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:FloatingTextWidget usesdiagramfillcolour="1" width="0" usesdiagramusefillcolour="1" x="298" linecolour="none" y="463" operation="" usesdiagramlinecolour="1" role="703" fillcolour="none" height="0" usefillcolor="1" seqnum="" xmi.id="-1" text="" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <linepath>
+ <startpoint startx="235" starty="463" />
+ <endpoint endx="362" endy="463" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="1" widgetbid="1097" widgetaid="1318" documentation="" type="512" >
+ <linepath>
+ <startpoint startx="178" starty="628" />
+ <endpoint endx="396" endy="477" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="3" indexa="1" totalcountb="2" indexb="1" widgetbid="1097" widgetaid="1348" documentation="" type="512" >
+ <linepath>
+ <startpoint startx="615" starty="362" />
+ <endpoint endx="431" endy="449" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="3" indexa="1" totalcountb="4" indexb="3" widgetbid="1097" widgetaid="1340" documentation="" type="512" >
+ <linepath>
+ <startpoint startx="565" starty="626" />
+ <endpoint endx="465" endy="477" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="4" indexb="2" widgetbid="1097" widgetaid="1367" documentation="" type="512" >
+ <linepath>
+ <startpoint startx="374" starty="629" />
+ <endpoint endx="431" endy="477" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="1033" widgetaid="1340" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="612" starty="626" />
+ <endpoint endx="675" endy="477" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="3" indexa="2" totalcountb="2" indexb="1" widgetbid="1033" widgetaid="1348" documentation="" type="502" >
+ <linepath>
+ <startpoint startx="646" starty="362" />
+ <endpoint endx="675" endy="449" />
+ </linepath>
+ </UML:AssocWidget>
+ </associations>
+ </diagram>
+ <diagram snapgrid="0" showattsig="1" fillcolor="#ffffc0" showgrid="0" showopsig="1" usefillcolor="1" snapx="10" snapy="10" showatts="0" xmi.id="1593" documentation="" type="402" showops="0" showpackage="0" name="5. Plugin system" localid="30000" showstereotype="0" showscope="1" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" linecolor="#ff0000" >
+ <widgets>
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="117" showattsigs="601" usesdiagramusefillcolour="1" x="345" linecolour="none" y="62" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="793" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="160" showattsigs="601" usesdiagramusefillcolour="1" x="205" linecolour="none" y="193" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="785" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="152" showattsigs="601" usesdiagramusefillcolour="1" x="458" linecolour="none" y="200" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="725" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="1" width="124" showattsigs="601" usesdiagramusefillcolour="1" x="223" linecolour="none" y="289" showopsigs="601" usesdiagramlinecolour="1" fillcolour="none" height="28" usefillcolor="1" showattributes="0" xmi.id="757" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="114" showattsigs="601" usesdiagramusefillcolour="0" x="624" linecolour="#ff0000" y="57" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="767" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="162" showattsigs="601" usesdiagramusefillcolour="0" x="308" linecolour="#ff0000" y="383" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="747" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="167" showattsigs="601" usesdiagramusefillcolour="0" x="306" linecolour="#ff0000" y="481" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="762" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ <UML:ConceptWidget usesdiagramfillcolour="0" width="183" showattsigs="601" usesdiagramusefillcolour="0" x="86" linecolour="#ff0000" y="386" showopsigs="601" usesdiagramlinecolour="0" fillcolour="#ffffc0" height="28" usefillcolor="1" showattributes="0" xmi.id="853" showoperations="0" showpackage="0" showscope="1" showstereotype="0" font="Arial [Monotype],11,-1,5,50,0,0,0,0,0" />
+ </widgets>
+ <messages/>
+ <associations>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="1" widgetbid="793" widgetaid="785" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="285" starty="193" />
+ <endpoint endx="384" endy="90" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="3" indexb="2" widgetbid="793" widgetaid="725" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="534" starty="200" />
+ <endpoint endx="423" endy="90" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="785" widgetaid="757" documentation="" type="500" >
+ <linepath>
+ <startpoint startx="285" starty="289" />
+ <endpoint endx="285" endy="221" />
+ </linepath>
+ </UML:AssocWidget>
+ <UML:AssocWidget totalcounta="2" indexa="1" totalcountb="2" indexb="1" widgetbid="747" widgetaid="762" documentation="" type="501" >
+ <linepath>
+ <startpoint startx="389" starty="481" />
+ <endpoint endx="389" endy="411" />
+ </linepath>
+ </UML:AssocWidget>
+ </associations>
+ </diagram>
+ </diagrams>
+ <listview>
+ <listitem open="1" type="800" id="-1" label="Views" >
+ <listitem open="1" type="801" id="-1" label="Logical View" >
+ <listitem open="1" type="807" id="1307" label="1 Startup Classes" />
+ <listitem open="1" type="807" id="1309" label="2 QuantaCommon and QExtFileInfo Class Dependencies" />
+ <listitem open="1" type="807" id="1561" label="3. The main classes" />
+ <listitem open="0" type="807" id="1569" label="4. Treeviews" />
+ <listitem open="0" type="807" id="1593" label="5. Plugin system" />
+ <listitem open="0" type="813" id="1390" label="CSSSelectorEditor" >
+ <listitem open="0" type="815" id="1391" label="CSSSelectorEditor" />
+ <listitem open="0" type="815" id="1396" label="code" />
+ <listitem open="0" type="815" id="1397" label="splitValueTRBL" />
+ <listitem open="0" type="815" id="1403" label="widgetFromCode" />
+ <listitem open="0" type="815" id="1405" label="~CSSSelectorEditor" />
+ </listitem>
+ <listitem open="0" type="813" id="757" label="CervisiaPlugin" >
+ <listitem open="0" type="815" id="758" label="CervisiaPlugin" />
+ <listitem open="0" type="815" id="759" label="run" />
+ <listitem open="0" type="815" id="760" label="unload" />
+ <listitem open="0" type="815" id="761" label="~CervisiaPlugin" />
+ </listitem>
+ <listitem open="0" type="813" id="1512" label="CopyTo" >
+ <listitem open="0" type="815" id="1515" label="CopyTo" />
+ <listitem open="0" type="814" id="1513" label="copiedURL" />
+ <listitem open="0" type="815" id="1519" label="copy" />
+ <listitem open="0" type="814" id="1514" label="mInitialDirUrl" />
+ <listitem open="0" type="815" id="1521" label="~CopyTo" />
+ </listitem>
+ <listitem open="0" type="813" id="1013" label="DocFolder" >
+ <listitem open="0" type="815" id="1022" label="DocFolder" />
+ <listitem open="0" type="815" id="1017" label="DocFolder" />
+ <listitem open="0" type="814" id="1014" label="name" />
+ <listitem open="0" type="815" id="1027" label="setOpen" />
+ <listitem open="0" type="815" id="1029" label="setup" />
+ <listitem open="0" type="815" id="1030" label="text" />
+ <listitem open="0" type="814" id="1015" label="topLevel" />
+ <listitem open="0" type="814" id="1016" label="url" />
+ <listitem open="0" type="815" id="1032" label="~DocFolder" />
+ </listitem>
+ <listitem open="0" type="813" id="999" label="DocItem" >
+ <listitem open="0" type="815" id="1006" label="DocItem" />
+ <listitem open="0" type="815" id="1002" label="DocItem" />
+ <listitem open="0" type="814" id="1000" label="name" />
+ <listitem open="0" type="815" id="1010" label="text" />
+ <listitem open="0" type="814" id="1001" label="url" />
+ <listitem open="0" type="815" id="1012" label="~DocItem" />
+ </listitem>
+ <listitem open="0" type="813" id="1089" label="DocTreeView" >
+ <listitem open="0" type="815" id="1091" label="DocTreeView" />
+ <listitem open="0" type="815" id="1094" label="contextHelp" />
+ <listitem open="0" type="814" id="1090" label="contextHelpDict" />
+ <listitem open="0" type="815" id="1096" label="~DocTreeView" />
+ </listitem>
+ <listitem open="0" type="813" id="407" label="Document" >
+ <listitem open="0" type="815" id="426" label="Document" />
+ <listitem open="0" type="814" id="408" label="baseURL" />
+ <listitem open="0" type="814" id="409" label="busy" />
+ <listitem open="0" type="815" id="434" label="changeTag" />
+ <listitem open="0" type="815" id="437" label="checkDirtyStatus" />
+ <listitem open="0" type="815" id="438" label="checkOverwrite" />
+ <listitem open="0" type="815" id="440" label="clearTempFile" />
+ <listitem open="0" type="815" id="441" label="closeTempFile" />
+ <listitem open="0" type="815" id="442" label="codeCompletionHintRequested" />
+ <listitem open="0" type="815" id="443" label="codeCompletionRequested" />
+ <listitem open="0" type="814" id="410" label="completionInProgress" />
+ <listitem open="0" type="815" id="444" label="createTempFile" />
+ <listitem open="0" type="815" id="445" label="currentDTD" />
+ <listitem open="0" type="815" id="447" label="defaultDTD" />
+ <listitem open="0" type="815" id="448" label="dirty" />
+ <listitem open="0" type="814" id="411" label="dtdName" />
+ <listitem open="0" type="815" id="449" label="evenQuotes" />
+ <listitem open="0" type="815" id="451" label="find" />
+ <listitem open="0" type="815" id="459" label="findDTDName" />
+ <listitem open="0" type="815" id="461" label="findRev" />
+ <listitem open="0" type="815" id="469" label="findWordRev" />
+ <listitem open="0" type="815" id="471" label="findXMLTag" />
+ <listitem open="0" type="815" id="476" label="getAttributeCompletions" />
+ <listitem open="0" type="815" id="480" label="getAttributeValueCompletions" />
+ <listitem open="0" type="815" id="485" label="getCharacterCompletions" />
+ <listitem open="0" type="815" id="486" label="getDTDIdentifier" />
+ <listitem open="0" type="815" id="487" label="getGlobalCursorPos" />
+ <listitem open="0" type="815" id="488" label="getTagCompletions" />
+ <listitem open="0" type="815" id="492" label="getTagNameAt" />
+ <listitem open="0" type="815" id="495" label="getVariableCompletions" />
+ <listitem open="0" type="814" id="412" label="includeList" />
+ <listitem open="0" type="815" id="499" label="insertFile" />
+ <listitem open="0" type="815" id="501" label="insertTag" />
+ <listitem open="0" type="815" id="504" label="insertText" />
+ <listitem open="0" type="815" id="507" label="isModified" />
+ <listitem open="0" type="815" id="508" label="isUntitled" />
+ <listitem open="0" type="814" id="413" label="m_dirty" />
+ <listitem open="0" type="814" id="414" label="m_parsingDTD" />
+ <listitem open="0" type="814" id="415" label="m_pluginInterface" />
+ <listitem open="0" type="814" id="416" label="m_project" />
+ <listitem open="0" type="814" id="417" label="m_tempFileName" />
+ <listitem open="0" type="814" id="418" label="oldstat" />
+ <listitem open="0" type="815" id="509" label="parseVariables" />
+ <listitem open="0" type="815" id="510" label="parsingDTD" />
+ <listitem open="0" type="815" id="511" label="readConfig" />
+ <listitem open="0" type="815" id="513" label="replaceSelected" />
+ <listitem open="0" type="815" id="515" label="resizeEvent" />
+ <listitem open="0" type="815" id="517" label="save" />
+ <listitem open="0" type="815" id="518" label="saveIt" />
+ <listitem open="0" type="815" id="519" label="scriptAutoCompletion" />
+ <listitem open="0" type="815" id="524" label="scriptCodeCompletion" />
+ <listitem open="0" type="815" id="528" label="selectText" />
+ <listitem open="0" type="815" id="533" label="setDTDIdentifier" />
+ <listitem open="0" type="815" id="535" label="setDirtyStatus" />
+ <listitem open="0" type="815" id="537" label="setModified" />
+ <listitem open="0" type="815" id="539" label="setParsingDTD" />
+ <listitem open="0" type="815" id="541" label="setUntitledUrl" />
+ <listitem open="0" type="815" id="543" label="showCodeCompletions" />
+ <listitem open="0" type="814" id="419" label="spellMoved" />
+ <listitem open="0" type="814" id="420" label="spellPos" />
+ <listitem open="0" type="814" id="421" label="spellText" />
+ <listitem open="0" type="814" id="422" label="tempFile" />
+ <listitem open="0" type="815" id="545" label="tempFileName" />
+ <listitem open="0" type="815" id="546" label="text" />
+ <listitem open="0" type="814" id="423" label="untitledUrl" />
+ <listitem open="0" type="815" id="551" label="url" />
+ <listitem open="0" type="814" id="424" label="userTagList" />
+ <listitem open="0" type="814" id="425" label="variableList" />
+ <listitem open="0" type="815" id="552" label="writeConfig" />
+ <listitem open="0" type="815" id="554" label="xmlAutoCompletion" />
+ <listitem open="0" type="815" id="559" label="xmlCodeCompletion" />
+ <listitem open="0" type="815" id="563" label="~Document" />
+ </listitem>
+ <listitem open="0" type="813" id="1537" label="FileCombo" >
+ <listitem open="0" type="815" id="1542" label="FileCombo" />
+ <listitem open="0" type="815" id="1545" label="FileCombo" />
+ <listitem open="0" type="814" id="1538" label="baseURL" />
+ <listitem open="0" type="814" id="1539" label="button" />
+ <listitem open="0" type="814" id="1540" label="combo" />
+ <listitem open="0" type="814" id="1541" label="m_absolutePath" />
+ <listitem open="0" type="815" id="1549" label="setBaseURL" />
+ <listitem open="0" type="815" id="1551" label="setReturnAbsolutePath" />
+ <listitem open="0" type="815" id="1553" label="setText" />
+ <listitem open="0" type="815" id="1555" label="text" />
+ <listitem open="0" type="815" id="1556" label="~FileCombo" />
+ </listitem>
+ <listitem open="0" type="813" id="1267" label="FileManage" >
+ <listitem open="0" type="815" id="1273" label="FileManage" />
+ <listitem open="0" type="815" id="1272" label="FileManage" />
+ <listitem open="0" type="815" id="1276" label="currentURL" />
+ <listitem open="0" type="815" id="1277" label="denyBinaryInsert" />
+ <listitem open="0" type="814" id="1268" label="dirInfo" />
+ <listitem open="0" type="814" id="1269" label="dirLister" />
+ <listitem open="0" type="814" id="1270" label="fileMenu" />
+ <listitem open="0" type="814" id="1271" label="folderMenu" />
+ <listitem open="0" type="815" id="1278" label="slotDirListClear" />
+ <listitem open="0" type="815" id="1279" label="slotDirListClearURL" />
+ <listitem open="0" type="815" id="1281" label="slotDirListCompleted" />
+ <listitem open="0" type="815" id="1283" label="slotDirListDeleteItem" />
+ <listitem open="0" type="815" id="1285" label="slotDirListNewItems" />
+ <listitem open="0" type="815" id="1287" label="slotDirListRefreshItesm" />
+ <listitem open="0" type="815" id="1289" label="slotInsertTag" />
+ <listitem open="0" type="815" id="1290" label="slotProperties" />
+ <listitem open="0" type="815" id="1291" label="slotPropertiesApplied" />
+ <listitem open="0" type="815" id="1292" label="slotReload" />
+ <listitem open="0" type="815" id="1293" label="~FileManage" />
+ </listitem>
+ <listitem open="0" type="813" id="937" label="FilesListView" >
+ <listitem open="0" type="815" id="940" label="FilesListView" />
+ <listitem open="0" type="815" id="945" label="currentFileName" />
+ <listitem open="0" type="814" id="938" label="dir" />
+ <listitem open="0" type="814" id="939" label="dirList" />
+ <listitem open="0" type="815" id="946" label="loadDir" />
+ <listitem open="0" type="815" id="948" label="slotReload" />
+ <listitem open="0" type="815" id="949" label="~FilesListView" />
+ </listitem>
+ <listitem open="0" type="813" id="981" label="FilesTreeFile" >
+ <listitem open="0" type="815" id="988" label="FilesTreeFile" />
+ <listitem open="0" type="815" id="984" label="FilesTreeFile" />
+ <listitem open="0" type="814" id="982" label="isDir" />
+ <listitem open="0" type="815" id="992" label="setDirIcon" />
+ <listitem open="0" type="815" id="993" label="setIcon" />
+ <listitem open="0" type="815" id="995" label="sortChildItems" />
+ <listitem open="0" type="814" id="983" label="url" />
+ <listitem open="0" type="815" id="998" label="~FilesTreeFile" />
+ </listitem>
+ <listitem open="0" type="813" id="950" label="FilesTreeFolder" >
+ <listitem open="0" type="815" id="959" label="FilesTreeFolder" />
+ <listitem open="0" type="815" id="955" label="FilesTreeFolder" />
+ <listitem open="0" type="815" id="963" label="acceptDrop" />
+ <listitem open="0" type="815" id="965" label="dropped" />
+ <listitem open="0" type="815" id="967" label="fullName" />
+ <listitem open="0" type="815" id="968" label="init" />
+ <listitem open="0" type="815" id="969" label="key" />
+ <listitem open="0" type="814" id="951" label="name" />
+ <listitem open="0" type="814" id="952" label="parentFolder" />
+ <listitem open="0" type="814" id="953" label="parentView" />
+ <listitem open="0" type="815" id="972" label="setOpen" />
+ <listitem open="0" type="815" id="974" label="setup" />
+ <listitem open="0" type="815" id="975" label="sortChildItems" />
+ <listitem open="0" type="815" id="978" label="text" />
+ <listitem open="0" type="814" id="954" label="url" />
+ <listitem open="0" type="815" id="980" label="~FilesTreeFolder" />
+ </listitem>
+ <listitem open="0" type="813" id="1241" label="FilesTreeView" >
+ <listitem open="0" type="815" id="1246" label="FilesTreeView" />
+ <listitem open="0" type="815" id="1242" label="FilesTreeView" />
+ <listitem open="0" type="815" id="1249" label="addFileInfoPage" />
+ <listitem open="0" type="815" id="1251" label="currentURL" />
+ <listitem open="0" type="815" id="1252" label="getItems" />
+ <listitem open="0" type="815" id="1254" label="itemRenamed" />
+ <listitem open="0" type="815" id="1257" label="readDir" />
+ <listitem open="0" type="815" id="1259" label="slotDirListDeleteItem" />
+ <listitem open="0" type="815" id="1261" label="slotDirListNewItems" />
+ <listitem open="0" type="815" id="1263" label="slotInsertTag" />
+ <listitem open="0" type="815" id="1264" label="slotProperties" />
+ <listitem open="0" type="815" id="1265" label="slotReload" />
+ <listitem open="0" type="815" id="1266" label="~FilesTreeView" />
+ </listitem>
+ <listitem open="1" type="813" id="1298" label="KApplication" />
+ <listitem open="1" type="813" id="1570" label="KListView" />
+ <listitem open="0" type="813" id="564" label="KQApplication" >
+ <listitem open="0" type="815" id="565" label="KQApplication" />
+ <listitem open="0" type="815" id="566" label="~KQApplication" />
+ </listitem>
+ <listitem open="0" type="813" id="401" label="KQApplicationPrivate" >
+ <listitem open="0" type="815" id="404" label="KQApplicationPrivate" />
+ <listitem open="0" type="814" id="402" label="args" />
+ <listitem open="0" type="815" id="405" label="init" />
+ <listitem open="0" type="814" id="403" label="splash" />
+ <listitem open="0" type="815" id="406" label="~KQApplicationPrivate" />
+ </listitem>
+ <listitem open="0" type="813" id="567" label="KQUniqueApplication" >
+ <listitem open="0" type="815" id="568" label="KQUniqueApplication" />
+ <listitem open="0" type="815" id="569" label="newInstance" />
+ <listitem open="0" type="815" id="570" label="~KQUniqueApplication" />
+ </listitem>
+ <listitem open="0" type="813" id="571" label="KSplash" >
+ <listitem open="0" type="815" id="572" label="KSplash" />
+ <listitem open="0" type="815" id="573" label="~KSplash" />
+ </listitem>
+ <listitem open="0" type="813" id="574" label="Node" >
+ <listitem open="0" type="815" id="583" label="Node" />
+ <listitem open="0" type="814" id="575" label="child" />
+ <listitem open="0" type="814" id="576" label="listItem" />
+ <listitem open="0" type="814" id="577" label="next" />
+ <listitem open="0" type="814" id="578" label="opened" />
+ <listitem open="0" type="814" id="579" label="parent" />
+ <listitem open="0" type="814" id="580" label="prev" />
+ <listitem open="0" type="814" id="581" label="removeAll" />
+ <listitem open="0" type="814" id="582" label="tag" />
+ <listitem open="0" type="815" id="585" label="~Node" />
+ </listitem>
+ <listitem open="0" type="813" id="695" label="Parser" >
+ <listitem open="0" type="815" id="704" label="Parser" />
+ <listitem open="0" type="815" id="705" label="clear" />
+ <listitem open="0" type="815" id="706" label="coutTree" />
+ <listitem open="0" type="815" id="709" label="currentDTD" />
+ <listitem open="0" type="814" id="696" label="dtdList" />
+ <listitem open="0" type="814" id="697" label="m_dtd" />
+ <listitem open="0" type="814" id="698" label="m_dtdName" />
+ <listitem open="0" type="814" id="699" label="m_node" />
+ <listitem open="0" type="814" id="700" label="m_text" />
+ <listitem open="0" type="814" id="701" label="maxLines" />
+ <listitem open="0" type="815" id="712" label="nodeAt" />
+ <listitem open="0" type="814" id="702" label="oldMaxLines" />
+ <listitem open="0" type="815" id="716" label="parse" />
+ <listitem open="0" type="815" id="718" label="rebuild" />
+ <listitem open="0" type="815" id="720" label="scriptParser" />
+ <listitem open="0" type="815" id="722" label="specialAreaParser" />
+ <listitem open="0" type="814" id="703" label="write" />
+ <listitem open="0" type="815" id="724" label="~Parser" />
+ </listitem>
+ <listitem open="0" type="813" id="738" label="PluginEditorItem" >
+ <listitem open="0" type="815" id="739" label="PluginEditorItem" />
+ <listitem open="0" type="815" id="741" label="paintCell" />
+ </listitem>
+ <listitem open="0" type="813" id="876" label="Project" >
+ <listitem open="0" type="815" id="907" label="Project" />
+ <listitem open="0" type="814" id="877" label="author" />
+ <listitem open="0" type="814" id="878" label="baseURL" />
+ <listitem open="0" type="814" id="879" label="buff" />
+ <listitem open="0" type="814" id="880" label="config" />
+ <listitem open="0" type="815" id="910" label="createEmptyDom" />
+ <listitem open="0" type="814" id="881" label="currentProjectView" />
+ <listitem open="0" type="815" id="911" label="defaultDTD" />
+ <listitem open="0" type="815" id="912" label="defaultEncoding" />
+ <listitem open="0" type="814" id="882" label="dom" />
+ <listitem open="0" type="814" id="883" label="email" />
+ <listitem open="0" type="815" id="913" label="hasProject" />
+ <listitem open="0" type="815" id="914" label="insertFile" />
+ <listitem open="0" type="815" id="917" label="insertFiles" />
+ <listitem open="0" type="815" id="919" label="insertFiles" />
+ <listitem open="0" type="815" id="922" label="isModified" />
+ <listitem open="0" type="814" id="884" label="keepPasswd" />
+ <listitem open="0" type="815" id="923" label="loadProjectXML" />
+ <listitem open="0" type="814" id="885" label="m_defaultDTD" />
+ <listitem open="0" type="814" id="886" label="m_defaultEncoding" />
+ <listitem open="0" type="814" id="887" label="m_newFileType" />
+ <listitem open="0" type="814" id="888" label="modified" />
+ <listitem open="0" type="815" id="924" label="newFileType" />
+ <listitem open="0" type="814" id="889" label="newURL" />
+ <listitem open="0" type="814" id="890" label="oldURL" />
+ <listitem open="0" type="814" id="891" label="olfwprj" />
+ <listitem open="0" type="815" id="925" label="openCurrentView" />
+ <listitem open="0" type="814" id="892" label="passwd" />
+ <listitem open="0" type="814" id="893" label="pnf" />
+ <listitem open="0" type="814" id="894" label="png" />
+ <listitem open="0" type="814" id="895" label="pnl" />
+ <listitem open="0" type="814" id="896" label="pnw" />
+ <listitem open="0" type="814" id="897" label="previewPrefix" />
+ <listitem open="0" type="814" id="898" label="projectName" />
+ <listitem open="0" type="814" id="899" label="projectRecent" />
+ <listitem open="0" type="814" id="900" label="projectURL" />
+ <listitem open="0" type="815" id="926" label="readConfig" />
+ <listitem open="0" type="815" id="928" label="readLastConfig" />
+ <listitem open="0" type="814" id="901" label="remoteDir" />
+ <listitem open="0" type="815" id="930" label="setDefaultDTD" />
+ <listitem open="0" type="814" id="902" label="stack" />
+ <listitem open="0" type="814" id="903" label="templateURL" />
+ <listitem open="0" type="814" id="904" label="toolbarURL" />
+ <listitem open="0" type="815" id="932" label="urlWithPrefix" />
+ <listitem open="0" type="814" id="905" label="usePreviewPrefix" />
+ <listitem open="0" type="814" id="906" label="wiz" />
+ <listitem open="0" type="815" id="934" label="writeConfig" />
+ <listitem open="0" type="815" id="936" label="~Project" />
+ </listitem>
+ <listitem open="0" type="813" id="1360" label="ProjectNewFinal" >
+ <listitem open="0" type="815" id="1361" label="ProjectNewFinal" />
+ <listitem open="0" type="815" id="1364" label="setMargin" />
+ <listitem open="0" type="815" id="1366" label="~ProjectNewFinal" />
+ </listitem>
+ <listitem open="0" type="813" id="1378" label="ProjectNewGeneral" >
+ <listitem open="0" type="815" id="1379" label="ProjectNewGeneral" />
+ <listitem open="0" type="815" id="1382" label="setMargin" />
+ <listitem open="0" type="815" id="1384" label="type" />
+ <listitem open="0" type="815" id="1385" label="~ProjectNewGeneral" />
+ </listitem>
+ <listitem open="0" type="813" id="1340" label="ProjectNewLocal" >
+ <listitem open="0" type="815" id="1342" label="ProjectNewLocal" />
+ <listitem open="0" type="814" id="1341" label="baseURL" />
+ <listitem open="0" type="815" id="1345" label="resizeEvent" />
+ <listitem open="0" type="815" id="1347" label="~ProjectNewLocal" />
+ </listitem>
+ <listitem open="0" type="813" id="1367" label="ProjectNewWeb" >
+ <listitem open="0" type="815" id="1372" label="ProjectNewWeb" />
+ <listitem open="0" type="814" id="1368" label="baseURL" />
+ <listitem open="0" type="814" id="1369" label="filesList" />
+ <listitem open="0" type="814" id="1370" label="proc" />
+ <listitem open="0" type="815" id="1375" label="resizeEvent" />
+ <listitem open="0" type="814" id="1371" label="start" />
+ <listitem open="0" type="815" id="1377" label="~ProjectNewWeb" />
+ </listitem>
+ <listitem open="0" type="813" id="1082" label="ProjectTreeFile" >
+ <listitem open="0" type="815" id="1084" label="ProjectTreeFile" />
+ <listitem open="0" type="814" id="1083" label="fname" />
+ <listitem open="0" type="815" id="1088" label="~ProjectTreeFile" />
+ </listitem>
+ <listitem open="0" type="813" id="1055" label="ProjectTreeFolder" >
+ <listitem open="0" type="815" id="1063" label="ProjectTreeFolder" />
+ <listitem open="0" type="815" id="1059" label="ProjectTreeFolder" />
+ <listitem open="0" type="815" id="1067" label="contains" />
+ <listitem open="0" type="814" id="1056" label="filesTreeList" />
+ <listitem open="0" type="815" id="1069" label="insertItem" />
+ <listitem open="0" type="815" id="1072" label="paintCell" />
+ <listitem open="0" type="814" id="1057" label="parentView" />
+ <listitem open="0" type="814" id="1058" label="path" />
+ <listitem open="0" type="815" id="1078" label="setOpen" />
+ <listitem open="0" type="815" id="1080" label="setup" />
+ <listitem open="0" type="815" id="1081" label="~ProjectTreeFolder" />
+ </listitem>
+ <listitem open="0" type="813" id="1225" label="ProjectTreeView" >
+ <listitem open="0" type="815" id="1231" label="ProjectTreeView" />
+ <listitem open="0" type="814" id="1226" label="baseURL" />
+ <listitem open="0" type="815" id="1234" label="currentURL" />
+ <listitem open="0" type="815" id="1235" label="itemRenamed" />
+ <listitem open="0" type="815" id="1238" label="openFolder" />
+ <listitem open="0" type="814" id="1227" label="openInQuantaId" />
+ <listitem open="0" type="814" id="1228" label="projectDir" />
+ <listitem open="0" type="814" id="1229" label="projectMenu" />
+ <listitem open="0" type="814" id="1230" label="projectName" />
+ <listitem open="0" type="815" id="1240" label="~ProjectTreeView" />
+ </listitem>
+ <listitem open="0" type="813" id="1318" label="ProjectUpload" >
+ <listitem open="0" type="815" id="1326" label="ProjectUpload" />
+ <listitem open="0" type="814" id="1319" label="baseUrl" />
+ <listitem open="0" type="815" id="1333" label="buildSelectedItemList" />
+ <listitem open="0" type="814" id="1320" label="currentURL" />
+ <listitem open="0" type="815" id="1334" label="initProjectInfo" />
+ <listitem open="0" type="814" id="1321" label="p" />
+ <listitem open="0" type="815" id="1336" label="reject" />
+ <listitem open="0" type="815" id="1337" label="resizeEvent" />
+ <listitem open="0" type="814" id="1322" label="startUrl" />
+ <listitem open="0" type="814" id="1323" label="stopUpload" />
+ <listitem open="0" type="814" id="1324" label="suspendUpload" />
+ <listitem open="0" type="814" id="1325" label="uploadInProgress" />
+ <listitem open="0" type="815" id="1339" label="~ProjectUpload" />
+ </listitem>
+ <listitem open="0" type="813" id="374" label="QExtFileInfo" >
+ <listitem open="0" type="815" id="379" label="QExtFileInfo" />
+ <listitem open="0" type="814" id="375" label="bJobOK" />
+ <listitem open="0" type="815" id="380" label="cdUp" />
+ <listitem open="0" type="815" id="382" label="createDir" />
+ <listitem open="0" type="815" id="384" label="enter_loop" />
+ <listitem open="0" type="815" id="385" label="exists" />
+ <listitem open="0" type="815" id="387" label="home" />
+ <listitem open="0" type="815" id="388" label="internalExists" />
+ <listitem open="0" type="814" id="376" label="lastErrorMsg" />
+ <listitem open="0" type="814" id="377" label="lstFilters" />
+ <listitem open="0" type="815" id="390" label="path" />
+ <listitem open="0" type="815" id="392" label="shortName" />
+ <listitem open="0" type="814" id="378" label="timer" />
+ <listitem open="0" type="815" id="394" label="toAbsolute" />
+ <listitem open="0" type="815" id="397" label="toRelative" />
+ <listitem open="0" type="815" id="400" label="~QExtFileInfo" />
+ </listitem>
+ <listitem open="0" type="813" id="658" label="QTag" >
+ <listitem open="0" type="815" id="669" label="=" />
+ <listitem open="0" type="815" id="672" label="QTag" />
+ <listitem open="0" type="815" id="671" label="QTag" />
+ <listitem open="0" type="815" id="674" label="addAttribute" />
+ <listitem open="0" type="815" id="676" label="attribute" />
+ <listitem open="0" type="815" id="678" label="attributeAt" />
+ <listitem open="0" type="815" id="680" label="attributeCount" />
+ <listitem open="0" type="815" id="681" label="attributes" />
+ <listitem open="0" type="814" id="659" label="attrs" />
+ <listitem open="0" type="814" id="660" label="commonGroups" />
+ <listitem open="0" type="815" id="682" label="fileName" />
+ <listitem open="0" type="815" id="683" label="isOptional" />
+ <listitem open="0" type="815" id="684" label="isSingle" />
+ <listitem open="0" type="814" id="661" label="m_fileName" />
+ <listitem open="0" type="815" id="685" label="name" />
+ <listitem open="0" type="814" id="662" label="optional" />
+ <listitem open="0" type="814" id="663" label="parentDTD" />
+ <listitem open="0" type="814" id="664" label="returnType" />
+ <listitem open="0" type="815" id="686" label="setFileName" />
+ <listitem open="0" type="815" id="688" label="setName" />
+ <listitem open="0" type="815" id="690" label="setOptional" />
+ <listitem open="0" type="815" id="692" label="setSingle" />
+ <listitem open="0" type="814" id="665" label="single" />
+ <listitem open="0" type="814" id="666" label="stoppingTags" />
+ <listitem open="0" type="814" id="667" label="tagName" />
+ <listitem open="0" type="814" id="668" label="type" />
+ <listitem open="0" type="815" id="694" label="~QTag" />
+ </listitem>
+ <listitem open="0" type="813" id="112" label="QuantaApp" >
+ <listitem open="0" type="815" id="205" label="QuantaApp" />
+ <listitem open="0" type="815" id="206" label="actions" />
+ <listitem open="0" type="815" id="207" label="allToolbarsHidden" />
+ <listitem open="0" type="814" id="113" label="bookmarkClear" />
+ <listitem open="0" type="814" id="114" label="bookmarkToggle" />
+ <listitem open="0" type="814" id="115" label="bottdock" />
+ <listitem open="0" type="814" id="116" label="bottomWidgetStack" />
+ <listitem open="0" type="814" id="117" label="closeprjAction" />
+ <listitem open="0" type="814" id="118" label="config" />
+ <listitem open="0" type="815" id="208" label="createContainer" />
+ <listitem open="0" type="814" id="119" label="currentToolbarDTD" />
+ <listitem open="0" type="814" id="120" label="dTab" />
+ <listitem open="0" type="814" id="121" label="dbg3" />
+ <listitem open="0" type="814" id="122" label="dbg4" />
+ <listitem open="0" type="814" id="123" label="debuggerStyle" />
+ <listitem open="0" type="815" id="213" label="defaultEncoding" />
+ <listitem open="0" type="814" id="124" label="doc" />
+ <listitem open="0" type="814" id="125" label="dtabdock" />
+ <listitem open="0" type="814" id="126" label="editRedo" />
+ <listitem open="0" type="814" id="127" label="editTagAction" />
+ <listitem open="0" type="814" id="128" label="editUndo" />
+ <listitem open="0" type="814" id="129" label="exitingFlag" />
+ <listitem open="0" type="814" id="130" label="fLTab" />
+ <listitem open="0" type="814" id="131" label="fTTab" />
+ <listitem open="0" type="814" id="132" label="fTab" />
+ <listitem open="0" type="814" id="133" label="fileRecent" />
+ <listitem open="0" type="815" id="214" label="focusInEvent" />
+ <listitem open="0" type="814" id="134" label="ftabdock" />
+ <listitem open="0" type="815" id="216" label="getDoc" />
+ <listitem open="0" type="815" id="217" label="getMessages" />
+ <listitem open="0" type="815" id="218" label="getProject" />
+ <listitem open="0" type="815" id="219" label="getView" />
+ <listitem open="0" type="814" id="135" label="grepDialog" />
+ <listitem open="0" type="815" id="220" label="htmlPart" />
+ <listitem open="0" type="814" id="136" label="htmlPartDoc" />
+ <listitem open="0" type="814" id="137" label="htmlpart" />
+ <listitem open="0" type="815" id="221" label="initActions" />
+ <listitem open="0" type="815" id="222" label="initDocument" />
+ <listitem open="0" type="815" id="223" label="initPlugins" />
+ <listitem open="0" type="815" id="224" label="initProject" />
+ <listitem open="0" type="815" id="225" label="initQuanta" />
+ <listitem open="0" type="815" id="226" label="initStatusBar" />
+ <listitem open="0" type="815" id="227" label="initTagDict" />
+ <listitem open="0" type="815" id="228" label="initView" />
+ <listitem open="0" type="814" id="138" label="insertDirAction" />
+ <listitem open="0" type="814" id="139" label="insertFileAction" />
+ <listitem open="0" type="814" id="140" label="leftdock" />
+ <listitem open="0" type="815" id="229" label="loadInitialProject" />
+ <listitem open="0" type="815" id="231" label="loadToolbarForDTD" />
+ <listitem open="0" type="814" id="141" label="m_actions" />
+ <listitem open="0" type="814" id="142" label="m_oldTreeViewWidget" />
+ <listitem open="0" type="814" id="143" label="m_pluginInterface" />
+ <listitem open="0" type="814" id="144" label="m_pluginMenu" />
+ <listitem open="0" type="814" id="145" label="m_tagsMenu" />
+ <listitem open="0" type="814" id="146" label="maindock" />
+ <listitem open="0" type="814" id="147" label="markList" />
+ <listitem open="0" type="814" id="148" label="messageOutput" />
+ <listitem open="0" type="815" id="233" label="newFileType" />
+ <listitem open="0" type="814" id="149" label="newPrjAction" />
+ <listitem open="0" type="814" id="150" label="openPrjAction" />
+ <listitem open="0" type="814" id="151" label="openPrjViewAction" />
+ <listitem open="0" type="815" id="234" label="outputDockWidget" />
+ <listitem open="0" type="814" id="152" label="pTab" />
+ <listitem open="0" type="814" id="153" label="phpDebugPort" />
+ <listitem open="0" type="815" id="235" label="pluginMenu" />
+ <listitem open="0" type="814" id="154" label="pm_bookmark" />
+ <listitem open="0" type="814" id="155" label="pm_set" />
+ <listitem open="0" type="814" id="156" label="previewCopyMade" />
+ <listitem open="0" type="814" id="157" label="previewTmpFile" />
+ <listitem open="0" type="815" id="236" label="processDTD" />
+ <listitem open="0" type="814" id="158" label="project" />
+ <listitem open="0" type="815" id="238" label="projectBaseURL" />
+ <listitem open="0" type="814" id="159" label="projectOptionAction" />
+ <listitem open="0" type="814" id="160" label="projectToolbarFiles" />
+ <listitem open="0" type="814" id="161" label="ptabdock" />
+ <listitem open="0" type="814" id="162" label="quantaStarted" />
+ <listitem open="0" type="815" id="239" label="queryClose" />
+ <listitem open="0" type="815" id="240" label="readOptions" />
+ <listitem open="0" type="815" id="241" label="readTagDir" />
+ <listitem open="0" type="815" id="243" label="readTagFile" />
+ <listitem open="0" type="814" id="163" label="redoAction" />
+ <listitem open="0" type="814" id="164" label="refreshTimer" />
+ <listitem open="0" type="815" id="247" label="removeContainer" />
+ <listitem open="0" type="815" id="252" label="removeToolbar" />
+ <listitem open="0" type="814" id="165" label="rescanPrjDirAction" />
+ <listitem open="0" type="814" id="166" label="rightWidgetStack" />
+ <listitem open="0" type="814" id="167" label="sTab" />
+ <listitem open="0" type="814" id="168" label="saveAction" />
+ <listitem open="0" type="814" id="169" label="saveAllAction" />
+ <listitem open="0" type="814" id="170" label="saveAsLocalTemplateAction" />
+ <listitem open="0" type="814" id="171" label="saveAsPrjViewAction" />
+ <listitem open="0" type="814" id="172" label="saveAsProjectTemplateAction" />
+ <listitem open="0" type="815" id="254" label="saveAsTemplate" />
+ <listitem open="0" type="815" id="257" label="saveModifiedToolbars" />
+ <listitem open="0" type="815" id="258" label="saveOptions" />
+ <listitem open="0" type="814" id="173" label="savePrjViewAction" />
+ <listitem open="0" type="814" id="174" label="saveSelectionAsLocalTemplateAction" />
+ <listitem open="0" type="814" id="175" label="saveSelectionAsProjectTemplateAction" />
+ <listitem open="0" type="815" id="259" label="saveToolBar" />
+ <listitem open="0" type="814" id="176" label="saveprjAction" />
+ <listitem open="0" type="814" id="177" label="scriptBeginRxStr" />
+ <listitem open="0" type="814" id="178" label="scriptEndRxStr" />
+ <listitem open="0" type="815" id="262" label="setAttributes" />
+ <listitem open="0" type="814" id="179" label="setEndOfLine" />
+ <listitem open="0" type="814" id="180" label="showDTDToolbar" />
+ <listitem open="0" type="814" id="181" label="showDTabAction" />
+ <listitem open="0" type="814" id="182" label="showFTabAction" />
+ <listitem open="0" type="814" id="183" label="showMessagesAction" />
+ <listitem open="0" type="814" id="184" label="showPTabAction" />
+ <listitem open="0" type="814" id="185" label="showPreviewAction" />
+ <listitem open="0" type="814" id="186" label="showSTabAction" />
+ <listitem open="0" type="814" id="187" label="showStatusbarAction" />
+ <listitem open="0" type="814" id="188" label="showTTabAction" />
+ <listitem open="0" type="814" id="189" label="showToolbarAction" />
+ <listitem open="0" type="815" id="265" label="showToolbarFile" />
+ <listitem open="0" type="814" id="190" label="showTreeAction" />
+ <listitem open="0" type="814" id="191" label="spellChecker" />
+ <listitem open="0" type="814" id="192" label="stabdock" />
+ <listitem open="0" type="814" id="193" label="statusbarTimer" />
+ <listitem open="0" type="814" id="194" label="tTab" />
+ <listitem open="0" type="815" id="267" label="tagsMenu" />
+ <listitem open="0" type="814" id="195" label="tempFileList" />
+ <listitem open="0" type="815" id="268" label="toolbarByURL" />
+ <listitem open="0" type="814" id="196" label="toolbarList" />
+ <listitem open="0" type="815" id="270" label="toolbarMenu" />
+ <listitem open="0" type="814" id="197" label="ttabdock" />
+ <listitem open="0" type="814" id="198" label="undoAction" />
+ <listitem open="0" type="814" id="199" label="uploadProjectAction" />
+ <listitem open="0" type="814" id="200" label="userToolbarsCount" />
+ <listitem open="0" type="814" id="201" label="view" />
+ <listitem open="0" type="814" id="202" label="viewBorder" />
+ <listitem open="0" type="814" id="203" label="viewDynamicWordWrap" />
+ <listitem open="0" type="814" id="204" label="viewLineNumbers" />
+ <listitem open="0" type="815" id="272" label="widgetStackOfHtmlPart" />
+ <listitem open="0" type="815" id="273" label="~QuantaApp" />
+ </listitem>
+ <listitem open="0" type="813" id="725" label="QuantaCmdPlugin" >
+ <listitem open="0" type="815" id="728" label="QuantaCmdPlugin" />
+ <listitem open="0" type="815" id="729" label="isLoaded" />
+ <listitem open="0" type="815" id="730" label="load" />
+ <listitem open="0" type="814" id="726" label="m_firstOutput" />
+ <listitem open="0" type="814" id="727" label="m_process" />
+ <listitem open="0" type="815" id="731" label="makeQString" />
+ <listitem open="0" type="815" id="734" label="run" />
+ <listitem open="0" type="815" id="735" label="toggle" />
+ <listitem open="0" type="815" id="736" label="unload" />
+ <listitem open="0" type="815" id="737" label="~QuantaCmdPlugin" />
+ </listitem>
+ <listitem open="0" type="813" id="307" label="QuantaCommon" >
+ <listitem open="0" type="815" id="308" label="QuantaCommon" />
+ <listitem open="0" type="815" id="309" label="attrCase" />
+ <listitem open="0" type="815" id="311" label="checkExactMimeType" />
+ <listitem open="0" type="815" id="314" label="checkMimeGroup" />
+ <listitem open="0" type="815" id="317" label="checkMimeType" />
+ <listitem open="0" type="815" id="320" label="convertToPath" />
+ <listitem open="0" type="815" id="322" label="dirCreationError" />
+ <listitem open="0" type="815" id="325" label="getDTDNameFromNickName" />
+ <listitem open="0" type="815" id="327" label="getDTDNickNameFromName" />
+ <listitem open="0" type="815" id="329" label="i18n2normal" />
+ <listitem open="0" type="815" id="331" label="isBetween" />
+ <listitem open="0" type="815" id="338" label="isKnownTag" />
+ <listitem open="0" type="815" id="341" label="isOptionalTag" />
+ <listitem open="0" type="815" id="344" label="isSingleTag" />
+ <listitem open="0" type="815" id="347" label="makeRxCompatible" />
+ <listitem open="0" type="815" id="349" label="pluginDirs" />
+ <listitem open="0" type="815" id="351" label="qUrl" />
+ <listitem open="0" type="815" id="353" label="setUrl" />
+ <listitem open="0" type="815" id="356" label="tagAttributeValues" />
+ <listitem open="0" type="815" id="360" label="tagAttributes" />
+ <listitem open="0" type="815" id="363" label="tagCase" />
+ <listitem open="0" type="815" id="365" label="tagFromDTD" />
+ <listitem open="0" type="815" id="368" label="tagFromDTD" />
+ <listitem open="0" type="815" id="371" label="xmlFromAttributes" />
+ <listitem open="0" type="815" id="373" label="~QuantaCommon" />
+ </listitem>
+ <listitem open="0" type="813" id="274" label="QuantaDoc" >
+ <listitem open="0" type="815" id="276" label="QuantaDoc" />
+ <listitem open="0" type="814" id="275" label="attribMenu" />
+ <listitem open="0" type="815" id="279" label="changeFileTabName" />
+ <listitem open="0" type="815" id="281" label="closeDocument" />
+ <listitem open="0" type="815" id="282" label="isModified" />
+ <listitem open="0" type="815" id="283" label="isModifiedAll" />
+ <listitem open="0" type="815" id="284" label="isOpened" />
+ <listitem open="0" type="815" id="286" label="newDocument" />
+ <listitem open="0" type="815" id="288" label="newWrite" />
+ <listitem open="0" type="815" id="289" label="nextDocument" />
+ <listitem open="0" type="815" id="290" label="openDocument" />
+ <listitem open="0" type="815" id="293" label="prevDocument" />
+ <listitem open="0" type="815" id="294" label="readConfig" />
+ <listitem open="0" type="815" id="296" label="saveAll" />
+ <listitem open="0" type="815" id="298" label="saveDocument" />
+ <listitem open="0" type="815" id="300" label="saveModified" />
+ <listitem open="0" type="815" id="301" label="setModified" />
+ <listitem open="0" type="815" id="303" label="write" />
+ <listitem open="0" type="815" id="304" label="writeConfig" />
+ <listitem open="0" type="815" id="306" label="~QuantaDoc" />
+ </listitem>
+ <listitem open="0" type="813" id="785" label="QuantaKPartPlugin" >
+ <listitem open="0" type="815" id="786" label="QuantaKPartPlugin" />
+ <listitem open="0" type="815" id="787" label="isLoaded" />
+ <listitem open="0" type="815" id="788" label="load" />
+ <listitem open="0" type="815" id="789" label="run" />
+ <listitem open="0" type="815" id="790" label="toggle" />
+ <listitem open="0" type="815" id="791" label="unload" />
+ <listitem open="0" type="815" id="792" label="~QuantaKPartPlugin" />
+ </listitem>
+ <listitem open="0" type="813" id="793" label="QuantaPlugin" >
+ <listitem open="0" type="815" id="806" label="QuantaPlugin" />
+ <listitem open="0" type="815" id="805" label="QuantaPlugin" />
+ <listitem open="0" type="815" id="814" label="arguments" />
+ <listitem open="0" type="815" id="815" label="fileName" />
+ <listitem open="0" type="815" id="816" label="isLoaded" />
+ <listitem open="0" type="815" id="817" label="isRunning" />
+ <listitem open="0" type="815" id="818" label="isStandard" />
+ <listitem open="0" type="815" id="819" label="load" />
+ <listitem open="0" type="815" id="820" label="location" />
+ <listitem open="0" type="814" id="794" label="m_action" />
+ <listitem open="0" type="814" id="795" label="m_arguments" />
+ <listitem open="0" type="814" id="796" label="m_fileName" />
+ <listitem open="0" type="814" id="797" label="m_icon" />
+ <listitem open="0" type="814" id="798" label="m_isRunning" />
+ <listitem open="0" type="814" id="799" label="m_location" />
+ <listitem open="0" type="814" id="800" label="m_name" />
+ <listitem open="0" type="814" id="801" label="m_outputWindow" />
+ <listitem open="0" type="814" id="802" label="m_standard" />
+ <listitem open="0" type="814" id="803" label="m_standardName" />
+ <listitem open="0" type="814" id="804" label="m_type" />
+ <listitem open="0" type="815" id="821" label="outputWindow" />
+ <listitem open="0" type="815" id="822" label="pluginName" />
+ <listitem open="0" type="815" id="823" label="run" />
+ <listitem open="0" type="815" id="824" label="setArguments" />
+ <listitem open="0" type="815" id="826" label="setFileName" />
+ <listitem open="0" type="815" id="828" label="setLocation" />
+ <listitem open="0" type="815" id="830" label="setOutputWindow" />
+ <listitem open="0" type="815" id="832" label="setPluginName" />
+ <listitem open="0" type="815" id="834" label="setRunning" />
+ <listitem open="0" type="815" id="836" label="setStandard" />
+ <listitem open="0" type="815" id="838" label="setType" />
+ <listitem open="0" type="815" id="840" label="toggle" />
+ <listitem open="0" type="815" id="841" label="type" />
+ <listitem open="0" type="815" id="842" label="unload" />
+ <listitem open="0" type="815" id="843" label="validatePlugin" />
+ <listitem open="0" type="815" id="845" label="validatePluginInfo" />
+ <listitem open="0" type="815" id="852" label="~QuantaPlugin" />
+ </listitem>
+ <listitem open="0" type="813" id="762" label="QuantaPluginConfig" >
+ <listitem open="0" type="815" id="763" label="QuantaPluginConfig" />
+ <listitem open="0" type="815" id="766" label="~QuantaPluginConfig" />
+ </listitem>
+ <listitem open="0" type="813" id="747" label="QuantaPluginEditor" >
+ <listitem open="0" type="815" id="749" label="QuantaPluginEditor" />
+ <listitem open="0" type="814" id="748" label="m_plugins" />
+ <listitem open="0" type="815" id="752" label="plugins" />
+ <listitem open="0" type="815" id="753" label="searchPathList" />
+ <listitem open="0" type="815" id="754" label="setSearchPaths" />
+ <listitem open="0" type="815" id="756" label="~QuantaPluginEditor" />
+ </listitem>
+ <listitem open="0" type="813" id="853" label="QuantaPluginInterface" >
+ <listitem open="0" type="815" id="856" label="QuantaPluginInterface" />
+ <listitem open="0" type="814" id="854" label="m_pluginNames" />
+ <listitem open="0" type="814" id="855" label="m_plugins" />
+ <listitem open="0" type="815" id="857" label="outputWindows" />
+ <listitem open="0" type="815" id="859" label="plugin" />
+ <listitem open="0" type="815" id="861" label="pluginAvailable" />
+ <listitem open="0" type="815" id="863" label="pluginNames" />
+ <listitem open="0" type="815" id="864" label="pluginTypes" />
+ <listitem open="0" type="815" id="865" label="plugins" />
+ <listitem open="0" type="815" id="866" label="readConfig" />
+ <listitem open="0" type="815" id="867" label="searchPaths" />
+ <listitem open="0" type="815" id="868" label="setPluginNames" />
+ <listitem open="0" type="815" id="870" label="setPlugins" />
+ <listitem open="0" type="815" id="872" label="setSearchPaths" />
+ <listitem open="0" type="815" id="874" label="writeConfig" />
+ <listitem open="0" type="815" id="875" label="~QuantaPluginInterface" />
+ </listitem>
+ <listitem open="0" type="813" id="74" label="QuantaView" >
+ <listitem open="0" type="815" id="86" label="QuantaView" />
+ <listitem open="0" type="815" id="89" label="addWrite" />
+ <listitem open="0" type="815" id="92" label="baseURL" />
+ <listitem open="0" type="814" id="75" label="beginOfScriptError" />
+ <listitem open="0" type="814" id="76" label="beginOfScriptOutput" />
+ <listitem open="0" type="814" id="77" label="column" />
+ <listitem open="0" type="814" id="78" label="doc" />
+ <listitem open="0" type="814" id="79" label="dontShowSavePreview" />
+ <listitem open="0" type="815" id="93" label="dragEnterEvent" />
+ <listitem open="0" type="815" id="95" label="dropEvent" />
+ <listitem open="0" type="815" id="97" label="getToolbarTab" />
+ <listitem open="0" type="815" id="98" label="initActions" />
+ <listitem open="0" type="815" id="99" label="initMenu" />
+ <listitem open="0" type="815" id="100" label="insertNewTag" />
+ <listitem open="0" type="815" id="104" label="insertTag" />
+ <listitem open="0" type="814" id="80" label="oldWrite" />
+ <listitem open="0" type="815" id="106" label="removeWrite" />
+ <listitem open="0" type="815" id="107" label="resizeEvent" />
+ <listitem open="0" type="814" id="81" label="scriptErrorDest" />
+ <listitem open="0" type="814" id="82" label="scriptOutputDest" />
+ <listitem open="0" type="814" id="83" label="space" />
+ <listitem open="0" type="814" id="84" label="toolbarTab" />
+ <listitem open="0" type="815" id="109" label="write" />
+ <listitem open="0" type="815" id="110" label="writeExists" />
+ <listitem open="0" type="814" id="85" label="writeTab" />
+ <listitem open="0" type="815" id="111" label="~QuantaView" />
+ </listitem>
+ <listitem open="0" type="813" id="1348" label="RescanPrj" >
+ <listitem open="0" type="815" id="1351" label="RescanPrj" />
+ <listitem open="0" type="814" id="1349" label="baseURL" />
+ <listitem open="0" type="815" id="1357" label="resizeEvent" />
+ <listitem open="0" type="814" id="1350" label="urlList" />
+ <listitem open="0" type="815" id="1359" label="~RescanPrj" />
+ </listitem>
+ <listitem open="0" type="813" id="767" label="SpellChecker" >
+ <listitem open="0" type="815" id="771" label="SpellChecker" />
+ <listitem open="0" type="815" id="774" label="locatePosition" />
+ <listitem open="0" type="814" id="768" label="m_kspell" />
+ <listitem open="0" type="814" id="769" label="m_mispellCount" />
+ <listitem open="0" type="814" id="770" label="m_replaceCount" />
+ <listitem open="0" type="815" id="778" label="readConfig" />
+ <listitem open="0" type="815" id="780" label="spellCheck" />
+ <listitem open="0" type="815" id="782" label="writeConfig" />
+ <listitem open="0" type="815" id="784" label="~SpellChecker" />
+ </listitem>
+ <listitem open="0" type="813" id="1211" label="StructTreeTag" >
+ <listitem open="0" type="815" id="1213" label="StructTreeTag" />
+ <listitem open="0" type="815" id="1216" label="StructTreeTag" />
+ <listitem open="0" type="815" id="1221" label="StructTreeTag" />
+ <listitem open="0" type="814" id="1212" label="node" />
+ <listitem open="0" type="815" id="1224" label="~StructTreeTag" />
+ </listitem>
+ <listitem open="0" type="813" id="1126" label="StructTreeView" >
+ <listitem open="0" type="815" id="1144" label="StructTreeView" />
+ <listitem open="0" type="815" id="1149" label="buildTree" />
+ <listitem open="0" type="814" id="1127" label="config" />
+ <listitem open="0" type="815" id="1152" label="deleteList" />
+ <listitem open="0" type="814" id="1128" label="dtdList" />
+ <listitem open="0" type="814" id="1129" label="dtdMenu" />
+ <listitem open="0" type="815" id="1153" label="followCursor" />
+ <listitem open="0" type="814" id="1130" label="followCursorFlag" />
+ <listitem open="0" type="814" id="1131" label="followCursorId" />
+ <listitem open="0" type="814" id="1132" label="groupOpened" />
+ <listitem open="0" type="814" id="1133" label="groups" />
+ <listitem open="0" type="814" id="1134" label="groupsCount" />
+ <listitem open="0" type="814" id="1135" label="lastTag" />
+ <listitem open="0" type="814" id="1136" label="m_parsingDTD" />
+ <listitem open="0" type="814" id="1137" label="parser" />
+ <listitem open="0" type="814" id="1138" label="popupMenu" />
+ <listitem open="0" type="815" id="1154" label="setFollowCursor" />
+ <listitem open="0" type="815" id="1156" label="setOpenSubTree" />
+ <listitem open="0" type="815" id="1159" label="setParsingDTD" />
+ <listitem open="0" type="815" id="1161" label="showEvent" />
+ <listitem open="0" type="815" id="1163" label="showTagAtPos" />
+ <listitem open="0" type="814" id="1139" label="timer" />
+ <listitem open="0" type="814" id="1140" label="top" />
+ <listitem open="0" type="814" id="1141" label="topOpened" />
+ <listitem open="0" type="814" id="1142" label="useOpenLevelSetting" />
+ <listitem open="0" type="814" id="1143" label="write" />
+ <listitem open="0" type="815" id="1166" label="~StructTreeView" />
+ </listitem>
+ <listitem open="0" type="813" id="586" label="Tag" >
+ <listitem open="0" type="815" id="602" label="=" />
+ <listitem open="0" type="815" id="605" label="Tag" />
+ <listitem open="0" type="815" id="604" label="Tag" />
+ <listitem open="0" type="814" id="587" label="attrCount" />
+ <listitem open="0" type="815" id="607" label="attribute" />
+ <listitem open="0" type="815" id="609" label="attributeIndex" />
+ <listitem open="0" type="815" id="611" label="attributeIndexAtPos" />
+ <listitem open="0" type="815" id="614" label="attributeNamePos" />
+ <listitem open="0" type="815" id="620" label="attributeValue" />
+ <listitem open="0" type="815" id="618" label="attributeValue" />
+ <listitem open="0" type="815" id="622" label="attributeValuePos" />
+ <listitem open="0" type="814" id="588" label="attrs" />
+ <listitem open="0" type="814" id="589" label="beginCol" />
+ <listitem open="0" type="814" id="590" label="beginLine" />
+ <listitem open="0" type="815" id="626" label="beginPos" />
+ <listitem open="0" type="814" id="591" label="cleanStr" />
+ <listitem open="0" type="814" id="592" label="closingMissing" />
+ <listitem open="0" type="814" id="593" label="dtd" />
+ <listitem open="0" type="814" id="594" label="endCol" />
+ <listitem open="0" type="814" id="595" label="endLine" />
+ <listitem open="0" type="815" id="629" label="endPos" />
+ <listitem open="0" type="815" id="632" label="hasAttribute" />
+ <listitem open="0" type="815" id="634" label="isQuotedAttribute" />
+ <listitem open="0" type="814" id="596" label="m_tagStr" />
+ <listitem open="0" type="814" id="597" label="m_write" />
+ <listitem open="0" type="814" id="598" label="name" />
+ <listitem open="0" type="815" id="636" label="parse" />
+ <listitem open="0" type="815" id="639" label="parseAttr" />
+ <listitem open="0" type="815" id="643" label="setStr" />
+ <listitem open="0" type="815" id="645" label="setTagPosition" />
+ <listitem open="0" type="815" id="650" label="setWrite" />
+ <listitem open="0" type="814" id="599" label="single" />
+ <listitem open="0" type="814" id="600" label="structBeginStr" />
+ <listitem open="0" type="815" id="652" label="tagStr" />
+ <listitem open="0" type="814" id="601" label="type" />
+ <listitem open="0" type="815" id="653" label="valueIndexAtPos" />
+ <listitem open="0" type="815" id="656" label="write" />
+ <listitem open="0" type="815" id="657" label="~Tag" />
+ </listitem>
+ <listitem open="0" type="813" id="1479" label="TagAction" >
+ <listitem open="0" type="815" id="1487" label="TagAction" />
+ <listitem open="0" type="815" id="1489" label="TagAction" />
+ <listitem open="0" type="815" id="1492" label="data" />
+ <listitem open="0" type="814" id="1480" label="firstError" />
+ <listitem open="0" type="814" id="1481" label="firstOutput" />
+ <listitem open="0" type="815" id="1493" label="insertTag" />
+ <listitem open="0" type="814" id="1482" label="m_view" />
+ <listitem open="0" type="814" id="1483" label="proc" />
+ <listitem open="0" type="815" id="1494" label="scriptDone" />
+ <listitem open="0" type="814" id="1484" label="scriptErrorDest" />
+ <listitem open="0" type="814" id="1485" label="scriptOutputDest" />
+ <listitem open="0" type="815" id="1495" label="slotGetScriptError" />
+ <listitem open="0" type="815" id="1499" label="slotGetScriptOutput" />
+ <listitem open="0" type="814" id="1486" label="tag" />
+ <listitem open="0" type="815" id="1503" label="~TagAction" />
+ </listitem>
+ <listitem open="0" type="813" id="1407" label="TagDialog" >
+ <listitem open="0" type="815" id="1415" label="TagDialog" />
+ <listitem open="0" type="815" id="1419" label="TagDialog" />
+ <listitem open="0" type="815" id="1423" label="baseURL" />
+ <listitem open="0" type="814" id="1408" label="deleteTag" />
+ <listitem open="0" type="814" id="1409" label="dict" />
+ <listitem open="0" type="814" id="1410" label="dtdTag" />
+ <listitem open="0" type="814" id="1411" label="extraPageList" />
+ <listitem open="0" type="815" id="1424" label="getAttribute" />
+ <listitem open="0" type="815" id="1426" label="getAttributeString" />
+ <listitem open="0" type="815" id="1427" label="getAttributes" />
+ <listitem open="0" type="815" id="1428" label="init" />
+ <listitem open="0" type="815" id="1431" label="insertAttribute" />
+ <listitem open="0" type="815" id="1434" label="insertTag" />
+ <listitem open="0" type="814" id="1412" label="m_baseURL" />
+ <listitem open="0" type="814" id="1413" label="m_tag" />
+ <listitem open="0" type="814" id="1414" label="mainDlg" />
+ <listitem open="0" type="815" id="1437" label="parseAttributes" />
+ <listitem open="0" type="815" id="1439" label="parseTag" />
+ <listitem open="0" type="815" id="1440" label="~TagDialog" />
+ </listitem>
+ <listitem open="0" type="813" id="1442" label="TagImgDlg" >
+ <listitem open="0" type="814" id="1443" label="QLabel_10" />
+ <listitem open="0" type="814" id="1444" label="QLabel_4" />
+ <listitem open="0" type="814" id="1445" label="QLabel_5" />
+ <listitem open="0" type="814" id="1446" label="QLabel_6" />
+ <listitem open="0" type="814" id="1447" label="QLabel_7" />
+ <listitem open="0" type="814" id="1448" label="QLabel_8" />
+ <listitem open="0" type="814" id="1449" label="QLabel_9" />
+ <listitem open="0" type="815" id="1465" label="TagImgDlg" />
+ <listitem open="0" type="814" id="1450" label="buttonCancel" />
+ <listitem open="0" type="814" id="1451" label="buttonImgSource" />
+ <listitem open="0" type="814" id="1452" label="buttonOk" />
+ <listitem open="0" type="814" id="1453" label="buttonRecalcImgSize" />
+ <listitem open="0" type="814" id="1454" label="comboAlign" />
+ <listitem open="0" type="814" id="1455" label="img" />
+ <listitem open="0" type="815" id="1468" label="initDialog" />
+ <listitem open="0" type="814" id="1456" label="labelImgSource" />
+ <listitem open="0" type="814" id="1457" label="lineAltText" />
+ <listitem open="0" type="814" id="1458" label="lineHSpace" />
+ <listitem open="0" type="814" id="1459" label="lineHeight" />
+ <listitem open="0" type="814" id="1460" label="lineImgSource" />
+ <listitem open="0" type="814" id="1461" label="lineVSpace" />
+ <listitem open="0" type="814" id="1462" label="lineWidth" />
+ <listitem open="0" type="814" id="1463" label="spinBorder" />
+ <listitem open="0" type="814" id="1464" label="widgetImg" />
+ <listitem open="0" type="815" id="1469" label="~TagImgDlg" />
+ </listitem>
+ <listitem open="0" type="813" id="1530" label="TagQuickStart" >
+ <listitem open="0" type="815" id="1532" label="TagQuickStart" />
+ <listitem open="0" type="814" id="1531" label="baseURL" />
+ <listitem open="0" type="815" id="1536" label="~TagQuickStart" />
+ </listitem>
+ <listitem open="0" type="813" id="1470" label="TagQuickTable" >
+ <listitem open="0" type="815" id="1472" label="TagQuickTable" />
+ <listitem open="0" type="814" id="1471" label="write" />
+ <listitem open="0" type="815" id="1476" label="~TagQuickTable" />
+ </listitem>
+ <listitem open="0" type="813" id="1187" label="TemplatesTreeView" >
+ <listitem open="0" type="815" id="1195" label="TemplatesTreeView" />
+ <listitem open="0" type="814" id="1188" label="baseURL" />
+ <listitem open="0" type="815" id="1199" label="contentsDropEvent" />
+ <listitem open="0" type="814" id="1189" label="deleteMenuId" />
+ <listitem open="0" type="815" id="1201" label="dragObject" />
+ <listitem open="0" type="814" id="1190" label="globalDir" />
+ <listitem open="0" type="814" id="1191" label="localDir" />
+ <listitem open="0" type="814" id="1192" label="openId" />
+ <listitem open="0" type="814" id="1193" label="projectDir" />
+ <listitem open="0" type="814" id="1194" label="quantaProperties" />
+ <listitem open="0" type="815" id="1202" label="readDirInfo" />
+ <listitem open="0" type="815" id="1204" label="slotInsertTag" />
+ <listitem open="0" type="815" id="1205" label="slotProperties" />
+ <listitem open="0" type="815" id="1206" label="slotPropertiesApplied" />
+ <listitem open="0" type="815" id="1207" label="slotReload" />
+ <listitem open="0" type="815" id="1208" label="writeDirInfo" />
+ <listitem open="0" type="815" id="1210" label="~TemplatesTreeView" />
+ </listitem>
+ <listitem open="0" type="813" id="1167" label="UploadTreeFile" >
+ <listitem open="0" type="815" id="1175" label="UploadTreeFile" />
+ <listitem open="0" type="815" id="1170" label="UploadTreeFile" />
+ <listitem open="0" type="814" id="1168" label="isDir" />
+ <listitem open="0" type="815" id="1180" label="key" />
+ <listitem open="0" type="814" id="1169" label="m_url" />
+ <listitem open="0" type="815" id="1183" label="setWhichPixmap" />
+ <listitem open="0" type="815" id="1185" label="url" />
+ <listitem open="0" type="815" id="1186" label="~UploadTreeFile" />
+ </listitem>
+ <listitem open="0" type="813" id="1033" label="UploadTreeFolder" >
+ <listitem open="0" type="815" id="1040" label="UploadTreeFolder" />
+ <listitem open="0" type="815" id="1036" label="UploadTreeFolder" />
+ <listitem open="0" type="815" id="1044" label="fullName" />
+ <listitem open="0" type="815" id="1045" label="key" />
+ <listitem open="0" type="814" id="1034" label="m_url" />
+ <listitem open="0" type="814" id="1035" label="parentFolder" />
+ <listitem open="0" type="815" id="1048" label="setOpen" />
+ <listitem open="0" type="815" id="1050" label="setWhichPixmap" />
+ <listitem open="0" type="815" id="1052" label="setup" />
+ <listitem open="0" type="815" id="1053" label="url" />
+ <listitem open="0" type="815" id="1054" label="~UploadTreeFolder" />
+ </listitem>
+ <listitem open="0" type="813" id="1097" label="UploadTreeView" >
+ <listitem open="0" type="815" id="1098" label="UploadTreeView" />
+ <listitem open="0" type="815" id="1101" label="addItem" />
+ <listitem open="0" type="815" id="1105" label="checkboxTree" />
+ <listitem open="0" type="815" id="1107" label="collapseAll" />
+ <listitem open="0" type="815" id="1109" label="expandAll" />
+ <listitem open="0" type="815" id="1111" label="findFolder" />
+ <listitem open="0" type="815" id="1114" label="findItem" />
+ <listitem open="0" type="815" id="1116" label="invertAll" />
+ <listitem open="0" type="815" id="1118" label="itemByUrl" />
+ <listitem open="0" type="815" id="1120" label="printTree" />
+ <listitem open="0" type="815" id="1123" label="selectAll" />
+ <listitem open="0" type="815" id="1125" label="~UploadTreeView" />
+ </listitem>
+ <listitem open="0" type="807" id="73" label="class diagram" />
+ </listitem>
+ <listitem open="1" type="802" id="-1" label="Use Case View" />
+ </listitem>
+ </listview>
+ </XMI.content>
+</XMI>
diff --git a/quanta/scripts/Makefile.am b/quanta/scripts/Makefile.am
new file mode 100644
index 00000000..00a74dea
--- /dev/null
+++ b/quanta/scripts/Makefile.am
@@ -0,0 +1,17 @@
+quantadir = ${quanta_datadir}/scripts
+
+quanta_DATA = scriptinfo.kmdr.info dwt.pl dwt.kmdr.info \
+ tidy.kmdr.info checkxml.kmdr.info meinproc.kmdr.info \
+ xmlval.kmdr.info xsltproc.kmdr.info htmlquickstart.kmdr.info \
+ TemplateMagic.pl TemplateMagic.pl.info info.css externalpreview.sh \
+ info.xsl externalpreview.sh.info dwt.pl.info gubed_install.kmdr.info
+
+
+execquantadir = ${quanta_datadir}/scripts
+
+execquanta_SCRIPTS = scriptinfo.kmdr dwt.kmdr tidy.kmdr \
+ checkxml.kmdr meinproc.kmdr \
+ xmlval.kmdr xsltproc.kmdr \
+ htmlquickstart.kmdr \
+ gubed_install.kmdr \
+ listwizard.kmdr picturewizard.kmdr tablewizard.kmdr docbook_table.kmdr
diff --git a/quanta/scripts/TemplateMagic.pl b/quanta/scripts/TemplateMagic.pl
new file mode 100644
index 00000000..40b3b2d1
--- /dev/null
+++ b/quanta/scripts/TemplateMagic.pl
@@ -0,0 +1,380 @@
+#!/usr/bin/perl
+#
+# Template Magic for Quanta:
+# This script is intended to be used as a sample of some of the possibilities of integrating
+# Kommander and Quanta. It's hoped that this can serve as a basic example of how Kommander works
+# and how it can speed you're web development.
+#
+# This script exists in the public domain and may be freely copied and redistributed. Please just
+# let me know that you used my script and what you're doing (I like new ideas).
+#
+# As usual, if this script by some means manages to do any harm to you, your computer, your animal,
+# your relatives or your animal relatives, feel free to vent to me in email and I'll try to fix the
+# script. You'll have to take care of the livestock.
+#
+# Template variables are of the form [ varname:vartype ] where vartype can be either
+# 'file', 'filename' or 'text'. Filename and file are two slight variations on the same theme
+# as both allow you to select a file from your filesystem, file will insert the contents of that
+# file whereas filename will simply insert the filename (with the path). Text is simply a rich
+# text field that can take a good little bit of text (the limitation if any will exist in
+# Kommander or your computers memory).
+#
+# Cheers,
+# --Robert Nickel <robert@artnickel.com>
+# Quanta Development Team Groupie
+#'
+
+use strict;
+# disable buffereing - otherwise everything waits till we quit
+$| = 1;
+
+my $tmversion = "2.0";
+
+#my $template=`kmdr-executor /tmp/TM.kmdr`;
+
+# adapt - passed parameter is template
+
+my $template = @ARGV[0];
+
+open(IFH, "< $template") || die("Couldn't read $template\n");
+
+my ($tmp,@ar,@OrderedVars,%Vars,%Vals,$i,$k,$v,$l,$r,$ns,@filechars,$fname,@VarData,@VD,$j);
+
+my $max_ui_height=800; #Maximum screen height of ui dialog
+my $calcHeight=0; #Height of ui dialog, up to a max of $max_ui_height
+parseTemplateVars();
+
+close(IFH);
+
+srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
+for (48..57,65..90,97..122) { push @filechars, chr(); } #Chars for tmp filename
+$fname="/tmp/";
+for (0..10) { $fname.=$filechars[rand 62]; }
+$fname.=".quanta.template";
+
+#uncomment this line if you're having grief with the generated kmdr file.'
+#and comment out the rm -f a little farther down.
+#$fname="/tmp/quanta_template.kmdr";
+
+open(OFH, "> $fname") || die("Couldn't create temp file $fname\n");
+&createUI();
+close(OFH);
+
+@VarData=`kmdr-executor $fname`; #We now have var:value one per line.
+
+#Ok. Let's get that pesky template loaded and output it to something useful.'
+#print "Data from kommander:\n";
+$j=0;
+for $i (@VarData) {
+ chomp($i);
+ if($i=~/^\+\+\+\+\z/) { #end of record marker
+ $j++;
+ } else { #add the contents to the end of the string
+ if(length($VD[$j])>0) { $VD[$j].=" "; }
+ $VD[$j].=$i;
+ }
+}
+
+for $i (@VD) {
+ chomp($i);
+ if($i ne "") {
+ ($k,$v)=split(/:/,$i,2); #This should give us key:value pair separated.
+# print "$k: '$v'\n";
+ if(exists($Vars{$k})) {
+ $Vals{$k}=$v;
+ } else { die("Inconsistent variable: $k.\nBailing....\n"); }
+ }
+}
+
+open(IFH, "< $template") || die("Couldn't read $template\n"); #reopen file to reset file pointer
+
+&insertTemplateValues();
+
+close(IFH);
+
+#cleanup temp file
+`rm -f $fname`;
+exit(0);
+
+sub usage() {
+ my $msg=shift();
+ print "$msg\n\nUsage: $0 <path-to-template>\n";
+ exit(1);
+}
+
+sub parseTemplateVars() {
+ $calcHeight=40; #base height for button.
+ @OrderedVars=(); #initialize this! Who knows?
+ while($tmp=<IFH>) {
+ chomp($tmp);
+ if($tmp=~/\[\s*\S+\s*\]/) { #Only parse on matches - Changed delimieters from |<- ->| to [ ]
+ $tmp=~s/^[^\[]*(\[\s*\S+\s*\])[^\[]*/$1/g;
+ $l=index($tmp,"[");
+ while($l>=0) {
+ $r=index($tmp,"]");
+ $ns=substr($tmp,$l+1,$r-1);
+ $ns=~s/\[\s*(\S+)\s*\]/$1/;
+ $ns=~s/\s//g; #no spaces!
+ ($k,$v)=split(/:/,$ns,2);
+ if(exists($Vars{$k}) && $v ne $Vars{$k}) {
+ die("Multiple definitions for variable $k - '$v' != '$Vars{$k}'.\n");
+ }
+ if(! exists($Vars{$k})) { push @OrderedVars, ["$k","$v"]; }
+ $Vars{$k}=$v;
+ $calcHeight+=$v eq "text" ? 35 : 25;
+ $tmp=substr($tmp,$r+1);
+ $l=index($tmp,"[");
+ }
+ }
+ }
+
+=pod
+ print "="x80 . "\n";
+ print "Variables found:\n";
+ for $i (keys %Vars) {
+ print "$i - $Vars{$i}\n";
+ }
+=cut
+}
+
+sub insertTemplateValues() {
+ my ($subcntr, $pre, $post);
+
+ while($tmp=<IFH>) {
+ $subcntr=0; #sanity. Make sure we don't run away with substitutions.'
+ while($tmp=~/\[\s*\S+\s*\]/ && $subcntr<100) { #Only do substitutions on matches.
+ for $k (keys %Vars) {
+ $tmp=~s/\[\s*$k:$Vars{$k}\s*]/$Vals{$k}/;
+ }
+ $subcntr++;
+ }
+ print $tmp;
+ }
+}
+
+sub header() {
+ #----------- Header -----------
+ if($calcHeight>$max_ui_height) { $calcHeight=$max_ui_height; } #Max!
+ print OFH <<E
+ <!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+ <class>TemplateVarList</class>
+ <widget class="Dialog">
+ <property name="name">
+ <cstring>TemplateVarList</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>600</width>
+ <height>$calcHeight</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Template Magic (for Quanta 3.1.9) version $tmversion</string>
+ </property>
+E
+;
+}
+
+sub footer() {
+ #----------- Footer -----------
+ my $theSpot=$calcHeight-30;
+ print OFH <<E
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>300</x>
+ <y>$theSpot</y>
+ <width>121</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Create Document</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>
+E
+;
+
+ $i=0;
+ for $k (keys %Vars) {
+ if($i>0) { print OFH "\n"; }
+ $i++;
+ print OFH "echo -e '$k:\@$k\\n++++'";
+ }
+print OFH <<E
+ </string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </widget>
+ <layoutdefaults spacing="6" margin="11"/>
+ </UI>
+
+E
+;
+}
+
+sub createUI() {
+=pod
+Structure for label widget: height is 20
+
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>40</y>
+ <width>130</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Variable2-FileInput</string>
+ </property>
+ </widget>
+
+Structure for a file widget: height is 20
+
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector2</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>50</y>
+ <width>441</width>
+ <height>20</height>
+ </rect>
+ </property>
+ </widget>
+
+Structure for a text widget: height is 30
+
+ <widget class="TextEdit">
+ <property name="name">
+ <cstring>TextEdit1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>10</y>
+ <width>440</width>
+ <height>30</height>
+ </rect>
+ </property>
+ <property name="vScrollBarMode">
+ <enum>AlwaysOff</enum>
+ </property>
+ <property name="hScrollBarMode">
+ <enum>AlwaysOff</enum>
+ </property>
+ </widget>
+.
+=cut
+
+ header();
+
+ my %Layouts;
+ my ($y_loc)=0;
+ for $k (0..$#OrderedVars) {
+ $Layouts{$OrderedVars[$k][0]}{y}=$y_loc;
+ print OFH <<E
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>LBL_$OrderedVars[$k][0]</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>$y_loc</y>
+ <width>130</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>$OrderedVars[$k][0]:</string>
+ </property>
+ </widget>
+E
+;
+ SWITCH: for ($OrderedVars[$k][1]) {
+ /file|filename/ && do { $y_loc+=25; last SWITCH; };
+ /text/ && do { $y_loc+=35; last SWITCH; };
+ }
+ }
+
+ for $k (0..$#OrderedVars) {
+
+ SWITCH: for ($OrderedVars[$k][1]) {
+ /file|filename/ && do {
+ print OFH <<E
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>$OrderedVars[$k][0]</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>$Layouts{$OrderedVars[$k][0]}{y}</y>
+ <width>440</width>
+ <height>20</height>
+ </rect>
+ </property>
+        <property name="associations" stdset="0">
+            <stringlist>
+                <string>\@widgetText</string>
+            </stringlist>
+        </property>
+ </widget>
+E
+;
+ last SWITCH;
+ };
+ /text/ && do {
+ print OFH <<E
+ <widget class="TextEdit">
+ <property name="name">
+ <cstring>$OrderedVars[$k][0]</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>$Layouts{$OrderedVars[$k][0]}{y}</y>
+ <width>440</width>
+ <height>30</height>
+ </rect>
+ </property>
+        <property name="associations" stdset="0">
+            <stringlist>
+                <string>\@widgetText</string>
+            </stringlist>
+        </property>
+ <property name="vScrollBarMode">
+ <enum>AlwaysOff</enum>
+ </property>
+ <property name="hScrollBarMode">
+ <enum>AlwaysOff</enum>
+ </property>
+ </widget>
+E
+;
+ last SWITCH;
+ };
+ }
+ }
+
+ footer();
+}
diff --git a/quanta/scripts/TemplateMagic.pl.info b/quanta/scripts/TemplateMagic.pl.info
new file mode 100644
index 00000000..4f10013e
--- /dev/null
+++ b/quanta/scripts/TemplateMagic.pl.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type=text/xsl href=info.xsl ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options interpreter="perl" />
+<name>TemplateMagic</name>
+<author>Eric Laffoon and Robert Nickel</author>
+<email>sequitur@kde.org</email>
+<website>http://quanta.sf.net</website>
+<version>2.0</version>
+<license>GPL</license>
+<about>This is mostly written by Robert and a result of a collaboration to enhance Quanta templates and demonstrate uses for Kommander. <br /><br />
+You can create fields in your templates by placing them in square brackets like so <strong>[fieldname:type]</strong> where type is text, file or filename. File and filename being different in either contents or name. The fields will be replaced with template insertion. This works with text (text/all) and document (template/all) templates. Other fields and functionality are planned. If you enhance this script please send us a copy.</about>
+</INFO>
diff --git a/quanta/scripts/checkxml.kmdr b/quanta/scripts/checkxml.kmdr
new file mode 100755
index 00000000..4e83a9f6
--- /dev/null
+++ b/quanta/scripts/checkxml.kmdr
@@ -0,0 +1,286 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form3</class>
+<comment>Quanta+ KDE XML Validator is a Kommander front-end for checkXML.</comment>
+<author>Chris Hornbaker</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>432</width>
+ <height>153</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Quanta+ KDE XML Validator</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout26</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout7</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Validate</string>
+ </property>
+ <property name="on">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>if [ !@FileSelector4 ]
+ then
+ CUR=1
+ else
+ CUR=''
+fi
+if [ !$CUR ]
+ then
+ TMP0=`dcop | grep quanta`
+ TMP1=`dcop $TMP0 WindowManagerIf projectURL`
+ DIR=`echo $TMP1 | cut -b6-`
+ else
+ DIR=`echo '@FileSelector4'`
+fi
+cd $DIR
+#meinproc --check --stdout index.docbook
+checkXML index.docbook 2&gt;&amp;1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="GroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>ValScript</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox4</cstring>
+ </property>
+ <property name="text">
+ <string>C&amp;urrent working folder</string>
+ </property>
+ <property name="autoRepeat">
+ <bool>false</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Other folder:</string>
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>89</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="FileSelector" row="1" column="2">
+ <property name="name">
+ <cstring>FileSelector4</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>CheckBox4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>FileSelector4</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel3</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>CheckBox4</tabstop>
+ <tabstop>ExecButton2</tabstop>
+ <tabstop>CloseButton1</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/checkxml.kmdr.info b/quanta/scripts/checkxml.kmdr.info
new file mode 100644
index 00000000..74d5d488
--- /dev/null
+++ b/quanta/scripts/checkxml.kmdr.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="info.xsl" ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>checkxml</name>
+<author>Chris Hornbaker</author>
+<email>jilks@openschooling.org</email>
+<website></website>
+<version>1.0</version>
+<license>GPL v2</license>
+<about>This Kommander script uses checkXML from kdelibs to validate KDE DocBook files.</about>
+</INFO>
+
diff --git a/quanta/scripts/docbook_table.kmdr b/quanta/scripts/docbook_table.kmdr
new file mode 100755
index 00000000..69778134
--- /dev/null
+++ b/quanta/scripts/docbook_table.kmdr
@@ -0,0 +1,250 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>DocBook_Table</class>
+<comment>Cria uma tabela em um documento docbook</comment>
+<author>Huberto Gastal Mayer</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>266</width>
+ <height>401</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Docbook Table</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>15</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>DocBook Table</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <widget class="GroupBox" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo '&lt;table id="@le_id"&gt;'
+echo ' &lt;title&gt;@te_descr&lt;/title&gt;'
+echo ' &lt;tgroup cols=""&gt;'
+
+@cb_title
+
+echo ' &lt;tbody&gt;'
+@sb_lin
+echo ' &lt;/tbody&gt;'
+
+echo ' &lt;/tgroup&gt;'
+echo '&lt;/table&gt;'
+
+
+</string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>id:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>le_id</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TextEdit" row="5" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>te_descr</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Description:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Columns</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="1" column="2">
+ <property name="name">
+ <cstring>sb_lin</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>l=0
+while [ $l -le @widgetText ]
+do
+
+ echo ' &lt;row&gt;';
+
+ @sb_col
+
+ echo ' &lt;/row&gt;';
+
+ l=$((l+1))
+
+done
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Lines</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="0" column="2">
+ <property name="name">
+ <cstring>sb_col</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>c=0
+while [ $c -le @widgetText ]
+do
+
+ echo " &lt;entry&gt;&lt;/entry&gt;"
+
+ c=$((c+1))
+
+done
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="2" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>cb_title</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Include title line</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>echo ' &lt;thead&gt;';
+echo ' &lt;row&gt;';
+
+@sb_col
+
+echo ' &lt;/row&gt;';
+echo ' &lt;/thead&gt;';</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="CloseButton" row="2" column="0">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@GroupBox1</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="2" column="1">
+ <property name="name">
+ <cstring>CloseButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>sb_col</tabstop>
+ <tabstop>sb_lin</tabstop>
+ <tabstop>cb_title</tabstop>
+ <tabstop>le_id</tabstop>
+ <tabstop>te_descr</tabstop>
+ <tabstop>CloseButton1</tabstop>
+ <tabstop>CloseButton1_2</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/dwt.kmdr b/quanta/scripts/dwt.kmdr
new file mode 100755
index 00000000..1fab1576
--- /dev/null
+++ b/quanta/scripts/dwt.kmdr
@@ -0,0 +1,192 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>dwt</class>
+<comment>Kommander dialog for the dwt script.</comment>
+<author>Benjamin Stocker</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>dwt</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>408</width>
+ <height>338</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>dwt - Apply Dreamweaver Template</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CloseButton" row="1" column="2">
+ <property name="name">
+ <cstring>cmdClose</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="1" column="1">
+ <property name="name">
+ <cstring>cmdOK</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>xclock sdsdsdsdsd </string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="TabWidget" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>tabMain</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Script</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lblProject</cstring>
+ </property>
+ <property name="text">
+ <string>Full project path:</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>chkDebug</cstring>
+ </property>
+ <property name="text">
+ <string>Show debug messages</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="3" column="0">
+ <property name="name">
+ <cstring>txtScript</cstring>
+ </property>
+ <property name="text">
+ <string>dwt.pl</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>lblScript</cstring>
+ </property>
+ <property name="text">
+ <string>Script location:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="0">
+ <property name="name">
+ <cstring>txtProjectPath</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer row="5" column="0">
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>80</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Help</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>txtHelp</cstring>
+ </property>
+ <property name="text">
+ <string>The dwt Script will apply actual Dreamweaver templates to all your project files. Just enter the FULL project path and specify where the script dwt.pl can be found.</string>
+ </property>
+ <property name="textFormat">
+ <enum>AutoText</enum>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignTop|AlignLeft</set>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>225</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/dwt.kmdr.info b/quanta/scripts/dwt.kmdr.info
new file mode 100644
index 00000000..1aca85a1
--- /dev/null
+++ b/quanta/scripts/dwt.kmdr.info
@@ -0,0 +1,14 @@
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>dwt</name>
+<author>Benjamin Stocker</author>
+<email>bstocker@4s-hosting.ch</email>
+<website>http://www.4s-hosting.ch/bstocker/dwt</website>
+<version>1.11</version>
+<license>GPL</license>
+<about>DreamWeaver Template functionality.
+This is a perl script to apply a modified Dreamweaver (DW) template to files using this template. Macromedia Dreamweaver manages this automatically whenever you change a tepmplate. See DW Documentation for more infos.
+When you have a DW-Project with templates but no DW, you can change templates, but this changes will not be added to files using the template.
+This script can solve this problem. It takes the name of the FULL project path as argument, scans this path for html files with Template references and updates them. Therefore, all you have to do after updating a template is running this script instead of loading Dreamweaver.</about>
+</INFO>
diff --git a/quanta/scripts/dwt.pl b/quanta/scripts/dwt.pl
new file mode 100644
index 00000000..af823663
--- /dev/null
+++ b/quanta/scripts/dwt.pl
@@ -0,0 +1,409 @@
+#!/usr/bin/perl
+
+## dwt - perl script to support dreamweaver templates
+## Copyright (C) 2003 Benjamin Stocker <bstocker@4s-hosting.ch>
+##
+## 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
+
+## DESCRIPTION:
+## This is a perl script to apply a modified Dreamweaver (DW)
+## template to a file using this template. Macromedia
+## Dreamweaver manages this automatically whenever you
+## change a tepmplate. See DW Documentation for more infos.
+## When you have a DW-Project with templates but no DW, you
+## cann change templates, but this changes will not be added
+## to files using the template.
+## This script can solve this problem. It takes the name of a
+## file as argument, scans this file for a template and adds
+## all template changes to the file.
+##
+## Check http://sys.4s-hosting.ch/bstocker/dwt/
+## for more informations and updates.
+##
+## Please, let me know it this script works for you, your questions
+## and comments are welcome!
+
+use Getopt::Std;
+use IO::Dir;
+
+# Write debug informations to STDOUT (-d)
+$DEBUG=0;
+# Version
+$VERSION="1.11 (06/9/2003)";
+# Display result on screen (-o);
+$SCREEN=0;
+# Extensions to search
+$SEXT="php:php3:php4:htm:html:phtml";
+@AEXT=split(':',$SEXT);
+
+&CheckArguments();
+
+## Check command line arguments
+if ($ARGV[0] eq '') {
+ &Usage;
+}
+$PROJECTPATH=$ARGV[0];
+$PROJECTPATH=&ExpandPath($PROJECTPATH);
+unless (-d $PROJECTPATH) {
+ print "FATAL: Cannot stat '$PROJECTPATH'. argument must be a directory\n";
+ exit;
+}
+
+&ScanDir($PROJECTPATH);
+
+# All done!
+exit(0);
+
+##
+## Scan all directories and files in specified path
+##
+sub ScanDir($) {
+ my $path=$_[0];
+ my ($dirname,$newpath,%dhf);
+ tie %dhf, IO::Dir, $path;
+ if (defined %dhf) {
+ foreach $dirname(keys(%dhf)) {
+ if ($dirname ne '.' and $dirname ne '..') {
+ $newpath="$path/$dirname";
+ &CheckExtension($newpath);
+ if (-d $newpath) {
+ &ScanDir($newpath);
+ }
+ }
+ }
+ } else {
+ die "FATAL: Cannot list $path";
+ }
+ undef $dhf;
+}
+
+##
+## Check if extension matches
+##
+sub CheckExtension($) {
+ my $filename=$_[0];
+ my $s;
+ foreach $s (@AEXT) {
+ if ($filename=~/\.$s$/i) {
+ &DebugMsg($filename);
+ &DoDWT($filename);
+ }
+ }
+}
+
+##
+## Merge template and document
+##
+sub DoDWT($) {
+ my $filename=$_[0];
+ my (@v,$source,$templatesource,$templatename);
+ my ($p1,$p2,$region,$rbegin,$rend,$rbuf,$q1,$q2);
+
+ # Read file into buffer
+ open HF, $filename or die "FATAL: Cannot open: $filename";
+ @v=<HF>; $source=join("",@v); $source=&Dos2Unix($source);
+ close HF;
+
+ # Extract template name from buffer
+ $templatename=&GetTemplateName($source);
+ if ($templatename eq '') {
+ print "NOTE: Could not extract template name from $filename\n";
+ return; # function execution ends here! NW would not like that :)
+ }
+
+ # Open template file
+ $templatename=&BuildPathName($templatename,$PROJECTPATH);
+ open HF, $templatename or die "FATAL: Cannot open template file: $templatename";
+ @v=<HF>; $templatesource=join("",@v);
+ $templatesource=&Dos2Unix($templatesource);
+ close HF;
+
+ # Correct links in template
+ $templatesource=&CorrectLinks($templatesource,$PROJECTPATH,$filename);
+
+ # Rebuild file using template
+ $p1=index($templatesource,"<!-- #BeginEditable ");
+ while ($p1>=0) {
+ $p1=index($templatesource,"\"",$p1);
+ if ($p1>=0) {
+ $p1=$p1+1;
+ $p2=index($templatesource,"\"",$p1);
+ $region=substr($templatesource,$p1,$p2-$p1);
+ &DebugMsg("Region: $region");
+ # Get region from file and paste into template
+ $rbegin="<!-- #BeginEditable \"$region\" -->";
+ $rend="<!-- #EndEditable -->"; # 21 characters, see below!
+ $q1=index($source,$rbegin);
+ $q2=index($source,$rend,$q1);
+ if ($q1>=0 and $q2>=0) {
+ # Extract from file
+ $rbuf=substr($source,$q1,$q2-$q1+21);
+ # Paste into template
+ $q1=index($templatesource,$rbegin);
+ $q2=index($templatesource,$rend,$q1);
+ if ($q1>=0 and $q2>=0) {
+ $q2=$q2+21;
+ $templatesource=substr($templatesource,0,$q1).$rbuf.substr($templatesource,$q2);
+ } else {
+ print "WARNING: Could not find region '$region' in template $templatename";
+ }
+ } else {
+ print "WARNING: Could not find region '$region' in $filename";
+ }
+ }
+ $p1=index($templatesource,"<!-- #BeginEditable ",$p1);
+ } # while
+
+ # Editable blocks inserted, now get library elements
+ $templatesource=&InsertLibs($templatesource, $projectpath, $filename);
+
+ # Finally, build frame
+ $templatesource=&RemoveHtmlTags($templatesource);
+ $templatesource=&AddHtmlTags($templatesource,$source);
+
+ # Save new file or write it to STDOUT
+ if (!$SCREEN) {
+ print "Updating $filename\n";
+ open HF,">$filename" or die "FATAL: Cannot create $filename";
+ print HF $templatesource;
+ close HF;
+ } else {
+ print $templatesource;
+ }
+}
+
+##
+## Extract template filename
+##
+sub GetTemplateName() {
+ my ($p1,$p2,$v);
+ my $source=$_[0];
+ my $templatename="";
+
+ $p1=index($source, "<!-- #BeginTemplate ");
+ if ($p1>=0) {
+ $p1=index($source,"\"",$p1);
+ if ($p1>=0) {
+ $p1=$p1+1;
+ $p2=index($source,"\"",$p1);
+ $templatename=substr($source,$p1,$p2-$p1);
+ &DebugMsg("Template to be used: $templatename");
+ }
+ }
+ return $templatename;
+}
+
+##
+## Add path specification to template filename, so it ca be opened
+##
+sub BuildPathName() {
+ my $templatename=$_[0];
+ my $prp=$_[1];
+ $templatename="$prp/$templatename";
+ # Remove unneeded slashes
+ $templatename=~s/\/\//\//g;
+ return $templatename;
+}
+
+##
+## Remove header and footer from Template
+##
+sub RemoveHtmlTags() {
+ my $p1;
+ my $templatesource=$_[0];
+ $p1=index($templatesource,"<head>"); # 6 chars
+ if ($p1>=0) {
+ $p1=$p1+6;
+ $templatesource=substr($templatesource,$p1);
+ } else {
+ print "WARNING: Could not find <head> tag in template $templatename";
+ }
+ $p1=index($templatesource,"</body>");
+ if ($p1>=0) {
+ $templatesource=substr($templatesource,0,$p1);
+ } else {
+ print "WARNING: Could not find </body> tag in template $templatename";
+ }
+ return $templatesource;
+}
+
+##
+## Add header and footer tags from source file to template
+##
+sub AddHtmlTags() {
+ my ($p1,$hstart,$hend);
+ my $templatesource=$_[0];
+ my $source=$_[1];
+
+ $p1=index($source,"<head>"); # 6 chars
+ if ($p1>=0) {
+ $p1=$p1+6;
+ $hstart=substr($source,0,$p1);
+ } else {
+ print "WARNING: Could not find <head> tag in $filename";
+ }
+ $p1=index($source,"</body>");
+ if ($p1>=0) {
+ $hend=substr($source,$p1);
+ } else {
+ print "WARNING: Could not find </body> tag in $filename";
+ }
+ return "$hstart$templatesource$hend";
+}
+
+##
+## Remove '\r' (DOS CRLF Format -> UNIX)
+##
+sub Dos2Unix() {
+ my $v=$_[0];
+ $v=~s/\r//gm;
+ return $v;
+}
+
+##
+## Correct template links in new created buffer
+##
+sub CorrectLinks() {
+ my $ts=$_[0];
+ my $prp=$_[1];
+ my $filename=$_[2];
+ my $l;
+
+ # Remove filename
+ $l=rindex($filename,'/');
+ $filename=substr($filename,0,$l);
+ # Get remaining path specification
+ $l=length($prp); $filename=substr($filename,$l);
+ $filename.='/'; $filename=~s/\/\//\//;
+ $ts=~s/\.\.$filename//g;
+ return $ts;
+}
+
+##
+## Insert library items (if any)
+##
+sub InsertLibs() {
+ my $source=$_[0];
+ my $projectpath=$_[1];
+ my $sourcepath=$_[2];
+ my ($p1, $p2, $p3, $lib, $libpath);
+
+ my (@alb, $lb);
+
+ # Scan for library items
+ $p1=index($source,"<!-- #BeginLibraryItem ");
+ while ($p1>=0) {
+ # Found, get lib name
+ $p1=index($source,"\"",$p1);
+ if ($p1>=0) {
+ $p1=$p1+1;
+ $p2=index($source,"\"",$p1);
+ $lib=substr($source,$p1,$p2-$p1);
+ &DebugMsg("Library item: $lib");
+ # Read library from disk
+ $libpath="$projectpath$lib";
+ open LHF, $libpath or die "FATAL: Cannot read library file $libpath";
+ @alb=<LHF>;
+ $lb=join("", @alb);
+ $lb=&Dos2Unix($lb);
+ $lb=&CorrectLinks($lb, $projectpath, $sourcepath);
+ close LHF;
+ # Replace item
+ $p2=index($source, "-->", $p2);
+ if ($p2>=0) {
+ $p2=$p2+3;
+ $p3=index($source, "<!-- #EndLibraryItem -->", $p2);
+ if ($p3>=0) {
+ # Build the updated document
+ $source=substr($source, 0, $p2) . $lb . substr($source, $p3);
+ } else {
+ print "WARNING: End tag for library $lib not found ";
+ }
+ } else {
+ print "WARNING: Error in library tag $lib. Please correcet markup";
+ }
+ }
+ $p1=index($source,"<!-- #BeginLibraryItem ", $p1);
+ }
+ return $source;
+}
+
+sub DebugMsg($) {
+ print "# $_[0]\n" if ($DEBUG);
+}
+
+##
+## Show a small help screen
+##
+sub Usage() {
+ print "Usage: dwt.pl [-dov -e extensions] projectpath\n";
+ print " -d Show debug messages\n";
+ print " -o Show result but do not save it to file\n";
+ print " -v Show version\n";
+ print " -e Set extensions to search for (default: $SEXT)\n";
+ exit;
+}
+
+##
+## Show version
+##
+sub Version() {
+ print "this is dwt $VERSION\n";
+ exit;
+}
+
+##
+## Check command line arguments
+##
+sub CheckArguments() {
+ my (%args, $s);
+
+ &getopt('e',\%args);
+ foreach $s (keys(%args)) {
+ if ($s eq 'o') {
+ $SCREEN=1;
+ } elsif ($s eq 'd') {
+ $DEBUG=1;
+ } elsif ($s eq 'v') {
+ &Version();
+ } elsif ($s eq 'e') {
+ @AEXT=split(':',$args{$s});
+ } else {
+ print "Unknown option: -$s\n";
+ &Usage();
+ }
+ }
+}
+
+##
+## Convert relative to absolute path
+##
+sub ExpandPath($) {
+ my $filename=$_[0];
+ my $pwd=$ENV{PWD};
+ # Convert filename to full pathname. Maybe there is a better way to do that?
+ # Could not find answer how to expand filename to full path at comp.lang.perl.*
+ if (substr($filename,0,1) ne '/') {
+ $filename="$pwd/$filename";
+ $filename=~s/\/[a-zA-Z0-9]+?\/\.\.\//\//; # Remove ' xxx/../ '
+ $filename=~s/\/\//\//g; # Remove ' // '
+ $filename=~s/\/\.//g; # Remove ' ./ '
+ }
+ $filename=~s/\/$//;
+ return $filename;
+}
+
+# EOF
+
diff --git a/quanta/scripts/dwt.pl.info b/quanta/scripts/dwt.pl.info
new file mode 100644
index 00000000..584322df
--- /dev/null
+++ b/quanta/scripts/dwt.pl.info
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type=text/xsl href=info.xsl ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options interpreter="perl" />
+<name>dwt.pl</name>
+<author>Benjamin Stocker</author>
+<email>bstocker@4s-hosting.ch</email>
+<website>http://www.4s-hosting.ch/bstocker/dwt </website>
+<version></version>
+<license>GPL</license>
+<about>Internally used by the dwt.kmdr script.</about>
+</INFO>
diff --git a/quanta/scripts/externalpreview.sh b/quanta/scripts/externalpreview.sh
new file mode 100644
index 00000000..9bc67fa7
--- /dev/null
+++ b/quanta/scripts/externalpreview.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+#Previews the current document in Mozilla/Netscape/Opera, depending
+#on the last two arguments (browsername, newtab command).
+#Might be adjusted in the feature to support more browsers.
+pid=$1
+currentURL=""
+if test $pid == "unique"
+then
+ currentURL=`dcop quanta WindowManagerIf saveCurrentFile`
+ shift
+else
+ currentURL=`dcop quanta-$pid WindowManagerIf saveCurrentFile`
+fi
+browser=$2
+newTab=$3
+if test $currentURL
+then
+ if ! $browser -remote "openURL($currentURL,$newTab)"
+ then
+ $browser $currentURL
+ fi
+fi \ No newline at end of file
diff --git a/quanta/scripts/externalpreview.sh.info b/quanta/scripts/externalpreview.sh.info
new file mode 100644
index 00000000..78e0db1a
--- /dev/null
+++ b/quanta/scripts/externalpreview.sh.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type=text/xsl href=info.xsl ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options interpreter="sh" />
+<name>externalpreview.sh</name>
+<author>Andras Mantia</author>
+<email>amantia@kde.org</email>
+<website>http://quanta.sf.net</website>
+<version>1.0</version>
+<license>GPL</license>
+<about>Script used by Quanta to display the current document in an external browser.
+If you have added support for new browsers, please send us a copy of the updated script.</about>
+</INFO>
diff --git a/quanta/scripts/gubed_install.kmdr b/quanta/scripts/gubed_install.kmdr
new file mode 100755
index 00000000..c362fabf
--- /dev/null
+++ b/quanta/scripts/gubed_install.kmdr
@@ -0,0 +1,295 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Gubed_install</class>
+<comment>Simple script to make installation of the Gubed PHP debugger server easier.</comment>
+<author>(C) 2004 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Gubed_install</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>578</width>
+ <height>327</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Gubed Installation v0.1</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>
+</string>
+ </stringlist>
+ </property>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CancelButton</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>490</x>
+ <y>289</y>
+ <width>77</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>332</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>302</y>
+ <width>332</width>
+ <height>16</height>
+ </rect>
+ </property>
+ </spacer>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>0</width>
+ <height>175</height>
+ </size>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>416</x>
+ <y>108</y>
+ <width>16</width>
+ <height>175</height>
+ </rect>
+ </property>
+ </spacer>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout5</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>11</y>
+ <width>556</width>
+ <height>62</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Target directory:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Archive name:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="0" column="1">
+ <property name="name">
+ <cstring>gubedArchive</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select the archive containing Gubed (tar.bz2 format)</string>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="1" column="1">
+ <property name="name">
+ <cstring>targetDirectory</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The target directory (example /var/www)</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>runServerCheck</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>11</x>
+ <y>79</y>
+ <width>473</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Run the server after installation has finished</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>RUN_SERVER=false</string>
+ <string></string>
+ <string>RUN_SERVER=true</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>If checked the server will be run in the background after the installation has finished</string>
+ </property>
+ </widget>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>logViewCheck</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>110</y>
+ <width>340</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>View installation log</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string>VIEW_LOG=true</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Uncheck this if you do not want to see the installation log. The log may provide important information in case of installation failure.</string>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>InstallButton</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>349</x>
+ <y>289</y>
+ <width>135</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>&amp;Start Installation</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@logViewCheck
+@runServerCheck
+echo "Archive name: @gubedArchive"
+echo "Target directory: @targetDirectory"
+mkdir /tmp/gubed-install
+cd /tmp/gubed-install
+echo "Extracting the archive..." &gt; /tmp/gubed-install-log
+tar xfj @gubedArchive &gt;&gt; /tmp/gubed-install-log
+dirName=`ls`
+cd $dirName
+echo "Compiling the server..." &gt;&gt; /tmp/gubed-install-log
+cd Server
+echo "Running autogen.sh..." &gt;&gt; /tmp/gubed-install-log
+./autogen.sh &gt;&gt; /tmp/gubed-install-log
+echo "Running configure..." &gt;&gt; /tmp/gubed-install-log
+./configure &gt;&gt; /tmp/gubed-install-log
+echo "Running make..." &gt;&gt; /tmp/gubed-install-log
+make &gt;&gt; /tmp/gubed-install-log
+
+echo "Installing the server..." &gt;&gt; /tmp/gubed-install-log
+cd /tmp/gubed-install
+cp -r $dirName "@targetDirectory"
+
+if test "$RUN_SERVER" == "true"
+then
+ echo "Running the server..." &gt;&gt; /tmp/gubed-install-log
+ cd "@targetDirectory"
+ cd $dirName
+ cd Server/src
+ ./gbdServer &amp;
+fi
+
+if test "$VIEW_LOG" == "true"
+then
+ kwrite /tmp/gubed-install-log &amp;
+ sleep 10
+fi
+
+echo "Cleaning up..."
+rm /tmp/gubed-install-log
+cd /tmp/gubed-install
+find . | xargs rm -f &gt; /dev/null
+cd /tmp/gubed-install
+cd $dirName
+rm -f "docs/Theory of operation" &gt; /dev/null
+cd /tmp/gubed-install
+find . | xargs rmdir -p &gt; /dev/null
+rmdir /tmp/gubed-install &gt; /dev/null
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/gubed_install.kmdr.info b/quanta/scripts/gubed_install.kmdr.info
new file mode 100644
index 00000000..e5d017e7
--- /dev/null
+++ b/quanta/scripts/gubed_install.kmdr.info
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type=text/xsl href=info.xsl ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>gubed_install</name>
+<author>Andras Mantia</author>
+<email>amantia@kde.org</email>
+<website>http://quanta.sf.net</website>
+<version>0.1</version>
+<license>GPL</license>
+<about>Simple script to make installation of the Gubed PHP debugger server easier.</about>
+</INFO>
diff --git a/quanta/scripts/htmlquickstart.kmdr b/quanta/scripts/htmlquickstart.kmdr
new file mode 100755
index 00000000..a182dcd4
--- /dev/null
+++ b/quanta/scripts/htmlquickstart.kmdr
@@ -0,0 +1,987 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>quickStartForm</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>quickStartForm</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>473</width>
+ <height>577</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="caption">
+ <string>Quick Start</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string>@execBegin
+quanta=`dcop quanta-@parentPid`
+if [ -z "$quanta" ]; then
+ quanta=`dcop quanta`
+ if [ ! -z "$quanta" ]; then
+ quantadcop=quanta
+ fi
+else
+ quantadcop=quanta-@parentPid
+fi
+
+if [ ! -z "$quantadcop" ]; then
+ encoding=`dcop $quantadcop SettingsIf encoding`
+ dcop @dcopid KommanderIf setSelection ComboMetachar $encoding
+ dcop @dcopid KommanderIf setChecked CBMetaChar true
+ dtep=`dcop $quantadcop SettingsIf dtep`
+ dcop @dcopid KommanderIf setCurrentListItem DTEPselect "$dtep"
+fi
+@execEnd</string>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <family>Sans Serif</family>
+ <pointsize>12</pointsize>
+ <bold>1</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Quanta Plus Kommander Quick Start</string>
+ </property>
+ <property name="alignment">
+ <set>AlignCenter</set>
+ </property>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>Spacer6_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>33</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="GroupBox" row="1" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>dialogScript</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>#############################
+# Globals
+
+# The indentation level. We have only
+# one level of indentation
+PADDING=' '
+
+# This sets the DTD var
+@DTEPselect
+
+# set parameters that depend on DTD
+if echo $DTD | grep -q xhtml
+then
+ XHTML=true
+ TAGEND=' /&gt;'
+ HTML='&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;'
+else
+ XHTML=FALSE
+ TAGEND='&gt;'
+ HTML='&lt;html&gt;'
+fi
+
+##############################
+# Finally generate the page
+
+@CBDTD
+echo $HTML
+echo '@CBCVS'
+@CBHead
+
+echo '&lt;body&gt;'
+echo '@CBPHPHeader'
+echo '@CBPHPFooter'
+echo '&lt;/body&gt;'
+echo '&lt;/html&gt;'
+
+quanta=`dcop quanta-@parentPid`
+if [ -z "$quanta" ]; then
+ quanta=`dcop quanta`
+ if [ ! -z "$quanta" ]; then
+ quantadcop=quanta
+ fi
+else
+ quantadcop=quanta-@parentPid
+fi
+
+if [ ! -z "$quantadcop" ]; then
+ dcop $quantadcop WindowManagerIf setDtep "@DTEPselect.text" false
+fi</string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>DTD / Schema:</string>
+ </property>
+ </widget>
+ <widget class="GroupBox" row="4" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>GroupBox3</cstring>
+ </property>
+ <property name="title">
+ <string>Body Area</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;body&gt;
+@CBPHPHeader
+@CBPHPFooter
+&lt;/body&gt;</string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="LineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>phpHeaderFile</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>phpFooterFile</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>CBPHPFooter</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;PHP footer include:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>&lt;? include_once("@phpFooterFile") ?&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>CBPHPHeader</cstring>
+ </property>
+ <property name="text">
+ <string>PHP header include:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>&lt;? include_once("@phpHeaderFile") ?&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="CheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>CBDTD</cstring>
+ </property>
+ <property name="text">
+ <string>Show &amp;DTD</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>@DTEPselect
+echo "$DTD"</string>
+ <string>echo "$DTD"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="0" column="1">
+ <item>
+ <property name="text">
+ <string>HTML 4.01 Transitional</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>HTML 4.01 Strict</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>HTML 4.01 Frameset</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XHTML 1.0 Transitional</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XHTML 1.0 Strict</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XHTML 1.0 Frameset</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XHTML 1.0 Basic</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XHTML 1.1</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>DTEPselect</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>################################
+# This script sets the DTD var
+
+
+# The various DTD's
+
+htmltrans='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;'
+
+strict='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;'
+
+frameset='&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"&gt;'
+
+xhtml1trans='&lt;?xml version="1.0" encoding="@ComboMetachar"?&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'
+
+xhtml1strict='&lt;?xml version="1.0" encoding="@ComboMetachar"?&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;'
+
+xhtml1frameset='&lt;?xml version="1.0" encoding="@ComboMetachar"?&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;'
+
+xhtml1basic='&lt;?xml version="1.0" encoding="@ComboMetachar"?&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"&gt;'
+
+xhtml11='&lt;?xml version="1.0" encoding="@ComboMetachar"?&gt;
+&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;'
+
+################################
+# Set the DTD based on user selection
+
+case "@widgetText" in
+"HTML 4.01 Transitional" )
+ DTD="$htmltrans"
+;;
+"HTML 4.01 Strict" )
+ DTD="$strict"
+;;
+"HTML 4.01 Frameset" )
+ DTD="$frameset"
+;;
+"XHTML 1.0 Transitional" )
+ DTD="$xhtml1trans"
+;;
+"XHTML 1.0 Strict" )
+ DTD="$xhtml1strict"
+;;
+"XHTML 1.0 Frameset" )
+ DTD="$xhtml1frameset"
+;;
+"XHTML 1.0 Basic" )
+ DTD="$xhtml1basic"
+;;
+"XHTML 1.1" )
+ DTD="$xhtml11"
+;;
+* )
+ echo "No Match"
+;;
+esac
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>CBHead</cstring>
+ </property>
+ <property name="text">
+ <string>Head &amp;area</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo '&lt;head&gt;'
+@LETitle
+@CBBasedir
+@CBMetaQuanta
+@CBMetaAuthor
+@CBMetaChar
+@CBMetaKeywords
+@CBStyle
+@CBStyleArea
+@CBJavascript
+echo '&lt;/head&gt;'</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="1" column="1">
+ <property name="name">
+ <cstring>CBCVS</cstring>
+ </property>
+ <property name="text">
+ <string>CVS tag &amp;in comment</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>&lt;!-- $Id$ --&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="GroupBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>GroupBox2</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>CBMetaAuthor</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Meta author:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo "$PADDING&lt;meta name=\"AUTHOR\" content=\"@LEMetaAuthor\"$TAGEND"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>CBMetaChar</cstring>
+ </property>
+ <property name="text">
+ <string>Meta character set:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo "$PADDING&lt;meta http-equiv=\"Content-Type\" content=\"text/html; charset=@ComboMetachar\"$TAGEND"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>CBStyleArea</cstring>
+ </property>
+ <property name="text">
+ <string>St&amp;yle area</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo "$PADDING&lt;style type=\"text/css\"&gt;"
+if [ $XHTML = true ]; then
+ echo "$PADDING/* &lt;![CDATA[ */"
+ echo "$PADDING"
+ echo "$PADDING/* ]]&gt; */"
+fi
+echo "$PADDING&lt;/style&gt;"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>LEBasedir</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="2" column="1">
+ <property name="name">
+ <cstring>LEMetaAuthor</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="3" column="1">
+ <item>
+ <property name="text">
+ <string>iso-8859-1</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-2</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-3</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-4</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-5</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-6</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-7</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-8</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-8i</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-9</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-10</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-11</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-12</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-13</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-14</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>iso-8859-15</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>utf-8</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>utf-16</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>koi8-r</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>koi8-u</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1250</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1251</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1252</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1253</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1254</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1255</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1256</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1257</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>windows-1258</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ComboMetachar</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="4" column="1">
+ <property name="name">
+ <cstring>LEMetaKeywords</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>limit to 8, separate with commas</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>CBBasedir</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Base directory:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo "$PADDING&lt;base href=\"@LEBasedir\"$TAGEND"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>CBMetaQuanta</cstring>
+ </property>
+ <property name="text">
+ <string>Meta &amp;Quanta</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo "$PADDING&lt;meta name=\"GENERATOR\" content=\"Quanta Plus\"$TAGEND"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>CBMetaKeywords</cstring>
+ </property>
+ <property name="text">
+ <string>Meta &amp;keywords:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo -n "$PADDING&lt;meta name=\"KEYWORDS\" content=\""
+echo -n '@LEMetaKeywords'
+echo "\"$TAGEND"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>CBStyle</cstring>
+ </property>
+ <property name="text">
+ <string>Li&amp;nked style sheet:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>echo "$PADDING&lt;link rel=\"stylesheet\" type=\"text/css\" href=\"@cssFile\"$TAGEND"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="5" column="1">
+ <property name="name">
+ <cstring>cssFile</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>LETitle</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "$PADDING&lt;title&gt;@widgetText&lt;/title&gt;"</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Title:</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="7" column="1">
+ <property name="name">
+ <cstring>CBJavascript</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;JavaScript area</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string>if echo $DTD | grep -q strict
+then
+ echo "$PADDING&lt;script type=\"text/javascript\"&gt;"
+else
+ echo "$PADDING&lt;script language=\"javascript\" type=\"text/javascript\"&gt;"
+fi
+
+
+if [ $XHTML = true ]; then
+ echo "$PADDING/* &lt;![CDATA[ */"
+ echo "$PADDING"
+ echo "$PADDING/* ]]&gt; */"
+else
+ echo "$PADDING// &lt;!--"
+ echo "$PADDING"
+ echo "$PADDING// --&gt;"
+fi
+
+echo "$PADDING&lt;/script&gt;"</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="CloseButton" row="2" column="3">
+ <property name="name">
+ <cstring>CloseButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="2" column="1">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@dialogScript
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>CBBasedir</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEBasedir</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBMetaAuthor</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEMetaAuthor</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBMetaKeywords</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>LEMetaKeywords</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBMetaChar</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ComboMetachar</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBStyle</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>cssFile</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBHead</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GroupBox2</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBPHPHeader</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>phpHeaderFile</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CBPHPFooter</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>phpFooterFile</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>quickStartForm</sender>
+ <signal>widgetOpened()</signal>
+ <receiver>GroupBox2</receiver>
+ <slot>populate()</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>DTEPselect</tabstop>
+ <tabstop>CBDTD</tabstop>
+ <tabstop>CBCVS</tabstop>
+ <tabstop>CBHead</tabstop>
+ <tabstop>LETitle</tabstop>
+ <tabstop>CBBasedir</tabstop>
+ <tabstop>LEBasedir</tabstop>
+ <tabstop>CBMetaAuthor</tabstop>
+ <tabstop>LEMetaAuthor</tabstop>
+ <tabstop>CBMetaChar</tabstop>
+ <tabstop>ComboMetachar</tabstop>
+ <tabstop>CBMetaKeywords</tabstop>
+ <tabstop>LEMetaKeywords</tabstop>
+ <tabstop>CBStyle</tabstop>
+ <tabstop>cssFile</tabstop>
+ <tabstop>CBMetaQuanta</tabstop>
+ <tabstop>CBStyleArea</tabstop>
+ <tabstop>CBJavascript</tabstop>
+ <tabstop>CBPHPHeader</tabstop>
+ <tabstop>phpHeaderFile</tabstop>
+ <tabstop>CBPHPFooter</tabstop>
+ <tabstop>phpFooterFile</tabstop>
+ <tabstop>CloseButton1</tabstop>
+ <tabstop>CloseButton1_2</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/htmlquickstart.kmdr.info b/quanta/scripts/htmlquickstart.kmdr.info
new file mode 100644
index 00000000..2bf48c23
--- /dev/null
+++ b/quanta/scripts/htmlquickstart.kmdr.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>htmlquickstart</name>
+<author>Eric Laffoon / Frederik Nosi</author>
+<email>sequitur@kde.org</email>
+<website>http://quanta.sf.net/</website>
+<version>1.1</version>
+<license>GPL</license>
+<about>This replaces the old HTML 3.2 oriented quick start hard coded into Quanta. This dialog allows for various HTML dialects and additional structural setup.
+
+Enjoy!</about>
+</INFO>
diff --git a/quanta/scripts/info.css b/quanta/scripts/info.css
new file mode 100644
index 00000000..434d18fa
--- /dev/null
+++ b/quanta/scripts/info.css
@@ -0,0 +1,13 @@
+H1 {
+ background-color:#a3dada;
+ text-align:center;
+}
+
+TH {
+ background-color:lightGray;
+ text-align:right;
+}
+
+TD {
+ background-color:#ffffcc;
+}
diff --git a/quanta/scripts/info.xsl b/quanta/scripts/info.xsl
new file mode 100644
index 00000000..07a10ed3
--- /dev/null
+++ b/quanta/scripts/info.xsl
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
+doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
+
+<xsl:template match="/">
+ <html>
+ <xsl:attribute name="xmlns"><xsl:text>http://www.w3.org/1999/xhtml</xsl:text></xsl:attribute>
+ <head>
+ <title><xsl:value-of select="INFO/name"/></title>
+ <meta>
+ <xsl:attribute name="http-equiv"><xsl:text>Content-Type</xsl:text></xsl:attribute>
+ <xsl:attribute name="content"><xsl:text>text/xhtml; charset=UTF-8</xsl:text></xsl:attribute>
+ </meta>
+ <link rel="stylesheet" type="text/css" href="info.css" />
+ </head>
+ <body>
+ <h1><xsl:value-of select="INFO/name"/></h1>
+ <table>
+ <tr>
+ <th>Author:</th>
+ <td><xsl:value-of select="INFO/author"/></td>
+ </tr>
+ <tr>
+ <th>Contact:</th>
+ <td>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:text>mailto:</xsl:text>
+ <xsl:value-of select="INFO/email"/>
+ </xsl:attribute>
+ <xsl:value-of select="INFO/email"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <th>Website:</th>
+ <td>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:value-of select="INFO/website"/>
+ </xsl:attribute>
+ <xsl:value-of select="INFO/website"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <th>Version:</th>
+ <td><xsl:value-of select="INFO/version"/></td>
+ </tr>
+ <tr>
+ <th>License:</th>
+ <td><xsl:value-of select="INFO/license"/></td>
+ </tr>
+ <tr>
+ <th>About:</th>
+ <td><xsl:value-of select="INFO/about"/></td>
+ </tr>
+ </table>
+ <br /><br />
+ <div align="center"><hr width="50%" />
+ Quanta Information File<br />
+ <em>The Quanta Team</em>
+ </div>
+ </body>
+ </html>
+</xsl:template>
+
+</xsl:stylesheet>
+
diff --git a/quanta/scripts/listwizard.kmdr b/quanta/scripts/listwizard.kmdr
new file mode 100755
index 00000000..818a1b92
--- /dev/null
+++ b/quanta/scripts/listwizard.kmdr
@@ -0,0 +1,441 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>DocBook_List</class>
+<comment>This dialog creates a variable, itemized, or ordered list, or a procedure for DocBook documents.</comment>
+<author>Carlos Leonhard Woelz</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>504</width>
+ <height>538</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Docbook List Wizard</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>Layout12</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>296</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="CloseButton" row="0" column="2">
+ <property name="name">
+ <cstring>CloseButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Press this button to cancel the creation of the list or procedure. No action will be performed.</string>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="0" column="1">
+ <property name="name">
+ <cstring>OKButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@VariableOption
+@ItemizedOption
+@OrderedOption
+@ProcedureOption</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Press this button to create the selected list or procedure.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="GroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>List Options</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout7</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="SpinBoxInt" row="0" column="1">
+ <property name="name">
+ <cstring>sb_lin</cstring>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select or enter in this spin box the number of list entries or steps that should be created by the wizard. After using the wizard, you can add (or remove) more entries or steps manually.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Number of list items or steps:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select or enter in this spin box the number of list entries or steps that should be created by the wizard. After using the wizard, you can add (or remove) more entries or steps manually.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_2</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>&lt;qt&gt;
+Select the list type:
+&lt;ul&gt;
+&lt;li&gt;&lt;b&gt;variablelist:&lt;/b&gt; a list with two sections for each item: the term and the definition.&lt;/li&gt;
+&lt;li&gt;&lt;b&gt;itemizedlist:&lt;/b&gt; a list used when the order of the items is not important.&lt;/li&gt;
+&lt;li&gt;&lt;b&gt;orderedlist:&lt;/b&gt; a list used when the order of the items is important (for instance, a list of things in order of preference). Do not use orderedlist to describe the steps required to perform an action.&lt;/li&gt;
+&lt;li&gt;&lt;b&gt;procedure:&lt;/b&gt; list of an sequence of ordered steps, describing to the reader how to perform a task. You can add substeps later.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/qt&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignJustify|AlignTop</set>
+ </property>
+ </widget>
+ <widget class="ButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>List Type</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="RadioButton" row="1" column="1">
+ <property name="name">
+ <cstring>ProcedureOption</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;procedure</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;procedure&gt;'
+echo ''
+l=1
+while [ $l -le @sb_lin ]; do
+ echo '&lt;step&gt;&lt;para&gt;'
+ echo 'Step '$l'.'
+ echo '&lt;/para&gt;&lt;/step&gt;'
+ echo ''
+ l=$((l+1))
+done
+echo '&lt;/procedure&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create a procedure. A procedure is a sequence of ordered steps, describing to the reader how to perform a task. You can add nested substeps.
+
+Here is one example of a procedure:
+
+&lt;procedure&gt;
+
+&lt;step&gt;&lt;para&gt;First step.&lt;/para&gt;&lt;/step&gt;
+
+&lt;step&gt;&lt;para&gt;Second step.&lt;/para&gt;
+&lt;substeps&gt;
+&lt;step&gt;&lt;para&gt;First substep of the second step.&lt;/para&gt;&lt;/step&gt;
+&lt;/substeps&gt;
+&lt;/step&gt;
+
+&lt;/procedure&gt;</string>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>ItemizedOption</cstring>
+ </property>
+ <property name="text">
+ <string>itemi&amp;zedlist</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;itemizedlist&gt;'
+echo ''
+l=1
+while [ $l -le @sb_lin ] ; do
+ echo '&lt;listitem&gt;&lt;para&gt;'
+ echo 'Text entry '$l'.'
+ echo '&lt;/para&gt;&lt;/listitem&gt;'
+ echo ''
+ l=$((l+1))
+done
+echo '&lt;/itemizedlist&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create a itemizedlist. A itemizedlist is a list used when the order of the items is not important.
+
+Here is one example of a itemizedlist:
+
+&lt;itemizedlist&gt;
+
+&lt;listitem&gt;&lt;para&gt;
+First item.
+&lt;/para&gt;&lt;/listitem&gt;
+
+&lt;listitem&gt;&lt;para&gt;
+Second item.
+&lt;/para&gt;&lt;/listitem&gt;
+
+&lt;/itemizedlist&gt;</string>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="0" column="1">
+ <property name="name">
+ <cstring>OrderedOption</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>or&amp;deredlist</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;orderedlist&gt;'
+echo ''
+l=1
+while [ $l -le @sb_lin ] ; do
+ echo '&lt;listitem&gt;&lt;para&gt;'
+ echo 'Text entry '$l'.'
+ echo '&lt;/para&gt;&lt;/listitem&gt;'
+ echo ''
+ l=$((l+1))
+ done
+echo '&lt;/orderedlist&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create a orderedlist. A orderedlist is a list used when the order of the items is important. A number will be associated with each entry, in order, starting from one.
+
+Here is one example of a orderedlist:
+
+&lt;orderedlist&gt;
+
+&lt;listitem&gt;&lt;para&gt;
+First item.
+&lt;/para&gt;&lt;/listitem&gt;
+
+&lt;listitem&gt;&lt;para&gt;
+Second item.
+&lt;/para&gt;&lt;/listitem&gt;
+
+&lt;/orderedlist&gt;</string>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>VariableOption</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;variablelist</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;variablelist&gt;'
+echo ''
+l=1
+while [ $l -le @sb_lin ]; do
+ echo '&lt;varlistentry&gt;'
+ echo '&lt;term&gt;Term '$l'&lt;/term&gt;'
+ echo '&lt;listitem&gt;&lt;para&gt;'
+ echo 'Definition '$l'.'
+ echo '&lt;/para&gt;&lt;/listitem&gt;'
+ echo '&lt;/varlistentry&gt;'
+ echo ''
+ l=$((l+1))
+done
+echo '&lt;/variablelist&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create a variablelist. A variablelist is a list with two sections for each item: the term (the tag used is &lt;term&gt;) and the definition (the tag used is &lt;listitem&gt;). To mark each entry of the list, the &lt;varlistentry&gt; tag is used.
+
+Here is one example of a variablelist:
+
+&lt;variablelist&gt;
+
+&lt;varlistentry&gt;
+&lt;term&gt;Term text&lt;/term&gt;
+&lt;listitem&gt;&lt;para&gt;Definition text.&lt;/para&gt;&lt;/listitem&gt;
+&lt;/varlistentry&gt;
+
+&lt;/variablelist&gt;</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>VariableOption</tabstop>
+ <tabstop>sb_lin</tabstop>
+ <tabstop>OKButton</tabstop>
+ <tabstop>CloseButton1_2</tabstop>
+ <tabstop>ItemizedOption</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/meinproc.kmdr b/quanta/scripts/meinproc.kmdr
new file mode 100755
index 00000000..c931e426
--- /dev/null
+++ b/quanta/scripts/meinproc.kmdr
@@ -0,0 +1,284 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form3</class>
+<comment>Quanta+: meinproc is a Kommander front-end for meinproc.</comment>
+<author>Chris Hornbaker</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>471</width>
+ <height>179</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Quanta+: meinproc</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CloseButton" row="1" column="2">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="1" column="1">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Process</string>
+ </property>
+ <property name="on">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>if [ !@OtherDir ]
+ then
+ CUR=1
+ else
+ CUR=''
+fi
+if [ !$CUR ]
+ then
+ TMP0=`dcop | grep -e "quanta"`
+ TMP1=`dcop $TMP0 WindowManagerIf projectURL`
+ DIR=`echo $TMP1 | cut -b6-`
+ else
+ DIR=`echo '@OtherDir'`
+fi
+cd $DIR
+rm -f *.html
+meinproc index.docbook
+if [ "@PrevKonq" = "true" ]
+then
+ konqueror index.html
+fi</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>292</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="GroupBox" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>StyleScript</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox4</cstring>
+ </property>
+ <property name="text">
+ <string>Current working folder &amp;in Quanta</string>
+ </property>
+ <property name="autoRepeat">
+ <bool>false</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string></string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Other folder:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>OtherDir</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="CheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>PrevKonq</cstring>
+ </property>
+ <property name="text">
+ <string>View in &amp;Konqueror</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>"false"</string>
+ <string></string>
+ <string>"true"</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>CheckBox4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>OtherDir</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel3</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>CheckBox4</tabstop>
+ <tabstop>PrevKonq</tabstop>
+ <tabstop>ExecButton2</tabstop>
+ <tabstop>CloseButton1</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/meinproc.kmdr.info b/quanta/scripts/meinproc.kmdr.info
new file mode 100644
index 00000000..99c12d12
--- /dev/null
+++ b/quanta/scripts/meinproc.kmdr.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="info.xsl" ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>meinproc</name>
+<author>Chris Hornbaker</author>
+<email>jilks@openschooling.org</email>
+<website></website>
+<version>1.0</version>
+<license>GPL v2</license>
+<about>This Kommander script uses meinproc from kdelibs to convert KDE DocBook files to HTML files for viewing.</about>
+</INFO>
+
diff --git a/quanta/scripts/picturewizard.kmdr b/quanta/scripts/picturewizard.kmdr
new file mode 100755
index 00000000..95d488f1
--- /dev/null
+++ b/quanta/scripts/picturewizard.kmdr
@@ -0,0 +1,587 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>DocBook_Image</class>
+<comment>This dialog creates a screenshot, a mediaobject or an inlinemediaobject for DocBook documents.</comment>
+<author>Carlos Leonhard Woelz</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>649</width>
+ <height>529</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Docbook Image Wizard</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>Layout12</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>342</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="CloseButton" row="0" column="2">
+ <property name="name">
+ <cstring>CloseButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Press this button to cancel the creation of the image markup. No action will be performed.</string>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="0" column="1">
+ <property name="name">
+ <cstring>OKButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>O&amp;K</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@ScreenshotOption
+@MediaOption
+@InlineMediaOption
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Press this button to create the image markup.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2_2</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>&lt;qt&gt;
+Select the type of markup appropriated to wrap your image:
+&lt;ul&gt;
+&lt;li&gt;&lt;b&gt;screenshot:&lt;/b&gt; used for screenshot images.&lt;/li&gt;
+&lt;li&gt;&lt;b&gt;mediaobject:&lt;/b&gt; used for all kinds of images which are not presented inside the flow of text or table entry.&lt;/li&gt;
+&lt;li&gt;&lt;b&gt;inlinemediaobject:&lt;/b&gt; used for images which are presented in the middle of flow of text, or in a table entry. Use mediaobject for all other images.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/qt&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignJustify|AlignTop</set>
+ </property>
+ </widget>
+ <widget class="ButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>ButtonGroup1</cstring>
+ </property>
+ <property name="title">
+ <string>Wrapper Type</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="RadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>ScreenshotOption</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;screenshot</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;screenshot&gt;'
+echo '&lt;screeninfo&gt;@le_description&lt;/screeninfo&gt;'
+echo '&lt;mediaobject&gt;'
+echo '&lt;imageobject&gt;'
+echo '&lt;imagedata fileref="@le_imagefile" format="@cb_imagetype" /&gt;'
+echo '&lt;/imageobject&gt;'
+echo '&lt;textobject&gt;'
+echo '&lt;phrase&gt;@le_description&lt;/phrase&gt;'
+echo '&lt;/textobject&gt;'
+@cb_caption
+echo '&lt;/mediaobject&gt;'
+echo '&lt;/screenshot&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create the necessary markup for a screenshot. The screenshot markup contains the mediaoption markup. Use for screenshots only. Other figures and images should use inlinemediaobject if inside text, or mediaobject to separate the image from the text.</string>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>MediaOption</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;mediaobject</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;mediaobject&gt;'
+echo '&lt;imageobject&gt;'
+echo '&lt;imagedata fileref="@le_imagefile" format="@cb_imagetype" /&gt;'
+echo '&lt;/imageobject&gt;'
+echo '&lt;textobject&gt;'
+echo '&lt;phrase&gt;@le_description&lt;/phrase&gt;'
+echo '&lt;/textobject&gt;'
+@cb_caption
+echo '&lt;/mediaobject&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create the necessary markup for a image outside the normal flow of text. Check the "Create caption, using the image description text." box, to add text description for the image.</string>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>InlineMediaOption</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="focusPolicy">
+ <enum>NoFocus</enum>
+ </property>
+ <property name="text">
+ <string>i&amp;nlinemediaobject</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;inlinemediaobject&gt;'
+echo '&lt;imageobject&gt;'
+echo '&lt;imagedata fileref="@le_imagefile" format="@cb_imagetype" /&gt;'
+echo '&lt;/imageobject&gt;'
+echo '&lt;textobject&gt;'
+echo '&lt;phrase&gt;@le_description&lt;/phrase&gt;'
+echo '&lt;/textobject&gt;'
+echo '&lt;/inlinemediaobject&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to create the necessary markup for a image inside the normal flow of text. You should use this option for images inside a table entry (entry tag) or a paragraph (para tag). This option is specially suited for small images, such as icons.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="GroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Image Options</string>
+ </property>
+ <property name="populationText">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout5</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string>BMP</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>CGM-BINARY</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>CGM-CHAR</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>CGM-CLEAR</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>DITROFF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>DVI</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>EPS</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>EQN</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>FAX</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GIF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GIF87a</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>GIF89a</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>IGES</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>JPEG</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>JPG</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>linespecific</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>PCX</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>PDF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>PIC</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>PNG</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>PS</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>SGML</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>SVG</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>SWF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>TBL</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>TEX</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>TIFF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>WMF</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>WPG</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>cb_imagetype</cstring>
+ </property>
+ <property name="currentItem">
+ <number>19</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select the image format here. The image format is usually reflects the file extension of your image file (.png corresponds to PNG in the drop down, .jpg corresponds to JPG, etc.).</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>cb_caption</cstring>
+ </property>
+ <property name="text">
+ <string>Create caption, &amp;using the image description text.</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>@null</string>
+ <string>echo '&lt;caption&gt;@le_description&lt;/caption&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check this box add caption text to the image. The caption text will appear below the image, allowing you to introduce or explain the image.</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>le_description</cstring>
+ </property>
+ <property name="text">
+ <string>Image description.</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter the description of the image here. For instance, a screenshot of a configuration dialog should be described as "Configuration dialog.". This text will be used as caption text if the box below is checked.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Image Type:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select the image format here. The image format is usually reflects the file extension of your image file (.png corresponds to PNG in the drop down, .jpg corresponds to JPG, etc.).</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Image file name:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter the file name of the image here, including the extension (.png, .jpg, etc.). Enter only the file name, not the location (path) of the image file. The image files should be located in the same folder as the DocBook sources.</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>le_imagefile</cstring>
+ </property>
+ <property name="text">
+ <string>image.png</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter the file name of the image here, including the extension (.png, .jpg, etc.). Enter only the file name, not the location (path) of the image file. The image files should be located in the same folder as the DocBook sources.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Image Description:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter the description of the image here. For instance, a screenshot of a configuration dialog should be described as "Configuration dialog.". This text will be used as caption text if the box below is checked.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>InlineMediaOption</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>cb_caption</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>MediaOption</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>cb_caption</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>ScreenshotOption</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>cb_caption</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>ScreenshotOption</tabstop>
+ <tabstop>le_description</tabstop>
+ <tabstop>le_imagefile</tabstop>
+ <tabstop>cb_imagetype</tabstop>
+ <tabstop>cb_caption</tabstop>
+ <tabstop>OKButton</tabstop>
+ <tabstop>CloseButton1_2</tabstop>
+ <tabstop>MediaOption</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/scriptinfo.kmdr b/quanta/scripts/scriptinfo.kmdr
new file mode 100755
index 00000000..c225a132
--- /dev/null
+++ b/quanta/scripts/scriptinfo.kmdr
@@ -0,0 +1,454 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form1</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>473</width>
+ <height>531</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Quanta Script Info Generator</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>6</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TabWidget" row="0" column="0">
+ <property name="name">
+ <cstring>TabWidget1</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Enter Info</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TextLabel1_3</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <family>Sans Serif</family>
+ <bold>1</bold>
+ <italic>1</italic>
+ </font>
+ </property>
+ <property name="text">
+ <string>Please fill in all fields</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Script name:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="1" column="1">
+ <property name="name">
+ <cstring>Name</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>7</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Enter the script name with the extension</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="8" column="0">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>About script:</string>
+ </property>
+ </widget>
+ <widget class="TextEdit" row="8" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>about</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;about&gt;@widgetText&lt;/about&gt;</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Formatting may be done with XHTML tags</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="5" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>website</cstring>
+ </property>
+ <property name="text">
+ <string>http://</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;website&gt;@widgetText&lt;/website&gt;</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>The location of your up-to-date file on the web</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Script author:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="7" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Script license:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="9" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>FileSelector1</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText/"@Name".info</string>
+ </stringlist>
+ </property>
+ <property name="selectionType">
+ <enum>Directory</enum>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Select the directory to write the .info file to</string>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="7" column="1" rowspan="1" colspan="2">
+ <item>
+ <property name="text">
+ <string>GPL-2</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>LGPL</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>BSD</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Public Domain</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Other</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>license</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;license&gt;@widgetText&lt;/license&gt;</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>If other include in about</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TextLabel1_4</cstring>
+ </property>
+ <property name="text">
+ <string>Editor/Executor:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>Author email:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="5" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Web address:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>TextLabel2_2</cstring>
+ </property>
+ <property name="text">
+ <string>Version number:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>Author</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;author&gt;@widgetText&lt;/author&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="4" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>email</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;email&gt;@widgetText&lt;/email&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="6" column="1">
+ <property name="name">
+ <cstring>version</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>&lt;version&gt;@widgetText&lt;/version&gt;</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="2" column="1">
+ <item>
+ <property name="text">
+ <string></string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kmdr-editor</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kwrite</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kate</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kdevelop</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>editor</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Optional: Editor other than Quanta to use for this script</string>
+ </property>
+ </widget>
+ <widget class="ComboBox" row="2" column="2">
+ <item>
+ <property name="text">
+ <string></string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kmdr-executor -c quanta</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>kmdr-executor</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>perl</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>php</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>executor</cstring>
+ </property>
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>Optional: External program executor</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="9" column="0">
+ <property name="name">
+ <cstring>TextLabel6</cstring>
+ </property>
+ <property name="text">
+ <string>Script location:</string>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="10" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>Write File</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>options=""
+if [ "@editor" ] || [ "@executor" ]; then
+# echo "@editor @executor"
+# editor=''
+# executor=''
+ options="&lt;options "
+ if [ @editor ]; then
+ options=$options'editor="@editor"'
+ fi
+ if [ @executor ]; then
+ options=$options' interpreter="@executor"'
+ fi
+ options=$options" /&gt;
+"
+fi
+
+echo "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;
+&lt;?xml-stylesheet type="text/xsl" href="info.xsl" ?&gt;
+&lt;!DOCTYPE QuantaScriptInfo&gt;
+&lt;INFO&gt;
+$options&lt;name&gt;@Name&lt;/name&gt;
+@Author
+@email
+@website
+@version
+@license
+@about
+&lt;/INFO&gt;" &gt; @FileSelector1</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>About</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>6</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TextEdit" row="0" column="0">
+ <property name="name">
+ <cstring>TextEdit3</cstring>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head&gt;&lt;meta name="qrichtext" content="1" /&gt;&lt;/head&gt;&lt;body style="font-size:11pt;font-family:sans-serif"&gt;
+&lt;p style="margin-top:16px"&gt;&lt;span style="font-weight:600"&gt;Quanta Plus Submitter Info Files&lt;/span&gt;&lt;/p&gt;
+&lt;p&gt;The purpose of these files is to provide developers with proper credit, expose licensing information and give users thumbnail information about scripts and templates at a glance. We ask that you try to do several things here.&lt;/p&gt;
+&lt;ul type="disc"&gt;&lt;li&gt;Fill in all the fields. They are all there for a reason.&lt;/li&gt;
+&lt;li&gt;Contact the appropriate Quanta script and template maintainer or a member of our team when you have new releases so we can include them. As we plan to build a huge repository we have to rely on you here.&lt;/li&gt;&lt;/ul&gt;
+&lt;p&gt;The additional information serves as a backup. Any time a user wants they can click the link to go to your site and get updates, docs or whatever they require. Thank you for helping us to make this a great feature&lt;/p&gt;
+&lt;p align="center" style="margin-top:14px"&gt;&lt;span style="font-weight:600"&gt;Contact Information&lt;/span&gt;&lt;/p&gt;
+&lt;p align="center"&gt;Quanta Resource Maintainer - (none at this time)&lt;br /&gt;Lead Developer - Andras Mantia &lt;a href="mailto:amantia@kde.org?subject=ScriptInfo"&gt;amantia@kde.org&lt;/a&gt;&lt;br /&gt;Kommander - Michal Rudolf &lt;a href="mailto:mrudolf@kdewebdev.org?subject=ScriptInfo"&gt;mrudolf@kdewebdev.org&lt;/a&gt;&lt;br /&gt;Project Lead - Eric Laffoon &lt;a href="mailto:sequitur@kde.org?subject=ScriptInfo"&gt;sequitur@kde.org&lt;/a&gt;&lt;/p&gt;
+&lt;/body&gt;&lt;/html&gt;
+</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<tabstops>
+ <tabstop>Name</tabstop>
+ <tabstop>Author</tabstop>
+ <tabstop>email</tabstop>
+ <tabstop>website</tabstop>
+ <tabstop>version</tabstop>
+ <tabstop>license</tabstop>
+ <tabstop>about</tabstop>
+ <tabstop>CloseButton1</tabstop>
+ <tabstop>editor</tabstop>
+ <tabstop>executor</tabstop>
+ <tabstop>TabWidget1</tabstop>
+ <tabstop>TextEdit3</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/scriptinfo.kmdr.info b/quanta/scripts/scriptinfo.kmdr.info
new file mode 100644
index 00000000..382eed34
--- /dev/null
+++ b/quanta/scripts/scriptinfo.kmdr.info
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type=text/xsl href=info.xsl ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>scriptinfo.kmdr</name>
+<author>Eric Laffoon</author>
+<email>sequitur@kde.org</email>
+<website>http://quanta.sf.net</website>
+<version>1.0</version>
+<license>GPL</license>
+<about>This dialog assists user/developers in creating the helpful *.info files like the one you're reading now. ;-)</about>
+</INFO>
diff --git a/quanta/scripts/tablewizard.kmdr b/quanta/scripts/tablewizard.kmdr
new file mode 100755
index 00000000..6f78c3c8
--- /dev/null
+++ b/quanta/scripts/tablewizard.kmdr
@@ -0,0 +1,449 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>DocBook_Table</class>
+<comment>Create a formal and informal table for DocBook documents.</comment>
+<author>Carlos Leonhard Woelz (based on Huberto Gastal Mayer initial work)</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>487</width>
+ <height>531</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Docbook Table Wizard</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CloseButton" row="0" column="2">
+ <property name="name">
+ <cstring>CloseButton1_2</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Click here to cancel the creation of the table. No action will be performed.</string>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="0" column="1">
+ <property name="name">
+ <cstring>OKButton</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@InformaltableOption
+@TableOption
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Press this button to create the table or informaltable.</string>
+ </property>
+ </widget>
+ <spacer row="0" column="0">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>141</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="GroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>TableOptionsGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Table Options</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter here the id of the table or informaltable. You can use the id to link or reference to the table or informaltable elsewhere in the document.</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout12</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ColumnLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Number of columns:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select or enter in this spin box the number of columns that should be created by the wizard.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>TableIdLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Table id:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter here the id of the table or informaltable. You can use the id to link or reference to the table or informaltable elsewhere in the document.</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="4" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>cb_header</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>&amp;Add table header</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo '';</string>
+ <string>echo '';</string>
+ <string>echo '&lt;thead&gt;'
+echo '&lt;row&gt;'
+@sb_col
+echo '&lt;/row&gt;'
+echo '&lt;/thead&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Check this box to create a table header. The table header is the first row of the table, and has the same number of entries as the other rows.</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="2" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>le_id</cstring>
+ </property>
+ <property name="text">
+ <string>table_id</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter here the id of the table or informaltable. You can use the id to link or reference to the table or informaltable elsewhere in the document.</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="1" column="2">
+ <property name="name">
+ <cstring>sb_lin</cstring>
+ </property>
+ <property name="value">
+ <number>5</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>l=1
+while [ $l -le @widgetText ]; do
+echo ''
+ echo '&lt;row&gt;'
+ @sb_col
+ echo '&lt;/row&gt;'
+ l=$((l+1))
+done;
+</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select or enter in this spin box the number of rows that should be created by the wizard. After using the wizard, you can add (or remove) more rows. To add more rows, add the same number of &lt;entry&gt; tags per &lt;row&gt; tag as in the rest of the table.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>LinesLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Number of rows:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select or enter in this spin box the number of rows that should be created by the wizard. After using the wizard, you can add (or remove) more rows. To add more rows, add the same number of &lt;entry&gt; tags per &lt;row&gt; tag as in the rest of the table.</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TableTitleLabel5</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Table title:</string>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter here the title of the table. The title of the table will appear in the table of contents as well, under the "List of Tables", if you are using the KDE DocBook tools.</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="0" column="2">
+ <property name="name">
+ <cstring>sb_col</cstring>
+ </property>
+ <property name="value">
+ <number>3</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>c=1
+while [ $c -le @widgetText ]; do
+ echo "&lt;entry&gt;&lt;/entry&gt;"
+ c=$((c+1))
+done
+</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select or enter in this spin box the number of columns that should be created by the wizard.</string>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="3" column="1" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>TitleLineBox</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Table Title</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo '&lt;title&gt;@widgetText&lt;/title&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Enter here the title of the table. The title of the table will appear in the table of contents as well, under the "List of Tables", if you are using the KDE DocBook tools.</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="ButtonGroup" row="1" column="0">
+ <property name="name">
+ <cstring>TableTypeGroup</cstring>
+ </property>
+ <property name="title">
+ <string>Table Type</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="RadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>TableOption</cstring>
+ </property>
+ <property name="text">
+ <string>ta&amp;ble</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;table id="@le_id"&gt;'
+@TitleLineBox
+echo '&lt;tgroup cols="@sb_col.text"&gt;'
+echo ''
+@cb_header
+echo ''
+echo '&lt;tbody&gt;'
+@sb_lin
+echo '&lt;/tbody&gt;'
+echo ''
+echo '&lt;/tgroup&gt;'
+echo '&lt;/table&gt;'
+</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to generate a formal table (table).</string>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>InformaltableOption</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;informaltable</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string>echo '&lt;informaltable id="@le_id"&gt;'
+echo '&lt;tgroup cols="@sb_col.text"&gt;'
+echo ''
+echo '&lt;tbody&gt;'
+@sb_lin
+echo '&lt;/tbody&gt;'
+echo ''
+echo '&lt;/tgroup&gt;'
+echo '&lt;/informaltable&gt;'</string>
+ </stringlist>
+ </property>
+ <property name="whatsThis" stdset="0">
+ <string>Select this option to generate an informal table (informaltable).</string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TableTypeLabel</cstring>
+ </property>
+ <property name="font">
+ <font>
+ </font>
+ </property>
+ <property name="text">
+ <string>&lt;qt&gt;
+Select the table type:
+&lt;ul&gt;
+&lt;li&gt;&lt;b&gt;informaltable:&lt;/b&gt; the most used table type in KDE docs. A informaltable does not contain title, table head or entry in the table of contents.&lt;/li&gt;
+&lt;li&gt;&lt;b&gt;table:&lt;/b&gt; a complete and formal table type, including title, table head and entry in the table of contents.&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/qt&gt;</string>
+ </property>
+ <property name="alignment">
+ <set>WordBreak|AlignJustify|AlignTop</set>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>TableOption</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TableTitleLabel5</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>TableOption</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TitleLineBox</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>TableOption</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>cb_header</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>InformaltableOption</tabstop>
+ <tabstop>TableOption</tabstop>
+ <tabstop>sb_col</tabstop>
+ <tabstop>sb_lin</tabstop>
+ <tabstop>le_id</tabstop>
+ <tabstop>TitleLineBox</tabstop>
+ <tabstop>cb_header</tabstop>
+ <tabstop>OKButton</tabstop>
+ <tabstop>CloseButton1_2</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/tidy.kmdr b/quanta/scripts/tidy.kmdr
new file mode 100755
index 00000000..4682470d
--- /dev/null
+++ b/quanta/scripts/tidy.kmdr
@@ -0,0 +1,1078 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Tidy</class>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Tidy</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>578</width>
+ <height>573</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Tidy by Kommander</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TabWidget" row="0" column="0" rowspan="1" colspan="5">
+ <property name="name">
+ <cstring>TabWidget1</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>General Options</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="GroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string>Non Tidy Option</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="font">
+ <font>
+ <bold>1</bold>
+ <italic>1</italic>
+ </font>
+ </property>
+ <property name="text">
+ <string>Note: This will not work well if you have multiple
+instances of Quanta running.</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>GUseDCOP</cstring>
+ </property>
+ <property name="text">
+ <string>Use DCOP to send active page from Quanta+ to tidy</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="FileSelector" row="8" column="0">
+ <property name="name">
+ <cstring>GconfigF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Path to tidy (required):</string>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="6" column="0">
+ <property name="name">
+ <cstring>GoutF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>GinputEN</cstring>
+ </property>
+ <property name="text">
+ <string>Input from file instead of stdin:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="9" column="0">
+ <property name="name">
+ <cstring>GerrorEN</cstring>
+ </property>
+ <property name="text">
+ <string>Write errors to file instead of stderr:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>GconfigEN</cstring>
+ </property>
+ <property name="text">
+ <string>Use configuration from file:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>GoutputEN</cstring>
+ </property>
+ <property name="text">
+ <string>Output to file instead of stdout:</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="4" column="0">
+ <property name="name">
+ <cstring>GinF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="10" column="0">
+ <property name="name">
+ <cstring>GerrorF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="11" column="0">
+ <property name="name">
+ <cstring>GmodF</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Modify original input files</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="FileSelector" row="2" column="0">
+ <property name="name">
+ <cstring>GtidyPath</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="ExecButton" row="2" column="1">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="text">
+ <string>/usr/bin</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>echo "/usr/bin/tidy"</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Processing Directives</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout1</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox" row="13" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ParseAsHTML</cstring>
+ </property>
+ <property name="text">
+ <string>Force XHTML to well-formed HTML</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="12" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>ParseAsXHTML</cstring>
+ </property>
+ <property name="text">
+ <string>Convert HTML to well-formed XHTML</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="4" column="0">
+ <property name="name">
+ <cstring>ParseClean</cstring>
+ </property>
+ <property name="text">
+ <string>Replace FONT, NOBR and CENTER tags by CSS</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="3" column="0">
+ <property name="name">
+ <cstring>ParseUpper</cstring>
+ </property>
+ <property name="text">
+ <string>Force tags to upper case</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="10" column="0">
+ <property name="name">
+ <cstring>ParseXML</cstring>
+ </property>
+ <property name="text">
+ <string>Specify the input is well-formed XML</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="9" column="0">
+ <property name="name">
+ <cstring>ParseOmit</cstring>
+ </property>
+ <property name="text">
+ <string>Omit optional end tags</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Do extra accessibility checks &lt;level&gt;:</string>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="1" column="1">
+ <property name="name">
+ <cstring>ParseWrap</cstring>
+ </property>
+ <property name="maxValue">
+ <number>500</number>
+ </property>
+ <property name="minValue">
+ <number>68</number>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="6" column="0">
+ <property name="name">
+ <cstring>ParseNumeric</cstring>
+ </property>
+ <property name="text">
+ <string>Output numeric rather than named entities</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="7" column="0">
+ <property name="name">
+ <cstring>ParseErrors</cstring>
+ </property>
+ <property name="text">
+ <string>Only show errors</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="SpinBoxInt" row="0" column="1">
+ <property name="name">
+ <cstring>ParseAccess</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Wrap text at column:</string>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="11" column="0">
+ <property name="name">
+ <cstring>ParseAsXML</cstring>
+ </property>
+ <property name="text">
+ <string>Convert HTML to well-formed XML</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="2" column="0">
+ <property name="name">
+ <cstring>ParseIndent</cstring>
+ </property>
+ <property name="text">
+ <string>Indent element content</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="5" column="0">
+ <property name="name">
+ <cstring>ParseBare</cstring>
+ </property>
+ <property name="text">
+ <string>Strip out smart quotes and em dashes, etc.</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CheckBox" row="8" column="0">
+ <property name="name">
+ <cstring>ParseQuiet</cstring>
+ </property>
+ <property name="text">
+ <string>Suppress nonessential output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>0</string>
+ <string></string>
+ <string>1</string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Character Encodings</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="ButtonGroup" row="0" column="0">
+ <property name="name">
+ <cstring>CharEncoding</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="RadioButton" row="9" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEibm858</cstring>
+ </property>
+ <property name="text">
+ <string>(ibm858) use IBM-858 (CP850+Euro) for input, US-ASCII for output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -ibm858</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>CEraw</cstring>
+ </property>
+ <property name="text">
+ <string>(raw) output values above 127 without conversion to entities</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -raw</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="10" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEutf16Le</cstring>
+ </property>
+ <property name="text">
+ <string>(utf16le) use UTF-16LE for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -utf16le</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="4" column="0">
+ <property name="name">
+ <cstring>CElatin1</cstring>
+ </property>
+ <property name="text">
+ <string>(latin1) use ISO-8859-1 for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -latin1</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="8" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEwin1252</cstring>
+ </property>
+ <property name="text">
+ <string>(win1252) use Windows-1252 for input, US-ASCII for output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -win1252</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="LineEdit" row="15" column="1">
+ <property name="name">
+ <cstring>CE</cstring>
+ </property>
+ <property name="maxLength">
+ <number>2</number>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="14" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEshiftjis</cstring>
+ </property>
+ <property name="text">
+ <string>(shiftjis) use Shift_JIS for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -shiftjis</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="11" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEutf16be</cstring>
+ </property>
+ <property name="text">
+ <string>(utf16be) use UTF-16BE for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -utf16be</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>CEascii</cstring>
+ </property>
+ <property name="text">
+ <string>(ascii) use US-ASCII for output, ISO-8859-1 for input</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -ascii</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="15" column="0">
+ <property name="name">
+ <cstring>CElangcode</cstring>
+ </property>
+ <property name="text">
+ <string>set the two-letter language code &lt;lang&gt; (for future use)</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -language @CE</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="12" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEutf16</cstring>
+ </property>
+ <property name="text">
+ <string>(utf16) use UTF-16 for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -utf16</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="13" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEbig5</cstring>
+ </property>
+ <property name="text">
+ <string>(big5) use Big5 for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -big5</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="6" column="0">
+ <property name="name">
+ <cstring>CEutf8</cstring>
+ </property>
+ <property name="text">
+ <string>(utf8) use UTF-8 for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -utf8</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CElatin0</cstring>
+ </property>
+ <property name="text">
+ <string>(latin0) use US-ASCII for output, ISO-8859-1 for input</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -latin0</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="7" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEmac</cstring>
+ </property>
+ <property name="text">
+ <string>(mac) use MacRoman for input, US-ASCII for output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -mac</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="5" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>CEiso2022</cstring>
+ </property>
+ <property name="text">
+ <string>(iso2022) use ISO-2022 for both input and output</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string> -iso2022</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="RadioButton" row="0" column="0">
+ <property name="name">
+ <cstring>RadioButton16</cstring>
+ </property>
+ <property name="text">
+ <string>Do not specify an encoding</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ </stringlist>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>About Tidy</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="TextEdit" row="0" column="0">
+ <property name="name">
+ <cstring>TextEdit1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="paletteBackgroundColor">
+ <color>
+ <red>255</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
+ </property>
+ <property name="text">
+ <string>HTML Tidy Configuration Settings
+
+Within a file, use the form:
+
+wrap: 72
+split: no
+
+When specified on the command line, use the form:
+
+--wrap 72 --split no
+
+Name Type Allowable values
+==================== ========= ==============================
+indent-spaces Integer 0, 1, 2, ...
+wrap Integer 0 (no wrapping), 1, 2, ...
+tab-size Integer 0, 1, 2, ...
+char-encoding Encoding ascii, latin0, latin1, raw, utf8, iso202
+ utf16le, utf16be, utf16,
+ mac, win1252, ibm858, big5, shiftjis
+input-encoding Encoding ascii, latin0, latin1, raw, utf8, iso202
+ utf16le, utf16be, utf16,
+ mac, win1252, ibm858, big5, shiftjis
+output-encoding Encoding ascii, latin0, latin1, raw, utf8, iso202
+ utf16le, utf16be, utf16,
+ mac, win1252, ibm858, big5, shiftjis
+newline enum LF, CRLF, CR
+doctype DocType auto, omit, strict, loose, transitional,
+ user specified fpi (string)
+repeated-attributes enum keep-first, keep-last
+alt-text String -
+slide-style String -
+error-file String -
+output-file String -
+write-back Boolean y/n, yes/no, t/f, true/false, 1/0
+markup Boolean y/n, yes/no, t/f, true/false, 1/0
+show-warnings Boolean y/n, yes/no, t/f, true/false, 1/0
+quiet Boolean y/n, yes/no, t/f, true/false, 1/0
+indent AutoBool auto, y/n, yes/no, t/f, true/false, 1/0
+hide-endtags Boolean y/n, yes/no, t/f, true/false, 1/0
+input-xml Boolean y/n, yes/no, t/f, true/false, 1/0
+output-xml Boolean y/n, yes/no, t/f, true/false, 1/0
+output-xhtml Boolean y/n, yes/no, t/f, true/false, 1/0
+output-html Boolean y/n, yes/no, t/f, true/false, 1/0
+add-xml-decl Boolean y/n, yes/no, t/f, true/false, 1/0
+uppercase-tags Boolean y/n, yes/no, t/f, true/false, 1/0
+uppercase-attributes Boolean y/n, yes/no, t/f, true/false, 1/0
+bare Boolean y/n, yes/no, t/f, true/false, 1/0
+clean Boolean y/n, yes/no, t/f, true/false, 1/0
+logical-emphasis Boolean y/n, yes/no, t/f, true/false, 1/0
+drop-proprietary-attributes Boolean y/n, yes/no, t/f, true/false, 1/0
+drop-font-tags Boolean y/n, yes/no, t/f, true/false, 1/0
+drop-empty-paras Boolean y/n, yes/no, t/f, true/false, 1/0
+fix-bad-comments Boolean y/n, yes/no, t/f, true/false, 1/0
+break-before-br Boolean y/n, yes/no, t/f, true/false, 1/0
+split Boolean y/n, yes/no, t/f, true/false, 1/0
+numeric-entities Boolean y/n, yes/no, t/f, true/false, 1/0
+quote-marks Boolean y/n, yes/no, t/f, true/false, 1/0
+quote-nbsp Boolean y/n, yes/no, t/f, true/false, 1/0
+quote-ampersand Boolean y/n, yes/no, t/f, true/false, 1/0
+wrap-attributes Boolean y/n, yes/no, t/f, true/false, 1/0
+wrap-script-literals Boolean y/n, yes/no, t/f, true/false, 1/0
+wrap-sections Boolean y/n, yes/no, t/f, true/false, 1/0
+wrap-asp Boolean y/n, yes/no, t/f, true/false, 1/0
+wrap-jste Boolean y/n, yes/no, t/f, true/false, 1/0
+wrap-php Boolean y/n, yes/no, t/f, true/false, 1/0
+fix-backslash Boolean y/n, yes/no, t/f, true/false, 1/0
+indent-attributes Boolean y/n, yes/no, t/f, true/false, 1/0
+assume-xml-procins Boolean y/n, yes/no, t/f, true/false, 1/0
+add-xml-space Boolean y/n, yes/no, t/f, true/false, 1/0
+enclose-text Boolean y/n, yes/no, t/f, true/false, 1/0
+enclose-block-text Boolean y/n, yes/no, t/f, true/false, 1/0
+keep-time Boolean y/n, yes/no, t/f, true/false, 1/0
+word-2000 Boolean y/n, yes/no, t/f, true/false, 1/0
+tidy-mark Boolean y/n, yes/no, t/f, true/false, 1/0
+gnu-emacs Boolean y/n, yes/no, t/f, true/false, 1/0
+gnu-emacs-file String -
+literal-attributes Boolean y/n, yes/no, t/f, true/false, 1/0
+show-body-only Boolean y/n, yes/no, t/f, true/false, 1/0
+fix-uri Boolean y/n, yes/no, t/f, true/false, 1/0
+lower-literals Boolean y/n, yes/no, t/f, true/false, 1/0
+hide-comments Boolean y/n, yes/no, t/f, true/false, 1/0
+indent-cdata Boolean y/n, yes/no, t/f, true/false, 1/0
+force-output Boolean y/n, yes/no, t/f, true/false, 1/0
+show-errors Integer 0, 1, 2, ...
+ascii-chars Boolean y/n, yes/no, t/f, true/false, 1/0
+join-classes Boolean y/n, yes/no, t/f, true/false, 1/0
+join-styles Boolean y/n, yes/no, t/f, true/false, 1/0
+escape-cdata Boolean y/n, yes/no, t/f, true/false, 1/0
+language String -
+ncr Boolean y/n, yes/no, t/f, true/false, 1/0
+output-bom AutoBool auto, y/n, yes/no, t/f, true/false, 1/0
+replace-color Boolean y/n, yes/no, t/f, true/false, 1/0
+css-prefix Name CSS1 selector
+new-inline-tags Tag names tagX, tagY, ...
+new-blocklevel-tags Tag names tagX, tagY, ...
+new-empty-tags Tag names tagX, tagY, ...
+new-pre-tags Tag names tagX, tagY, ...
+accessibility-check Integer 0, 1, 2, ...
+</string>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ <widget class="ExecButton" row="1" column="1">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Process</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>tidyargs="@GtidyPath @CharEncoding"
+
+[ 1 -eq @GmodF ] &amp;&amp; tidyargs="$tidyargs -m"
+[ 1 -eq @GoutputEN ] &amp;&amp; tidyargs="$tidyargs -o @GoutF"
+[ 1 -eq @GerrorEN ] &amp;&amp; tidyargs="$tidyargs -f @GerrorF"
+[ 1 -eq @GconfigEN ] &amp;&amp; tidyargs="$tidyargs -config @GconfigF"
+[ 1 -eq @GinputEN ] &amp;&amp; tidyargs="$tidyargs @GinF"
+[ 1 -eq @ParseIndent ] &amp;&amp; tidyargs="$tidyargs -i"
+[ 68 -lt @ParseWrap ] &amp;&amp; tidyargs="$tidyargs -wrap @ParseWrap"
+[ 1 -eq @ParseUpper ] &amp;&amp; tidyargs="$tidyargs -u"
+[ 1 -eq @ParseClean ] &amp;&amp; tidyargs="$tidyargs -c"
+[ 1 -eq @ParseBare ] &amp;&amp; tidyargs="$tidyargs -b"
+[ 1 -eq @ParseNumeric ] &amp;&amp; tidyargs="$tidyargs -n"
+[ 1 -eq @ParseErrors ] &amp;&amp; tidyargs="$tidyargs -e"
+[ 1 -eq @ParseQuiet ] &amp;&amp; tidyargs="$tidyargs -q"
+[ 1 -eq @ParseOmit ] &amp;&amp; tidyargs="$tidyargs -omit"
+[ 1 -eq @ParseXML ] &amp;&amp; tidyargs="$tidyargs -xml"
+[ 1 -eq @ParseAsHTML ] &amp;&amp; tidyargs="$tidyargs -asxml"
+[ 1 -eq @ParseAsXHTML ] &amp;&amp; tidyargs="$tidyargs -asxhtml"
+[ 1 -eq @ParseAsHTML ] &amp;&amp; tidyargs="$tidyargs -ashtml"
+[ 0 -lt @ParseAccess ] &amp;&amp; tidyargs="$tidyargs -access @ParseAccess"
+
+if [ @GUseDCOP -eq 1 ]; then
+ dcopid=`dcop quanta*`
+ ifstr="EditInterface#"`dcop $dcopid WindowManagerIf currentEditorIfNum`
+ dcop $dcopid $ifstr text | $tidyargs
+else
+ $tidyargs
+fi
+</string>
+ </stringlist>
+ </property>
+ <property name="writeStdout">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="2">
+ <property name="name">
+ <cstring>Spacer1_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>80</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="4">
+ <property name="name">
+ <cstring>Spacer1_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>125</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="CloseButton" row="1" column="3">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>GoutputEN</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GoutF</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>GconfigEN</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GconfigF</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>GerrorEN</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GerrorF</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>GinputEN</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GinF</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>GinputEN</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GmodF</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>ExecButton2</sender>
+ <signal>widgetTextChanged(const QString&amp;)</signal>
+ <receiver>GtidyPath</receiver>
+ <slot>setWidgetText(const QString&amp;)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/tidy.kmdr.info b/quanta/scripts/tidy.kmdr.info
new file mode 100644
index 00000000..a6658718
--- /dev/null
+++ b/quanta/scripts/tidy.kmdr.info
@@ -0,0 +1,9 @@
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>tidy</name>
+<author>Robert Nickel</author>
+<email>robert@artnickel.com</email>
+<license>GPL</license>
+<about>An advanced Kommander dialog for HTML Tidy that also demonstrates some advanced Kommander features.</about>
+</INFO>
diff --git a/quanta/scripts/xmlval.kmdr b/quanta/scripts/xmlval.kmdr
new file mode 100755
index 00000000..ea8b5078
--- /dev/null
+++ b/quanta/scripts/xmlval.kmdr
@@ -0,0 +1,499 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>Form3</class>
+<comment>Quanta+ XML Validator is a Kommander front-end for xmllint.</comment>
+<author>Chris Hornbaker</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form3</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>439</width>
+ <height>254</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Quanta+ XML Validator</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="GroupBox" row="0" column="0" rowspan="1" colspan="3">
+ <property name="name">
+ <cstring>ValScript</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># get file to be tested location
+@CheckBox4
+if [ !$CUR ]
+ then
+ TMP0=`dcop | grep quanta`
+ TMP1=`dcop $TMP0 WindowManagerIf currentURL`
+ FILE=`echo $TMP1 | cut -b6-`
+ else
+ FILE=`echo '@FileSelector4'`
+fi
+
+# Get validation type info
+@CheckBox3
+if [ !$WF ]
+ then
+ @ComboBox2
+ VALSTR="$VAL @FileSelector5"
+ else
+ VALSTR="$VAL"
+fi
+# Put it all together
+CMDLINE="$VALSTR $FILE"</string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout10</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox4</cstring>
+ </property>
+ <property name="text">
+ <string>C&amp;urrent file</string>
+ </property>
+ <property name="autoRepeat">
+ <bool>false</bool>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string># Check if we're using the current file and make note of it
+if [ !@FileSelector4 ]
+ then
+ CUR=1
+ else
+ CUR=''
+fi</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer9</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Other file:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer5</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector4</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0">
+ <property name="name">
+ <cstring>Layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>Validate against:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ComboBox">
+ <item>
+ <property name="text">
+ <string>DTD (Internal)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>DTD (External)</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>XML Schema</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>RelaxNG Schema</string>
+ </property>
+ </item>
+ <property name="name">
+ <cstring>ComboBox2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>################################
+# Set up variables
+# W3C XML Schema
+WXS='--schema'
+# RelaxNG Schema
+RNGS='--relaxng'
+# DTD specified in document
+DTD1='--valid'
+# DTD not specified in document and
+# needs loaded from URL
+DTD2='--dtdvalid'
+
+################################
+# Set validation type
+
+case "@widgetText" in
+"XML Schema" )
+ VAL="$WXS"
+;;
+"RelaxNG Schema" )
+ VAL="$RNGS"
+;;
+"DTD (Internal)" )
+ VAL="$DTD1"
+;;
+"DTD (External)" )
+ VAL="$DTD1"
+;;
+* )
+ VAL=""
+;;
+esac</string>
+ </stringlist>
+ </property>
+ <property name="items" stdset="0">
+ <stringlist>
+ <string>DTD</string>
+ <string>RelaxNG Schema</string>
+ <string>W3C XML Schema</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="2" column="0">
+ <property name="name">
+ <cstring>Layout11</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox3</cstring>
+ </property>
+ <property name="text">
+ <string>Well-formed checking &amp;only</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@null</string>
+ <string></string>
+ <string># Are we just checking well-formedness?
+@ComboBox2
+if [ !$VAL ]
+ then
+ WF=1
+ else
+ WF=''
+fi
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer10</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget" row="4" column="0">
+ <property name="name">
+ <cstring>Layout6</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel5</cstring>
+ </property>
+ <property name="text">
+ <string>Definition URI:</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector5</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="ExecButton" row="1" column="1">
+ <property name="name">
+ <cstring>ExecButton2</cstring>
+ </property>
+ <property name="focusPolicy">
+ <enum>TabFocus</enum>
+ </property>
+ <property name="text">
+ <string>&amp;Validate</string>
+ </property>
+ <property name="on">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># Set up the CMDLINE var and run xmllint
+@ValScript
+xmllint $CMDLINE 2&gt;&amp;1
+</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CloseButton" row="1" column="2">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ <spacer row="1" column="0">
+ <property name="name">
+ <cstring>Spacer8</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>228</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>CheckBox4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>FileSelector4</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox4</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel3</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel4</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>ComboBox2</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel5</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox3</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>FileSelector5</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/xmlval.kmdr.info b/quanta/scripts/xmlval.kmdr.info
new file mode 100644
index 00000000..56533d03
--- /dev/null
+++ b/quanta/scripts/xmlval.kmdr.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="info.xsl" ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>xmlval</name>
+<author>Chris Hornbaker</author>
+<email>jilks@openschooling.org</email>
+<website></website>
+<version>1.0</version>
+<license>GPL v2</license>
+<about>This Kommander script uses xmllint from the libxml2 package to validate XML files.</about>
+</INFO>
+
diff --git a/quanta/scripts/xsltproc.kmdr b/quanta/scripts/xsltproc.kmdr
new file mode 100755
index 00000000..0341f681
--- /dev/null
+++ b/quanta/scripts/xsltproc.kmdr
@@ -0,0 +1,294 @@
+<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
+<class>xslt_processor</class>
+<comment>Kommander front-end to xsltproc for Quanta Plus.</comment>
+<author>Chris Hornbaker</author>
+<widget class="Dialog">
+ <property name="name">
+ <cstring>Form1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>461</width>
+ <height>250</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Quanta+: xsltproc</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="1" column="0">
+ <property name="name">
+ <cstring>Layout5</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>30</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="ExecButton">
+ <property name="name">
+ <cstring>ExecButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Translate</string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># Set up the CMDLINE var and run xsltproc
+@GroupBox1
+xsltproc $CMDLINE</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="CloseButton">
+ <property name="name">
+ <cstring>CloseButton1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Close</string>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="GroupBox" row="0" column="0">
+ <property name="name">
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string># get file to be tested location
+@CheckBox1
+if [ !$CUR ]
+ then
+ TMP0=`dcop | grep quanta`
+ TMP1=`dcop $TMP0 WindowManagerIf currentURL`
+ FILE=`echo $TMP1 | cut -b6-`
+ else
+ FILE=`echo '@FileSelector1'`
+fi
+
+STYLESHEET=`echo '@FileSelector2'`
+
+OPFILE=`echo '@LineEdit1'`
+
+# Put it all together
+CMDLINE="-o $HOME/$OPFILE $STYLESHEET $FILE"</string>
+ </stringlist>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>11</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLayoutWidget" row="0" column="0">
+ <property name="name">
+ <cstring>Layout17</cstring>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="CheckBox">
+ <property name="name">
+ <cstring>CheckBox1</cstring>
+ </property>
+ <property name="text">
+ <string>Current file</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string></string>
+ <string></string>
+ <string># Check if we're using the current file and make note of it
+if [ !@FileSelector1 ]
+ then
+ CUR=1
+ else
+ CUR=''
+fi</string>
+ </stringlist>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout15</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>File location:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector1</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout14</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Stylesheet location:</string>
+ </property>
+ </widget>
+ <widget class="FileSelector">
+ <property name="name">
+ <cstring>FileSelector2</cstring>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ <widget class="QLayoutWidget">
+ <property name="name">
+ <cstring>Layout13</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>6</number>
+ </property>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Output file name:</string>
+ </property>
+ </widget>
+ <widget class="LineEdit">
+ <property name="name">
+ <cstring>LineEdit1</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="associations" stdset="0">
+ <stringlist>
+ <string>@widgetText</string>
+ </stringlist>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </grid>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>CheckBox1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>FileSelector1</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>CheckBox1</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>TextLabel1</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/scripts/xsltproc.kmdr.info b/quanta/scripts/xsltproc.kmdr.info
new file mode 100644
index 00000000..c44976b5
--- /dev/null
+++ b/quanta/scripts/xsltproc.kmdr.info
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="info.xsl" ?>
+<!DOCTYPE QuantaScriptInfo>
+<INFO>
+<options editor="kmdr-editor" interpreter="kmdr-executor -c quanta" />
+<name>xsltproc</name>
+<author>Chris Hornbaker</author>
+<email>jilks@openschooling.org</email>
+<website></website>
+<version>1.0</version>
+<license>GPL v2</license>
+<about>This Kommander script uses xsltproc from the libxslt package to apply XSLT file to XML files.</about>
+</INFO>
+
diff --git a/quanta/src/Makefile.am b/quanta/src/Makefile.am
new file mode 100644
index 00000000..5b8a47d9
--- /dev/null
+++ b/quanta/src/Makefile.am
@@ -0,0 +1,74 @@
+if BUILD_WYSIWYG
+LIB_KAFKA = $(top_builddir)/quanta/parts/kafka/libkafkalibrary.la
+KAFKAINCLUDE = -I$(top_srcdir)/quanta/parts/kafka -I$(top_builddir)/quanta/parts/kafka
+endif
+
+if include_cvsservice
+CVSSERVICE_INCLUDE = -I$(top_srcdir)/quanta/components/cvsservice
+LIB_CVSSERVICE = $(top_builddir)/quanta/components/cvsservice/libcvsservice.la -lcvsservice
+endif
+
+bin_PROGRAMS = quanta
+
+quanta_SOURCES = quanta_init.cpp quantaview.cpp quantadoc.cpp main.cpp document.cpp kqapp.cpp quanta.cpp dcopwindowmanagerif.skel dcopsettingsif.skel dcopquantaif.skel dcopsettings.cpp dtds.cpp dcopquanta.cpp viewmanager.cpp
+
+
+quanta_LDADD = $(top_builddir)/quanta/project/libproject.la \
+ $(top_builddir)/quanta/plugins/libplugins.la \
+ $(top_builddir)/quanta/parsers/libparser.la \
+ $(top_builddir)/quanta/parsers/dtd/libdtdparser.la \
+ $(top_builddir)/quanta/treeviews/libtreeviews.la \
+ $(top_builddir)/quanta/dialogs/libdialogs.la \
+ $(top_builddir)/quanta/components/debugger/libdebuggermanager.la \
+ $(top_builddir)/quanta/dialogs/tagdialogs/libtagdialogs.la \
+ $(top_builddir)/quanta/dialogs/settings/libsettingsdialogs.la \
+ $(top_builddir)/quanta/messages/libmessages.la \
+ $(top_builddir)/quanta/components/framewizard/libframewizard.la \
+ $(top_builddir)/quanta/components/csseditor/libcsseditor.la \
+ $(top_builddir)/quanta/components/tableeditor/libtableeditor.la \
+ $(top_builddir)/quanta/parts/preview/libpreview.la \
+ $(top_builddir)/quanta/utility/libutility.la \
+ $(top_builddir)/lib/libquantamodule.la \
+ -lkatepartinterfaces $(LIB_KNEWSTUFF) $(LIB_KAFKA) $(LIB_CVSSERVICE) \
+ $(LIB_KMDI) $(LIBXML_LIBS) $(LIBXSLT_LIBS) $(LIB_KABC) $(LIB_KSPELL) $(LIB_KHTML)
+# $(top_builddir)/lib/compatibility/libcompat.la
+
+AM_CPPFLAGS = -I$(top_srcdir)/quanta/dialogs \
+ -I$(top_srcdir)/quanta/plugins \
+ -I$(top_srcdir)/quanta/components/framewizard \
+ -I$(top_srcdir)/quanta/components/csseditor \
+ -I$(top_srcdir)/quanta/components/debugger \
+ -I$(top_srcdir)/quanta/components/tableeditor \
+ -I$(top_srcdir)/quanta/dialogs/tagdialogs \
+ -I$(top_srcdir)/quanta/dialogs/settings \
+ -I$(top_srcdir)/quanta/utility \
+ -I$(top_srcdir)/quanta/treeviews \
+ -I$(top_srcdir)/quanta/project \
+ -I$(top_srcdir)/quanta/parsers \
+ -I$(top_srcdir)/quanta/parsers/dtd \
+ -I$(top_srcdir)/quanta/parts/preview \
+ -I$(top_srcdir)/quanta/parts/kafka \
+ -I$(top_srcdir)/quanta/messages \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/quanta/dialogs \
+ -I$(top_builddir)/quanta/dialogs/tagdialogs \
+ -I$(top_builddir)/quanta/dialogs/settings \
+ -I$(top_builddir)/quanta/components/csseditor \
+ -I$(top_builddir)/quanta/components/framewizard \
+ -I$(top_builddir)/quanta/components/tableeditor \
+ -I$(top_builddir)/quanta/plugins \
+ $(KAFKAINCLUDE) $(CVSSERVICE_INCLUDE) $(KMDI_INCLUDES) \
+ $(KNEWSTUFF_INCLUDES) $(all_includes)
+# -I$(top_srcdir)/lib/compatibility
+
+quanta_METASOURCES = AUTO
+
+# the library search path.
+quanta_LDFLAGS = $(all_libraries) $(KDE_RPATH)
+
+# this is where the kdelnk file will go
+xdg_apps_DATA = quanta.desktop
+
+kdemimedir = $(kde_mimedir)/application
+kdemime_DATA = x-webprj.desktop
+
diff --git a/quanta/src/dcopquanta.cpp b/quanta/src/dcopquanta.cpp
new file mode 100644
index 00000000..55ff068e
--- /dev/null
+++ b/quanta/src/dcopquanta.cpp
@@ -0,0 +1,113 @@
+/***************************************************************************
+ dcopquanta.cpp - description
+ -------------------
+ begin : Thu Mar 4 2004
+ copyright : (C) 2004 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+//kde includes
+
+//qt includes
+#include <qregexp.h>
+
+//app includes
+#include "dcopquanta.h"
+#include "node.h"
+
+extern GroupElementMapList globalGroupMap;
+
+DCOPQuanta::DCOPQuanta() : DCOPObject("QuantaIf")
+{
+}
+
+QStringList DCOPQuanta::selectors(const QString& tag)
+{
+ const QRegExp rx("\\.|\\#|\\:");
+ QStringList selectorList;
+ GroupElementMapList::Iterator it;
+ for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
+ {
+ QString key = it.key();
+ if (key.startsWith("Selectors|"))
+ {
+ QString selectorName = key.mid(10);
+ int index = selectorName.find(':');
+ if (index != -1)
+ selectorName = selectorName.mid(0, index);
+ QString tmpStr;
+ index = selectorName.find(rx);
+ if (index != -1)
+ {
+ tmpStr = selectorName.left(index).lower();
+ } else
+ {
+ tmpStr = selectorName;
+ }
+ if (tmpStr.isEmpty() || tag.lower() == tmpStr || tmpStr == "*")
+ {
+ tmpStr = selectorName.mid(index + 1).replace('.',' ');
+ if (!tmpStr.isEmpty() && !selectorList.contains(tmpStr))
+ selectorList << tmpStr;
+ }
+ }
+ }
+ return selectorList;
+}
+
+QStringList DCOPQuanta::idSelectors()
+{
+ QStringList selectorList;
+ GroupElementMapList::Iterator it;
+ for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
+ {
+ QString key = it.key();
+ if (key.startsWith("Selectors|"))
+ {
+ QString selectorName = key.mid(10);
+ QString tmpStr;
+ if (selectorName.startsWith("#"))
+ {
+ selectorList << selectorName.mid(1);
+ }
+ }
+ }
+ return selectorList;
+}
+
+QStringList DCOPQuanta::groupElements(const QString& group)
+{
+ QStringList elementList;
+ GroupElementMapList::Iterator it;
+ for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
+ {
+ QString key = it.key();
+ if (key.startsWith(group + "|"))
+ {
+ QString name = key.mid(10);
+ int index = name.find(':');
+ if (index != -1)
+ name = name.mid(0, index);
+ QString tmpStr;
+ index = name.find("|");
+ if (index != -1)
+ {
+ tmpStr = name.left(index).lower();
+ } else
+ {
+ tmpStr = name;
+ }
+
+ elementList << tmpStr;
+ }
+ }
+ return elementList;
+}
diff --git a/quanta/src/dcopquanta.h b/quanta/src/dcopquanta.h
new file mode 100644
index 00000000..5c92f06f
--- /dev/null
+++ b/quanta/src/dcopquanta.h
@@ -0,0 +1,34 @@
+/***************************************************************************
+ dcopquanta.h - description
+ -------------------
+ begin : Thu Mar 4 2004
+ copyright : (C) 2004 Andras Mantia <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 DCOPQUANTA_H
+#define DCOPQUANTA_H
+
+#include "dcopquantaif.h"
+
+class DCOPQuanta : public DCOPQuantaIf
+{
+
+public:
+ DCOPQuanta();
+ ~DCOPQuanta() {};
+
+ virtual QStringList selectors(const QString& tag);
+ virtual QStringList idSelectors();
+ virtual QStringList groupElements(const QString &group);
+};
+
+#endif
diff --git a/quanta/src/dcopquantaif.h b/quanta/src/dcopquantaif.h
new file mode 100644
index 00000000..f0ec1818
--- /dev/null
+++ b/quanta/src/dcopquantaif.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ dcopquantaif.h - description
+ -------------------
+ begin : Thu Mar 4 2004
+ copyright : (C) 2004 Andras Mantia <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 DCOPQUANTAIF_H
+#define DCOPQUANTAIF_H
+#include <dcopobject.h>
+#include <qstringlist.h>
+
+class DCOPQuantaIf : virtual public DCOPObject
+{
+ K_DCOP
+
+ k_dcop:
+
+ virtual QStringList selectors(const QString &tag) = 0;
+ virtual QStringList idSelectors() = 0;
+ virtual QStringList groupElements(const QString &group) = 0;
+};
+
+#endif
diff --git a/quanta/src/dcopsettings.cpp b/quanta/src/dcopsettings.cpp
new file mode 100644
index 00000000..b47e6c39
--- /dev/null
+++ b/quanta/src/dcopsettings.cpp
@@ -0,0 +1,51 @@
+/***************************************************************************
+ dcopsettings.cpp - description
+ -------------------
+ begin : Thu Jan 29 2004
+ copyright : (C) 2004 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "dcopsettings.h"
+#include "quanta.h"
+#include "resource.h"
+#include "quantacommon.h"
+#include "project.h"
+#include "dtds.h"
+
+DCOPSettings::DCOPSettings() : DCOPObject("SettingsIf")
+{
+}
+
+QString DCOPSettings::encoding()
+{
+ QString encoding = quantaApp->defaultEncoding();
+ encoding.replace("iso ", "iso-"); //it's said that "iso-8859-x" is the valid format
+ encoding.replace("utf", "utf-"); //it's said that "utf-x" is the valid format
+ encoding.replace("cp ", "windows-");
+ return encoding;
+}
+
+QString DCOPSettings::dtep()
+{
+ if (Project::ref()->hasProject())
+ {
+ return DTDs::ref()->getDTDNickNameFromName(Project::ref()->defaultDTD());
+ }
+ else
+ return DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType);
+}
+
+QString DCOPSettings::quotationChar()
+{
+ return qConfig.attrValueQuotation;
+}
+
diff --git a/quanta/src/dcopsettings.h b/quanta/src/dcopsettings.h
new file mode 100644
index 00000000..62dc52b0
--- /dev/null
+++ b/quanta/src/dcopsettings.h
@@ -0,0 +1,35 @@
+/***************************************************************************
+ dcopsettings.h - description
+ -------------------
+ begin : Thu Jan 29 2004
+ copyright : (C) 2004 Andras Mantia <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 DCOPSETTINGS_H
+#define DCOPSETTINGS_H
+
+
+#include "dcopsettingsif.h"
+
+class DCOPSettings : public DCOPSettingsIf
+{
+
+public:
+ DCOPSettings();
+ ~DCOPSettings() {};
+
+ virtual QString encoding();
+ virtual QString dtep();
+ virtual QString quotationChar();
+};
+
+#endif
diff --git a/quanta/src/dcopsettingsif.h b/quanta/src/dcopsettingsif.h
new file mode 100644
index 00000000..7a811bc2
--- /dev/null
+++ b/quanta/src/dcopsettingsif.h
@@ -0,0 +1,34 @@
+/***************************************************************************
+ dcopsettingsif.h - description
+ -------------------
+ begin : Thu Jan 29 2004
+ copyright : (C) 2003 by Andras Mantia <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 DCOPSETTINGSIF_H
+#define DCOPSETTINGSIF_H
+
+#include <dcopobject.h>
+#include <qstringlist.h>
+
+class DCOPSettingsIf : virtual public DCOPObject
+{
+ K_DCOP
+
+ k_dcop:
+
+ virtual QString encoding() = 0;
+ virtual QString dtep() = 0;
+ virtual QString quotationChar() = 0;
+};
+
+#endif
+
diff --git a/quanta/src/dcopwindowmanagerif.h b/quanta/src/dcopwindowmanagerif.h
new file mode 100644
index 00000000..d0f8a908
--- /dev/null
+++ b/quanta/src/dcopwindowmanagerif.h
@@ -0,0 +1,46 @@
+/***************************************************************************
+ dcopwindowmanagerif.h - description
+ -------------------
+ begin : Wed Feb 5 2003
+ copyright : (C) 2003 by Andras Mantia <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 DCOPWINDOWMANAGERIF_H
+#define DCOPWINDOWMANAGERIF_H
+
+#include <dcopobject.h>
+#include <qstringlist.h>
+
+class DCOPWindowManagerIf : virtual public DCOPObject
+{
+ K_DCOP
+
+ k_dcop:
+
+ virtual int currentEditorIfNum() const = 0;
+ virtual QString currentURL() const = 0;
+ virtual QString projectURL() const = 0;
+ virtual QStringList openedURLs() const = 0;
+ virtual QStringList tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
+ virtual void newCursorPosition(const QString &file, int lineNumber, int columnNumber) = 0;
+ virtual void newDebuggerPosition(const QString &file, int lineNumber) = 0;
+ virtual void openFile(const QString &file, int lineNumber, int columnNumber) = 0;
+ virtual QString saveCurrentFile() = 0;
+ virtual void setDtep(const QString& dtepName, bool convert) = 0;
+ virtual QString documentFolderForURL(const QString &url) = 0;
+ virtual QString urlWithPreviewPrefix(const QString &url) = 0;
+ virtual void addFileToProject(const QString &url) = 0;
+ virtual void addFolderToProject(const QString &url) = 0;
+ virtual void uploadURL(const QString &url, const QString& profile, bool markOnly) = 0;
+};
+
+#endif
+
diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp
new file mode 100644
index 00000000..0c3c30ab
--- /dev/null
+++ b/quanta/src/document.cpp
@@ -0,0 +1,3192 @@
+/***************************************************************************
+ document.cpp - description
+ -------------------
+ begin : Tue Jun 6 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+#include <list>
+#include <cctype>
+#include <cstdlib>
+#include <stdlib.h>
+
+//QT includes
+#include <qcheckbox.h>
+#include <qdir.h>
+#include <qeventloop.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qlineedit.h>
+#include <qtextcodec.h>
+#include <qtextstream.h>
+#include <qregexp.h>
+#include <qradiobutton.h>
+
+// KDE includes
+#include <kapplication.h>
+#include <kwin.h>
+#include <klocale.h>
+#include <kaction.h>
+#include <kactionclasses.h>
+#include <kdialogbase.h>
+#include <kiconloader.h>
+#include <kmdcodec.h>
+#include <kmessagebox.h>
+#include <ktempfile.h>
+#include <kdirwatch.h>
+#include <kdebug.h>
+#include <kprogress.h>
+#include <kio/netaccess.h>
+#include <kstandarddirs.h>
+
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/cursorinterface.h>
+#include <ktexteditor/clipboardinterface.h>
+#include <ktexteditor/codecompletioninterface.h>
+#include <ktexteditor/configinterface.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/editinterfaceext.h>
+#include <ktexteditor/encodinginterface.h>
+#include <ktexteditor/selectioninterface.h>
+#include <ktexteditor/selectioninterfaceext.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/wordwrapinterface.h>
+#include <ktexteditor/markinterfaceextension.h>
+
+#include <kate/view.h>
+
+#include "tag.h"
+#include "quantacommon.h"
+#include "document.h"
+#include "resource.h"
+#include "dirtydlg.h"
+#include "dirtydialog.h"
+#include "casewidget.h"
+#include "project.h"
+#include "dtdselectdialog.h"
+
+#include "quanta.h"
+#include "quantaview.h"
+#include "structtreeview.h"
+#include "qextfileinfo.h"
+#include "viewmanager.h"
+#include "messageoutput.h"
+
+#include "undoredo.h"
+
+#include "dtds.h"
+
+#include "sagroupparser.h"
+
+#define STEP 1
+
+extern GroupElementMapList globalGroupMap;
+
+Document::Document(KTextEditor::Document *doc,
+ QWidget *parent, const char *name, WFlags f )
+ : QWidget(parent, name, f)
+{
+ m_dirty = false;
+ busy = false;
+ changed = false;
+ m_md5sum = "";
+ m_doc = doc;
+ m_view = 0L; //needed, because createView() calls processEvents() and the "this" may be deleted before m_view gets a value => crash on delete m_view;
+ m_view = m_doc->createView(parent, 0L);
+ completionInProgress = false;
+ argHintVisible = false;
+ completionRequested = false;
+ userTagList.setAutoDelete(true);
+
+ // remove the unwanted actions
+ KAction *a = m_view->actionCollection()->action( "file_export" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "file_save" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "file_save_as" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "file_reload" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "edit_undo" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "edit_redo" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ //because they are not implemented in VPL
+
+ a = m_view->actionCollection()->action( "edit_copy" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "edit_cut" );
+ if (a)
+ m_view->actionCollection()->take(a);
+ a = m_view->actionCollection()->action( "edit_paste" );
+ if (a)
+ m_view->actionCollection()->take(a);
+
+ //conflicting shortcuts, so change them
+ a = m_view->actionCollection()->action("view_border");
+ if (a)
+ a->setShortcut(Qt::SHIFT + Qt::Key_F9);
+
+ a = m_view->actionCollection()->action("view_folding_markers");
+ if (a)
+ a->setShortcut(Qt::SHIFT + Qt::Key_F11);
+
+ KActionMenu *bookmarkAction = dynamic_cast<KActionMenu*>(m_view->actionCollection()->action( "bookmarks" ));
+ if (bookmarkAction)
+ {
+ m_view->actionCollection()->take(bookmarkAction);
+ //kdDebug(24000) << "Bookmarks found!" << endl;
+ //bookmarkAction->insert(quantaApp->actionCollection()->action( "file_quit" ));
+ }
+
+ editIf = dynamic_cast<KTextEditor::EditInterface *>(m_doc);
+ editIfExt = dynamic_cast<KTextEditor::EditInterfaceExt *>(m_doc);
+ encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(m_doc);
+ m_encoding = quantaApp->defaultEncoding();
+ if (encodingIf)
+ m_encoding = encodingIf->encoding();
+ if (m_encoding.isEmpty())
+ m_encoding = "utf8"; //final fallback
+ m_codec = QTextCodec::codecForName(m_encoding);
+
+ selectionIf = dynamic_cast<KTextEditor::SelectionInterface *>(m_doc);
+ selectionIfExt = dynamic_cast<KTextEditor::SelectionInterfaceExt *>(m_doc);
+ configIf = dynamic_cast<KTextEditor::ConfigInterface*>(m_doc);
+ if (configIf)
+ configIf->readConfig();
+ viewCursorIf = dynamic_cast<KTextEditor::ViewCursorInterface *>(m_view);
+ codeCompletionIf = dynamic_cast<KTextEditor::CodeCompletionInterface *>(m_view);
+ markIf = dynamic_cast<KTextEditor::MarkInterface *>(m_doc);
+ KTextEditor::MarkInterfaceExtension* iface = dynamic_cast<KTextEditor::MarkInterfaceExtension*>(m_doc);
+ if (iface)
+ {
+ iface->setPixmap(KTextEditor::MarkInterface::markType07, SmallIcon("stop"));
+ iface->setPixmap(KTextEditor::MarkInterface::markType02, SmallIcon("debug_breakpoint"));
+ iface->setDescription(KTextEditor::MarkInterface::markType02, i18n("Breakpoint"));
+ iface->setPixmap(KTextEditor::MarkInterface::markType05, SmallIcon("debug_currentline"));
+ iface->setDescription(KTextEditor::MarkInterface::markType08, i18n("Annotation"));
+ iface->setPixmap(KTextEditor::MarkInterface::markType08, SmallIcon("stamp"));
+
+ // This is allows user to set breakpoints and bookmarks by clicking or rightclicking on the icon border.
+ iface->setMarksUserChangable(KTextEditor::MarkInterface::markType01 + KTextEditor::MarkInterface::markType02);
+
+ }
+
+ tempFile = 0;
+ m_tempFileName = QString::null;
+ dtdName = Project::ref()->defaultDTD();
+ reparseEnabled = true;
+ repaintEnabled = true;
+ delayedTextChangedEnabled = true;
+ docUndoRedo = new undoRedo(this);
+
+ //path of the backup copy file of the document
+ m_backupPathValue = QString::null;
+
+ connect( m_doc, SIGNAL(charactersInteractivelyInserted (int ,int ,const QString&)),
+ this, SLOT(slotCharactersInserted(int ,int ,const QString&)) );
+
+ connect( m_view, SIGNAL(completionAborted()),
+ this, SLOT( slotCompletionAborted()) );
+
+ connect( m_view, SIGNAL(completionDone(KTextEditor::CompletionEntry)),
+ this, SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
+
+ connect( m_view, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString *)),
+ this, SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,QString *)) );
+ connect( m_doc, SIGNAL(textChanged()), SLOT(slotTextChanged()));
+
+ connect(m_view, SIGNAL(gotFocus(Kate::View*)), SIGNAL(editorGotFocus()));
+
+ connect(fileWatcher, SIGNAL(dirty(const QString&)), SLOT(slotFileDirty(const QString&)));
+
+// connect(m_doc, SIGNAL(marksChanged()), this, SLOT(slotMarksChanged()));
+ connect(m_doc, SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
+
+}
+
+Document::~Document()
+{
+ if (configIf)
+ configIf->writeConfig();
+ parser->clearGroups();
+ // kdDebug(24000) << "Document::~ Document: " << this << endl;
+ m_doc->closeURL(false); //TODO: Workaround for a Kate bug. Remove when KDE < 3.2.0 support is dropped.
+ delete m_doc;
+}
+
+void Document::setUntitledUrl(const QString &url)
+{
+ untitledUrl = url;
+ openURL(KURL());
+}
+
+bool Document::isUntitled()
+{
+ return (m_doc->url().url().isEmpty()) ? true : false;
+}
+
+KURL Document::url()
+{
+ return ( isUntitled() ) ? KURL("file:"+untitledUrl) : m_doc->url();
+}
+
+// kwrite addons
+
+void Document::insertTag(const QString &s1, const QString &s2)
+{
+ QString selection;
+
+ if (selectionIf && selectionIf->hasSelection())
+ {
+ reparseEnabled = false;
+ selection = selectionIf->selection();
+ selectionIf->removeSelectedText();
+ reparseEnabled = true;
+ }
+ insertText(s1 + selection);
+ insertText(s2, false); // don't adjust cursor, thereby leaving it in the middle of tag
+}
+
+
+/** Change the current tag's attributes with those from dict */
+void Document::changeTag(Tag *tag, QDict<QString> *dict )
+{
+ tag->modifyAttributes(dict);
+ QString tagStr = tag->toString();
+
+ reparseEnabled = false;
+ int bLine, bCol, eLine, eCol;
+ tag->beginPos(bLine,bCol);
+ tag->endPos(eLine,eCol);
+ editIf->removeText(bLine, bCol, eLine, eCol+1);
+ viewCursorIf->setCursorPositionReal((uint)bLine, (uint)bCol);
+ insertText(tagStr);
+}
+
+/**Change the namespace in a tag. Add if it's not present, or remove if the
+namespace argument is empty*/
+void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
+{
+ int bl, bc;
+ int nl, nc;
+ if (!tag->nameSpace.isEmpty())
+ {
+ tag->beginPos(bl, bc);
+ if (tag->type == Tag::XmlTagEnd)
+ bc++;
+ tag->namePos(nl, nc);
+ reparseEnabled = false;
+ editIf->removeText(bl, bc + 1, nl, nc);
+ reparseEnabled = true;
+ } else
+ {
+ tag->beginPos(bl, bc);
+ if (tag->type == Tag::XmlTagEnd)
+ bc++;
+ }
+ if (!nameSpace.isEmpty())
+ {
+ viewCursorIf->setCursorPositionReal((uint)bl, (uint)(bc + 1));
+ insertText(nameSpace + ":", true, false);
+ }
+ slotDelayedTextChanged(true);
+ quantaApp->slotNewLineColumn();
+}
+
+/**Change the attr value of the called attrName to attrValue*/
+void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QString& attrValue)
+{
+ QString value;
+ int line, col;
+ int index = tag->attributeIndex(attrName);
+ if (index != -1)
+ {
+ int endCol;
+ value = tag->attributeValue(index);
+ if (value == attrValue)
+ return;
+ int aLine, aCol;
+ tag->attributeNamePos(index, aLine, aCol);
+ tag->attributeValuePos(index, line, col);
+ if (line == aLine && col == aCol)
+ {
+ col += tag->attribute(index).length();
+ value = QString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
+ } else
+ {
+ endCol = col + value.length();
+ if (attrValue.isEmpty())
+ {
+ tag->attributeNamePos(index, line, col);
+ endCol++;
+ }
+ reparseEnabled = false;
+ QString textLine = editIf->textLine(line);
+ while (col > 1 && textLine[col-1].isSpace())
+ col--;
+
+ editIf->removeText(line, col, line, endCol);
+ reparseEnabled = true;
+ value = attrValue;
+ }
+ } else
+ {
+ index = tag->attrCount() - 1;
+ if (tag->attribute(index) == "/")
+ {
+ tag->attributeNamePos(index, line, col);
+ col--;
+ } else
+ {
+ tag->endPos(line, col);
+ }
+ if (attrValue.isEmpty())
+ {
+ value = "";
+ } else
+ {
+ value = " " + QuantaCommon::attrCase(attrName) + "=" + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
+ }
+ }
+ if (!value.isEmpty())
+ {
+ viewCursorIf->setCursorPositionReal((uint)line, (uint)col);
+ insertText(value);
+ }
+ quantaApp->slotNewLineColumn();
+
+ //else
+// slotDelayedTextChanged();
+}
+
+
+void Document::selectText(int x1, int y1, int x2, int y2 )
+{
+ if (selectionIf)
+ selectionIf->setSelection(x1, y1, x2, y2);
+}
+
+
+void Document::replaceSelected(const QString &s)
+{
+ if (selectionIf)
+ {
+ unsigned int line, col;
+
+ viewCursorIf->cursorPositionReal(&line, &col);
+ reparseEnabled = false;
+ selectionIf->removeSelectedText();
+ reparseEnabled = true;
+ editIf->insertText(line, col, s);
+ }
+}
+
+void Document::insertFile(const KURL& url)
+{
+ QString fileName;
+ if (url.isLocalFile())
+ {
+ fileName = url.path();
+ } else
+ {
+ if (!KIO::NetAccess::download(url, fileName, this))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot download <b>%1</b>.</qt>").arg( url.prettyURL(0, KURL::StripFileProtocol)));
+ return;
+ }
+ }
+ QFile file(fileName);
+ if (file.open(IO_ReadOnly))
+ {
+ QTextStream stream( &file );
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ insertText(stream.read());
+ file.close();
+ } else
+ KMessageBox::error(this, i18n("<qt>Cannot open <b>%1</b> for reading.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
+}
+
+/** Inserts text at the current cursor position */
+void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse)
+{
+ QString text = a_text;
+ if(text.isEmpty())
+ return;
+
+ reparseEnabled = false;
+ unsigned int line, col;
+
+ viewCursorIf->cursorPositionReal(&line, &col);
+ Node *n = parser->nodeAt(line, col, true);
+ if (n && n->tag->dtd()->family != Xml)
+ {
+ int bLine, bCol;
+ n->tag->beginPos(bLine, bCol);
+ QString s = this->text(bLine, bCol, line, col);
+ bool insideQuotes = false;
+ for (int i = 0 ; i < (int)s.length() - 1; i++)
+ {
+ if (s[i] == '"' && (i == 0 || s[i-1] != '\\'))
+ insideQuotes = !insideQuotes;
+ }
+ int eLine, eCol;
+ n->tag->endPos(eLine, eCol);
+ s = this->text(line + 1, col, eLine, eCol);
+ bool closeQuotationFound = false;
+ for (int i = 0 ; i < (int)s.length() - 1; i++)
+ {
+ if (s[i] == '"' && (i == 0 || s[i-1] != '\\'))
+ {
+ closeQuotationFound = true;
+ break;
+ }
+ }
+ if (insideQuotes && closeQuotationFound)
+ {
+ text.replace("\\\"", "\"");
+ text.replace("\"", "\\\"");
+ }
+ }
+
+ editIf->insertText(line, col, text);
+
+ // calculate new cursor position
+ // counts the words and whitespace of the text so we can place the
+ // cursor correctly and quickly with the viewCursorInterace, avoiding
+ // the KTexEditor::insertText method
+ if(adjustCursor)
+ {
+ unsigned textLength = text.length();
+ unsigned int wordWrapAt = 80;
+ bool noWordWrap = false;
+ KTextEditor::WordWrapInterface *wordWrapIf = dynamic_cast<KTextEditor::WordWrapInterface *>(m_doc);
+ if (wordWrapIf)
+ {
+ wordWrapAt = wordWrapIf->wordWrapAt();
+ noWordWrap = !(wordWrapIf->wordWrap());
+ }
+ uint i=0, j=0;
+ int wordLength;
+ const char *ascii = text.latin1(); // use ascii for maximum speed
+ bool lineLock =false;
+
+ while(i < textLength)
+ {
+ if(ascii[i] == '\n') // add a line, first column
+ {
+ ++line; col=0; ++i; lineLock = false;
+ }
+ else if(ascii[i] == '\r')
+ {
+ col = 0; ++i;
+ }
+ else if(!noWordWrap && !(isspace(ascii[i]))) // new word, see if it wraps
+ {
+ // TOO SLOW int wordLength = (text.mid(i).section(QRegExp("[ \t\r\n]"), 0, 0).length());
+ wordLength = -1;
+ for(j = i+1;ascii[j];++j) // get word size, ascii is MUCH faster
+ {
+ if(isspace(ascii[j]))
+ {
+ wordLength = j-i;
+ break;
+ }
+ }
+ if(wordLength == -1)
+ wordLength = (textLength)-i;
+
+ if((wordLength+col) > wordWrapAt)
+ {
+ if(col && !lineLock) // wraps onto new line unless locked by kate
+ {
+ col=0;
+ ++line;
+ }
+ }
+ col += wordLength;
+ i += wordLength;
+ if(wordLength > (int) wordWrapAt)
+ lineLock = true; // words > wordWrapAt lock the rest of the line
+ }
+ else // whitespace
+ {
+ ++col; ++i;
+ if(!noWordWrap)
+ if(col > wordWrapAt && !lineLock) // wrap like words
+ {
+ col -= wordWrapAt;
+ ++line;
+ }
+ }
+ }
+ }
+ viewCursorIf->setCursorPositionReal(line, col);
+ reparseEnabled = true;
+ if (reparse)
+ {
+ baseNode = parser->rebuild(this);
+ if (qConfig.instantUpdate && quantaApp->structTreeVisible())
+ {
+ typingInProgress = false;
+ StructTreeView::ref()->slotReparse(this, baseNode , qConfig.expandLevel);
+ }
+ quantaApp->updateTreeViews();
+ }
+}
+
+bool Document::insertChildTags(QTag *tag, QTag *lastTag)
+{
+ bool childInserted = false;
+ if (!tag || tag == lastTag) //avoid infinite recursion
+ {
+ return false;
+ }
+ QMap<QString, bool>::Iterator it;
+ for (it = tag->childTags.begin(); it != tag->childTags.end(); ++it)
+ {
+ if (it.data())
+ {
+ childInserted = true;
+ QTag *childTag = QuantaCommon::tagFromDTD(tag->parentDTD, it.key());
+ QString tagStr =QuantaCommon::tagCase(it.key());
+ if ( tag->parentDTD->singleTagStyle == "xml" &&
+ ( childTag->isSingle() ||
+ (childTag->isOptional() && !qConfig.closeOptionalTags)) )
+ {
+ insertText("<" +tagStr + "/>", true, false);
+ } else
+ {
+ insertText("<" +tagStr + ">", true, false);
+ }
+ QString closingStr;
+ if (insertChildTags(childTag, tag))
+ {
+ closingStr = "";
+ }
+ if ( (!childTag->isSingle() && !childTag->isOptional() && qConfig.closeTags) ||
+ (childTag->isOptional() && qConfig.closeOptionalTags) )
+ {
+ insertText(closingStr + "</" + tagStr + ">", true, false);
+ }
+ }
+ }
+ return childInserted;
+}
+
+/** Get the view of the document */
+KTextEditor::View* Document::view()
+{
+ return m_view;
+}
+
+/** Get the KTextEditor::Document of the document */
+KTextEditor::Document* Document::doc()
+{
+ return m_doc;
+}
+
+/** Returns true if the document was modified. */
+bool Document::isModified()
+{
+ bool modified = false;
+ if (m_doc)
+ modified = m_doc->isModified();
+
+ return modified;
+}
+
+void Document::setModified(bool flag)
+{
+ if (m_doc)
+ m_doc->setModified(flag);
+}
+
+void Document::createTempFile()
+{
+ closeTempFile();
+ tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
+ QString encoding = quantaApp->defaultEncoding();
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+ if (encoding.isEmpty())
+ encoding = "utf8"; //final fallback
+ tempFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ * (tempFile->textStream()) << editIf->text();
+
+ m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
+ tempFile->close();
+// kdDebug(24000) << "Creating tempfile " << m_tempFileName << " for " << url() << endl;
+}
+
+void Document::closeTempFile()
+{
+ if (tempFile != 0)
+ {
+ delete tempFile;
+ tempFile = 0L;
+ }
+ if (QFileInfo(m_tempFileName).exists())
+ QFile::remove(m_tempFileName);
+
+ m_tempFileName = QString::null;
+}
+
+QString Document::tempFileName()
+{
+ return m_tempFileName;
+}
+
+
+/** This will return the current tag name at the given position.
+ It will work even if the tag has not been completed yet. An
+ empty string will be returned if no tag is found.
+*/
+QString Document::getTagNameAt(int line, int col )
+{
+ QString name = "";
+ QString textLine = editIf->textLine(line);
+ textLine = textLine.left(col);
+ while (line >= 0)
+ {
+ QuantaCommon::removeCommentsAndQuotes(textLine, completionDTD);
+ int pos = textLine.findRev("<");
+ int pos2 = textLine.findRev(">");
+ if (pos != -1 && pos2 < pos)
+ {
+ textLine.remove(0, pos + 1);
+ pos = 0;
+ while (pos < (int)textLine.length() &&
+ !textLine[pos].isSpace() &&
+ textLine[pos] != '>')
+ pos++;
+ name = textLine.left(pos).stripWhiteSpace();
+ pos = name.find(":");
+ if (pos != -1)
+ name = name.mid(pos + 1);
+ break;
+ } else
+ {
+ if (pos2 == -1)
+ {
+ line--;
+ if (line >= 0)
+ textLine = editIf->textLine(line);
+ } else
+ {
+ name = "";
+ break;
+ }
+ }
+ }
+
+ return name;
+}
+
+/** Show the code completions passed in as an argument */
+void Document::showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions ) {
+ bool reparse = reparseEnabled;
+ reparseEnabled = false;
+ codeCompletionIf->showCompletionBox( *completions, false );
+ reparseEnabled = reparse;
+ argHintVisible = false;
+ delete completions;
+}
+
+/** Once the completed text has been inserted into the document we
+ want to update the cursor position.
+*/
+void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
+{
+ unsigned int line,col;
+ completionInProgress = false;
+ argHintVisible = false;
+ viewCursorIf->cursorPositionReal(&line,&col);
+ const DTDStruct* dtd = currentDTD();
+/* if (completion.type == "charCompletion")
+ {
+ m_lastCompletionList = getCharacterCompletions(completion.userdata);
+ QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ } else*/
+ if (completion.type == "attribute")
+ {
+ viewCursorIf->setCursorPositionReal(line,col-1);
+ if (dtd)
+ {
+ QTag *tag = QuantaCommon::tagFromDTD(dtd,completion.userdata);
+ if (tag)
+ {
+ m_lastCompletionList = getAttributeValueCompletions(tag->name(), completion.text);
+ QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ }
+ }
+ } else
+ if (completion.type == "attributeValue")
+ {
+ viewCursorIf->setCursorPositionReal(line, col);
+ } else
+ if (completion.type == "doctypeList")
+ {
+ viewCursorIf->setCursorPositionReal(line,col+1);
+ } else
+ if (completion.type == "script")
+ {
+ viewCursorIf->setCursorPositionReal(line,col);
+ if (dtd)
+ {
+ m_lastLine = line;
+ m_lastCol = col - 1;
+ QTimer::singleShot(0, this, SLOT(slotDelayedScriptAutoCompletion()));
+ }
+ }
+}
+
+void Document::slotDelayedScriptAutoCompletion()
+{
+ scriptAutoCompletion(m_lastLine, m_lastCol, "");
+}
+
+void Document::slotDelayedShowCodeCompletion()
+{
+ showCodeCompletions(m_lastCompletionList);
+}
+
+/** This is called when the user selects a completion. We
+ can filter this completion to allow more intelligent
+ code compeltions
+*/
+void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,QString *string )
+{
+ kdDebug(24000) << *string << endl;
+ kdDebug(24000) << completion->userdata << endl;
+ int pos = completion->userdata.find("|");
+ QString s = completion->userdata.left(pos);
+ completion->userdata.remove(0,pos+1);
+ string->remove(0, s.length());
+ kdDebug(24000) << *string << endl;
+ kdDebug(24000) << completion->userdata << endl;
+ if (completion->type == "charCompletion")
+ {
+ *string = completion->userdata;
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ QString s2 = editIf->textLine(line).left(col);
+ kdDebug(24000) << s2 << endl;
+ int pos = s2.findRev('&');
+ if (pos != -1)
+ {
+ s2 = s2.mid(pos + 1);
+ string->remove(s2);
+ }
+ string->append(";");
+ kdDebug(24000) << *string << endl;
+ } else
+ if ( completion->type == "attributeValue")
+ {
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ QString textLine = editIf->textLine(line);
+ QChar tagSeparator = completionDTD->tagSeparator;
+ if (tagSeparator == '\'' || tagSeparator =='"')
+ tagSeparator = qConfig.attrValueQuotation;
+ if (textLine[col] != tagSeparator)
+ string->append(tagSeparator);
+ } else
+ if ( completion->type == "attribute" )
+ {
+ string->append("="+QString(qConfig.attrValueQuotation)+QString(qConfig.attrValueQuotation));
+ } else
+ if (completion->type == "doctypeList")
+ {
+ s = *string;
+ string->remove(0, string->length());
+ QString s2 = QString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
+ const DTDStruct *dtd = DTDs::ref()->find(DTDs::ref()->getDTDNameFromNickName(s));
+ if (dtd && !dtd->url.isEmpty())
+ {
+ s2 += " \""+dtd->url+"\"";
+ }
+ string->append(QuantaCommon::attrCase(s2));
+ } else
+ if (completion->type == "script")
+ {
+ string->append(completionDTD->attrAutoCompleteAfter);
+ }
+}
+
+void Document::slotReplaceChar()
+{
+ reparseEnabled = false;
+ editIf->removeText(m_replaceLine, m_replaceCol, m_replaceLine, m_replaceCol+1);
+ insertText(m_replaceStr, true, false);
+}
+/** Called when a user types in a character. From this we can show possibile
+ completions based on what they are trying to input.
+*/
+void Document::slotCharactersInserted(int line, int column, const QString& string)
+{
+ if (qConfig.replaceNotInEncoding)
+ {
+ if (encodingIf)
+ {
+ QString encoding = encodingIf->encoding();
+ if (encoding != m_encoding)
+ {
+ m_encoding = encoding;
+ m_codec = QTextCodec::codecForName(encoding);
+ }
+ if (!m_codec->canEncode(string[0]))
+ {
+ m_replaceLine = line;
+ m_replaceCol = column;
+ m_replaceStr = QuantaCommon::encodedChar(string[0].unicode());
+ QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ return;
+ }
+ }
+ }
+ if (qConfig.replaceAccented)
+ {
+ uint c = string[0].unicode();
+ if (c > 191)
+ {
+ m_replaceLine = line;
+ m_replaceCol = column;
+ m_replaceStr = QuantaCommon::encodedChar(c);
+ QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ return;
+ }
+ }
+
+
+ if ( (string == ">") ||
+ (string == "<") )
+ {
+ slotDelayedTextChanged(true);
+ }
+ bool handled = false;
+ if (qConfig.useAutoCompletion)
+ {
+ if (completionInProgress)
+ {
+ handleCodeCompletion();
+ } else
+ {
+ completionDTD = currentDTD();
+ if (completionDTD->family == Xml)
+ {
+ handled = xmlAutoCompletion(line, column, string);
+ }
+ if (completionDTD->family == Script)
+ {
+ handled = scriptAutoCompletion(line, column, string);
+ if (!handled && string == ">")
+ {
+ Node *node = parser->nodeAt(line, column, false);
+ if (node && node->tag->validXMLTag && node->tag->type == Tag::ScriptTag)
+ {
+ column++;
+ editIf->insertText(line, column, "</" + node->tag->name + ">");
+ viewCursorIf->setCursorPositionReal( line, column );
+ }
+ }
+ handled = true;
+ }
+
+ if (!handled)
+ {
+ const DTDStruct *lastDTD = completionDTD;
+ completionDTD = defaultDTD();
+ if (lastDTD != completionDTD && completionDTD->family == Xml)
+ {
+ handled = xmlAutoCompletion(line, column, string);
+ }
+/*TODO: Can the default DTD be a script?
+ if (dtd->family == Script)
+ {
+ scriptAutoCompletion(dtd, line, column, string);
+ }
+*/
+ }
+ }
+ }
+}
+
+/** Called whenever a user inputs text in an XML type document.
+ Returns true if the code completionw as handled.
+*/
+bool Document::xmlAutoCompletion(int line, int column, const QString & string)
+{
+ QTag *tag;
+ QString tagName;
+ bool handled = false;
+ tagName = getTagNameAt(line, column);
+ tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
+ if (!tag && !tagName.isEmpty())
+ tag = userTagList.find(tagName.lower());
+
+ QString s = editIf->textLine(line).left(column + 1);
+ bool namespacecompletion = false;
+ if (!tagName.isEmpty() && string ==":" && s.endsWith("<" + tagName + ":"))
+ namespacecompletion = true;
+ int i = column;
+ while (i > 0 && s[i].isSpace())
+ i--;
+ s = s.left(i + 1);
+
+ if ( !tag || tagName.isEmpty() || namespacecompletion) //we are outside of any tag
+ {
+
+ if (s.endsWith(completionDTD->tagAutoCompleteAfter) ||
+ namespacecompletion) // a tag is started, either with < or <namespace:
+ {
+ //we need to complete a tag name
+ showCodeCompletions( getTagCompletions(line, column + 1) );
+ handled = true;
+ } else
+ if (string == ">" && !tagName.isEmpty() && tagName[0] != '!' && tagName[0] != '?' &&
+ tagName[0] != '/' && !tagName.endsWith("/") && !s.endsWith("/>") &&
+ qConfig.closeTags &&
+ currentDTD(true)->family == Xml) //close unknown tags
+ {
+ //add closing tag if wanted
+ column++;
+ editIf->insertText(line, column, "</" + tagName + ">");
+ docUndoRedo->dontAddModifsSet(2);
+ viewCursorIf->setCursorPositionReal( line, column );
+ handled = true;
+ } else
+ if (string == "/" && s.endsWith("</") && tagName.isEmpty())
+ {
+ Node *node = parser->nodeAt(line, column, false);
+ if (node && node->parent )
+ {
+ node = node->parent;
+ if (node->tag->type == Tag::XmlTag && (!node->next || !QuantaCommon::closesTag(node->tag, node->next->tag)))
+ {
+ QString name = node->tag->name;
+ name = name.left(name.find(" | "));
+ if (!node->tag->nameSpace.isEmpty())
+ name.prepend(node->tag->nameSpace + ":");
+ editIf->insertText(line, column + 1, name + ">");
+ docUndoRedo->dontAddModifsSet(2);
+ viewCursorIf->setCursorPositionReal( line, column + name.length() + 2);
+ handled = true;
+ }
+ }
+ }
+ }
+ else // we are inside of a tag
+ {
+ if ( string == ">" && tagName[0] != '/' && !tagName.endsWith("/") &&
+ !s.endsWith("/>") && tag)
+ {
+ if ( tag->parentDTD->singleTagStyle == "xml" &&
+ (tag->isSingle() || (!qConfig.closeOptionalTags && tag->isOptional()))
+ )
+ {
+ editIf->insertText(line, column, " /");
+ docUndoRedo->dontAddModifsSet(2);
+ viewCursorIf->setCursorPositionReal( line, column+3 );
+ handled = true;
+ }
+ if ( ( !tag->isSingle() && !tag->isOptional() && qConfig.closeTags) ||
+ ( tag->isOptional() && qConfig.closeOptionalTags ) )
+ {
+ //add closing tag if wanted
+ Node *node = parser->nodeAt(line, column, false);
+ if (node && (!node->next || !QuantaCommon::closesTag(node->tag, node->next->tag)))
+ {
+ if (node && !node->tag->nameSpace.isEmpty())
+ tagName.prepend(node->tag->nameSpace + ":");
+ column++;
+ editIf->insertText(line, column, "</" + tagName + ">");
+ docUndoRedo->dontAddModifsSet(2);
+ viewCursorIf->setCursorPositionReal( line, column );
+ handled = true;
+ }
+ }
+ if (!tag->childTags.isEmpty())
+ {
+ reparseEnabled = false;
+ // insertText("\n", false, false);
+ insertChildTags(tag);
+ reparseEnabled = true;
+ baseNode = parser->rebuild(this);
+ if (qConfig.instantUpdate && quantaApp->structTreeVisible())
+ {
+ typingInProgress = false;
+ StructTreeView::ref()->slotReparse(this, baseNode , qConfig.expandLevel);
+ }
+ }
+ }
+ else if ( string == " " )
+ {
+ QString textLine = editIf->textLine(line);
+ if (!QuantaCommon::insideCommentsOrQuotes(column, textLine, completionDTD))
+ {
+ showCodeCompletions(getAttributeCompletions(tagName, ""));
+ handled = true;
+ }
+ }
+ else if ( string[0] == qConfig.attrValueQuotation )
+ {
+ //we need to find the attribute name
+ QString textLine = editIf->textLine(line).left(column-1);
+ QString attribute = textLine.mid(textLine.findRev(' ')+1);
+ if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
+ {
+ completionDTD = DTDs::ref()->find("text/css");
+ completionRequested = true;
+ return scriptAutoCompletion(line, column + 1, string);
+ }
+ showCodeCompletions( getAttributeValueCompletions(tagName, attribute) );
+ handled = true;
+ }
+ } // else - we are inside of a tag
+ if (!handled)
+ {
+ //check if we are inside a style attribute, and use css autocompletion if we are
+ QString textLine = editIf->textLine(line);
+ textLine = textLine.left(column);
+ int pos = textLine.findRev('"');
+ if (pos != -1)
+ {
+ pos = textLine.findRev(' ', pos);
+ if (pos != -1)
+ {
+ textLine = textLine.mid(pos + 1);
+ pos = textLine.find('=');
+ if (pos != -1)
+ {
+ QString attribute = textLine.left(pos);
+ if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
+ {
+ completionDTD = DTDs::ref()->find("text/css");
+ completionRequested = true;
+ return scriptAutoCompletion(line, column + 1, string);
+ }
+ }
+ }
+ }
+ QString s = editIf->textLine(line).left(column + 1);
+ pos = s.findRev('&');
+ if (pos != -1)
+ {
+ //complete character codes
+ s = s.mid(pos + 1);
+ showCodeCompletions(getCharacterCompletions(s));
+ handled = true;
+ }
+ }
+ return handled;
+}
+
+/** Return a list of possible variable name completions */
+QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
+{
+ QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ KTextEditor::CompletionEntry completion;
+
+ completion.type = "variable";
+
+ QString textLine = editIf->textLine(line).left(col);
+ QString word = findWordRev(textLine);
+ if (!group.removeFromAutoCompleteWordRx.pattern().isEmpty())
+ word.remove(group.removeFromAutoCompleteWordRx);
+ completion.userdata = word + "|";
+ GroupElementMapList::Iterator it;
+ QString str = group.name;
+ str.append("|");
+ str.append(word);
+ for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
+ {
+ if (it.key().startsWith(str) && it.key() != str )
+ {
+ GroupElementList elementList = it.data();
+ for (uint i = 0; i < elementList.count(); i++)
+ {
+ if (elementList[i]->parentNode == 0L || elementList[i]->global)
+ {
+ completion.text = it.key().section('|', -1).stripWhiteSpace();
+ completions->append(completion);
+ break;
+ } else
+ {
+ Node *n = node;
+ while (n && n != elementList[i]->parentNode)
+ {
+ n = n->parent;
+ }
+ if (n == elementList[i]->parentNode)
+ {
+ completion.text = it.key().section('|', -1).stripWhiteSpace();
+ completions->append(completion);
+ break;
+ }
+ }
+ }
+ }
+ }
+ IncludedGroupElementsMap elements = parser->includedMap;
+ IncludedGroupElementsMap::Iterator it2;
+ for ( it2 = elements.begin(); it2 != elements.end(); ++it2 )
+ {
+ QStringList list = it2.data()[group.name].keys();
+ list.sort();
+ for (uint i = 0; i < list.count(); i++)
+ {
+ if (list[i].startsWith(word) && list[i] != word)
+ {
+ completion.text = list[i].stripWhiteSpace();
+ completions->append(completion);
+ }
+ }
+ }
+
+
+ return completions;
+}
+
+bool Document::isDerivatedFrom(const QString& className, const QString &baseClass)
+{
+ if (className.isEmpty() || !completionDTD->classInheritance.contains(className))
+ return false;
+
+ QString parentClass = completionDTD->classInheritance[className];
+ int result = 0;
+ do {
+ if (parentClass == baseClass)
+ result = 1; //className extends baseClass
+ else
+ {
+ if (completionDTD->classInheritance.contains(parentClass))
+ parentClass = completionDTD->classInheritance[parentClass];
+ else
+ result = -1;//nothing was found in the inheritance list
+ }
+ } while (result == 0);
+
+ return (result == 1);
+}
+
+
+/** Return a list of possible tag name completions */
+QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
+{
+ QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ KTextEditor::CompletionEntry completion;
+ switch (completionDTD->family)
+ {
+ case Xml: completion.type = "tag";
+ break;
+ case Script:
+ completion.type = "script";
+ break;
+ }
+ Node *node = parser->nodeAt(line, col);
+ if (node && node->tag->type != Tag::XmlTag)
+ node = node->parent;
+ if (node && node->tag->type != Tag::XmlTag)
+ node = 0L;
+ QTag *parentQTag= 0L;
+ if (node && node->parent)
+ parentQTag = QuantaCommon::tagFromDTD(node->parent);
+ QString textLine = editIf->textLine(line).left(col);
+ QString word = findWordRev(textLine, completionDTD).upper();
+ QString classStr = "";
+ QString objStr;
+ if (completionDTD->classGroupIndex != -1 && completionDTD->objectGroupIndex != -1)
+ {
+ textLine = textLine.left(textLine.length() - word.length());
+ int pos = completionDTD->memberAutoCompleteAfter.searchRev(textLine);
+ if (pos != -1)
+ {
+ textLine = textLine.left(pos);
+ QRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
+ pos = r->searchRev(textLine);
+ if (pos != -1)
+ {
+ objStr = r->cap(1);
+ if (objStr == "this")
+ {
+ QString parentGroupStr = "";
+ bool classFound = false;
+ parser->synchParseInDetail();
+ Node *n = parser->nodeAt(line, col);
+ while (n && !classFound)
+ {
+ //Need to parser for groups, as the node tree is rebuilt before
+ //autocompletion and none of the node has links to group elements
+ //at this position.
+ SAGroupParser *gParser = new SAGroupParser(0L, this, n, n->nextSibling(), true, false, false);
+ gParser->slotParseForScriptGroup();
+ GroupElementList::Iterator it = n->m_groupElements.begin();
+ while (it != n->m_groupElements.end())
+ {
+ GroupElement *e = *it;
+ if (parentGroupStr.isEmpty() && e->group->appendToTags)
+ {
+ parentGroupStr = e->group->parentGroup;
+ }
+ if (!parentGroupStr.isEmpty() && e->group->name == parentGroupStr)
+ {
+ classStr = e->tag->name;
+ classFound = true;
+ }
+ //detach the groupelement from the node
+ e->node = 0L;
+ e->group = 0L;
+ e->deleted = true;
+ it = n->m_groupElements.erase(it);
+ }
+ delete gParser;
+ n = n->parent;
+ }
+ } else
+ {
+ GroupElementList groupElementList = globalGroupMap[completionDTD->structTreeGroups[completionDTD->objectGroupIndex].name + "|" + objStr];
+ for (GroupElementList::Iterator it = groupElementList.begin(); it != groupElementList.end(); ++it)
+ {
+ if (!(*it)->tag)
+ continue;
+#ifdef DEBUG_PARSER
+ kdDebug(24000) << "GroupElement: " << (*it) << " " << (*it)->tag->area().bLine << " " << (*it)->tag->area().bCol << " "<< (*it)->tag->area().eLine << " "<< (*it)->tag->area().eCol << " " << (*it)->tag->tagStr() << " " << (*it)->type << endl;
+#endif
+ if (!(*it)->type.isEmpty())
+ {
+ classStr = (*it)->type;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if ((!objStr.isEmpty() || !completionRequested) && classStr.isEmpty()) //the class cannot be identified for the object or there is no object.
+ return completions;
+ }
+ completion.userdata = word + "|";
+ QStringList tagNameList;
+ QMap<QString, QString> comments;
+ //A QMap to hold the completion type (function/string/class/etc)
+ QMap<QString, QString> type;
+ QString tagName;
+ QDictIterator<QTag> it(*(completionDTD->tagsList));
+ int i = 0;
+ for( ; it.current(); ++it )
+ {
+ QTag *tag = it.current();
+ if ((tag->type != "entity") && (tag->className == classStr ||
+ isDerivatedFrom(classStr, tag->className)))
+ {
+ tagName = tag->name();
+ if (!tagName.isEmpty() && tagName.upper().startsWith(word))
+ {
+ if (!parentQTag || (parentQTag && parentQTag->isChild(tagName)))
+ {
+ tagName = tag->name() + QString("%1").arg(i, 10);
+ tagNameList += tagName;
+ comments.insert(tagName, tag->comment);
+ i++;
+ }
+ }
+ }
+ }
+
+ QDictIterator<QTag> it2(userTagList);
+ for( ; it2.current(); ++it2 )
+ {
+ QTag *tag = it2.current();
+ if ((tag->className == classStr ||
+ isDerivatedFrom(classStr, tag->className)) && tag->name().upper().startsWith(word))
+ {
+ tagName = tag->name() + QString("%1").arg(i, 10);
+ tagNameList += tagName;
+ comments.insert(tagName, tag->comment);
+
+ // If the completion family is script, then we want to update the tag type
+ // it appears we use "script" for adding the completionDTD->attrAutoCompleteAfter when we run the slotFilterCompletion
+ // so we will continue to use that for functions (they need the attribute added), but variables get a new type - and we do not
+ // have to auto-complete them
+ if(completionDTD->family==Script)
+ {
+ if(tag->type=="variable")
+ type.insert(tagName, tag->type);
+ else if(tag->type=="function")
+ type.insert(tagName, "script");
+
+ // We add the type to the comment variable, so it displays on the screen, giving the user some feedback
+ if(comments[tagName].length())
+ comments[tagName] = tag->type + "\n" + comments[tagName];
+ else
+ comments[tagName] = tag->type + comments[tagName];
+ }
+ i++;
+ }
+ }
+
+ tagNameList.sort();
+ // tagNameList is sorted above to sort the completions by name alphabetically
+ // Now we want to sort the completions by their types.
+ // We only want to do this if we are completing Script DTDs
+ // We are going to use a couple of iterators to sort the list by Type
+ // Type Sorting is as follows: 0:Other, 1:Variables, 2: Functions (script)
+ QValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
+ QValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
+ for (uint i = 0; i < tagNameList.count(); i++)
+ {
+ if (completionDTD->family == Xml)
+ completion.text = QuantaCommon::tagCase(tagNameList[i]);
+ else
+ completion.text = tagNameList[i];
+ completion.text = completion.text.left(completion.text.length() - 10).stripWhiteSpace();
+ completion.comment = comments[tagNameList[i]];
+
+ if(completionDTD->family==Script)
+ {
+ // Here we actually append the completion type
+ completion.type = type[tagNameList[i]];
+ // And here is out sorting...
+ if(completion.type.contains("variable"))
+ {
+ // Insert after the last variable
+ variableIt++;
+ variableIt = completions->insert(variableIt, completion);
+ }
+ else
+ {
+ if(completion.type.contains("script"))
+ {
+ //Scripts can go at the end of the list
+ completions->append(completion);
+ }
+ else
+ {
+ // Other types go first, after the last other type
+ otherIt++;
+ otherIt = completions->insert(otherIt, completion);
+ // If we have no variables in the list, we need to point variableIt to otherIt, so they will go after the 'others'
+ if((*variableIt).text.length()==0)
+ variableIt=otherIt;
+ }
+ }
+ }
+ else
+ completions->append( completion );
+ }
+
+// completionInProgress = true;
+
+ return completions;
+}
+
+/** Return a list of valid attributes for the given tag */
+QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const QString& tagName, const QString& a_startsWith )
+{
+ QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ KTextEditor::CompletionEntry completion;
+ QTag *tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
+ if (!tag)
+ {
+ tag = userTagList.find(tagName.lower());
+ }
+ QString startsWith = a_startsWith.upper();
+ if (tag)
+ {
+ switch (completionDTD->family)
+ {
+ case Xml:
+ {
+ completion.type = "attribute";
+ completion.userdata = startsWith+"|"+tag->name();
+
+ //list specified attributes for this tag
+ AttributeList *list = tag->attributes();
+ QValueList<KTextEditor::CompletionEntry> tempCompletions;
+ QStringList nameList;
+ for (uint i = 0; i < list->count(); i++)
+ {
+ QString item = list->at(i)->name;
+ if (item.upper().startsWith(startsWith))
+ {
+ completion.text = QuantaCommon::attrCase(item);
+ completion.comment = list->at(i)->type;
+ tempCompletions.append( completion );
+ nameList.append(completion.text);
+ }
+ }
+
+ //list common attributes for this tag
+ for (QStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
+ {
+ AttributeList *attrs = tag->parentDTD->commonAttrs->find(*it);
+ for (uint j = 0; j < attrs->count(); j++)
+ {
+ QString name = attrs->at(j)->name;
+ if (name.upper().startsWith(startsWith))
+ {
+ completion.text = QuantaCommon::attrCase(name);
+ completion.comment = attrs->at(j)->type;
+ tempCompletions.append( completion );
+ nameList.append(completion.text);
+ }
+ }
+ }
+
+ if (tag->name().contains("!doctype",false)) //special case, list all the known document types
+ {
+ QStringList nickNames = DTDs::ref()->nickNameList(true);
+ for ( QStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
+ {
+ completion.type = "doctypeList";
+ completion.text = *it;
+ tempCompletions.append(completion);
+ nameList.append(completion.text);
+ }
+ }
+ //below isn't fast, but enough here. May be better with QMap<QString, KTextEditor::CompletionEntry>
+ nameList.sort();
+ for ( QStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
+ {
+ for (QValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
+ {
+ if ( (*compIt).text == *it)
+ {
+ completions->append(*compIt);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ case Script:
+ {
+ completion.userdata = startsWith+"|"+tag->name();
+ completion.type = "script";
+ AttributeList *list = tag->attributes();
+ for (uint i = 0; i < list->count(); i++)
+ {
+ QString item = list->at(i)->name;
+ completion.text = item;
+ completion.comment = list->at(i)->type;
+ completions->append( completion );
+ }
+ }
+ }
+ } // if (tag)
+
+// completionInProgress = true;
+ return completions;
+}
+
+/** Return a list of valid attribute values for the given tag and attribute */
+QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith )
+{
+ QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+
+ KTextEditor::CompletionEntry completion;
+ completion.type = "attributeValue";
+ completion.userdata = startsWith+"|"+tagName + "," + attribute;
+
+ bool deleteValues;
+ QStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
+ if (attribute.lower() == "class")
+ {
+ if (!values)
+ {
+ values = new QStringList(quantaApp->selectors(tagName));
+ deleteValues = true;
+ }
+ } else
+ if (attribute.lower() == "id")
+ {
+ if (!values)
+ {
+ values = new QStringList(quantaApp->idSelectors());
+ deleteValues = true;
+ }
+ }
+ if (values)
+ {
+ for ( QStringList::Iterator it = values->begin(); it != values->end(); ++it )
+ {
+ completion.text = *it;
+ if (completion.text.startsWith(startsWith))
+ {
+ completions->append( completion );
+ }
+ }
+ }
+ if (deleteValues)
+ delete values;
+ int andSignPos = startsWith.find('&');
+ if (andSignPos != -1)
+ {
+ QValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
+ *completions += *charCompletions;
+ delete charCompletions;
+ }
+
+// completionInProgress = true;
+ return completions;
+}
+
+/** Return a list of character completions (like &nbsp; ...) */
+QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const QString& startsWith)
+{
+ QValueList<KTextEditor::CompletionEntry> *completions = 0L;
+ QMap<QString, KTextEditor::CompletionEntry> completionMap;
+
+ //first search for entities defined in the document
+ const DTDStruct *dtdDTD = DTDs::ref()->find("dtd");
+ if (dtdDTD)
+ {
+ StructTreeGroup group;
+ for (uint j = 0; j < dtdDTD->structTreeGroups.count(); j++)
+ {
+ group = dtdDTD->structTreeGroups[j];
+ if (!group.autoCompleteAfterRx.pattern().isEmpty() &&
+ group.autoCompleteAfterRx.search("&") != -1)
+ {
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col, false);
+ completions = getGroupCompletions(node, group, line, col);
+ for (uint i = 0; i < completions->count(); i++)
+ {
+ (*completions)[i].type = "charCompletion";
+ (*completions)[i].userdata = (*completions)[i].text;
+ completionMap[(*completions)[i].text] = (*completions)[i];
+ }
+ break;
+ }
+ }
+ }
+
+ if (!completions)
+ completions = new QValueList<KTextEditor::CompletionEntry>();
+
+ KTextEditor::CompletionEntry completion;
+ completion.type = "charCompletion";
+ //add the entities from the tag files
+ QDictIterator<QTag> it(*(completionDTD->tagsList));
+ for( ; it.current(); ++it )
+ {
+ QTag *tag = it.current();
+ if (tag->type == "entity")
+ {
+ QString tagName = tag->name(true);
+ if (tagName.upper().startsWith(startsWith.upper()) || startsWith.isEmpty())
+ {
+ completion.text = tagName;
+ completion.userdata = tagName;
+ completions->append( completion );
+ completionMap[tagName] = completion;
+ }
+ }
+ }
+
+ QValueList<KTextEditor::CompletionEntry> *completions2 = new QValueList<KTextEditor::CompletionEntry>();
+ for (QMap<QString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
+ {
+ completions2->append(it.data());
+ }
+ delete completions;
+ completions = completions2;
+
+ for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ {
+ completion.text = *it;
+ int begin = completion.text.find("(&") + 2;
+ if (begin == 1)
+ continue;
+ int length = completion.text.find(";)") - begin + 1;
+ QString s = completion.text.mid(begin, length - 1);
+ completion.text = s + " : " + completion.text.left(begin -2) + " - " + completion.text.mid(begin + length + 1);
+ if (s.startsWith(startsWith))
+ {
+ completion.userdata = s.mid(startsWith.length());
+ completions->append( completion );
+ }
+ }
+
+ return completions;
+}
+
+/** Returns the DTD identifier for the document */
+QString Document::getDTDIdentifier()
+{
+ return dtdName;
+}
+
+/** Sets the DTD identifier */
+void Document::setDTDIdentifier(const QString &id)
+{
+ dtdName = id.lower();
+ m_groupsForDTEPs.clear();
+}
+
+/** Get a pointer to the current active DTD. If fallback is true, this always gives back a valid and known DTD pointer: the active, the document specified and in last case the application default document type. */
+const DTDStruct* Document::currentDTD(bool fallback)
+{
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+
+ const DTDStruct *dtd = parser->currentDTD(line, col);
+
+ if (fallback && !dtd) return defaultDTD();
+
+ return dtd;
+}
+
+/** Get a pointer to the default DTD (document, or app). */
+const DTDStruct* Document::defaultDTD() const
+{
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ if (!dtd) dtd = DTDs::ref()->find(Project::ref()->defaultDTD());
+ if (!dtd) dtd = DTDs::ref()->find(qConfig.defaultDocType); //this will always exists
+
+ return dtd;
+}
+
+/** Find the DTD name for a part of the document. */
+QString Document::findDTDName(Tag **tag)
+{
+ //Do some magic to find the document type
+ int endLine = editIf->numLines();
+ QString foundText = "";
+ int pos = 0;
+ int i = 0;
+ int line, startPos;
+ QString text;
+ do
+ {
+ text = editIf->textLine(i);
+ //search for !DOCTYPE tags
+ pos = text.find("!doctype",0,false);
+ if (pos != -1) //parse the found !DOCTYPE tag
+ {
+ int bl, bc, el, ec;
+ line = i;
+ bl = line;
+ startPos = text.findRev('<',pos);
+ while (startPos == -1 && line >=0)
+ {
+ text = editIf->textLine(line);
+ startPos = text.findRev('<');
+ bl = line;
+ line--;
+ }
+ if (startPos == -1)
+ {
+ i++;
+ continue;
+ }
+ bc = startPos;
+ line = i;
+ text = editIf->textLine(i);
+ startPos = text.find('>',pos);
+ el = line;
+ while (startPos == -1 && line < endLine)
+ {
+ text = editIf->textLine(line);
+ startPos = text.find('>');
+ el = line;
+ line++;
+ }
+ if (startPos == -1)
+ {
+ i++;
+ continue;
+ }
+ ec = startPos + 1;
+ *tag = new Tag();
+ (*tag)->setTagPosition(bl, bc, el, ec);
+ text = this->text(bl, bc, el, ec);
+ (*tag)->parse(text, this);
+ (*tag)->type = Tag::XmlTag;
+ text.replace("\\\"", "\"");
+ pos = text.find("public",0,false);
+ if (pos == -1) //if no PUBLIC info, use the word after !DOCTYPE as the doc.type
+ {
+ foundText = (*tag)->attribute(0);
+ } else
+ { //use the quoted string after PUBLIC as doc. type
+ pos = text.find("\"", pos+1);
+ if (pos !=-1)
+ {
+ int endPos = text.find("\"",pos+1);
+ foundText = text.mid(pos+1, endPos-pos-1);
+ }
+ }
+ break;
+ }
+ i++;
+ } while (i < endLine);
+
+ return foundText.lower();
+}
+
+/** Called whenever a user inputs text in a script type document. */
+bool Document::scriptAutoCompletion(int line, int column, const QString& insertedString)
+{
+ bool handled = false;
+ Node *node = parser->nodeAt(line, column);
+ if (!node) //happens in some cases in CSS
+ return false;
+ if (node->tag->type == Tag::Comment)
+ return true; //nothing to do
+ const DTDStruct *dtd = node->tag->dtd();
+ if (node->prev)
+ node = node->prev;
+ else
+ if (node->parent)
+ node = node->parent;
+
+ int bl, bc;
+ node->tag->beginPos(bl, bc);
+ QString s = text(bl, bc, line, column);
+ if (QuantaCommon::insideCommentsOrQuotes(s.length() -1, s, dtd))
+ return true; //again, nothing to do
+ QString s2 = s;
+ int i = s.length() - 1;
+ while (i > 0 && s[i].isSpace())
+ i--;
+ while (i > 0 && (s[i].isLetterOrNumber() || s[i] == '_' ||
+ (completionDTD->minusAllowedInWord && s[i] == '-') ) )
+ i--;
+ QString startStr = s.mid(i + 1).stripWhiteSpace();
+ s = s.left(i + 1);
+ if (s[i] == completionDTD->attributeSeparator)
+ {
+ while (i > 0 && s[i] != completionDTD->attrAutoCompleteAfter)
+ i--;
+ s = s.left(i + 1);
+ } else
+ if (s[i] == completionDTD->tagSeparator)
+ {
+ while (i > 0 && s[i] != completionDTD->tagAutoCompleteAfter)
+ i--;
+ s = s.left(i + 1);
+ }
+
+ if ( s[i] == completionDTD->attrAutoCompleteAfter ||
+ s[i] == completionDTD->attributeSeparator ) //if we need to list the arguments of a function
+ {
+ QString textLine = s.left(i);
+ QString word = findWordRev(textLine, completionDTD);
+ QValueList<QTag *> tags;
+ if (!word.isEmpty())
+ {
+ tags.append(userTagList.find(word.lower()));
+ QDictIterator<QTag> it(*(completionDTD->tagsList));
+ for( ; it.current(); ++it )
+ {
+ if (it.currentKey() == word)
+ tags.append(it.current());
+ }
+ }
+ QStringList argList;
+ for (QValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
+ {
+ QTag *tag = *it;
+ if (!tag)
+ continue;
+ QString arguments;
+ if (tag->type != "property")
+ {
+ for (int i =0; i < tag->attributeCount(); i++)
+ {
+ Attribute* attr = tag->attributeAt(i);
+ if (attr->status == "optional")
+ {
+ arguments = arguments + "["+attr->type +" "+attr->name +"], ";
+ } else
+ {
+ arguments = arguments + attr->type +" "+attr->name +", ";
+ }
+ }
+ arguments = tag->returnType +" "+tag->name() + "("+arguments.left(arguments.length()-2)+")";
+ argList.append(arguments);
+ codeCompletionIf->showArgHint(argList, "()" , completionDTD->attributeSeparator);
+ argHintVisible = true;
+ } else
+ {
+ if (hintRequested)
+ {
+ arguments = tag->name() + ": " + tag->attributeAt(0)->name + ";";
+ argList.append(arguments);
+ codeCompletionIf->showArgHint(argList, ":;" , completionDTD->attributeSeparator);
+ } else
+ showCodeCompletions( getAttributeValueCompletions(tag->name(), tag->attributeAt(0)->name, startStr));
+ }
+
+ handled = true;
+ }
+ } else
+ {
+ StructTreeGroup group;
+ for (uint j = 0; j < completionDTD->structTreeGroups.count(); j++)
+ {
+ group = completionDTD->structTreeGroups[j];
+ if (!group.autoCompleteAfterRx.pattern().isEmpty() &&
+ ( group.autoCompleteAfterRx.search(s2) != -1||
+ group.autoCompleteAfterRx.search(s) != -1) )
+ {
+ Node *node = parser->nodeAt(line, column, false);
+ showCodeCompletions(getGroupCompletions(node, group, line, column + 1));
+ handled = true;
+ break;
+ }
+ }
+ }
+ if ( !handled && !argHintVisible &&
+ (completionRequested ||
+ (s[i] == completionDTD->tagAutoCompleteAfter && (insertedString == " " || (insertedString[0] == completionDTD->tagAutoCompleteAfter && !completionDTD->requestSpaceBeforeTagAutoCompletion))) ||
+ completionDTD->tagAutoCompleteAfter == '\1' || (!completionDTD->memberAutoCompleteAfter.pattern().isEmpty() && completionDTD->memberAutoCompleteAfter.searchRev(s) != -1))
+ )
+ {
+ showCodeCompletions(getTagCompletions(line, column + 1));
+ handled = true;
+ }
+ return handled;
+}
+
+/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
+work correctly. */
+QString Document::text(int bLine, int bCol, int eLine, int eCol) const
+{
+ if (bLine > eLine)
+ {
+ int tmp = bLine;
+ bLine = eLine;
+ eLine = tmp;
+ tmp = bCol;
+ bCol = eCol;
+ eCol = tmp;
+ }
+ QString t = editIf->textLine(bLine);
+ if (bLine == eLine)
+ {
+ return t.mid(bCol, eCol-bCol +1);
+ }
+ t.remove(0, bCol);
+ t.append("\n");
+//TODO: This is slow if the area is big. We need to speed it up!!
+ for (int i = bLine+1; i < eLine ; i++)
+ {
+ t.append(editIf->textLine(i)+"\n");
+ }
+ t = t+editIf->textLine(eLine).left(eCol+1);
+ return t;
+}
+
+//TODO: profile which one is used more often and time critical places and use
+//that one as the default and call from that one the other version
+QString Document::text(const AreaStruct &area) const
+{
+ return text(area.bLine, area.bCol, area.eLine, area.eCol);
+}
+
+QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+{
+
+ QRegExp rx = regExp;
+ QString foundText = "";
+ int maxLine = editIf->numLines();
+ QString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
+ int pos;
+ int line = sLine;
+ do
+ {
+ pos = rx.search(textToSearch);
+ if (pos == -1)
+ {
+/* if (line + STEP < maxLine)
+ {
+ line += STEP;
+ textToSearch.append("\n"+text(line - STEP + 1, 0, line, editIf->lineLength(line)));
+ } else*/
+ {
+ line ++;
+ if (line < maxLine) textToSearch.append("\n"+editIf->textLine(line));
+ }
+ }
+ } while (line < maxLine && pos == -1);
+// pos = rx.search(text(sLine, sCol, maxLine -1, 100));
+ if (pos != -1)
+ {
+ foundText = rx.cap();
+ QString s = textToSearch.left(pos);
+ int linesUntilFound = s.contains("\n");
+ fbLine = sLine + linesUntilFound;
+ fbCol = s.length()-s.findRev("\n")-1;
+ int linesInFound = foundText.contains("\n");
+ feCol = foundText.length()-foundText.findRev("\n")-2;
+ feLine = fbLine + linesInFound;
+ if (linesUntilFound == 0)
+ {
+ fbCol = fbCol + sCol;
+ }
+ if (linesInFound == 0)
+ {
+ feCol = feCol + fbCol;
+ }
+ if (fbCol < 0) fbCol = 0;
+ if (feCol < 0) feCol = 0;
+/*
+ s = text(fbLine, fbCol, feLine, feCol);
+ if (s != foundText) //debug, error
+ {
+ KMessageBox::error(this,"Found: "+foundText+"\nRead: "+s);
+ }
+*/
+ }
+
+ return foundText;
+}
+
+QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+{
+ QRegExp rx = regExp;
+ QString foundText = "";
+ int pos = -1;
+ int line = sLine;
+ QString textToSearch = text(sLine, 0, sLine, sCol);
+ do
+ {
+ pos = rx.searchRev(textToSearch);
+ if (pos == -1)
+ {
+/* if (line - STEP >= 0)
+ {
+ textToSearch.prepend(text(line - STEP, 0, line - 1, editIf->lineLength(line-1)) + "\n");
+ line -= STEP;
+ } else */
+ {
+ line--;
+ if (line >=0) textToSearch.prepend(editIf->textLine(line) + "\n");
+ }
+ }
+ } while (line >=0 && pos == -1);
+ if (pos != -1)
+ {
+ foundText = rx.cap();
+ fbLine = line;
+ fbCol = pos;
+ int linesInFound = foundText.contains("\n");
+ feCol = foundText.length()-foundText.findRev("\n")-2;
+ feLine = fbLine + linesInFound;
+ if (linesInFound == 0)
+ {
+ feCol = feCol + fbCol;
+ }
+ if (fbCol < 0) fbCol = 0;
+ if (feCol < 0) feCol = 0;
+/*
+ QString s = text(fbLine, fbCol, feLine, feCol);
+ if (s != foundText) //debug, error
+ {
+ KMessageBox::error(this,"FindRev\nFound: "+foundText+"\nRead: "+s);
+ }
+*/
+ }
+
+ return foundText;
+}
+
+/** Code completion was requested by the user. */
+void Document::codeCompletionRequested()
+{
+ completionRequested = true;
+ completionInProgress = false;
+ argHintVisible = false;
+ hintRequested = false;
+ handleCodeCompletion();
+ completionRequested = false;
+}
+
+void Document::handleCodeCompletion()
+{
+ slotDelayedTextChanged(true);
+ bool handled = false;
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ completionDTD = currentDTD();
+ if (completionDTD->family == Xml)
+ {
+ handled = xmlCodeCompletion(line, col);
+ }
+ if (completionDTD->family == Script)
+ {
+ if (completionDTD->tagAutoCompleteAfter == '\0')
+ completionDTD->tagAutoCompleteAfter = '\1';
+ handled = scriptAutoCompletion(line, col - 1, "");
+ if (completionDTD->tagAutoCompleteAfter == '\1')
+ completionDTD->tagAutoCompleteAfter = '\0';
+/* if (!handled)
+ {
+ completionDTD = defaultDTD();
+ QString s = text(line, 0, line, col).stripWhiteSpace();
+ if (s.findRev("<") != -1)
+ {
+ //showCodeCompletions(getTagCompletions(line, col + 1));
+
+ handled = true;
+ }
+ }*/
+ }
+ if (!handled)
+ {
+ completionDTD = defaultDTD();
+ if (completionDTD->family == Xml)
+ {
+ // xmlCodeCompletion(line, col);
+ xmlAutoCompletion(line, col, " ");
+ }
+ }
+
+ completionInProgress = true;
+}
+
+/** Bring up the code completion tooltip. */
+void Document::codeCompletionHintRequested()
+{
+ completionRequested = true;
+ slotDelayedTextChanged(true);
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ completionDTD = currentDTD();
+ if (completionDTD->family == Script)
+ {
+// QString textLine = editIf->textLine(line).left(col);
+// int pos = textLine.findRev("(");
+// int pos2 = textLine.findRev(")");
+ //if (pos > pos2 )
+ hintRequested = true;
+ scriptAutoCompletion(line, col - 1, "");
+ }
+ completionRequested = false;
+}
+
+QString Document::currentWord()
+{
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ QString textLine = editIf->textLine(line);
+ int startPos = textLine.findRev(QRegExp("\\W"), col);
+ int endPos = textLine.find(QRegExp("\\W"), col);
+ if (startPos == -1)
+ startPos = 0;
+ else
+ startPos++;
+ if (endPos == -1)
+ endPos = textLine.length();
+ return textLine.mid(startPos, endPos - startPos);
+}
+
+/** Find the word until the first word boundary backwards */
+QString Document::findWordRev(const QString& textToSearch, const DTDStruct *dtd)
+{
+ QString t = textToSearch;
+ while (t.endsWith(" "))
+ t = t.left(t.length()-1);
+ int startPos = -1;
+ int pos;
+ bool end = false;
+ do{
+ pos = t.findRev(QRegExp("\\W"), startPos);
+ if (t[pos] == '_' ||
+ (dtd && dtd->minusAllowedInWord && t[pos] == '-'))
+ {
+ startPos = pos - t.length()-1;
+ end = false;
+ } else
+ {
+ end = true;
+ }
+ } while (!end);
+ return t.remove(0,pos+1);
+}
+
+
+/** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */
+bool Document::xmlCodeCompletion(int line, int col)
+{
+ bool handled = false;
+ Node *node = parser->nodeAt(line, col);
+ if (node && node->tag && node->tag->type == Tag::XmlTag )
+ {
+ Tag *tag = node->tag;
+ int bLine, bCol;
+ tag->beginPos(bLine, bCol);
+ QString s;
+ int index;
+ QString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
+ int nameCol = bCol + tagName.length() + 1;
+ if (!tag->nameSpace.isEmpty())
+ nameCol += 1 + tag->nameSpace.length();
+ if (col > bCol && col <= nameCol) //we are inside a tag name, so show the possible tags
+ {
+ showCodeCompletions( getTagCompletions(line, col) );
+ handled = true;
+ } else
+ {
+ index = tag->valueIndexAtPos(line,col);
+ if (index != -1) //inside a value
+ {
+ s = tag->attribute(index);
+ if (s == "style" && completionDTD->insideDTDs.contains("css"))
+ {
+ completionDTD = DTDs::ref()->find("text/css");
+ return scriptAutoCompletion(line, col, "");
+ } else
+ {
+ tag->attributeValuePos(index, bLine, bCol);
+ s = tag->attributeValue(index).left(col - bCol);
+ showCodeCompletions( getAttributeValueCompletions(tagName, tag->attribute(index), s) );
+ handled = true;
+ }
+ } else
+ {
+ index = tag->attributeIndexAtPos(line,col);
+ s = text(line,col,line,col);
+ if (index != -1 || s ==" " || s==">" || s == "/") //inside an attribute or between attributes
+ {
+ if (index !=-1)
+ {
+ tag->attributeNamePos(index, bLine, bCol);
+ s = tag->attribute(index).left(col - bCol);
+ } else
+ {
+ s = text(line, 0, line, col -1);
+ s = s.section(' ', -1);
+ }
+ showCodeCompletions( getAttributeCompletions(tagName, s) );
+ handled = true;
+ }
+ }
+ }
+ }
+ if (!handled)
+ {
+ QString s = editIf->textLine(line).left(col);
+ int pos = s.findRev('&');
+ if (pos != -1)
+ {
+ s = s.mid(pos + 1);
+ if (!s.stripWhiteSpace().isEmpty())
+ {
+ //complete character codes
+ showCodeCompletions(getCharacterCompletions(s));
+ handled = true;
+ }
+ }
+ }
+ return handled;
+}
+
+void Document::slotCompletionAborted()
+{
+ completionInProgress = false;
+ argHintVisible = false;
+}
+
+/** Ask for user confirmation if the file was changed outside. */
+void Document::checkDirtyStatus()
+{
+ QString fileName;
+ if (url().isLocalFile())
+ fileName = url().path();
+ if (m_dirty)
+ {
+ createTempFile();
+ if (!fileName.isEmpty())
+ {
+ QDateTime modifTime = QFileInfo(fileName).lastModified();
+ if (modifTime == m_modifTime)
+ m_dirty = false;
+ }
+ if (m_dirty)
+ {
+ if (m_md5sum.isEmpty())
+ {
+ QFile f(fileName);
+ if (f.open(IO_ReadOnly))
+ {
+ const char* c = "";
+ KMD5 context(c);
+ context.reset();
+ context.update(f);
+ m_md5sum = context.hexDigest();
+ f.close();
+ }
+ m_dirty = false;
+ } else
+ {
+ //check if the file is changed, also by file content. Might help to reduce
+ //unwanted warning on NFS
+ QFile f(fileName);
+ if (f.open(IO_ReadOnly))
+ {
+ QString md5sum;
+ const char* c = "";
+ KMD5 context(c);
+ context.reset();
+ context.update(f);
+ md5sum = context.hexDigest();
+ kdDebug(24000) << "MD5 sum of current doc: " << m_md5sum << endl;
+ kdDebug(24000) << "MD5 sum of doc on disc : " << md5sum << endl;
+ if (md5sum == m_md5sum)
+ {
+ m_dirty = false;
+ }
+ f.close();
+ }
+ }
+ }
+ if (m_dirty)
+ {
+ DirtyDlg *dlg = new DirtyDlg(url().path(), m_tempFileName, false, this);
+ DirtyDialog *w = static_cast<DirtyDialog*>(dlg->mainWidget());
+ QString kompareStr = KStandardDirs::findExe("kompare");
+ if (kompareStr.isEmpty())
+ {
+ w->buttonCompare->setEnabled(false);
+ w->buttonLoad->setChecked(true);
+ }
+ if (dlg->exec())
+ {
+ m_doc->setModified(false);
+ openURL(url());
+ }
+ m_modifTime = QFileInfo(fileName).lastModified();
+ delete dlg;
+ }
+ closeTempFile();
+ m_dirty = false;
+ }
+}
+
+/** Save the document and reset the dirty status. */
+void Document::save()
+{
+ if (url().isLocalFile())
+ {
+ QString fileName;
+ fileName = url().path();
+ fileWatcher->removeFile(fileName);
+// kdDebug(24000) << "removeFile[save]: " << fileName << endl;
+ m_doc->save();
+ m_dirty = false;
+ m_modifTime = QFileInfo(fileName).lastModified();
+ fileWatcher->addFile(fileName);
+// kdDebug(24000) << "addFile[save]: " << fileName << endl;
+ } else
+ {
+ m_doc->save();
+ m_dirty = false;
+ }
+// kdDebug(24000) << "Document " << url() << " saved." << endl;
+}
+
+bool Document::saveAs(const KURL& url)
+{
+ bool result = m_doc->saveAs(url);
+ if (result)
+ {
+ m_md5sum = "";
+ if (url.isLocalFile())
+ {
+ QFile f(url.path());
+ if (f.open(IO_ReadOnly))
+ {
+ const char* c = "";
+ KMD5 context(c);
+ context.reset();
+ context.update(f);
+ m_md5sum = context.hexDigest();
+ f.close();
+ }
+ }
+ }
+ return result;
+}
+
+void Document::enableGroupsForDTEP(const QString& dtepName, bool enable)
+{
+ if (m_groupsForDTEPs.isEmpty())
+ m_groupsForDTEPs = m_DTEPList;
+ if (enable)
+ {
+ if (m_groupsForDTEPs.contains(dtepName) == 0)
+ m_groupsForDTEPs.append(dtepName);
+ } else
+ {
+ m_groupsForDTEPs.remove(dtepName);
+ }
+}
+
+void Document::resetGroupsForDTEPList()
+{
+ m_groupsForDTEPs.clear();
+}
+
+/** Returns true if the number of " (excluding \") inside text is even. */
+bool Document::evenQuotes(const QString &text)
+{
+ int num = text.contains(QRegExp("[^\\\\]\""));
+
+ return (num /2 *2 == num);
+}
+
+void Document::slotTextChanged()
+{
+ changed = true;
+ parser->setSAParserEnabled(false); //disable special area parsing if the text was changed.
+ if (reparseEnabled && delayedTextChangedEnabled)
+ {
+ kdDebug(24000) << "Delayed text changed called." << endl;
+ //delay the handling, otherwise we may get wrong values for (line,column)
+ QTimer::singleShot(0, this, SLOT(slotDelayedTextChanged()));
+ delayedTextChangedEnabled = false;
+ }
+}
+
+void Document::slotDelayedTextChanged(bool forced)
+{
+ if (!forced && typingInProgress)
+ {
+ kdDebug(24000) << "Reparsing delayed!" << endl;
+ parser->setParsingNeeded(true);
+ QTimer::singleShot(1000, this, SLOT(slotDelayedTextChanged()));
+ reparseEnabled = false;
+ delayedTextChangedEnabled = false;
+ return;
+ }
+
+ uint line, column;
+ QString oldNodeName = "";
+ Node *node;
+ Node *currentNode = 0L; //holds a copy of the node which is at (line,column)
+ Node *previousNode = 0L;//holds a copy of the node before currentNode
+ if (qConfig.updateClosingTags)
+ {
+ viewCursorIf->cursorPositionReal(&line, &column);
+ node = parser->nodeAt(line, column, false);
+ if (node &&
+ ((node->tag->type == Tag::XmlTag && !node->tag->single) ||
+ node->tag->type == Tag::XmlTagEnd)
+ )
+ {
+ Tag *tag;
+ tag = new Tag(*node->tag);
+ currentNode = new Node(0L);
+ currentNode->removeAll = false;
+ currentNode->tag = tag;
+
+ node = node->previousSibling();
+ if (node)
+ {
+ tag = new Tag(*node->tag);
+ previousNode = new Node(0L);
+ previousNode->removeAll = false;
+ previousNode->tag = tag;
+ }
+ }
+ }
+ parser->setSAParserEnabled(true); //enable special area parsing, it was disabled in slotTextChanged()
+ baseNode = parser->rebuild(this);
+ if (qConfig.updateClosingTags && currentNode)
+ {
+ viewCursorIf->cursorPositionReal(&line, &column);
+ node = parser->nodeAt(line, column, false);
+ if (node &&
+ node->tag->nameSpace + node->tag->name != currentNode->tag->nameSpace + currentNode->tag->name &&
+ ((node->tag->type == Tag::XmlTag && !node->tag->single) || node->tag->type == Tag::XmlTagEnd) && node->tag->validXMLTag)
+ {
+ int bl, bc, bl2, bc2;
+ node->tag->beginPos(bl, bc);
+ currentNode->tag->beginPos(bl2,bc2);
+ if ( (bl != bl2 || bc !=bc2) && previousNode)
+ {
+ previousNode->tag->beginPos(bl2, bc2);
+ Node::deleteNode(currentNode);
+ currentNode = previousNode;
+ previousNode = 0L;
+ } else
+ {
+ Node::deleteNode(previousNode);
+ previousNode = 0L;
+ }
+ if (bl == bl2 && bc == bc2 &&
+ ((node->tag->type == Tag::XmlTag && !node->tag->single) || currentNode->tag->type == Tag::XmlTagEnd))
+ {
+ QString newName = node->tag->name;
+ bool updateClosing = (currentNode->tag->type == Tag::XmlTag) && !newName.startsWith("!");
+ int num = 1;
+ if (!node->tag->nameSpace.isEmpty())
+ newName.prepend(node->tag->nameSpace + ":");
+ if (updateClosing)
+ node = node->nextSibling();
+ else
+ node = node->previousSibling();
+ while (node)
+ {
+ if (node->tag->validXMLTag && ((node->tag->type == Tag::XmlTag && !node->tag->single) || node->tag->type == Tag::XmlTagEnd))
+ {
+ if (node->tag->nameSpace + node->tag->name == currentNode->tag->nameSpace + currentNode->tag->name )
+ {
+ num++;
+ }
+ if ( (updateClosing && QuantaCommon::closesTag(currentNode->tag, node->tag)) ||
+ (!updateClosing && QuantaCommon::closesTag(node->tag, currentNode->tag)) )
+ {
+ num--;
+ }
+ if (num == 0)
+ {
+ reparseEnabled = false;
+ node->tag->beginPos(bl, bc);
+ bc++;
+ if(editIfExt)
+ editIfExt->editBegin();
+ int len = node->tag->name.length();
+ if (!node->tag->nameSpace.isEmpty())
+ len += 1 + node->tag->nameSpace.length();
+ editIf->removeText(bl, bc, bl, bc + len);
+ if (updateClosing)
+ {
+ editIf->insertText(bl, bc, "/"+newName);
+ } else
+ {
+ editIf->insertText(bl, bc, newName.mid(1));
+ if (bl == (int)line)
+ {
+ column += (newName.length() - currentNode->tag->name.length());
+ }
+ }
+ if(editIfExt)
+ editIfExt->editEnd();
+ viewCursorIf->setCursorPositionReal(bl, bc);
+ docUndoRedo->mergeNextModifsSet();
+ baseNode = parser->parse(this, true);
+ viewCursorIf->setCursorPositionReal(line, column);
+ reparseEnabled = true;
+ break;
+ }
+ }
+ if (updateClosing)
+ node = node->nextSibling();
+ else
+ node = node->previousSibling();
+ }
+ }
+ }
+ Node::deleteNode(currentNode);
+ Node::deleteNode(previousNode);
+ }
+
+ quantaApp->slotNewLineColumn();
+ if (qConfig.instantUpdate && quantaApp->structTreeVisible())
+ {
+ typingInProgress = false;
+ StructTreeView::ref()->slotReparse(this, baseNode , qConfig.expandLevel);
+ }
+ reparseEnabled = true;
+ delayedTextChangedEnabled = true;
+}
+
+/** Returns list of values for attribute */
+QStringList* Document::tagAttributeValues(const QString& dtdName, const QString& tag, const QString &attribute, bool &deleteResult)
+{
+ QStringList *values = 0L;
+ deleteResult = true;
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ if (dtd)
+ {
+ QString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
+ AttributeList* attrs = QuantaCommon::tagAttributes(dtdName, tag);
+ if (attrs)
+ {
+ Attribute *attr;
+ KURL u;
+ KURL base = url();
+ base.setPath(base.directory(false,false));
+ QString s;
+ for ( attr = attrs->first(); attr; attr = attrs->next() )
+ {
+ QString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
+ if (attrName == searchForAttr)
+ {
+ if (attr->type == "url") {
+ Project *project = Project::ref();
+ if (project->hasProject())
+ {
+ values = new QStringList(project->fileNameList());
+ for (uint i = 0; i < values->count(); i++)
+ {
+ u = (*values)[i];
+ u = QExtFileInfo::toRelative(u, base);
+ (*values)[i] = u.path();
+ }
+ values->remove(values->at(0));
+ values->append("mailto:" + project->email());
+ } else
+ {
+ QDir dir = QDir(url().directory());
+ values = new QStringList(dir.entryList());
+ }
+ break;
+ } else {
+ values = &attr->values;
+ deleteResult = false;
+ break;
+ }
+ }
+ }
+ }
+ }
+ return values;
+}
+
+bool Document::hasChanged()
+{
+ bool b = changed;
+ changed = false;
+ return b;
+}
+
+void Document::setChanged(bool newStatus)
+{
+ changed = newStatus;
+}
+
+void Document::paste()
+{
+ reparseEnabled = false;
+ dynamic_cast<KTextEditor::ClipboardInterface*>(view())->paste();
+ reparseEnabled = true;
+ baseNode = parser->rebuild(this);
+}
+
+/** returns all the areas that are between tag and it's closing pair */
+QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent)
+{
+ Node *node = baseNode;
+ int bl, bc, el, ec;
+ QStringList result;
+
+ while (node)
+ {
+ if (node->tag->type == Tag::XmlTag)
+ {
+ if ( (node->tag->dtd()->caseSensitive && node->tag->name == tag) ||
+ (!node->tag->dtd()->caseSensitive && node->tag->name.lower() == tag.lower()) )
+ {
+ node->tag->beginPos(bl, bc);
+ if (node->next)
+ node->next->tag->endPos(el, ec);
+ else
+ {
+ el = editIf->numLines()-1;
+ ec = editIf->lineLength(el);
+ }
+ QString s = text(bl, bc, el, ec);
+ if (includeCoordinates)
+ {
+ s.prepend(QString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
+ }
+ result += s;
+ if (skipFoundContent)
+ node = node->next;
+ else
+ node = node->nextSibling();
+ } else
+ node = node->nextSibling();
+ } else
+ node = node->nextSibling();
+ }
+
+ return result;
+}
+
+void Document::activateRepaintView(bool activation)
+{
+ repaintEnabled = activation;
+ m_view->setUpdatesEnabled(activation);
+}
+
+void Document::setErrorMark(int line)
+{
+ if (!markIf)
+ return;
+ markIf->addMark(line, KTextEditor::MarkInterface::markType07);
+}
+
+void Document::clearErrorMarks()
+{
+ if (!markIf)
+ return;
+ QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ KTextEditor::Mark* mark;
+ for (mark = marks.first(); mark; mark = marks.next())
+ {
+ if (mark->type & KTextEditor::MarkInterface::markType07)
+ markIf->removeMark(mark->line, KTextEditor::MarkInterface::markType07);
+ }
+}
+
+QString Document::backupPathEntryValue()
+{
+ return m_backupPathValue;
+}
+
+void Document::setBackupPathEntryValue(const QString& ev)
+{
+ m_backupPathValue = ev;
+}
+
+/** if the document is modified then backup it and insert an entry in quantarc */
+void Document::createBackup(KConfig* config)
+{
+ if (isModified())
+ {
+ if (isUntitled())
+ {
+ m_backupPathValue = qConfig.backupDirPath + untitledUrl + "." + hashFilePath("file:///" + untitledUrl) + "U";
+ } else
+ {
+ m_backupPathValue = qConfig.backupDirPath + url().fileName() + "." + hashFilePath(url().url());
+ }
+ QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+
+ //the encoding used for the current document
+ QString encoding = quantaApp->defaultEncoding();
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+ if (encoding.isEmpty())
+ encoding = "utf8"; //final fallback
+
+ //creates an entry string in quantarc if it does not exist yet
+ config->setGroup("General Options");
+ QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
+ QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
+ if (!autosavedFilesEntryList.contains(backupPathValueURL)) //not yet backed up, add an entry for this file
+ {
+ autosavedFilesEntryList.append(backupPathValueURL);
+ config->writePathEntry("List of autosaved files", autosavedFilesEntryList);
+ if (!isUntitled())
+ backedupFilesEntryList.append(KURL::fromPathOrURL(url().path() + "." + qConfig.quantaPID).url());
+ else
+ backedupFilesEntryList.append(url().url() + "." + qConfig.quantaPID);
+ config->writePathEntry("List of backedup files", backedupFilesEntryList);
+ config->sync();
+ }
+
+ //creates a copy of this specific document
+ QFile file(m_backupPathValue);
+ if (file.open(IO_WriteOnly))
+ {
+ QTextStream stream(&file);
+ stream.setCodec(QTextCodec::codecForName(encoding));
+ stream << editIf->text();
+ file.close();
+ }
+ }
+}
+/** if there is no more need for a backup copy then remove it */
+void Document::removeBackup(KConfig *config)
+{
+ QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+
+ config->reparseConfiguration();
+ config->setGroup("General Options");
+
+ QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
+ QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
+
+ autosavedFilesEntryList.remove(backupPathValueURL);
+ config->writePathEntry("List of autosaved files", autosavedFilesEntryList);
+ backedupFilesEntryList.remove(KURL::fromPathOrURL(url().path() + "." + qConfig.quantaPID).url());
+ config->writePathEntry("List of backedup files", backedupFilesEntryList);
+ config->sync();
+
+ if(QFile::exists(m_backupPathValue))
+ QFile::remove(m_backupPathValue);
+}
+/** creates a string by hashing a bit the path string of this document */
+QString Document::hashFilePath(const QString& p)
+{
+ switch(p.length())
+ {
+ case 1: {
+ int c = int(p[0]);
+ return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ }
+
+ case 2: {
+ int c = int(p[1]) * 2;
+ return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ }
+
+ default: {
+ int sign = 1,
+ sum = 0;
+ uint plen = p.length();
+ for (uint i = 0; i+1 < plen; i++)
+ {
+ sum += int(p[i]) + int(p[i + 1]) * sign;
+ sign *= -1;
+ }
+ if( sum >= 0 )
+ return QString::number(sum, 10) + "P" + qConfig.quantaPID;
+ else
+ return QString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
+ }
+ }
+}
+
+void Document::convertCase()
+{
+ int tagCase = 0;
+ int attrCase = 0;
+ KDialogBase dlg(this, 0L, false, i18n("Change Tag & Attribute Case"), KDialogBase::Ok | KDialogBase::Cancel);
+ CaseWidget w(&dlg);
+ dlg.setMainWidget(&w);
+ const DTDStruct *dtd = defaultDTD();
+ switch (qConfig.attrCase)
+ {
+ case 1: {w.lowerAttr->setChecked(true); break;}
+ case 2: {w.upperAttr->setChecked(true); break;}
+ default:{w.unchangedAttr->setChecked(true); break;}
+ }
+ switch (qConfig.tagCase)
+ {
+ case 1: {w.lowerTag->setChecked(true); break;}
+ case 2: {w.upperTag->setChecked(true); break;}
+ default:{w.unchangedTag->setChecked(true); break;}
+ }
+
+ if (dlg.exec())
+ {
+ KProgressDialog progressDlg(this, 0, i18n("Working..."));
+ progressDlg.setLabel(i18n("Changing tag and attribute case. This may take some time, depending on the document complexity."));
+ progressDlg.setAllowCancel(false);
+ progressDlg.show();
+ kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ KProgress *pBar = progressDlg.progressBar();
+ pBar->setValue(0);
+ pBar->setTotalSteps(nodeNum);
+ pBar->setTextEnabled(true);
+ if (w.lowerTag->isChecked())
+ tagCase = 1;
+ if (w.upperTag->isChecked())
+ tagCase = 2;
+ if (w.lowerAttr->isChecked())
+ attrCase = 1;
+ if (w.upperAttr->isChecked())
+ attrCase = 2;
+ if (tagCase == 0 && attrCase == 0)
+ return;
+ reparseEnabled = false;
+ int bl, bc, ec;
+ uint line, col;
+ viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = baseNode;
+ while (node)
+ {
+ pBar->advance(1);
+ if (node->tag->dtd() == dtd)
+ {
+ if (tagCase !=0)
+ {
+ if(editIfExt)
+ editIfExt->editBegin();
+ node->tag->namePos(bl, bc);
+ ec = bc + node->tag->name.length();
+ editIf->removeText(bl, bc, bl, ec);
+ viewCursorIf->setCursorPositionReal(bl, bc);
+ QString newName = node->tag->name;
+ if (tagCase == 1)
+ newName = newName.lower();
+ else if (tagCase == 2)
+ newName = newName.upper();
+ editIf->insertText(bl, bc, newName);
+ if(editIfExt)
+ editIfExt->editEnd();
+ }
+ if (attrCase != 0)
+ {
+ QString newName;
+ for (int i = 0; i < node->tag->attrCount(); i++)
+ {
+ if(editIfExt)
+ editIfExt->editBegin();
+ node->tag->attributeNamePos(i, bl, bc);
+ newName = node->tag->attribute(i);
+ ec = bc + newName.length();
+ editIf->removeText(bl, bc, bl, ec);
+ if (attrCase == 1)
+ newName = newName.lower();
+ else if (attrCase == 2)
+ newName = newName.upper();
+ editIf->insertText(bl, bc, newName);
+ if(editIfExt)
+ editIfExt->editEnd();
+ }
+ }
+ }
+ node = node->nextSibling();
+ }
+ reparseEnabled = true;
+ viewCursorIf->setCursorPositionReal(line, col);
+ quantaApp->reparse(true);
+ }
+}
+
+void Document::open(const KURL &url, const QString &encoding)
+{
+ if (encodingIf)
+ {
+ encodingIf->setEncoding(encoding);
+ m_encoding = encoding;
+ m_codec = QTextCodec::codecForName(m_encoding);
+ }
+ connect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
+ connect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ if (!openURL(url))
+ slotOpeningFailed(QString::null);
+ if (!url.isLocalFile())
+ {
+ QExtFileInfo internalFileInfo;
+ internalFileInfo.enter_loop();
+ }
+}
+
+void Document::slotOpeningCompleted()
+{
+ KURL u = url();
+ if (!u.isLocalFile())
+ {
+ m_modifTime = QDateTime();
+ qApp->exit_loop();
+ }
+ else
+ {
+ fileWatcher->addFile(u.path());
+ m_modifTime = QFileInfo(u.path()).lastModified();
+// kdDebug(24000) << "addFile[Document::open]: " << u.path() << endl;
+ }
+ disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ m_dirty = false;
+ m_view->setFocus();
+ processDTD();
+ emit openingCompleted(u);
+}
+
+void Document::slotOpeningFailed(const QString &errorMessage)
+{
+ m_md5sum = "";
+ Q_UNUSED(errorMessage); //TODO: append the error message to our own error message
+ if (!url().isLocalFile())
+ qApp->exit_loop();
+ disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ emit openingFailed(url());
+}
+
+void Document::processDTD(const QString& documentType)
+{
+ QString foundName;
+ QString projectDTD = Project::ref()->defaultDTD();
+ setDTDIdentifier(projectDTD);
+ Tag *tag = 0L;
+ if (documentType.isEmpty())
+ {
+ foundName = findDTDName(&tag); //look up the whole file for DTD definition
+ bool found = false;
+ if (!foundName.isEmpty()) //!DOCTYPE found in file
+ {
+ KDialogBase dlg(this, 0L, true, i18n("DTD Selector"), KDialogBase::Ok | KDialogBase::Cancel);
+ DTDSelectDialog *dtdWidget = new DTDSelectDialog(&dlg);
+ dlg.setMainWidget(dtdWidget);
+ QStringList lst = DTDs::ref()->nickNameList(true);
+ QString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ dtdWidget->dtdCombo->insertItem(lst[i]);
+ if (lst[i] == foundNickName)
+ {
+ setDTDIdentifier(foundName);
+ found =true;
+ }
+ }
+
+ if (!DTDs::ref()->find(foundName))
+ {
+ //try to find the closest matching DTD
+ QString s = foundName.lower();
+ uint spaceNum = s.contains(' ');
+ QStringList dtdList = DTDs::ref()->nameList();
+ QStringList lastDtdList;
+ for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
+ {
+ lastDtdList = dtdList;
+ QStringList::Iterator strIt = dtdList.begin();
+ while (strIt != dtdList.end())
+ {
+ if (!(*strIt).startsWith(s.section(' ', 0, i)))
+ {
+ strIt = dtdList.remove(strIt);
+ } else
+ {
+ ++strIt;
+ }
+ }
+ }
+ dtdList = lastDtdList;
+ for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
+ {
+ lastDtdList = dtdList;
+ QStringList::Iterator strIt = dtdList.begin();
+ while (strIt != dtdList.end())
+ {
+ if (!(*strIt).endsWith(s.section(' ', -(i+1), -1)))
+ {
+ strIt = dtdList.remove(strIt);
+ } else
+ {
+ ++strIt;
+ }
+ }
+ }
+ if (lastDtdList.count() == 1 || lastDtdList[0].startsWith(s.section(' ', 0, 0)))
+ {
+ projectDTD = lastDtdList[0];
+ }
+ }
+
+// dlg->dtdCombo->insertItem(i18n("Create New DTD Info"));
+ dtdWidget->messageLabel->setText(i18n("This DTD is not known for Quanta. Choose a DTD or create a new one."));
+ dtdWidget->currentDTD->setText(DTDs::ref()->getDTDNickNameFromName(foundName));
+ QString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
+ for (int i = 0; i < dtdWidget->dtdCombo->count(); i++)
+ {
+ if (dtdWidget->dtdCombo->text(i) == projectDTDNickName)
+ {
+ dtdWidget->dtdCombo->setCurrentItem(i);
+ break;
+ }
+ }
+ if (!found && qConfig.showDTDSelectDialog)
+ {
+ quantaApp->slotHideSplash();
+ if (dlg.exec())
+ {
+ qConfig.showDTDSelectDialog = !dtdWidget->useClosestMatching->isChecked();
+ setDTDIdentifier(DTDs::ref()->getDTDNameFromNickName(dtdWidget->dtdCombo->currentText()));
+ const DTDStruct *dtd = DTDs::ref()->find(dtdName);
+ if (dtdWidget->convertDTD->isChecked() && dtd->family == Xml)
+ {
+ int bLine, bCol, eLine, eCol;
+ tag->beginPos(bLine,bCol);
+ tag->endPos(eLine,eCol);
+ editIf->removeText(bLine, bCol, eLine, eCol+1);
+ viewCursorIf->setCursorPositionReal((uint)bLine, (uint)bCol);
+ insertText("<!DOCTYPE" + dtd->doctypeStr +">");
+ }
+ }
+ }
+ } else //DOCTYPE not found in file
+ {
+ KURL u = url();
+ QString dtdId = DTDs::ref()->DTDforURL(u)->name;
+// if (dtdId == "empty")
+ {
+ const DTDStruct * dtd = DTDs::ref()->find(projectDTD);
+ if (DTDs::canHandle(dtd, u))
+ dtdId = projectDTD;
+ else
+ {
+ dtd = DTDs::ref()->find(qConfig.defaultDocType);
+ if (DTDs::canHandle(dtd, u))
+ dtdId = qConfig.defaultDocType;
+ }
+ }
+ setDTDIdentifier(dtdId);
+ }
+ } else //dtdName is read from the method's parameter
+ {
+ setDTDIdentifier(documentType);
+ }
+
+ if (!isUntitled())
+ {
+ quantaApp->messageOutput()->showMessage(i18n("\"%1\" is used for \"%2\".\n").arg(DTDs::ref()->getDTDNickNameFromName(dtdName)).arg(url().prettyURL(0, KURL::StripFileProtocol)));
+ }
+ quantaApp->slotLoadToolbarForDTD(dtdName);
+ StructTreeView::ref()->useOpenLevelSetting = true;
+ delete tag;
+}
+
+
+/** Called when a file on the disk has changed. */
+void Document::slotFileDirty(const QString& fileName)
+{
+ if ( url().path() == fileName && !dirty() )
+ {
+ setDirtyStatus(true);
+ if (this == ViewManager::ref()->activeDocument())
+ {
+ checkDirtyStatus();
+ }
+ }
+}
+
+void Document::slotMarkChanged(KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action)
+{
+ if(mark.type & KTextEditor::MarkInterface::markType02)
+ {
+ if(action == KTextEditor::MarkInterfaceExtension::MarkRemoved)
+ emit breakpointUnmarked(this, mark.line);
+ else
+ emit breakpointMarked(this, mark.line);
+ }
+}
+
+void Document::resetDTEPs()
+{
+ m_DTEPList.clear();
+ m_DTEPList.append(defaultDTD()->name);
+}
+
+void Document::addDTEP(const QString &dtepName)
+{
+ if (m_DTEPList.contains(dtepName) == 0)
+ {
+ m_DTEPList.append(dtepName);
+ }
+}
+
+QStringList Document::groupsForDTEPs()
+{
+ if (m_groupsForDTEPs.isEmpty())
+ return m_DTEPList;
+ else
+ return m_groupsForDTEPs;
+}
+
+QString Document::annotationText(uint line)
+{
+ QMap<uint, QPair<QString, QString> >::Iterator it = m_annotations.find(line);
+ if (it != m_annotations.end())
+ return it.data().first;
+ else
+ return QString::null;
+}
+
+void Document::setAnnotationText(uint line, const QString& text)
+{
+ if (text.isEmpty())
+ {
+ m_annotations.remove(line);
+ if (markIf)
+ markIf->removeMark(line, KTextEditor::MarkInterface::markType08);
+ } else
+ {
+ m_annotations.insert(line, qMakePair(text, QString("")));
+ if (markIf)
+ markIf->setMark(line, KTextEditor::MarkInterface::markType08);
+ uint line, column;
+ viewCursorIf->cursorPositionReal(&line, &column);
+ viewCursorIf->setCursorPositionReal(line, 0);
+ const DTDStruct *dtd = currentDTD(true);
+ QString commentBegin = "";
+ QString commentEnd = "";
+ for (QMap<QString, QString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
+ {
+ commentBegin = it.key();
+ commentEnd = it.data();
+ if (commentEnd != "\n")
+ break;
+ }
+ if (commentBegin.isEmpty())
+ {
+ if (dtd->family == Xml)
+ {
+ commentBegin = "<!--";
+ commentEnd = "-->";
+ } else
+ {
+ commentBegin = "/*";
+ commentEnd = "*/";
+ }
+ }
+ QString s = "@annotation: " + text;
+ s.prepend(commentBegin + " ");
+ s.append(" " + commentEnd + "\n");
+ insertText(s, true, true);
+ emit showAnnotation(line, "", qMakePair(text, QString("")));
+ }
+}
+
+void Document::addAnnotation(uint line, const QPair<QString, QString>& annotation)
+{
+ m_annotations.insert(line, annotation);
+ if (markIf)
+ markIf->setMark(line, KTextEditor::MarkInterface::markType08);
+ emit showAnnotation(line, "", annotation);
+}
+
+void Document::clearAnnotations()
+{
+ if (markIf)
+ {
+ QPtrList<KTextEditor::Mark> m = markIf->marks();
+ for (uint i=0; i < m.count(); i++)
+ markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType08 );
+ }
+ m_annotations.clear();
+}
+
+bool Document::openURL(const KURL& url)
+{
+ m_md5sum = "";
+ if (url.isLocalFile())
+ {
+ QFile f(url.path());
+ if (f.open(IO_ReadOnly))
+ {
+ const char* c = "";
+ KMD5 context(c);
+ context.reset();
+ context.update(f);
+ m_md5sum = context.hexDigest();
+ f.close();
+ }
+ }
+ return m_doc->openURL(url);
+}
+
+#include "document.moc"
diff --git a/quanta/src/document.h b/quanta/src/document.h
new file mode 100644
index 00000000..7b6ef151
--- /dev/null
+++ b/quanta/src/document.h
@@ -0,0 +1,352 @@
+/***************************************************************************
+ document.h - description
+ -------------------
+ begin : Tue Jun 6 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@penguinpowered.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <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 DOCUMENT_H
+#define DOCUMENT_H
+
+//qt includes
+#include <qdatetime.h>
+#include <qdict.h>
+#include <qmap.h>
+#include <qwidget.h>
+
+#include <kurl.h>
+#include <ktexteditor/markinterfaceextension.h>
+
+//own includes
+#include "qtag.h"
+
+/**
+ *@author Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon & Andras Mantia
+ */
+
+class QDomDocument;
+class QEvent;
+class QFocusEvent;
+class QTextCodec;
+class QStringList;
+class KConfig;
+class KTempFile;
+class KURL;
+class Tag;
+class Node;
+class Project;
+class undoRedo;
+struct AreaStruct;
+struct DTDStruct;
+
+namespace KTextEditor
+{
+ class CodeCompletionInterface;
+ class CompletionEntry;
+ class ConfigInterface;
+ class Document;
+ class EditInterface;
+ class EditInterfaceExt;
+ class EncodingInterface;
+ class MarkInterface;
+ class SelectionInterface;
+ class SelectionInterfaceExt;
+ class View;
+ class ViewCursorInterface;
+ class Mark;
+}
+
+class Document : public QWidget{
+ Q_OBJECT
+
+public:
+ Document(KTextEditor::Document *doc,
+ QWidget *parent = 0, const char *name = 0, WFlags f=0);
+ ~Document();
+
+ KURL url();
+
+ bool isUntitled();
+ void setUntitledUrl(const QString &url);
+ /** Returns tag name at specified position */
+ QString getTagNameAt(int line, int col );
+
+ void selectText(int x1, int y1, int x2, int y2 );
+ void replaceSelected(const QString &s);
+
+ /** insert tag in document */
+ void insertTag(const QString &s1, const QString &s2 = QString::null);
+ /** Change the current tag's attributes with those from dict */
+ void changeTag(Tag *tag, QDict<QString> *dict );
+ /**Change the attr value of the called attrName to attrValue*/
+ void changeTagAttribute(Tag *tag, const QString& attrName, const QString&attrValue);
+ /**Change the namespace in a tag. Add if it's not present, or remove if the
+ namespace argument is empty*/
+ void changeTagNamespace(Tag *tag, const QString& nameSpace);
+ /** Insert the content of the url into the document. */
+ void insertFile(const KURL& url);
+ /** Inserts text at the current cursor position */
+ void insertText(const QString &text, bool adjustCursor = true, bool reparse = true);
+ /** Recursively insert the mandatory childs of tag. Returns true if a child was
+ inserted.*/
+ bool insertChildTags(QTag *tag, QTag* lastTag = 0L);
+
+ QPoint getGlobalCursorPos();
+ QString find(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ QString findRev(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ /** Get the view of the document */
+ KTextEditor::View* view();
+ /** Get the KTextEditor::Document of the document */
+ KTextEditor::Document* doc();
+ /** Sets the modifiedFlag value. */
+ void setModified(bool flag);
+ /** Returns true if the document was modified. */
+ bool isModified();
+
+ /** Creates a temporary file where the editor content is saved.
+ */
+ void createTempFile();
+ /** Closes and removes the temporary file. */
+ void closeTempFile();
+ /** Returns the name of the temporary file, QString::null if no temporary file exists. */
+ QString tempFileName();
+
+ /** Returns the DTD identifier for the document */
+ QString getDTDIdentifier();
+ /** Sets the DTD identifier */
+ void setDTDIdentifier(const QString &id);
+ /** Get a pointer to the current active DTD. If fallback is true, this always gives back a valid and known DTD pointer: the active, the document specified and in last case the application default document type. */
+ const DTDStruct* currentDTD(bool fallback = true);
+ /** Get a pointer to the default DTD (document, or app). */
+ const DTDStruct* defaultDTD() const;
+ /** Find the DTD name for a part of the document. */
+ QString findDTDName(Tag **tag);
+ /** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
+work correctly. */
+ QString text(int bLine, int bCol, int eLine, int eCol) const;
+ /** Same as the above, but using AreaStruct as an argument */
+ QString text(const AreaStruct &area) const;
+ /** Code completion was requested by the user. */
+ void codeCompletionRequested();
+ /** Bring up the code completion tooltip. */
+ void codeCompletionHintRequested();
+ /** Returns the dirty status. */
+ bool dirty() const {return m_dirty;};
+ void setDirtyStatus(bool status) {m_dirty = status;};
+ /** Ask for user confirmation if the file was changed outside. */
+ void checkDirtyStatus();
+ /** Save the document and reset the dirty status. */
+ void save();
+ /** Save the document under a new name and calculate the new md5sum. */
+ bool saveAs(const KURL& url);
+ /** Enable or disable the visibility of groups for a DTEP.*/
+ void enableGroupsForDTEP(const QString& dtepName, bool enable = true);
+ /** Clears the selected DTEP list */
+ void resetGroupsForDTEPList();
+ /** Find the word until the first word boundary backwards */
+ QString findWordRev(const QString& textToSearch, const DTDStruct *dtd = 0L);
+ /** Returns the changed status since the last query. Resets changed.*/
+ bool hasChanged();
+ /** Sets the changed status.*/
+ void setChanged(bool newStatus);
+ /** Paste the contents of clipboard into the document */
+ void paste();
+
+ /** disable/enable the parser*/
+ void activateParser(bool activation) {reparseEnabled = activation;}
+ bool parserActivated() {return reparseEnabled;}
+
+ /** returns all the areas that are between tag and it's closing pair */
+ QStringList tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent);
+
+ /** disable/enable the repaint of the Kate view */
+ void activateRepaintView(bool activation);
+ bool RepaintViewActivated() {return repaintEnabled;}
+
+ void setErrorMark(int line);
+ void clearErrorMarks();
+ void convertCase();
+
+ /** returns the word under the cursor */
+ QString currentWord();
+ /** Opens the url. The url must be valid and the file pointed to it must exists. */
+ void open(const KURL &url, const QString &encoding);
+ /**
+ * Opens a file in the editor part.
+ * @param url
+ */
+ bool openURL(const KURL& url);
+ /** Reads the DTD info from the file, tries to find the correct DTD and builds the tag/attribute list from the DTD file. */
+ void processDTD(const QString& documentType = QString::null);
+
+ /** Resets the list of DTEPs found in the document */
+ void resetDTEPs();
+ /** Adds a DTEP to the list of DTEPs present in the document */
+ void addDTEP(const QString &dtepName);
+ /** Returns the list of DTEPs that should appear in the structure tree. By default
+ this is the list of DTEPs present in the document, but the user can turn on/
+ off them with the help of RMB->Show Groups For in the structure tree */
+ QStringList groupsForDTEPs();
+
+ bool busy;
+
+ KTextEditor::ViewCursorInterface *viewCursorIf;
+ KTextEditor::SelectionInterface *selectionIf;
+ KTextEditor::SelectionInterfaceExt *selectionIfExt;
+ KTextEditor::EditInterface *editIf;
+ KTextEditor::EncodingInterface *encodingIf;
+ KTextEditor::EditInterfaceExt *editIfExt;
+ KTextEditor::CodeCompletionInterface *codeCompletionIf;
+ KTextEditor::ConfigInterface* configIf;
+ KTextEditor::MarkInterface* markIf;
+
+ /** Hold the list of user tags (real or not, like functions) that are in the document*/
+ QTagList userTagList;
+ /** The undo/redo stack */
+ undoRedo *docUndoRedo;
+
+ bool isBackedUp();
+ /** Creates an automatic backup copy for the crash recovering mechanism */
+ void createBackup(KConfig* config);
+ /** No descriptions */
+ QString backupPathEntryValue();
+ /** No descriptions */
+ void setBackupPathEntryValue(const QString& ev);
+ /** Removes automatic backup copies */
+ void removeBackup(KConfig *config);
+ /** create a string using document path string */
+ static QString hashFilePath(const QString& p);
+ QString annotationText(uint line);
+ void setAnnotationText(uint line, const QString& text);
+ QMap<uint, QPair<QString, QString> > annotations() {return m_annotations;}
+ void addAnnotation(uint line, const QPair<QString, QString>& annotation);
+ void clearAnnotations();
+
+public slots:
+
+ /** Called after a completion is inserted */
+ void slotCompletionDone( KTextEditor::CompletionEntry completion );
+ /** Called when a user selects a completion, we then can modify it */
+ void slotFilterCompletion(KTextEditor::CompletionEntry*,QString *);
+ /** Called whenever a user inputs text */
+ void slotCharactersInserted(int ,int ,const QString&);
+ /** Called when the code completion is aborted.*/
+ void slotCompletionAborted();
+ /** Called whenever the text in the document is changed. */
+ void slotTextChanged();
+ /** Handle the text changed events. Usually called from slotTextChanged,
+ but it's possible to force the handling by calling manually and setting
+ forced to true. */
+ void slotDelayedTextChanged(bool forced = false);
+ void slotDelayedScriptAutoCompletion();
+ void slotDelayedShowCodeCompletion();
+
+signals:
+ /** Emitted when the internal text editor got the focus */
+ void editorGotFocus();
+ void openingFailed(const KURL &url);
+ void openingCompleted(const KURL &url);
+
+ void breakpointMarked(Document*, int);
+ void breakpointUnmarked(Document*, int);
+ void showAnnotation(uint, const QString&, const QPair<QString, QString>&);
+
+private slots:
+ void slotReplaceChar();
+ void slotOpeningCompleted();
+ void slotOpeningFailed(const QString &errorMessage);
+ /** Called when a file on the disk has changed. */
+ void slotFileDirty(const QString& fileName);
+
+ void slotMarkChanged(KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action);
+private:
+ /**
+ * Finds the beginning of a tag in the document, starting from a position.
+ * @param position start to look from this position backwards
+ * @return the position of the starting character or an empty QPoint if not found
+ */
+ QPoint findTagBeginning(const QPoint& position);
+ QPoint findTagEnd(const QPoint& position);
+
+
+
+ QMap<uint, QPair<QString, QString> > m_annotations;
+ QString untitledUrl;
+ int m_replaceLine;
+ int m_replaceCol;
+ QString m_replaceStr;
+
+ KTextEditor::Document *m_doc;
+ KTextEditor::View *m_view;
+
+ KTempFile *tempFile;
+ QString m_tempFileName;
+ QDateTime m_modifTime;
+ /* path of the backup copy file of the document */
+ QString m_backupPathValue;
+ QString dtdName;
+ QString m_encoding;
+ QTextCodec *m_codec;
+/*The DTD valid in the place where the completion was invoked.*/
+ const DTDStruct *completionDTD;
+
+ bool changed;
+ bool completionInProgress;
+ bool completionRequested; ///< true if the code completion was explicitely requested by the user
+ bool argHintVisible;
+ bool hintRequested;
+ bool reparseEnabled;
+ bool repaintEnabled;
+ bool delayedTextChangedEnabled;
+ /** True if the document is dirty (has been modified outside). */
+ bool m_dirty;
+ QString m_md5sum;
+ Project *m_project;
+ /** Parse the document according to this DTD. */
+ QStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
+ QStringList m_DTEPList; ///< The list of all DTEPs found in the document
+ //stores the data after an autocompletion. Used when bringing up the
+ //autocompletion box delayed with the singleshot timer (workaround for
+ //a bug: the box is not showing up if it is called from slotCompletionDone)
+ int m_lastLine, m_lastCol;
+ QValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
+
+ /** Get list of possibile variable name completions */
+ QValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
+ /** Get list of possibile tag name completions */
+ QValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
+ /** Get list of possibile tag attribute completions */
+ QValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const QString& tagName,const QString& startsWith=QString::null);
+ /** Get list of possibile tag attribute value completions */
+ QValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith=QString::null);
+ /** Get list of possibile completions in normal text input (nt creating a tag) */
+ QValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const QString& starstWith=QString::null);
+ /** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */
+ bool xmlCodeCompletion(int line, int col);
+ /** Returns list of values for attribute. If deleteResult is true after the call,
+ the caller must delete the returned list. */
+ QStringList* tagAttributeValues(const QString& dtdName, const QString& tag, const QString& attribute, bool &deleteResult);
+ /** Brings up list of code completions */
+ void showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions );
+ /** Called whenever a user inputs text in an XML type document. */
+ bool xmlAutoCompletion(int , int , const QString & );
+ /** Called whenever a user inputs text in a script type document. */
+ bool scriptAutoCompletion(int line, int col, const QString &insertedString);
+ /** Returns true if the number of " (excluding \") inside text is even. */
+ bool evenQuotes(const QString &text);
+ void handleCodeCompletion();
+ bool isDerivatedFrom(const QString& className, const QString &baseClass);
+};
+
+#endif
+
diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp
new file mode 100644
index 00000000..44fba0ab
--- /dev/null
+++ b/quanta/src/dtds.cpp
@@ -0,0 +1,1103 @@
+/***************************************************************************
+ dtds.cpp
+ -------------------
+ begin : 12.02.2004 (extract from quanta_init and others)
+
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev <pdima@users.sourceforge.net,yshurik@linuxfan.com>
+ (C) 2001-2003 by Andras Mantia <amantia@kde.org>
+ (C) 2000, 2003 by Eric Laffoon <sequitur@kde.org>
+ (C) 2004 by Jens Herden <jhe at epost.de>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 <qfile.h>
+#include <qextfileinfo.h>
+#include <qdom.h>
+#include <qcursor.h>
+#include <qtimer.h>
+
+// include files for KDE
+#include <kapplication.h>
+#include <kcombobox.h>
+#include <kconfig.h>
+#include <kdialogbase.h>
+#include <kurl.h>
+#include <kurlrequester.h>
+#include <kglobal.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <kfiledialog.h>
+
+
+// application specific includes
+#include "quantacommon.h"
+#include "resource.h"
+#include "dtdparser.h"
+#include "document.h"
+#include "viewmanager.h"
+#include "loadentitydlgs.h"
+
+#include "dtds.h"
+
+/** filename for the desciption of the dtd */
+const QString m_rcFilename("description.rc");
+
+/**
+ This constructor reads the dictionary of known dtd's, the attributes and tags will be loaded
+ on the first access to one dtd.
+*/
+DTDs::DTDs(QObject *parent)
+ :QObject(parent)
+{
+ connect(this, SIGNAL(hideSplash()), parent, SLOT(slotHideSplash()));
+ connect(this, SIGNAL(enableIdleTimer(bool)), parent, SLOT(slotEnableIdleTimer(bool)));
+ connect(this, SIGNAL(loadToolbarForDTD(const QString&)), parent, SLOT(slotLoadToolbarForDTD(const QString&)));
+// kdDebug(24000) << "dtds::dtds" << endl;
+ m_dict = new QDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
+ m_dict->setAutoDelete(true);
+ m_doc = new QDomDocument();
+
+ QString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
+ QStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
+ QStringList tagsDirs;
+ QStringList::ConstIterator end = tagsResourceDirs.constEnd();
+ for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ {
+ if ((*it).startsWith(localKDEdir))
+ {
+ QDir dir(*it);
+ dir.setFilter(QDir::Dirs);
+ QStringList subDirs = dir.entryList();
+ QStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ {
+// kdDebug(24000) << "dtds::dtds add:" << *it + *subit+"/" << endl;
+ if ((*subit != ".") && (*subit != ".."))
+ tagsDirs += *it + *subit + "/";
+ }
+ }
+ }
+ for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ {
+ if (!(*it).startsWith(localKDEdir))
+ {
+ QDir dir(*it);
+ dir.setFilter(QDir::Dirs);
+ QStringList subDirs = dir.entryList();
+ QStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ {
+// kdDebug(24000) << "dtds::dtds add2:" << *it + *subit+"/" << endl;
+ if ((*subit != ".") && (*subit != ".."))
+ tagsDirs += *it + *subit + "/";
+ }
+ }
+ }
+// kdDebug(24000) << tagsDirs.count() << " folders found." << endl;
+ QTime t;
+ t.start();
+ QStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
+ for ( QStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
+ {
+// kdDebug(24000) << "read:" << *it << endl;
+ readTagDir(*it, false); // read all tags, but only short form
+ }
+ kdDebug(24000) << "DTD reading: " << t.elapsed() << endl;
+//load the mimetypes from the insideDTDs
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ DTDStruct * dtd = it.current();
+ for (uint i = 0; i < dtd->insideDTDs.count(); i++)
+ {
+ const DTDStruct *insideDTD = m_dict->find(dtd->insideDTDs[i]); // search but don't load
+ if (!insideDTD)
+ insideDTD = m_dict->find(getDTDNameFromNickName(dtd->insideDTDs[i])); // search but don't load
+ if (insideDTD && !insideDTD->toplevel)
+ dtd->mimeTypes += insideDTD->mimeTypes;
+ }
+ }
+
+ // kdDebug(24000) << "dtds::dtds constructed" << endl;
+}
+
+DTDs::~DTDs()
+{
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ removeDTD (it.current());
+ }
+ delete m_dict;
+ delete m_doc;
+}
+
+
+
+void DTDs::removeDTD(DTDStruct *dtd)
+{
+ if (dtd)
+ {
+ delete dtd->tagsList;
+ dtd->tagsList = 0L;
+ delete dtd->commonAttrs;
+ dtd->commonAttrs = 0L;
+ m_dict->remove(dtd->name.lower());
+ }
+}
+
+
+/** Reads the tag files and the description.rc from tagDir in order to
+ build up the internal DTD and tag structures. */
+bool DTDs::readTagDir(const QString &dirName, bool loadAll)
+{
+ // kdDebug(24000) << "dtds::readTagDir:" << dirName << " all:" << loadAll << endl;
+ QString tmpStr = dirName + m_rcFilename;
+ if (!QFile::exists(tmpStr))
+ return false;
+ KConfig *dtdConfig = new KConfig(tmpStr, true);
+ dtdConfig->setGroup("General");
+ QString dtdName = dtdConfig->readEntry("Name", "Unknown");
+ if (m_dict->find(dtdName.lower()))
+ {
+ delete dtdConfig;
+ kdDebug(24000) << "dtds::readTagDir from " << dirName
+ << " canceled, DTD " << dtdName << " found in memory" << endl;
+ return false;
+ }
+
+ //read the general DTD info
+ DTDStruct *dtd = new DTDStruct;
+ dtd->fileName = tmpStr;
+ dtd->name = dtdName;
+ dtd->nickName = dtdConfig->readEntry("NickName", dtdName);
+ dtd->mimeTypes = dtdConfig->readListEntry("MimeTypes");
+ for (uint i = 0; i < dtd->mimeTypes.count(); i++)
+ dtd->mimeTypes[i] = dtd->mimeTypes[i].stripWhiteSpace();
+ dtd->family = dtdConfig->readNumEntry("Family", Xml);
+ if (dtd->family != Xml)
+ dtd->toplevel = dtdConfig->readBoolEntry("TopLevel", false);
+ else
+ dtd->toplevel = true;
+ dtd->tagsList = 0L;
+ dtd->commonAttrs = 0L;
+
+ //Read the areas that define the areas
+ dtdConfig->setGroup("Parsing rules");
+ QStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
+ for (uint i = 0; i < definitionAreaBorders.count(); i++)
+ {
+ QStringList tmpStrList = QStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
+ dtd->definitionAreas[tmpStrList[0].stripWhiteSpace()] = tmpStrList[1].stripWhiteSpace();
+ }
+ //Read the tags that define this DTD
+ QStringList tmpStrList = dtdConfig->readListEntry("Tags");
+ for (uint i = 0; i < tmpStrList.count(); i++)
+ {
+ tmpStr = tmpStrList[i].stripWhiteSpace();
+ int pos = tmpStr.find('(');
+ dtd->definitionTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace();
+ }
+ //Which DTD can be present in this one?
+ dtd->insideDTDs = dtdConfig->readListEntry("MayContain");
+ for (uint i = 0; i < dtd->insideDTDs.count(); i++)
+ {
+ dtd->insideDTDs[i] = dtd->insideDTDs[i].stripWhiteSpace().lower();
+ }
+
+
+ m_dict->insert(dtdName.lower(), dtd); //insert the structure into the dictionary
+ delete dtdConfig;
+
+ if (!loadAll)
+ {
+ dtd->loaded = false;
+ return true;
+ }
+
+ dtd->loaded = readTagDir2(dtd);
+ return dtd->loaded;
+}
+
+
+/** Reads the tag files and the description.rc from dtd in order to
+ build up the internal DTD and tag structures.
+ */
+bool DTDs::readTagDir2(DTDStruct *dtd)
+{
+// kdDebug(24000) << "dtds::readTagDir2:" << dtd->name << " at " << dtd->fileName << endl;
+
+ if (!QFile::exists(dtd->fileName)) return false;
+
+ kapp->setOverrideCursor( QCursor(Qt::WaitCursor) );
+
+ KConfig *dtdConfig = new KConfig(dtd->fileName, true);
+
+ //read the general DTD info
+ dtdConfig->setGroup("General");
+ dtd->commonAttrs = new AttributeListDict();
+ dtd->commonAttrs->setAutoDelete(true);
+
+ bool caseSensitive = dtdConfig->readBoolEntry("CaseSensitive");
+ dtd->url = dtdConfig->readEntry("URL");
+ dtd->doctypeStr = dtdConfig->readEntry("DoctypeString");
+ if (dtd->doctypeStr.isEmpty())
+ {
+ dtd->doctypeStr = "PUBLIC \"" + dtd->name + "\"";
+ if (!dtd->url.isEmpty())
+ dtd->doctypeStr += " \"" + dtd->url + "\"";
+ }
+ dtd->doctypeStr.prepend(' ');
+ dtd->inheritsTagsFrom = dtdConfig->readEntry("Inherits").lower();
+ dtd->documentation = dtdConfig->readEntry("Documentation").lower();
+
+ dtd->defaultExtension = dtdConfig->readEntry("DefaultExtension");
+ dtd->caseSensitive = caseSensitive;
+ int numOfTags = 0;
+ QTagList *tagList = new QTagList(119, false); //max 119 tag in a DTD
+ tagList->setAutoDelete(true);
+ //read all the tag files
+ KURL dirURL(dtd->fileName);
+ dirURL.setFileName("");
+ QString dirName = dirURL.path(1);
+ if (QFile::exists(dirName + "common.tag"))
+ readTagFile(dirName + "common.tag", dtd, 0L);
+ //bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
+ emit enableIdleTimer(false);
+ KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L);
+ //quantaApp->slotEnableIdleTimer(idleTimerStatus);
+ emit enableIdleTimer(true);
+ QString tmpStr;
+ KURL::List::ConstIterator end_f = files.constEnd();
+ for ( KURL::List::ConstIterator it_f = files.constBegin(); it_f != end_f; ++it_f )
+ {
+ tmpStr = (*it_f).path(-1);
+ if (!tmpStr.isEmpty())
+ {
+ tmpStr.prepend(dirName);
+ if (!tmpStr.endsWith("/common.tag"))
+ numOfTags += readTagFile(tmpStr, dtd, tagList);
+ }
+ }
+
+ //read the toolbars
+ dtdConfig->setGroup("Toolbars");
+ tmpStr = QuantaCommon::readPathEntry(dtdConfig, "Location"); //holds the location of the toolbars
+ if (!tmpStr.endsWith("/") && !tmpStr.isEmpty())
+ {
+ tmpStr.append("/");
+ }
+ dtd->toolbars = dtdConfig->readListEntry("Names");
+ for (uint i = 0; i < dtd->toolbars.count(); i++)
+ {
+ dtd->toolbars[i] = tmpStr + dtd->toolbars[i].stripWhiteSpace() + toolbarExtension;
+ }
+
+ //read the extra tags and their attributes
+ dtdConfig->setGroup("Extra tags");
+ dtd->defaultAttrType = dtdConfig->readEntry("DefaultAttrType","input");
+ QStrList extraTagsList;
+ dtdConfig->readListEntry("List",extraTagsList);
+ QString option;
+ QStrList optionsList;
+ QStrList attrList;
+ for (uint i = 0 ; i < extraTagsList.count(); i++)
+ {
+ QTag *tag = new QTag();
+ tag->setName(QString(extraTagsList.at(i)).stripWhiteSpace());
+
+ tmpStr = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
+ if (tagList->find(tmpStr)) //the tag is already defined in a .tag file
+ {
+ delete tag;
+ continue; //skip this tag
+ }
+ tag->parentDTD = dtd;
+ //read the possible stopping tags
+ QStrList stoppingTags;
+ dtdConfig->readListEntry(tag->name() + "_stoppingtags",stoppingTags);
+ for (uint j = 0; j < stoppingTags.count(); j++)
+ {
+ QString stopTag = QString(stoppingTags.at(j)).stripWhiteSpace();
+ if (!dtd->caseSensitive) stopTag = stopTag.upper();
+ tag->stoppingTags.append(stopTag);
+ }
+ //read the possible tag options
+ optionsList.clear();
+ dtdConfig->readListEntry(tag->name() + "_options",optionsList);
+ for (uint j = 0; j < optionsList.count(); j++)
+ {
+ option = QString(optionsList.at(j)).stripWhiteSpace();
+ QDictIterator<AttributeList> it(*(dtd->commonAttrs));
+ for( ; it.current(); ++it )
+ {
+ tmpStr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ if (option == tmpStr)
+ {
+ tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ }
+ }
+ if (option == "single")
+ {
+ tag->setSingle(true);
+ }
+ if (option == "optional")
+ {
+ tag->setOptional(true);
+ }
+ }
+ attrList.clear();
+ dtdConfig->readListEntry(tag->name(), attrList);
+ for (uint j = 0; j < attrList.count(); j++)
+ {
+ Attribute* attr = new Attribute;
+ attr->name = QString(attrList.at(j)).stripWhiteSpace();
+ attr->type = dtd->defaultAttrType;
+ tag->addAttribute(attr);
+ delete attr;
+ }
+ if (caseSensitive)
+ {
+ tagList->insert(tag->name(),tag); //append the tag to the list for this DTD
+ } else
+ {
+ tagList->insert(tag->name().upper(),tag);
+ }
+ }
+ dtd->tagsList = tagList;
+ dtd->tagsList->setAutoDelete(true);
+
+
+ /**** Code for the new parser *****/
+
+ dtdConfig->setGroup("Parsing rules");
+ bool appendCommonRules = dtdConfig->readBoolEntry("AppendCommonSpecialAreas", true);
+ //Read the special areas and area names
+ QString rxStr = "";
+ if (dtd->family == Xml && appendCommonRules)
+ {
+ dtd->specialAreas["<?xml"] = "?>";
+ dtd->specialAreaNames["<?xml"] = "XML PI";
+ dtd->specialAreas["<!--"] = "-->";
+ dtd->specialAreaNames["<!--"] = "comment";
+// dtd->specialAreas["<!"] = ">";
+ // dtd->specialAreaNames["<!"] = "DTD";
+ dtd->insideDTDs.append("dtd");
+ tmpStr = "(<?xml)|(<!--)|(<!)|";
+ rxStr = QuantaCommon::makeRxCompatible(tmpStr);
+ }
+ QStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
+ QStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
+ QStringList tmpStrList;
+ for (uint i = 0; i < specialAreasList.count(); i++)
+ {
+ if (!specialAreasList[i].stripWhiteSpace().isEmpty())
+ {
+ tmpStrList = QStringList::split(" ",specialAreasList[i].stripWhiteSpace());
+ tmpStr = tmpStrList[0].stripWhiteSpace();
+ rxStr.append(QuantaCommon::makeRxCompatible(tmpStr)+"|");
+ dtd->specialAreas[tmpStr] = tmpStrList[1].stripWhiteSpace();
+ dtd->specialAreaNames[tmpStr] = specialAreaNameList[i];
+ }
+ }
+ if (rxStr.isEmpty())
+ {
+ dtd->specialAreaStartRx.setPattern("");
+ } else
+ {
+ dtd->specialAreaStartRx.setPattern(rxStr.left(rxStr.length() - 1));
+ }
+ //Read the special tags
+ tmpStrList = dtdConfig->readListEntry("SpecialTags");
+ for (uint i = 0; i < tmpStrList.count(); i++)
+ {
+ tmpStr = tmpStrList[i].stripWhiteSpace();
+ int pos = tmpStr.find('(');
+ dtd->specialTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace();
+ }
+
+ //static const QString quotationStr = "\\\\\"|\\\\'";
+ rxStr = "\\\\\"|\\\\'|";
+ QStringList commentsList = dtdConfig->readListEntry("Comments");
+ if (dtd->family == Xml && appendCommonRules)
+ commentsList.append("<!-- -->");
+ QString tmpStr2;
+ for (uint i = 0; i < commentsList.count(); i++)
+ {
+ tmpStrList = QStringList::split(" ",commentsList[i].stripWhiteSpace());
+ tmpStr = tmpStrList[0].stripWhiteSpace();
+ rxStr += QuantaCommon::makeRxCompatible(tmpStr);
+ rxStr += "|";
+ tmpStr2 = tmpStrList[1].stripWhiteSpace();
+ if (tmpStr2 == "EOL")
+ tmpStr2 = '\n';
+ dtd->comments[tmpStr] = tmpStr2;
+ }
+ dtd->commentsStartRx.setPattern(rxStr.left(rxStr.length()-1));
+
+ /**** End of code for the new parser *****/
+
+ //read the definition of a structure, and the structure keywords
+ QStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
+ if (structKeywords.count() !=0 )
+ {
+ tmpStr = "\\b(";
+ for (uint i = 0; i < structKeywords.count(); i++)
+ {
+ tmpStr += structKeywords[i].stripWhiteSpace()+"|";
+ }
+ tmpStr.truncate(tmpStr.length()-1);
+ tmpStr += ")\\b";
+ } else
+ {
+ tmpStr = "\\b[\\d\\S\\w]+\\b";
+ }
+ dtd->structKeywordsRx.setPattern(tmpStr);
+
+ structKeywords = dtdConfig->readListEntry("LocalScopeKeywords",',');
+ if (structKeywords.count() !=0 )
+ {
+ tmpStr = "\\b(";
+ for (uint i = 0; i < structKeywords.count(); i++)
+ {
+ tmpStr += structKeywords[i].stripWhiteSpace()+"|";
+ }
+ tmpStr.truncate(tmpStr.length()-1);
+ tmpStr += ")\\b";
+ } else
+ {
+ tmpStr = "\\b[\\d\\S\\w]+\\b";
+ }
+ dtd->localScopeKeywordsRx.setPattern(tmpStr);
+
+ dtd->structRx.setPattern(dtdConfig->readEntry("StructRx","\\{|\\}").stripWhiteSpace());
+ dtd->structBeginStr = dtdConfig->readEntry("StructBeginStr","{").stripWhiteSpace();
+ dtd->structEndStr = dtdConfig->readEntry("StructEndStr","}").stripWhiteSpace();
+
+
+ dtdConfig->setGroup("Extra rules");
+ dtd->minusAllowedInWord = dtdConfig->readBoolEntry("MinusAllowedInWord", false);
+ tmpStr = dtdConfig->readEntry("TagAutoCompleteAfter", "<").stripWhiteSpace();
+ if (tmpStr.upper() == "NONE")
+ dtd->tagAutoCompleteAfter = '\0';
+ else
+ if (tmpStr.upper() == "ALWAYS")
+ dtd->tagAutoCompleteAfter = '\1';
+ else
+ dtd->tagAutoCompleteAfter = tmpStr.at(0);
+ dtd->requestSpaceBeforeTagAutoCompletion = dtdConfig->readBoolEntry("RequestSpaceBeforeTagAutoCompletion", false);
+ dtd->attrAutoCompleteAfter = dtdConfig->readEntry("AttributeAutoCompleteAfter","(").stripWhiteSpace().at(0);
+ dtd->attributeSeparator = dtdConfig->readEntry("AttributeSeparator").stripWhiteSpace().at(0);
+ if (dtd->attributeSeparator.isNull())
+ {
+ dtd->attributeSeparator = (dtd->family == Xml) ? '\"' : ',';
+ }
+ dtd->tagSeparator = dtdConfig->readEntry("TagSeparator").stripWhiteSpace().at(0);
+ if (dtd->tagSeparator.isNull())
+ dtd->tagSeparator = dtd->attributeSeparator;
+
+ dtd->booleanAttributes = dtdConfig->readEntry("BooleanAttributes","extended");
+ dtd->booleanTrue = dtdConfig->readEntry("BooleanTrue","true");
+ dtd->booleanFalse = dtdConfig->readEntry("BooleanFalse","false");
+ dtd->singleTagStyle = dtdConfig->readEntry("Single Tag Style", "xml").lower();
+ dtd->variableGroupIndex = dtdConfig->readNumEntry("VariableGroupIndex", 0) - 1;
+ dtd->functionGroupIndex = dtdConfig->readNumEntry("FunctionGroupIndex", 0) - 1;
+ dtd->classGroupIndex = dtdConfig->readNumEntry("ClassGroupIndex", 0) - 1;
+ if (dtd->classGroupIndex != -1)
+ {
+ tmpStr = dtdConfig->readEntry("MemberAutoCompleteAfter").stripWhiteSpace();
+ dtd->memberAutoCompleteAfter.setPattern(tmpStr);
+ }
+ dtd->objectGroupIndex = dtdConfig->readNumEntry("ObjectGroupIndex", 0) - 1;
+
+ //read the definition of different structure groups, like links, images, functions
+ //classes, etc.
+ uint structGroupsCount = dtdConfig->readNumEntry("StructGroupsCount", 0);
+ if (structGroupsCount > MAX_STRUCTGROUPSCOUNT)
+ structGroupsCount = MAX_STRUCTGROUPSCOUNT; //max. 10 groups
+
+ if (dtd->family == Script)
+ {
+ StructTreeGroup group;
+ QRegExp attrRx("\\([^\\)]*\\)");
+ QString tagStr;
+ for (uint index = 1; index <= structGroupsCount; index++)
+ {
+ dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ //new code
+ group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
+ group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
+ group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace();
+ tmpStr = dtdConfig->readEntry("DefinitionRx").stripWhiteSpace();
+ group.definitionRx.setPattern(tmpStr);
+ tmpStr = dtdConfig->readEntry("UsageRx").stripWhiteSpace();
+ group.usageRx.setPattern(tmpStr);
+ tmpStr = dtdConfig->readEntry("TypeRx").stripWhiteSpace();
+ group.typeRx.setPattern(tmpStr);
+ group.hasDefinitionRx = !group.definitionRx.pattern().isEmpty();
+ group.isMinimalDefinitionRx = dtdConfig->readBoolEntry("DefinitionRx_Minimal", false);
+ group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false);
+ group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace();
+ tagStr = dtdConfig->readEntry("TagType", "Text").stripWhiteSpace();
+ if (tagStr == "XmlTag")
+ group.tagType = Tag::XmlTag;
+ else if (tagStr == "XmlTagEnd")
+ group.tagType = Tag::XmlTagEnd;
+ else if (tagStr == "Text")
+ group.tagType = Tag::Text;
+ else if (tagStr == "Comment")
+ group.tagType = Tag::Comment;
+ else if (tagStr == "CSS")
+ group.tagType = Tag::CSS;
+ else if (tagStr == "ScriptTag")
+ group.tagType = Tag::ScriptTag;
+ else if (tagStr == "ScriptStructureBegin")
+ group.tagType = Tag::ScriptStructureBegin;
+ else if (tagStr == "ScriptStructureEnd")
+ group.tagType = Tag::ScriptStructureEnd;
+ else group.tagType = -1;
+ tmpStr = dtdConfig->readEntry("AutoCompleteAfter").stripWhiteSpace();
+ group.autoCompleteAfterRx.setPattern(tmpStr);
+ tmpStr = dtdConfig->readEntry("RemoveFromAutoCompleteWord").stripWhiteSpace();
+ group.removeFromAutoCompleteWordRx.setPattern(tmpStr);
+ group.hasFileName = dtdConfig->readBoolEntry("HasFileName", false);
+ group.parseFile = dtdConfig->readBoolEntry("ParseFile", false);
+ tmpStr = dtdConfig->readEntry("FileNameRx").stripWhiteSpace();
+ group.fileNameRx.setPattern(tmpStr);
+ dtd->structTreeGroups.append(group);
+ }
+ } else
+ {
+ XMLStructGroup group;
+ QRegExp attrRx("\\([^\\)]*\\)");
+ QString tagName;
+ for (uint index = 1; index <= structGroupsCount; index++)
+ {
+ dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
+ group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
+ group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace();
+ group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false);
+ group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace();
+ QString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
+ if (!tagStr.isEmpty())
+ {
+ attrRx.search(tagStr);
+ tmpStr = attrRx.cap();
+ tmpStrList = QStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
+ tagName = tagStr.left(tagStr.find('(')).lower();
+ group.attributes.clear();
+ for (uint i = 0; i < tmpStrList.count(); i++)
+ group.attributes += tmpStrList[i].stripWhiteSpace();
+ group.hasFileName = dtdConfig->readBoolEntry("HasFileName", false);
+ tmpStr = dtdConfig->readEntry("FileNameRx").stripWhiteSpace();
+ group.fileNameRx.setPattern(tmpStr);
+ dtd->xmlStructTreeGroups.insert(tagName, group);
+ }
+ }
+ }
+
+ delete dtdConfig;
+ dtd->loaded = true;
+ resolveInherited(dtd);
+ kapp->restoreOverrideCursor();
+ return true;
+}
+
+
+void DTDs::resolveInherited (DTDStruct *dtd)
+{
+ //Resolve the inheritence
+ if (!dtd->inheritsTagsFrom.isEmpty())
+ {
+ DTDStruct *parent = (DTDStruct *) find(dtd->inheritsTagsFrom); // this loads the dtd, if not present in memory
+ QDictIterator<QTag> tag_it(*(parent->tagsList));
+ for ( ; tag_it.current(); ++tag_it)
+ {
+ QTag *tag = tag_it.current();
+ QString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
+ if (!dtd->tagsList->find(searchForTag))
+ {
+ QTag *newTag = new QTag(*tag);
+ dtd->tagsList->insert(searchForTag, newTag);
+ }
+ }
+ }
+
+//Read the pseudo DTD area definition strings (special area/tag string)
+//from the DTD's which may be present in the DTD (May_Contain setting)
+ QMap<QString, QString>::ConstIterator mapIt;
+ QString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
+ if (!specialAreaStartRxStr.isEmpty())
+ specialAreaStartRxStr += "|";
+ for (uint i = 0; i < dtd->insideDTDs.count(); i++)
+ {
+ const DTDStruct *insideDTD = m_dict->find(dtd->insideDTDs[i]); // search but don't load
+ if (!insideDTD)
+ insideDTD = m_dict->find(getDTDNameFromNickName(dtd->insideDTDs[i])); // search but don't load
+ if (insideDTD)
+ {
+ for (mapIt = insideDTD->definitionAreas.begin(); mapIt != insideDTD->definitionAreas.end(); ++mapIt)
+ {
+ QString tmpStr = mapIt.key();
+ dtd->specialAreas[tmpStr] = mapIt.data();
+ dtd->specialAreaNames[tmpStr] = dtd->insideDTDs[i];
+ specialAreaStartRxStr.append("(?:" + QuantaCommon::makeRxCompatible(tmpStr) + ")|");
+ }
+
+ for (mapIt = insideDTD->definitionTags.begin(); mapIt != insideDTD->definitionTags.end(); ++mapIt)
+ {
+ dtd->specialTags[mapIt.key()] = mapIt.data();
+ }
+ }
+ dtd->specialAreaStartRx.setPattern(specialAreaStartRxStr.left(specialAreaStartRxStr.length() - 1));
+ };
+}
+
+
+
+/** Reads the tags for the tag files. Returns the number of read tags. */
+uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList)
+{
+// kdDebug(24000) << "dtds::readTagFile:" << fileName << endl;
+ QFile f(fileName);
+ if (! f.exists())
+ kdError() << "dtds::readTagFile file does not exist:" << fileName << endl;
+ else
+ {
+ bool result = f.open( IO_ReadOnly );
+ if (! result)
+ kdError() << "dtds::readTagFile unable to open:" << fileName
+ << " Status: " << f.status() << endl;
+ }
+ QString errorMsg;
+ int errorLine, errorCol;
+ if (!m_doc->setContent( &f, &errorMsg, &errorLine, &errorCol ))
+ {
+ emit hideSplash();
+ KMessageBox::error(0L, i18n("<qt>The DTD tag file %1 is not valid.<br> The error message is: <i>%2 in line %3, column %4.</i></qt>").arg(fileName).arg(errorMsg).arg(errorLine).arg(errorCol),
+ i18n("Invalid Tag File"));
+ kdWarning() << fileName << ": " << errorMsg << ": " << errorLine << "," << errorCol << endl;
+ }
+
+ f.close();
+ QDomNodeList nodeList = m_doc->elementsByTagName("tag");
+ uint numOfTags = nodeList.count();
+ for (uint i = 0; i < numOfTags; i++)
+ {
+ QDomNode n = nodeList.item(i);
+ QDomElement e = n.toElement();
+ if (e.attribute("type") == "class")
+ {
+ QString extends = e.attribute("extends");
+ QString name = e.attribute("name");
+ if (!name.isEmpty() && !extends.isEmpty())
+ parentDTD->classInheritance[name] = extends;
+ continue;
+ }
+ QTag *tag = new QTag();
+ tag->setName(e.attribute("name"));
+ tag->setFileName(fileName);
+ tag->parentDTD = parentDTD;
+ bool common = false;
+ setAttributes(&n, tag, common);
+ if (common)
+ {
+ QString groupName = e.attribute("name");
+ AttributeList *attrs = tag->attributes();
+ attrs->setAutoDelete(false);
+ AttributeList *commonAttrList = new AttributeList; //no need to delete it
+ commonAttrList->setAutoDelete(true);
+ *commonAttrList = *attrs;
+ //delete tag;
+ parentDTD->commonAttrs->insert(groupName, commonAttrList);
+ } else
+ {
+ if (parentDTD->caseSensitive)
+ {
+ tagList->replace(tag->name(), tag); //append the tag to the list for this DTD
+ } else
+ {
+ tagList->replace(tag->name().upper(), tag);
+ }
+ }
+ }
+ return numOfTags;
+}
+
+
+/**
+ Parse the dom document and retrieve the tag attributes
+*/
+void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
+{
+ common = false;
+ Attribute *attr;
+
+ QDomElement el = dom->toElement();
+ QString tmpStr;
+
+ tmpStr = el.attribute("common");
+ if ((tmpStr != "1" && tmpStr != "yes")) //in case of common tags, we are not interested in these options
+ {
+ if (tag->parentDTD->commonAttrs)
+ {
+ QDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
+ for( ; it.current(); ++it )
+ {
+ QString lookForAttr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ tmpStr = el.attribute(lookForAttr);
+ if (tmpStr == "1" || tmpStr == "yes")
+ {
+ tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ }
+ }
+ }
+
+ tmpStr = el.attribute("single");
+ if (tmpStr == "1" || tmpStr == "yes")
+ {
+ tag->setSingle(true);
+ }
+
+ tmpStr = el.attribute("optional");
+ if (tmpStr == "1" || tmpStr == "yes")
+ {
+ tag->setOptional(true);
+ }
+
+ tmpStr = el.attribute("scope");
+ tag->setScope(tmpStr);
+
+ tag->type = el.attribute("type", "xmltag");
+ tag->returnType = el.attribute("returnType", "");
+ tag->className = el.attribute("class", "");
+ tag->comment = el.attribute("comment", "");
+ if (!tag->comment.isEmpty())
+ tag->comment = " [" + i18n(tag->comment) + "] ";
+ tag->comment.prepend(el.attribute("version"));
+ } else
+ {
+ common = true;
+ }
+ QString attrList;
+ for ( QDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
+ {
+ tmpStr = n.nodeName();
+ if (tmpStr == "children")
+ {
+ QDomElement el = n.toElement();
+ QDomElement item = el.firstChild().toElement();
+ while ( !item.isNull() )
+ {
+ tmpStr = item.tagName();
+ if (tmpStr == "child")
+ {
+ QString childTag = item.attribute("name");
+ if (!tag->parentDTD->caseSensitive)
+ childTag = childTag.upper();
+ tag->childTags.insert(childTag, item.attribute("usage") == "required");
+ }
+ item = item.nextSibling().toElement();
+ }
+ } else
+ if (tmpStr == "stoppingtags") //read what tag can act as closing tag
+ {
+ QDomElement el = n.toElement();
+ QDomElement item = el.firstChild().toElement();
+ while ( !item.isNull() )
+ {
+ if (item.tagName() == "stoppingtag")
+ {
+ QString stopTag = item.attribute("name");
+ if (!tag->parentDTD->caseSensitive)
+ stopTag = stopTag.upper();
+ tag->stoppingTags.append(stopTag);
+ }
+ item = item.nextSibling().toElement();
+ }
+ } else
+ if (tmpStr == "attr") //an attribute
+ {
+ QDomElement el = n.toElement();
+ attr = new Attribute;
+ attr->name = el.attribute("name");
+ attr->source = el.attribute("source");
+ attr->interface = el.attribute("interface");
+ attr->method = el.attribute("method");
+ attr->arguments = el.attribute("arguments");
+
+ attr->type = el.attribute("type",tag->parentDTD->defaultAttrType);
+ attr->defaultValue = el.attribute("defaultValue");
+ attr->status = el.attribute("status");
+
+ if ( attr->type == "list" ) {
+ for ( QDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
+ if ( attrEl.tagName() == "items" ) {
+ QDomElement item = attrEl.firstChild().toElement();
+ while ( !item.isNull() ) {
+ attr->values.append( item.text() );
+ item = item.nextSibling().toElement();
+ }
+ }
+ }
+ } else if ( attr->type == "check" ) {
+ attr->values.append("true");
+ attr->values.append("false");
+ } else if ( attr->type == "color" ) {
+ attr->values.append("Black");
+ attr->values.append("Silver");
+ attr->values.append("Gray");
+ attr->values.append("White");
+ attr->values.append("Maroon");
+ attr->values.append("Red");
+ attr->values.append("Purple");
+ attr->values.append("Fuchsia");
+ attr->values.append("Green");
+ attr->values.append("Lime");
+ attr->values.append("Olive");
+ attr->values.append("Yellow");
+ attr->values.append("Navy");
+ attr->values.append("Blue");
+ attr->values.append("Teal");
+ attr->values.append("Aqua");
+ } else if ( attr->type == "url" ) {
+ //not treated yet
+ } else if ( attr->type == "input" ) {
+ //not treated yet
+ }
+
+ if (tag->type == "function" || tag->type == "method")
+ {
+ if (attr->status == "optional")
+ {
+ attrList = attrList + "["+attr->type +" "+attr->name +"], ";
+ } else
+ {
+ attrList = attrList + attr->type +" "+attr->name +", ";
+ }
+ }
+ if (!attr->name.isEmpty())
+ {
+ tag->addAttribute(attr);
+ }
+ delete attr;
+ }
+ }
+ if (!attrList.isEmpty())
+ tag->comment.prepend(attrList.left(attrList.length() - 2) + "; ");
+}
+
+
+void DTDs::slotLoadDTD()
+{
+ KURL url = KFileDialog::getOpenURL("", i18n("*.dtd|DTD Definitions"), 0L);
+ if (!url.isEmpty())
+ {
+ DTDParser dtdParser(url, KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
+ if (dtdParser.parse())
+ {
+ QString dirName = dtdParser.dirName();
+ KConfig dtdcfg(dirName + m_rcFilename, true);
+ dtdcfg.setGroup("General");
+ QString dtdName = dtdcfg.readEntry("Name");
+ QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ DTDStruct * dtd = m_dict->find(dtdName) ;
+ if (dtd &&
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ {
+ return;
+ }
+ removeDTD(dtd);
+ if (readTagDir(dirName))
+ {
+ QString family = dtdcfg.readEntry("Family", "1");
+ Document *w = ViewManager::ref()->activeDocument();
+ if (family == "1" && w &&
+ KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes)
+ {
+ w->setDTDIdentifier(dtdName);
+ emit loadToolbarForDTD(w->getDTDIdentifier());
+ emit forceReparse();
+ }
+ }
+ }
+ }
+}
+
+void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
+{
+ QString dirName = _dirName;
+ if (!dirName.endsWith("/"))
+ dirName += "/";
+ KConfig dtdcfg(dirName + m_rcFilename, true);
+ dtdcfg.setGroup("General");
+ QString dtdName = dtdcfg.readEntry("Name");
+ QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ DTDStruct * dtd = m_dict->find(dtdName) ;
+ if ( dtd &&
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ {
+ return;
+ }
+ removeDTD(dtd);
+ if (!readTagDir(dirName))
+ {
+ KMessageBox::error(0L, i18n("<qt>Cannot read the DTEP from <b>%1</b>. Check that the folder contains a valid DTEP (<i>description.rc and *.tag files</i>).</qt>").arg(dirName), i18n("Error Loading DTEP"));
+ } else
+ {
+ QString family = dtdcfg.readEntry("Family", "1");
+ if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), QString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
+ {
+ KURL src;
+ src.setPath(dirName);
+ KURL target;
+ QString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ target.setPath(destDir + src.fileName());
+ KIO::copy( src, target, false); //don't care about the result
+ }
+ Document *w = ViewManager::ref()->activeDocument();
+ if (family == "1" && w &&
+ KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes)
+ {
+ w->setDTDIdentifier(dtdName);
+ emit loadToolbarForDTD(w->getDTDIdentifier());
+ emit forceReparse();
+ }
+ }
+}
+
+void DTDs::slotLoadEntities()
+{
+ KDialogBase dlg(0L, "loadentities", true, i18n("Load DTD Entities Into DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
+ LoadEntityDlgS entitiesWidget(&dlg);
+ QStringList lst(DTDs::ref()->nickNameList(true));
+ entitiesWidget.targetDTEPCombo->insertStringList(lst);
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ entitiesWidget.targetDTEPCombo->setCurrentItem(lst.findIndex(nickName));
+ }
+ dlg.setMainWidget(&entitiesWidget);
+ if (dlg.exec())
+ {
+ DTDStruct * dtd = m_dict->find(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText()));
+ DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
+ QString dtdDir = QFileInfo(dtd->fileName).dirPath();
+ if (dtdParser.parse(dtdDir, true))
+ {
+ readTagFile(dtdDir + "/entities.tag", dtd, dtd->tagsList);
+ }
+ }
+}
+
+
+/** Returns the DTD name (identifier) corresponding to the DTD's nickname */
+QString DTDs::getDTDNameFromNickName(const QString& nickName)
+{
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ if (it.current()->nickName.lower() == nickName.lower())
+ {
+ return it.current()->name;
+ }
+ }
+ return nickName;
+}
+
+/** returns the known nick names */
+QStringList DTDs::nickNameList(bool topLevelOnly)
+{
+ QStringList nickList;
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ if (!topLevelOnly || it.current()->toplevel)
+ {
+ nickList << it.current()->nickName;
+ }
+ }
+ nickList.sort();
+ return nickList;
+}
+
+
+/** returns the known names */
+QStringList DTDs::nameList(bool topLevelOnly)
+{
+ QStringList nameList;
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ if (!topLevelOnly || it.current()->toplevel)
+ {
+ nameList << it.current()->name;
+ }
+ }
+ nameList.sort();
+ return nameList;
+}
+
+QStringList DTDs::fileNameList(bool topLevelOnly)
+{
+ QStringList nameList;
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ if (!topLevelOnly || it.current()->toplevel)
+ {
+ nameList << (it.current()->name + "|" + it.current()->fileName);
+ }
+ }
+ return nameList;
+}
+
+
+const DTDStruct * DTDs::DTDforURL(const KURL &url)
+{
+ QValueList<DTDStruct*> foundList;
+ QDictIterator<DTDStruct> it(*m_dict);
+ for( ; it.current(); ++it )
+ {
+ if (it.current()->toplevel && canHandle(it.current(), url))
+ {
+ foundList.append(it.current());
+ }
+ }
+ if (foundList.isEmpty())
+ return find("empty");
+ else
+ {
+ QString path = url.path();
+ for (uint i = 0; i < foundList.count(); i++)
+ {
+ if (path.endsWith('.' + foundList[i]->defaultExtension))
+ return foundList[i];
+ }
+ return foundList[0];
+ }
+}
+
+bool DTDs::canHandle(const DTDStruct *dtd, const KURL &url)
+{
+ QString mimetype = KMimeType::findByURL(url)->name();
+ if (dtd->mimeTypes.contains(mimetype))
+ return true;
+ if (url.path().endsWith('.' + dtd->defaultExtension))
+ return true;
+ return false;
+}
+
+#include "dtds.moc"
diff --git a/quanta/src/dtds.h b/quanta/src/dtds.h
new file mode 100644
index 00000000..1e26f712
--- /dev/null
+++ b/quanta/src/dtds.h
@@ -0,0 +1,238 @@
+/***************************************************************************
+ dtds.h - description
+ -------------------
+ begin : 12.02.2004 (extract from quanta_init and others)
+
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev <pdima@users.sourceforge.net,yshurik@linuxfan.com>
+ (C) 2001-2003 by Andras Mantia <amantia@kde.org>
+ (C) 2000, 2003 by Eric Laffoon <sequitur@kde.org>
+ (C) 2004 by Jens Herden <jhe at epost.de>
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * 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 DTDS_H
+#define DTDS_H
+
+// application specific includes
+#include "qtag.h"
+#include "qobject.h"
+#include "qfile.h"
+
+//qt includes
+#include <qdict.h>
+
+//kde includes
+#include <kdebug.h>
+
+
+class QDomNode;
+class QDomDocument;
+class QTag;
+class QString;
+class QStringList;
+class KConfig;
+struct DTDStruct;
+
+
+/** @short This class manages the DTD's for Quanta.
+ *
+ * The constructor only loads the necessary information from the description.rc file.
+ * The rest is later loaded on demand of the find() function.
+ */
+class DTDs : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * since this class is a singleton you must use this function to access it
+ * @return the class pointer
+ */
+ static DTDs* ref(QObject *parent = 0L)
+ {
+ static DTDs *m_ref;
+ if (!m_ref) m_ref = new DTDs(parent);
+ return m_ref;
+ }
+
+
+ ~DTDs();
+
+ /**
+ * searchs a dtd and loads it from disk if not present in memory
+ *
+ * @param dtdName name of the dtd, will be converted to lowercase inside
+ * @return the found dtd structure
+ */
+ const DTDStruct * find (const QString &dtdName)
+ {
+// kdDebug(24000) << "dtds::find " << dtdName << endl;
+ DTDStruct *dtd = m_dict->find(dtdName.lower()) ;
+ if (dtd && ! dtd->loaded ) readTagDir2(dtd);
+ return dtd;
+ }
+ /**
+ * @param nickName nickname of the DTD
+ * @return the name (identifier) to the nickname. If the DTD is not found you get
+ * nickName back!
+ */
+ QString getDTDNameFromNickName(const QString& nickName);
+ /**
+ * @param name name of the DTD
+ * @return the nickname to the name. If the DTD is not found you get
+ * name back!
+ */
+ QString getDTDNickNameFromName(const QString& name)
+ {
+ DTDStruct *dtd = m_dict->find(name);
+ if ( dtd )
+ return dtd->nickName;
+ else
+ return name;
+ };
+
+ /**
+ * creates a list of all available nicknames
+ *
+ * @param topLevelOnly true = only the DTD's which can be the main DTD of a document
+ * are included
+ * @return all known nick names
+ */
+ QStringList nickNameList (bool topLevelOnly=false);
+
+ /**
+ * creates a list of all available names
+ *
+ * @param topLevelOnly true = only the DTD's which can be the main DTD of a document
+ * are included
+ * @return all known names
+ */
+ QStringList nameList (bool topLevelOnly=false);
+ /**
+ * creates a list with the path to the description.rc of all available DTEPs
+ *
+ * @param topLevelOnly true = only the DTD's which can be the main DTD of a document
+ * are included
+ * @return a list with the name and the path to the description.rc of all available DTEPs in form of
+ * DTEPName | path to description.rc
+ */
+ QStringList fileNameList (bool topLevelOnly=false);
+
+
+ /** finds a dtd for a given url
+ *
+ * @param url look for this file
+ * @return the first DTD for this mimetype or the "empty" DTD if not found
+ */
+ const DTDStruct * DTDforURL(const KURL &url);
+
+ /**
+ * Checks if a DTD can handle the file or not.
+ * @param dtd the DTD to check against
+ * @param url the url pointing to the file
+ * @return true if it can handle
+ */
+ static bool canHandle(const DTDStruct *dtd, const KURL &url);
+
+public slots:
+
+ /** Load a DTD and convert to a DTEP */
+ void slotLoadDTD();
+
+ /** Loads a DTEP from a directory
+ * @param dirName The directory containing the DTEP
+ * @param askForAutoLoad if true and the user answer with yes to the autoload question
+ * the DTEP will be copied to the local resource directory and will be autoloaded on
+ * startup
+ */
+ void slotLoadDTEP(const QString& dirName, bool askForAutoLoad);
+
+ /**
+ * Loads (replaces) the entities for a DTEP.
+ */
+ void slotLoadEntities();
+
+signals:
+ /** used to hide the splash screen */
+ void hideSplash();
+
+ /** DTD has changed need reparse */
+ void forceReparse();
+
+ /** Enable/disbale the idle timer*/
+ void enableIdleTimer(bool);
+
+ void loadToolbarForDTD(const QString&);
+
+private:
+
+ /** The constructor is privat because we use singleton patter.
+ * If you need the class use DTDs::ref() for
+ * construction and reference
+ */
+ DTDs(QObject *parent);
+
+
+ /** Reads the tag files and the description.rc from tagDir in order to
+ * build up the internal DTD and tag structures.
+ *
+ * @param dirName folder where dtd definition is located
+ * @param loadAll true = all information and tags will be loaded now (@ref readTagDir2 will be called)
+ * @return true = no error
+ */
+ bool readTagDir(const QString &dirName, bool loadAll=true);
+
+ /** Reads the tag files and the description.rc from tagDir in order to
+ * build up the internal DTD and tag structures.
+ *
+ * @param dtd the already preloaded dtd structure
+ * @return true = no error
+ */
+ bool readTagDir2(DTDStruct *dtd);
+
+
+ /** helper for @ref readTagDir2
+ *
+ * @param dtd the already preloaded dtd structure
+ */
+ void resolveInherited (DTDStruct *dtd);
+
+ /** Reads the tags from the tag files.
+ *
+ * @param fileName path of the tag file
+ * @param parentDTD the DTD where the tags belog to
+ * @param tagList the list where the tags are inserted
+ * @return the number of read tags.
+ */
+ uint readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList);
+
+ /** Parses the dom document and retrieve the tag attributes
+ *
+ * @param dom the DOM node containing the tag definition
+ * @param tag the QTag object that will be initialized by using the information in dom
+ * @param common will be true, if the tag is a just a list of common group attributes
+ */
+ void setAttributes(QDomNode *dom, QTag* tag, bool &common);
+ /** removes dtd from dictonary and deletes all components
+ *
+ * @param dtd the dtd to delete
+ */
+ void removeDTD(DTDStruct *dtd);
+
+ /** helper to read the tag files */
+ QDomDocument *m_doc;
+
+ /** dictonary with references to all DTD's in memory */
+ QDict<DTDStruct> *m_dict;
+};
+
+
+#endif
diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp
new file mode 100644
index 00000000..6e7f02df
--- /dev/null
+++ b/quanta/src/kqapp.cpp
@@ -0,0 +1,233 @@
+/*
+ KQApplication.cpp
+
+ KNode, the KDE newsreader
+ Copyright (c) 1999-2001 the KNode authors.
+ See file AUTHORS for details
+
+ Rewritten for Quanta Plus: (C) 2002, 2003 Andras Mantia <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.
+ 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, US
+*/
+
+#include <qtimer.h>
+
+#include <kconfig.h>
+#include <kdebug.h>
+#include <kwin.h>
+#include <kcmdlineargs.h>
+#include <kurl.h>
+#include <kiconloader.h>
+#include <kstandarddirs.h>
+#include <kglobalsettings.h>
+#include <ksplashscreen.h>
+#include <dcopclient.h>
+#include <kdeversion.h>
+
+#include "config.h"
+#include "quantacommon.h"
+#include "project.h"
+#include "quanta.h"
+#include "quanta_init.h"
+#include "kqapp.h"
+
+QuantaApp *quantaApp = 0L; //global pointer to the main application object
+#define SPLASH_PICTURE "quantalogo"
+
+KSplash::KSplash()
+ : QFrame( 0L, QString("Quanta")+QUANTA_VERSION,
+ QWidget::WStyle_NoBorder | QWidget::WStyle_Customize | WX11BypassWM)
+{
+ QPixmap pm( UserIcon(SPLASH_PICTURE) );
+
+ setBackgroundPixmap(pm);
+ QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ setGeometry( desk.center().x()-225, desk.center().y()-150, 450, 300 );
+ setLineWidth(0);
+ show();
+}
+
+
+KSplash::~KSplash()
+{
+}
+
+
+KQApplication::KQApplication()
+ : KApplication()
+{
+ args = KCmdLineArgs::parsedArgs();
+ splash = 0L;
+
+ KGlobal::dirs()->addPrefix(PREFIX);
+ dcopClient()->registerAs("quanta", true);
+
+//FIXME: Do not hide the problem, but really fix the session restoration.
+//I have no idea how to do it, but it may be broken because of delayed
+//initialization in QuantaApp
+/* if (isRestored())
+ {
+ RESTORE(QuantaApp);
+ }
+ else */
+ {
+ KConfig *config = kapp->config();
+ config->setGroup("General Options");
+ int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
+ QString layout = config->readEntry("Window layout", "Default");
+ if (layout == "Default" || args->isSet("resetlayout"))
+ {
+ mdiMode = KMdi::IDEAlMode;
+ config->writeEntry("MDI mode", KMdi::IDEAlMode);
+ config->writeEntry("Window layout", "Default");
+ }
+ quantaApp = new QuantaApp(mdiMode);
+ config->setGroup("General Options");
+ if (config->readBoolEntry("Show Splash", true) && args->isSet("logo"))
+ {
+ sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
+ sp->show();
+ connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
+ QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ }
+ setMainWidget(quantaApp);
+ slotInit();
+ }
+}
+
+void KQApplication::slotInit()
+{
+ KQApplicationPrivate::init();
+}
+
+KQApplication::~KQApplication()
+{
+}
+
+void KQApplication::slotSplashTimeout()
+{
+ delete splash;
+ delete sp;
+ splash = 0L;
+ sp = 0L;
+}
+
+KQUniqueApplication::KQUniqueApplication()
+ : KUniqueApplication()
+{
+ KGlobal::dirs()->addPrefix(PREFIX);
+ dcopClient()->registerAs("quanta", false);
+}
+
+KQUniqueApplication::~KQUniqueApplication()
+{
+}
+
+
+int KQUniqueApplication::newInstance()
+{
+ args = KCmdLineArgs::parsedArgs();
+ if (mainWidget())
+ {
+ KWin::activateWindow( mainWidget()->winId() );
+ quantaApp = static_cast<QuantaApp*>(mainWidget());
+ quantaApp->setParserEnabled(false);
+ for (int i = 0; i < args->count(); i++)
+ {
+ quantaApp->slotFileOpen(args->url(i), quantaApp->defaultEncoding()); // load initial files
+ }
+ quantaApp->setParserEnabled(true);
+ quantaApp->reparse(true);
+ }
+ else
+ {
+ splash = 0L;
+ KConfig *config = kapp->config();
+ config->setGroup("General Options");
+ int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
+ QString layout = config->readEntry("Window layout", "Default");
+ if (layout == "Default" || args->isSet("resetlayout"))
+ {
+ mdiMode = KMdi::IDEAlMode;
+ config->writeEntry("Window layout", "Default");
+ config->writeEntry("MDI mode", KMdi::IDEAlMode);
+ }
+ quantaApp = new QuantaApp(mdiMode);
+ config->setGroup("General Options");
+ if (config->readBoolEntry("Show Splash", true) && args->isSet("logo"))
+ {
+ sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
+ sp->show();
+ connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
+ QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ }
+ setMainWidget(quantaApp);
+ slotInit();
+ }
+
+ return 0;
+}
+
+void KQUniqueApplication::slotInit()
+{
+ KQApplicationPrivate::init();
+}
+
+void KQUniqueApplication::slotSplashTimeout()
+{
+ delete splash;
+ delete sp;
+ splash = 0L;
+ sp = 0L;
+}
+
+
+void KQApplicationPrivate::init()
+{
+ if (quantaApp->quantaStarted)
+ {
+ quantaApp->slotEnableIdleTimer(false);
+ quantaApp->setParserEnabled(false); //will be enabled in quantaApp->m_quantaInit->openLastFiles();
+ quantaApp->m_quantaInit->initQuanta();
+ quantaApp->show();
+
+ QString initialProject;
+ QStringList initialFiles;
+ for (int i = 0; i < args->count(); i++ )
+ {
+ QString arg = args->url(i).url();
+
+ if(arg.findRev(QRegExp(".+\\.webprj")) != -1)
+ initialProject = arg;
+ else
+ initialFiles += arg;
+ }
+ quantaApp->m_quantaInit->loadInitialProject(initialProject);
+ //recoverCrashed manages the autosaved copies
+ quantaApp->m_quantaInit->recoverCrashed(initialFiles);
+
+ for(QStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
+ {
+ KURL url;
+ QuantaCommon::setUrl(url, (*it));
+ quantaApp->slotFileOpen(url, quantaApp->defaultEncoding()); // load initial files
+ }
+ quantaApp->m_quantaInit->openLastFiles();
+ }
+ args->clear();
+ delete splash;
+ splash = 0L;
+ delete sp;
+ sp = 0L;
+ delete quantaApp->m_quantaInit;
+ quantaApp->m_quantaInit = 0L;
+ quantaApp->slotEnableIdleTimer(true);
+}
+
+#include "kqapp.moc"
diff --git a/quanta/src/kqapp.h b/quanta/src/kqapp.h
new file mode 100644
index 00000000..592d7cbc
--- /dev/null
+++ b/quanta/src/kqapp.h
@@ -0,0 +1,79 @@
+/*
+ knapplication.h
+
+ KNode, the KDE newsreader
+ Copyright (c) 1999-2001 the KNode authors.
+ See file AUTHORS for details
+
+ Rewritten for Quanta Plus: (C) 2002, 2003 Andras Mantia <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.
+ 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, US
+*/
+
+#ifndef KQAPPLICATION_H
+#define KQAPPLICATION_H
+
+#include <qframe.h>
+#include <kuniqueapplication.h>
+
+class KCmdLineArgs;
+class KSplashScreen;
+
+class KSplash : public QFrame
+{
+ Q_OBJECT
+
+ public:
+ KSplash();
+ ~KSplash();
+};
+
+class KQApplicationPrivate
+{
+ public:
+ KQApplicationPrivate():splash(0L), sp(0L) {};
+ ~KQApplicationPrivate() {};
+
+ protected:
+ void init();
+
+ KSplash *splash;
+ KCmdLineArgs *args;
+ KSplashScreen *sp;
+};
+
+class KQApplication : public KApplication, KQApplicationPrivate
+{
+ Q_OBJECT
+
+ public:
+ KQApplication();
+ ~KQApplication();
+ public slots:
+ void slotInit();
+ void slotSplashTimeout();
+};
+
+class KQUniqueApplication : public KUniqueApplication, KQApplicationPrivate
+{
+ Q_OBJECT
+
+ public:
+ KQUniqueApplication();
+ ~KQUniqueApplication();
+
+ /** Create new instance of Quanta. Make the existing
+ main window active if Quanta is already running */
+ int newInstance();
+ public slots:
+ void slotInit();
+ void slotSplashTimeout();
+};
+
+#endif
diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp
new file mode 100644
index 00000000..39672048
--- /dev/null
+++ b/quanta/src/main.cpp
@@ -0,0 +1,217 @@
+/***************************************************************************
+ main.cpp - description
+ -------------------
+ begin : ���� 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2002 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <stdlib.h>
+
+// kde includes
+#include <klocale.h>
+#include <kaboutdata.h>
+#include <kiconloader.h>
+#include <ksimpleconfig.h>
+#include <kdebug.h>
+#include <kcmdlineargs.h>
+#include <dcopclient.h>
+#include <dcopref.h>
+
+// qt includes
+#include <qpixmap.h>
+#include <qnetwork.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+
+// app includes
+#include "kqapp.h"
+#include "quanta.h"
+
+static const char *description =
+ I18N_NOOP("Quanta Plus Web Development Environment");
+// INSERT A DESCRIPTION FOR YOUR APPLICATION HERE
+
+static const char *othertext =
+ I18N_NOOP("Our goal is to be nothing less than the best possible tool for\n \
+working with tagging and scripting languages.\
+\n\nQuanta Plus is not in any way affiliated with any commercial\n \
+versions of Quanta. \
+\n\nWe hope you enjoy Quanta Plus.\n\n");
+
+static const char *developers = I18N_NOOP("The Quanta+ developers");
+
+static KCmdLineOptions options[] =
+{
+ { "+[File]", I18N_NOOP("File to open"), 0 },
+ { "unique", I18N_NOOP("Whether we start as a one-instance application"), 0 },
+ { "nologo", I18N_NOOP("Do not show the nice logo during startup"), 0 },
+ { "resetlayout", I18N_NOOP("Reset the layout of the user interface to the default"), 0},
+ KCmdLineLastOption
+ // INSERT YOUR COMMANDLINE OPTIONS HERE
+};
+
+int main(int argc, char *argv[])
+{
+ char *copyright = new char[200]; //this should be enough
+ strcpy(copyright, "(C) 2000-2006 - ");
+ strcat(copyright, developers);
+ KAboutData
+ aboutData( QUANTA_PACKAGE, I18N_NOOP("Quanta"),
+ QUANTA_VERSION, description, KAboutData::License_GPL_V2,
+ copyright,
+ othertext,
+ "http://kdewebdev.org"
+ );
+
+ //aboutData.otherText(&othertext);
+
+ aboutData.addAuthor("Eric Laffoon",I18N_NOOP("Project Lead - public liaison"), "sequitur@kde.org");
+ aboutData.addAuthor("Andras Mantia",I18N_NOOP("Program Lead - bug squisher"), "amantia@kde.org");
+ aboutData.addAuthor("Dmitry Poplavsky",I18N_NOOP("Inactive - left for commercial version"), "dima@kde.org");
+ aboutData.addAuthor("Alexander Yakovlev",I18N_NOOP("Inactive - left for commercial version"), "yshurik@kde.org");
+
+ aboutData.addCredit("Michal Rudolf",
+ I18N_NOOP("Various fixes, table editor maintainer"),
+ "mrudolf@kdewebdev.org");
+
+ aboutData.addCredit("Linus McCabe",
+ I18N_NOOP("Debugger interface and integration of the Gubed PHP debugger"),
+ "Linus@mccabe.nu");
+
+ aboutData.addCredit("Thiago Silva",
+ I18N_NOOP("Debugger interface"),
+ "thiago.silva@kdemail.net");
+
+ aboutData.addCredit("Chris Hornbaker",
+ I18N_NOOP("XML - compliance, tools & DTEPs"),
+ "chrishornbaker@earthlink.net");
+
+ aboutData.addCredit("Dave Reddish",
+ I18N_NOOP("Template contributions"),
+ "wykd@wykd.co.uk");
+
+ aboutData.addCredit("Doug Bezona",
+ I18N_NOOP("ColdFusion support"),
+ "doug@bezona.com");
+
+ aboutData.addCredit("Mathieu Kooiman",
+ I18N_NOOP("Initial debugger work - advanced test"),
+ "M.Kooiman@MAP-IS.nl");
+
+ aboutData.addCredit("Richard Moore",
+ I18N_NOOP("Coding and tag dialog definition documentation and more"),
+ "rich@kde.org");
+
+ aboutData.addCredit("Marc Britton",
+ I18N_NOOP("Original plugin system, various fixes"),
+ "consume@optushome.com.au");
+
+ aboutData.addCredit("Robert Nickel",
+ I18N_NOOP("Original documentation, many cool parsing scripts to automate \ndevelopment"),
+ "robert@artnickel.com");
+
+ aboutData.addCredit("Jason P. Hanley",
+ I18N_NOOP("Various fixes, foundational code for the old DTD parsing and other \nDTD related work"),
+ "jphanley@buffalo.edu");
+
+ aboutData.addCredit("George Vilches",
+ I18N_NOOP("Tree based upload dialog"),
+ "gav@creolmail.org");
+
+ aboutData.addCredit("Ted Pibil",
+ I18N_NOOP("Addition and maintenance of DTDs"),
+ "ted@pibil.org");
+
+ aboutData.addCredit("Nicolas Deschildre",
+ I18N_NOOP("Visual Page Layout part, new undo/redo system"),
+ "nicolasdchd@ifrance.com");
+
+ aboutData.addCredit("Paulo Moura Guedes",
+ I18N_NOOP("VPL View"),
+ "moura@caixamagica.pt");
+
+ aboutData.addCredit("Luciano Gulmini",
+ I18N_NOOP("Frame wizard, CSS wizard"),
+ "e.gulmini@tiscali.it");
+
+ aboutData.addCredit("Emiliano Gulmini",
+ I18N_NOOP("Crash recovery"),
+ "emi_barbarossa@yahoo.it");
+
+ aboutData.addCredit("Jens Herden",
+ I18N_NOOP("Improvements to the treeview code; code review and cleanup"),
+ "jens@kdewebdev.org");
+
+ aboutData.addCredit("Andrea Bergia",
+ I18N_NOOP("Original CSS editor"),
+ "andreabergia@yahoo.it");
+
+ aboutData.addCredit("Matthew Colton",
+ I18N_NOOP("Cool splash screen for many version releases of Quanta"),
+ "mat.colton@web-xs.de");
+
+ aboutData.addCredit("Claus Hindsgaul",
+ I18N_NOOP("Danish translation"),
+ "claus_h@image.dk");
+
+ aboutData.addCredit("Dmitri Dmitrienko",
+ I18N_NOOP("Part of a code for the old PHP4 Debugger"),
+ "dd@cron.ru");
+
+ aboutData.addCredit("Keith Isdale",
+ I18N_NOOP("XSLT tags"),
+ "k_isdale@tpg.com.au");
+
+ aboutData.addCredit("Lukas Masek",
+ I18N_NOOP("Splash screen and icon for 3.2"),
+ "luci@sh.ground.cz");
+
+ KCmdLineArgs::init( argc, argv, &aboutData);
+ KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+
+ // this defeats the purpose of KCmdLineArgs, but there is no other
+ // way around, I'm afraid.
+ const char *uniq = "--unique";
+ bool isUnique = false;
+ for ( int i = 1; i < argc; i++ ) {
+ if ( strcmp(argv[i], uniq) == 0 ) {
+ isUnique = true;
+ KUniqueApplication::addCmdLineOptions(); // before calling parsedArgs!
+ break;
+ }
+ }
+
+ KApplication *app;
+ KApplication::disableAutoDcopRegistration();
+
+ if (isUnique) {
+ KUniqueApplication::dcopClient()->registerAs("quanta-foo");
+ if (KUniqueApplication::dcopClient()->isApplicationRegistered("quanta"))
+ {
+ KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ for (int i = 0; i < args->count(); i++)
+ {
+ QString s = args->url(i).url();
+ DCOPRef("quanta", "WindowManagerIf").call("openFile(QString, int, int)", s, 1, 1); // Activate it
+ }
+ DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()");
+ exit(0);
+ }
+ app = new KQUniqueApplication;
+ } else {
+ app = new KQApplication;
+ }
+
+ return app->exec();
+}
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
new file mode 100644
index 00000000..596dc7e3
--- /dev/null
+++ b/quanta/src/quanta.cpp
@@ -0,0 +1,5390 @@
+/***************************************************************************
+ quanta.cpp - description
+ -------------------
+ begin : ?? ??? 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2005 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <time.h>
+
+// include files for QT
+#include <qaction.h>
+#include <qdragobject.h>
+#include <qdir.h>
+#include <qprinter.h>
+#include <qpainter.h>
+#include <qwidgetstack.h>
+#include <qtabwidget.h>
+#include <qfile.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qtabbar.h>
+#include <qradiobutton.h>
+#include <qimage.h>
+#include <qtimer.h>
+#include <qtextcodec.h>
+#include <qtextstream.h>
+#include <qtextedit.h>
+#include <qiodevice.h>
+#include <qcombobox.h>
+#include <qdockarea.h>
+#include <qdom.h>
+#include <qspinbox.h>
+#include <qeventloop.h>
+#include <qfontmetrics.h>
+#include <qclipboard.h>
+#include <qptrlist.h>
+#include <qbuffer.h>
+#include <qdatetime.h>
+
+
+// include files for KDE
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kaccelmanager.h>
+#include <kbugreport.h>
+#include <kcolordialog.h>
+#include <kcombobox.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+#include <kencodingfiledialog.h>
+#include <kfiledialog.h>
+#include <kmenubar.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <khtmlview.h>
+#include <kdialogbase.h>
+#include <kdeversion.h>
+#include <kkeydialog.h>
+#include <kinputdialog.h>
+#include <klibloader.h>
+#include <kdockwidget.h>
+#include <kstatusbar.h>
+#include <kpopupmenu.h>
+#include <kpushbutton.h>
+#include <kprocess.h>
+#include <kprogress.h>
+#include <ktempdir.h>
+#include <ktempfile.h>
+#include <ktextedit.h>
+#include <kdebug.h>
+#include <ktar.h>
+#include <kedittoolbar.h>
+#include <kaction.h>
+#include <kcharsets.h>
+#include <kdirwatch.h>
+#include <kstandarddirs.h>
+#include <ktabwidget.h>
+#include <ktip.h>
+#include <kmimetype.h>
+#include <kparts/partmanager.h>
+#include <kparts/part.h>
+#include <kstringhandler.h>
+#include <kstdguiitem.h>
+#include <kurldrag.h>
+
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/encodinginterface.h>
+#include <ktexteditor/selectioninterface.h>
+#include <ktexteditor/markinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/printinterface.h>
+#include <ktexteditor/popupmenuinterface.h>
+#include <ktexteditor/dynwordwrapinterface.h>
+#include <ktexteditor/encodinginterface.h>
+#include <ktexteditor/undointerface.h>
+#include <ktexteditor/document.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/clipboardinterface.h>
+
+#include <kio/netaccess.h>
+
+#ifdef ENABLE_CVSSERVICE
+#include "cvsservice.h"
+#endif
+
+
+// application specific includes
+#include "document.h"
+#include "quanta.h"
+#include "quantaview.h"
+#include "quantadoc.h"
+#include "qextfileinfo.h"
+#include "resource.h"
+
+#include "project.h"
+
+// For Kafka cut/copy/paste
+#include "wkafkapart.h"
+
+#include "whtmlpart.h"
+
+#include "abbreviation.h"
+#include "filemasks.h"
+#include "styleoptionss.h"
+#include "previewoptions.h"
+#include "parseroptions.h"
+#include "dtdselectdialog.h"
+#include "donationdialog.h"
+#include "fourbuttonmessagebox.h"
+#include "specialchardialog.h"
+#include "kafkasyncoptions.h"
+#include "htmldocumentproperties.h"
+#include "undoredo.h"
+
+#include "filestreeview.h"
+#include "structtreeview.h"
+#include "doctreeview.h"
+#include "templatestreeview.h"
+#include "tagattributetree.h"
+#include "projecttreeview.h"
+#include "scripttreeview.h"
+#include "servertreeview.h"
+#include "variableslistview.h"
+#include "debuggerbreakpointview.h"
+
+#include "listdlg.h"
+#include "tagdialog.h"
+#include "tagmaildlg.h"
+#include "tagmisc.h"
+#include "tagquicklistdlg.h"
+#include "tableeditor.h"
+
+#include "csseditor.h"
+#include "cssselector.h"
+
+#include "framewizard.h"
+
+#include "debuggermanager.h"
+
+#include "parser.h"
+#include "dtdparser.h"
+
+#include "annotationoutput.h"
+#include "messageoutput.h"
+
+#include "dtepeditdlg.h"
+#include "actionconfigdialog.h"
+#include "toolbarxmlgui.h"
+#include "tagaction.h"
+#include "toolbartabwidget.h"
+#include "dcopquanta.h"
+#include "tagmiscdlg.h"
+
+#include "quantaplugininterface.h"
+#include "quantaplugin.h"
+#include "dtds.h"
+#include "dcopsettings.h"
+#include "quanta_init.h"
+#include "viewmanager.h"
+#include "debuggerui.h"
+#include "newstuff.h"
+#include "quantanetaccess.h"
+
+extern int NN;
+
+const QString resourceDir = QString(QUANTA_PACKAGE) + "/";
+
+// from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors)
+static void silenceQToolBar(QtMsgType, const char *){}
+
+QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm( 0, "Quanta", (KMdi::MdiMode) mdiMode)
+
+{
+ setStandardToolBarMenuEnabled(true);
+ createStandardStatusBarAction();
+ m_quantaInit = new QuantaInit(this);
+ dcopSettings = new DCOPSettings;
+ dcopQuanta = new DCOPQuanta;
+ DTDs::ref(this);
+ quantaStarted = true;
+ tempFileList.setAutoDelete(true);
+ m_toolbarList.setAutoDelete(true);
+ userToolbarsCount = 0;
+ baseNode = 0L;
+ currentToolbarDTD = QString::null;
+ m_config=kapp->config();
+ idleTimer = new QTimer(this);
+ connect(idleTimer, SIGNAL(timeout()), SLOT(slotIdleTimerExpired()));
+ m_idleTimerEnabled = true;
+
+ qConfig.globalDataDir = KGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
+ if (qConfig.globalDataDir.isEmpty())
+ {
+ quantaStarted = false;
+ kdWarning() << "***************************************************************************" << endl;
+ kdWarning() << i18n("Quanta data files were not found.") << endl;
+ kdWarning() << i18n("You may have forgotten to run \"make install\", or your KDEDIR, KDEDIRS or PATH are not set correctly.") << endl;
+ kdWarning() << "***************************************************************************" << endl;
+ QTimer::singleShot(20, kapp, SLOT(quit()));
+ return;
+ }
+ qConfig.enableDTDToolbar = true;
+
+ // connect up signals from KXXsldbgPart
+ connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(QString,int)", false );
+ connectDCOPSignal(0, 0, "editorPositionChanged(QString,int,int)", "newCursorPosition(QString,int,int)", false );
+ connectDCOPSignal(0, 0, "openFile(QString,int,int)", "openFile(QString,int,int)", false);
+
+ m_partManager = new KParts::PartManager(this);
+ // When the manager says the active part changes,
+ // the builder updates (recreates) the GUI
+ connect(m_partManager, SIGNAL(activePartChanged(KParts::Part * )),
+ this, SLOT(slotActivePartChanged(KParts::Part * )));
+ connect(this, SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
+ connect(tabWidget(), SIGNAL(initiateDrag(QWidget *)), this, SLOT(slotTabDragged(QWidget*)));
+
+ m_oldKTextEditor = 0L;
+ m_previewToolView = 0L;
+ m_documentationToolView = 0L;
+ m_previewedDocument = 0L;
+ m_previewVisible = false;
+ m_newDTEPStuff = 0L;
+ m_newToolbarStuff = 0L;
+ m_newTemplateStuff = 0L;
+ m_newScriptStuff = 0L;
+ m_newDocStuff = 0L;
+ m_debugger = 0L;
+ m_parserEnabled = true;
+ cursorLine = 0;
+ cursorCol = 0;
+ emit eventHappened("quanta_start", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ setAcceptDrops(true);
+ tabWidget()->installEventFilter(this);
+}
+
+
+QuantaApp::~QuantaApp()
+{
+ delete m_newDTEPStuff;
+ m_newDTEPStuff = 0L;
+ delete m_newToolbarStuff;
+ m_newToolbarStuff = 0L;
+ delete m_newTemplateStuff;
+ m_newTemplateStuff = 0L;
+ delete m_newScriptStuff;
+ m_newScriptStuff = 0L;
+ delete m_newDTEPStuff;
+ m_newDocStuff = 0L;
+ // disconnect(m_htmlPart, SIGNAL(destroyed(QObject *)));
+ // disconnect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)));
+ disconnect(this, SIGNAL(lastChildViewClosed()), ViewManager::ref(), SLOT(slotLastViewClosed()));
+ //kdDebug(24000) << "QuantaApp::~QuantaApp" << endl;
+#ifdef ENABLE_CVSSERVICE
+ delete CVSService::ref();
+#endif
+ delete m_debugger;
+ m_debugger = 0L;
+ quantaApp = 0L;
+ delete m_doc;
+ m_doc = 0L;
+ kdDebug(24000) << "Node objects before delete :" << NN << " baseNode= " << baseNode << endl;
+ delete baseNode;
+ baseNode = 0;
+ delete parser;
+ parser = 0L;
+ delete idleTimer;
+ idleTimer = 0L;
+ delete m_actions;
+ m_actions = 0L;
+ cursorLine = 0;
+ cursorCol = 0;
+ tempFileList.clear();
+ for (uint i = 0; i < tempDirList.count(); i++)
+ {
+ KIO::NetAccess::del(KURL().fromPathOrURL(tempDirList.at(i)->name()), this);
+ }
+ tempDirList.clear();
+ QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ ToolbarEntry *p_toolbar;
+ for( ; iter.current(); ++iter )
+ {
+ p_toolbar = iter.current();
+ delete p_toolbar->dom;
+ delete p_toolbar->menu;
+ delete p_toolbar->guiClient;
+ }
+
+ m_toolbarList.clear();
+ QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ tmpDir = tmpDirs[0];
+ for (uint i = 0; i < tmpDirs.count(); i++)
+ {
+ if (tmpDirs[i].contains("kde-"))
+ tmpDir = tmpDirs[i];
+ }
+ QString infoCss = tmpDir;
+ infoCss += "quanta/info.css";
+ QFile::remove(infoCss);
+ QDir dir;
+ dir.rmdir(tmpDir + "quanta");
+
+ delete dcopSettings;
+ delete dcopQuanta;
+// delete m_partManager;
+
+ kdDebug(24000) << "Undeleted node objects :" << NN << endl;
+}
+
+void QuantaApp::setTitle(const QString& title)
+{
+ QString s = title;
+ if (Project::ref()->hasProject())
+ {
+ s = Project::ref()->projectName() + " : " + s;
+ }
+ setCaption(s);
+}
+
+void QuantaApp::slotFileNew()
+{
+ m_doc->openDocument(KURL());
+}
+
+void QuantaApp::slotFileOpen()
+{
+ QString myEncoding = defaultEncoding();
+ QString startDir;
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w && !w->isUntitled())
+ startDir = w->url().url();
+ else
+ startDir = Project::ref()->projectBaseURL().url();
+
+ KEncodingFileDialog::Result data;
+ data = KEncodingFileDialog::getOpenURLsAndEncoding(myEncoding, startDir,
+ "all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Open File"));
+ slotFileOpen(data.URLs, data.encoding);
+}
+
+void QuantaApp::slotFileOpen(const KURL::List &urls, const QString& encoding)
+{
+ m_doc->blockSignals(true);
+ m_parserEnabled = false;
+ for (KURL::List::ConstIterator i = urls.begin(); i != urls.end(); ++i)
+ {
+ if (!QExtFileInfo::exists(*i, true, this))
+ {
+ KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg((*i).prettyURL(0, KURL::StripFileProtocol)));
+
+ } else
+ {
+ if (QuantaCommon::checkMimeGroup(*i, "text") ||
+ QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
+ slotFileOpen(*i, encoding);
+ }
+ }
+ m_doc->blockSignals(false);
+ m_parserEnabled = true;
+ reparse(true);
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ setTitle(w->url().prettyURL(0, KURL::StripFileProtocol));
+}
+
+void QuantaApp::slotFileOpen(const KURL &url)
+{
+ slotFileOpen(url, defaultEncoding());
+}
+
+void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding)
+{
+ m_doc->openDocument(url, encoding);
+}
+
+void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding, bool readOnly)
+{
+ m_doc->openDocument(url, encoding, true, readOnly);
+}
+
+void QuantaApp::slotFileOpenRecent(const KURL &url)
+{
+ if (!QExtFileInfo::exists(url, true, this))
+ {
+ if (KMessageBox::questionYesNo(this,
+ i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep"))
+ == KMessageBox::Yes)
+ {
+ fileRecent->removeURL(url);
+ }
+ } else
+ if (QuantaCommon::checkMimeGroup(url, "text") ||
+ QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
+ {
+ slotFileOpen(url);
+ }
+ fileRecent->setCurrentItem(-1);
+ ViewManager::ref()->activeDocument()->view()->setFocus();
+}
+
+void QuantaApp::slotFileSave()
+{
+ QuantaView* view=ViewManager::ref()->activeView();
+ Document *w = view->document();
+ if (w)
+ {
+ w->checkDirtyStatus();
+ if (w->isUntitled())
+ slotFileSaveAs();
+ else
+ {
+ if(ViewManager::ref()->activeView() &&
+ ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ w->docUndoRedo->reloadQuantaEditor();
+ view->saveDocument(w->url());
+ w->docUndoRedo->fileSaved();
+ }
+ }
+}
+
+bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
+{
+ bool result = false;
+ QuantaView* view = viewToSave;
+ if (!view)
+ view = ViewManager::ref()->activeView();
+ Document *w = view->document();
+ if (w)
+ {
+ KURL oldURL = w->url();
+ w->checkDirtyStatus();
+ if (!w->isUntitled() && oldURL.isLocalFile())
+ {
+ fileWatcher->removeFile(oldURL.path());
+// kdDebug(24000) << "removeFile[slotFileSaveAs]: " << oldURL.path() << endl;
+ }
+
+ //FIXME: in katepart changing encoding saves the original file if it was modified, so it's useless in saveas...
+// QString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
+
+ bool gotPath = false;
+
+ KURL saveAsUrl;
+
+ if (fTab->isVisible())
+ {
+ saveAsUrl = fTab->currentURL();
+ if (fTab->currentKFileTreeViewItem() && fTab->currentKFileTreeViewItem()->isDir())
+ {
+ saveAsUrl.adjustPath(+1);
+ }
+ gotPath = true;
+ } else
+ if (ProjectTreeView::ref()->isVisible())
+ {
+ saveAsUrl = ProjectTreeView::ref()->currentURL();
+ if (ProjectTreeView::ref()->currentKFileTreeViewItem() && ProjectTreeView::ref()->currentKFileTreeViewItem()->isDir())
+ {
+ saveAsUrl.adjustPath(+1);
+ }
+ gotPath = true;
+ }
+ if (!gotPath || saveAsUrl.isEmpty())
+ {
+ if (w->isUntitled())
+ {
+ saveAsUrl = Project::ref()->projectBaseURL();
+ saveAsUrl.adjustPath(+1);
+ saveAsUrl.setFileName(oldURL.fileName());
+ } else
+ saveAsUrl = oldURL;
+ } else
+ if (w->isUntitled() && !saveAsUrl.path().endsWith("/"))
+ {
+ saveAsUrl.setPath(saveAsUrl.directory(false, false) + oldURL.fileName());
+ }
+
+//FIXME: in katepart changing encoding saves the original file if it was modified, so it's useless in saveas...
+ /*
+ KEncodingFileDialog::Result data;
+ data = KEncodingFileDialog::getSaveURLAndEncoding(myEncoding, saveAsUrl.url(),
+ "all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Save File"));
+ KURL saveUrl = data.URLs[0];
+ bool found;
+ QString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
+ if (encodingIf && encodingIf->encoding() != encoding)
+ encodingIf->setEncoding(encoding);
+ */
+ KURL saveUrl = KFileDialog::getSaveURL(saveAsUrl.url(),
+ "all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Save File"));
+
+ if (QuantaCommon::checkOverwrite(saveUrl, this) && view->saveDocument(saveUrl))
+ {
+ oldURL = saveUrl;
+ if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) &&
+ KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::add(), i18n("Do Not Add"))
+ )
+ {
+ if (saveUrl.isLocalFile())
+ {
+ QDir dir(saveUrl.path());
+ saveUrl.setPath(dir.canonicalPath());
+ }
+ Project::ref()->insertFile(saveUrl, true);
+ }
+ if (view->hadLastFocus() == QuantaView::VPLFocus)
+ w->docUndoRedo->reloadQuantaEditor();
+
+ w->docUndoRedo->fileSaved();
+ result = true;
+ }
+ if (oldURL.isLocalFile())
+ {
+ fileWatcher->addFile(oldURL.path());
+// kdDebug(24000) << "addFile[slotFileSaveAs]: " << oldURL.path() << endl;
+ }
+ }
+ return result;
+}
+
+void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ Document *w = view->document();
+ if (!w) return;
+
+ KURL url;
+ int query;
+ KURL projectTemplateURL;
+ w->checkDirtyStatus();
+ QString localTemplateDir = locateLocal("data", resourceDir + "templates/");
+
+ do {
+ query = KMessageBox::Yes;
+
+ if (projectTemplate)
+ {
+ url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), QString::null, this);
+ } else
+ {
+ url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), QString::null, this);
+ }
+
+ if (url.isEmpty()) return;
+
+ if (Project::ref()->hasProject())
+ projectTemplateURL = Project::ref()->templateURL();
+ if ( ((projectTemplate) && (projectTemplateURL.isParentOf(url)) ) ||
+ ((! projectTemplate) && (KURL(localTemplateDir).isParentOf(url))) )
+ {
+ if (!QuantaCommon::checkOverwrite(url, this))
+ query = KMessageBox::No;
+ } else
+ {
+ if (projectTemplate)
+ localTemplateDir = projectTemplateURL.path(1);
+ KMessageBox::sorry(this,i18n("You must save the templates in the following folder: \n\n%1").arg(localTemplateDir));
+ query = KMessageBox::No;
+ }
+ } while (query != KMessageBox::Yes);
+
+ if (query == KMessageBox::Cancel) return;
+
+ if (selectionOnly && w->selectionIf)
+ {
+ KTempFile *tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ QString content;
+ content = w->selectionIf->selection();
+ QTextStream stream(tempFile->file());
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ stream << content;
+ tempFile->file()->flush();
+ tempFile->close();
+ if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url, -1, true, false, this))
+ KMessageBox::error(this, i18n("<qt>There was an error while creating the template file.<br>Check that you have write access to <i>%1</i>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error"));
+ delete tempFile;
+ } else
+ {
+ view->saveDocument(url);
+ }
+
+ if (projectTemplate)
+ Project::ref()->insertFile(url, true);
+ if(ViewManager::ref()->activeView() &&
+ ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ w->docUndoRedo->reloadQuantaEditor();
+
+ w->docUndoRedo->fileSaved();
+}
+
+void QuantaApp::slotFileSaveAsLocalTemplate()
+{
+ saveAsTemplate(false);
+}
+
+void QuantaApp::slotFileSaveAsProjectTemplate()
+{
+ saveAsTemplate(true);
+}
+
+
+void QuantaApp::slotFileSaveSelectionAsLocalTemplate()
+{
+ saveAsTemplate(false, true);
+}
+
+void QuantaApp::slotFileSaveSelectionAsProjectTemplate()
+{
+ saveAsTemplate(true, true);
+}
+
+void QuantaApp::slotFileSaveAll()
+{
+ ViewManager::ref()->saveAll();
+}
+
+void QuantaApp::slotFileReload(QuantaView *view)
+{
+ if (!view)
+ view = ViewManager::ref()->activeView();
+ Document *w = view->document();
+ if (!w || w->isUntitled() || !view->saveModified())
+ return;
+ w->setModified(false);
+ unsigned int line, col;
+ w->viewCursorIf->cursorPosition(&line, &col);
+ if (w->openURL(w->url()))
+ w->viewCursorIf->setCursorPosition(line, col);
+ reparse(true);
+}
+
+void QuantaApp::slotFileReloadAll()
+{
+//TODO: Implement it!
+}
+
+void QuantaApp::slotFileClose(const KURL &url)
+{
+ QuantaView *view = ViewManager::ref()->isOpened(url);
+ if (view)
+ {
+ ViewManager::ref()->removeView(view);
+ }
+}
+
+
+void QuantaApp::slotFileCloseAll()
+{
+ ViewManager::ref()->closeAll();
+ WHTMLPart *part = m_htmlPart;
+ part->closeURL();
+ part->begin(Project::ref()->projectBaseURL());
+ part->write(" ");
+ part->end();
+
+ slotNewStatus();
+}
+
+void QuantaApp::slotFileQuit()
+{
+ close();
+}
+
+
+void QuantaApp::slotEditFindInFiles()
+{
+ QuantaPlugin *fileReplacePlugin = m_pluginInterface->plugin("KFileReplace");
+ if (fileReplacePlugin)
+ fileReplacePlugin->run();
+}
+
+
+void QuantaApp::slotHelpTip()
+{
+ KTipDialog::showTip(this, QString::null, true);
+}
+
+void QuantaApp::slotStatusMsg(const QString &msg)
+{
+ statusbarTimer->stop();
+ statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS);
+ statusBar()->repaint();
+ kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ statusbarTimer->start(10000, true);
+}
+
+/** repaint preview */
+void QuantaApp::slotRepaintPreview()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ if (!m_previewVisible) return;
+ if (!m_previewToolView && qConfig.previewPosition != "Editor" ) return;
+
+ m_previewedDocument = 0L;
+ previewCopyMade = false;
+
+ KHTMLView *html = m_htmlPart->view();
+ int xOffset = html->contentsX(), yOffset = html->contentsY();
+
+ m_htmlPart->closeURL();
+ KParts::BrowserExtension *browserExtension = KParts::BrowserExtension::childObject(m_htmlPart);
+ KParts::URLArgs args(true, browserExtension->xOffset(), browserExtension->yOffset());
+ browserExtension->setURLArgs( args );
+ QString encoding = defaultEncoding();
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+
+ KURL url;
+ m_htmlPart->setEncoding(encoding, true);
+ QStringList list;
+ if (m_noFramesPreview)
+ {
+ list = w->tagAreas("frameset", true, true);
+ if (list.isEmpty() || w->editIf->text().isEmpty())
+ m_noFramesPreview = false;
+ else
+ {
+ m_htmlPart->closeURL();
+ QStringList noframearea = w->tagAreas("noframes", false, true);
+ //find the frameset area
+ int bl, bc, el, ec;
+ QStringList l = QStringList::split('\n', list[0], true);
+ QStringList coordList = QStringList::split(',', l[0], true);
+ bl = coordList[0].toInt();
+ bc = coordList[1].toInt();
+ el = coordList[2].toInt();
+ ec = coordList[3].toInt();
+ QString noFramesText = w->text(0,0, bl, bc - 1);
+ noFramesText += noframearea[0];
+ noFramesText += w->text(el, ec + 1, w->editIf->numLines() - 1, w->editIf->lineLength(w->editIf->numLines() - 1));
+ noFramesText.replace(QRegExp("</?noframes[^>]*>", false), "");
+ //kdDebug(24000) << "NOFRAMES: " << noFramesText << endl;
+ if (w->isUntitled())
+ m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset);
+ else
+ {
+ url = Project::ref()->urlWithPrefix(w->url());
+ m_htmlPart->setPreviewedURL(url);
+ m_htmlPart->begin(url, xOffset, yOffset);
+ }
+ m_htmlPart->write(noFramesText);
+ m_htmlPart->end();
+ }
+ }
+
+ if (!m_noFramesPreview)
+ {
+ m_htmlPart->closeURL();
+ QString text = w->editIf->text();
+ if (text.isEmpty())
+ {
+ text = i18n("<center><h3>The current document is empty...</h3></center>");
+ }
+ if (w->isUntitled())
+ {
+ m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset);
+ m_htmlPart->write(text);
+ m_htmlPart->end();
+ } else
+ {
+ m_previewedDocument = w;
+ url = Project::ref()->urlWithPrefix(w->url());
+ m_htmlPart->setPreviewedURL(url);
+ KURL previewURL = w->url();
+ previewURL.setFileName("preview-" + previewURL.fileName());
+ //save the content to disk, so preview with prefix works
+ KTempFile *tmpFile = new KTempFile(tmpDir);
+ QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ tmpFile->setAutoDelete(true);
+ QString encoding = quantaApp->defaultEncoding();
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+ if (encoding.isEmpty())
+ encoding = "utf8"; //final fallback
+ tmpFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ *(tmpFile->textStream()) << w->editIf->text();
+ tmpFile->close();
+ if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
+ m_htmlPart->setPreviewedURL(KURL()); // copy failed, force the preview of the original
+ };
+ delete tmpFile;
+ m_htmlPart->openURL(url);
+ m_htmlPart->addToHistory(url.url());
+ }
+ }
+ m_htmlPart->show();
+}
+
+void QuantaApp::slotOpenFileInPreview(const KURL& a_url)
+{
+ WHTMLPart *part = m_htmlPart;
+ if (!part)
+ return;
+ slotShowPreviewWidget(true);
+ part->openURL(a_url);
+ part->show();
+}
+
+/** view image in preview */
+void QuantaApp::slotImageOpen(const KURL& url)
+{
+ slotShowPreviewWidget(true);
+ WHTMLPart *part = m_htmlPart;
+ QString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
+ text += url.fileName(); //TODO
+ text += "\">\n</div>\n</body>\n</html>\n";
+ part->closeURL();
+ KURL docURL = url;
+ docURL.setFileName("imagepreview.html");
+ part->begin(docURL);
+ part->write(text);
+ part->end();
+
+ part->show();
+}
+
+
+/** insert <img> tag for images or <a> for other */
+void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ KURL baseURL ;
+ if (w->isUntitled() )
+ {
+ baseURL = Project::ref()->projectBaseURL();
+ } else
+ {
+ baseURL = w->url();
+ baseURL.setFileName("");
+ }
+ KURL relURL = QExtFileInfo::toRelative(url, baseURL);
+ QString urlStr = relURL.url();
+ if (relURL.protocol() == baseURL.protocol())
+ urlStr = relURL.path();
+ bool isImage = false;
+
+ if (!dirInfo.preText.isEmpty() || !dirInfo.postText.isEmpty())
+ {
+ w->insertTag(dirInfo.preText+urlStr+dirInfo.postText);
+ } else
+ {
+ QString mimetype = KMimeType::findByURL(url)->name();
+ if (mimetype.contains("image"))
+ {
+ QString imgFileName;
+ KIO::NetAccess::download(url, imgFileName, this);
+ QImage img(imgFileName);
+ if (!img.isNull())
+ {
+ QString width,height;
+ width.setNum(img.width());
+ height.setNum(img.height());
+ QString imgTag = QuantaCommon::tagCase("<img ");
+ imgTag += QuantaCommon::attrCase("src=");
+ imgTag += QuantaCommon::quoteAttributeValue(urlStr);
+ imgTag += QuantaCommon::attrCase(" width=");
+ imgTag += QuantaCommon::quoteAttributeValue(width);
+ imgTag += QuantaCommon::attrCase(" height=");
+ imgTag += QuantaCommon::quoteAttributeValue(height);
+ if (w->currentDTD(true)->singleTagStyle == "xml")
+ imgTag += " />";
+ else
+ imgTag += ">";
+ w->insertTag(imgTag);
+ isImage = true;
+ }
+ KIO::NetAccess::removeTempFile(imgFileName);
+ }
+ if (!isImage)
+ {
+ QString tag = QuantaCommon::tagCase("<a ");
+ tag += QuantaCommon::attrCase("href=");
+ tag += QuantaCommon::quoteAttributeValue(urlStr);
+ tag += ">";
+ w->insertTag(tag, QuantaCommon::tagCase("</a>"));
+ }
+ }
+ w->view()->setFocus();
+ }
+}
+
+void QuantaApp::slotNewStatus()
+{
+ fileRecent->setEnabled(true);
+ actionCollection()->action("project_open_recent")->setEnabled(true);
+ QuantaView *view = ViewManager::ref()->activeView();
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ setTitle( w->url().prettyURL(0, KURL::StripFileProtocol) );
+
+ if (w->doc()->isReadWrite())
+ {
+ KToggleAction *a = dynamic_cast<KToggleAction*>(w->view()->actionCollection()->action("set_insert"));
+ if (a)
+ {
+ statusBar()->changeItem(a->isChecked() ? i18n(" OVR ") : i18n(" INS "),IDS_INS_OVR);
+ }
+ }
+ else
+ statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR);
+ statusBar()->changeItem(w->isModified() ? " * " : "",IDS_MODIFIED);
+
+ saveAction->setEnabled(w->isModified());
+ saveAllAction->setEnabled(ViewManager::ref()->isOneModified());
+
+ bool projectExists = Project::ref()->hasProject();
+
+ actionCollection()->action("toolbars_load_project")->setEnabled(projectExists);
+ actionCollection()->action("toolbars_save_project")->setEnabled(projectExists);
+ }
+ if (view)
+ {
+ view->updateTab();
+ }
+}
+
+void QuantaApp::slotOptionsConfigureKeys()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ KKeyDialog dlg( false, this );
+ QPtrList<KXMLGUIClient> toolbarGuiClients;
+ QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ for( ; iter.current(); ++iter )
+ {
+ toolbarGuiClients.append(iter.current()->guiClient);
+ }
+ QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( QPtrListIterator<KXMLGUIClient> it( clients );
+ it.current(); ++it )
+ {
+ if (toolbarGuiClients.contains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection
+ dlg.insert((*it)->actionCollection());
+ }
+ if (dlg.configure() == KKeyDialog::Accepted)
+ {
+ // this is needed for when we have multiple embedded kateparts and change one of them.
+ // it also needs to be done to their views, as they too have actioncollections to update
+ if (const QPtrList<KParts::Part> * partlist = m_partManager->parts())
+ {
+ QPtrListIterator<KParts::Part> it(*partlist);
+ while (KParts::Part* part = it.current())
+ {
+ if (KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>(part))
+ {
+ KActionPtrList actionList = doc->actionCollection()->actions();
+ KActionPtrList::Iterator actionIt;
+ if (!w || w->doc() != doc)
+ {
+ for ( actionIt = actionList.begin(); actionIt != actionList.end(); ++actionIt)
+ {
+ (*actionIt)->setShortcut((*actionIt)->shortcutDefault());
+ }
+ }
+ doc->reloadXML();
+
+ QPtrList<KTextEditor::View> const & list = doc->views();
+ QPtrListIterator<KTextEditor::View> itt( list );
+ while (KTextEditor::View * view = itt.current())
+ {
+ if (!w || w->view() != view)
+ {
+ actionList = view->actionCollection()->actions();
+ for (actionIt = actionList.begin(); actionIt != actionList.end(); ++actionIt)
+ {
+ (*actionIt)->setShortcut((*actionIt)->shortcutDefault());
+ }
+ }
+ view->reloadXML();
+ ++itt;
+ }
+ }
+ ++it;
+ }
+ }
+
+ QDomDocument doc;
+ doc.setContent(KXMLGUIFactory::readConfigFile(xmlFile(), instance()));
+ QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ QDomNode node = nodeList.item(0).firstChild();
+ while (!node.isNull())
+ {
+ if (node.nodeName() == "Action")
+ {
+ TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(node.toElement().attribute("name")));
+ if (action)
+ {
+ action->setModified(true);
+ QDomElement el = action->data();
+ el.setAttribute("shortcut", action->shortcut().toString());
+ el = node.toElement();
+ node = node.nextSibling();
+ el.parentNode().removeChild(el);
+ } else
+ {
+ node = node.nextSibling();
+ }
+ }
+ }
+ }
+}
+
+void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
+{
+ currentPageIndex = ToolbarTabWidget::ref()->currentPageIndex();
+ QDomNodeList nodeList;
+ ToolbarEntry *p_toolbar = 0L;
+
+ saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ KEditToolbar *dlg;
+ if (defaultToolbar)
+ dlg = new KEditToolbar(defaultToolbar, factory(), this);
+ else
+ dlg = new KEditToolbar(factory(), this);
+
+ KMenuBar *mb = menuBar();
+ KActionCollection *ac = actionCollection();
+ //remove the manually added menus BEFORE the dlg shows up
+ if (m_debugger->UI())
+ {
+ m_debugger->UI()->hideMenu();
+ }
+ for (uint i = 0 ; i < mb->count(); i++)
+ {
+ if (mb->text(mb->idAt(i)) == i18n("&Window"))
+ {
+ mb->removeItem(mb->idAt(i));
+ break;
+ }
+ }
+ ToolbarTabWidget *tb = ToolbarTabWidget::ref();
+ QString toolbarId;
+ for (int i = 0; i < tb->count(); i++)
+ {
+ toolbarId = tb->id(i);
+ p_toolbar = quantaApp->m_toolbarList[toolbarId];
+ if (p_toolbar)
+ {
+ delete p_toolbar->menu;
+ p_toolbar->menu = 0L;
+ }
+ }
+
+ connect(dlg, SIGNAL(newToolbarConfig()), SLOT(slotNewToolbarConfig()));
+ dlg->exec();
+ delete dlg;
+ QPopupMenu *menu = 0L;
+ m_tagsMenu = static_cast<QPopupMenu*>(factory()->container("tags", this));
+ QString toolbarName;
+ for (int i = 0; i < tb->count(); i++)
+ {
+ toolbarName = tb->label(i);
+ toolbarId = tb->id(i);
+ p_toolbar = quantaApp->m_toolbarList[toolbarId];
+ if (p_toolbar)
+ {
+ menu = new QPopupMenu(m_tagsMenu);
+ nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ KAction *action = ac->action(nodeList.item(i).toElement().attribute("name"));
+ if (action)
+ action->plug(menu);
+ }
+
+ m_tagsMenu->insertItem(toolbarName,menu);
+ p_toolbar->menu = menu;
+ }
+ }
+
+ //add back the menus
+ m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(factory()->container("plugins", this)));
+ m_pluginInterface->buildPluginMenu();
+ for (uint i = 0 ; i < mb->count(); i++)
+ {
+ if (mb->text(mb->idAt(i)) == i18n("&Settings"))
+ {
+ mb->insertItem(i18n("&Window"), windowMenu(), -1, i);
+ break;
+ }
+ }
+ if (m_debugger->UI())
+ {
+ m_debugger->UI()->showMenu();
+ }
+ tb->setCurrentPage(currentPageIndex);
+}
+
+void QuantaApp::slotOptionsConfigureToolbars()
+{
+ slotConfigureToolbars();
+}
+
+void QuantaApp::slotNewToolbarConfig()
+{
+ applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ ToolbarTabWidget::ref()->setCurrentPage(currentPageIndex);
+}
+
+void QuantaApp::slotShowMenuBar()
+{
+ if (menuBar()->isVisible())
+ menuBar()->hide();
+ else
+ menuBar()->show();
+}
+
+void QuantaApp::slotOptionsConfigureActions()
+{
+ ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg", true);
+ dlg.exec();
+}
+
+void QuantaApp::slotPreviewOptions()
+{
+ KMessageBox::information(this, i18n("Changes made in the preview configuration dialog are global and have effect on every application using the KHTML part to display web pages, including Konqueror."), i18n("Warning"), "configure_preview_warning");
+ KApplication::startServiceByDesktopName("quanta_preview_config");
+}
+
+void QuantaApp::slotOptions()
+{
+ KDialogBase *kd = new KDialogBase(KDialogBase::IconList,
+ i18n("Configure Quanta"),
+ KDialogBase::Ok | KDialogBase::Cancel,
+ KDialogBase::Ok, this, "tabdialog");
+
+ // Tag Style options
+ QVBox *page=kd->addVBoxPage(i18n("Tag Style"), QString::null, BarIcon("kwrite", KIcon::SizeMedium));
+ StyleOptionsS *styleOptionsS = new StyleOptionsS( (QWidget *)page);
+
+ styleOptionsS->tagCase->setCurrentItem( qConfig.tagCase);
+ styleOptionsS->attributeCase->setCurrentItem( qConfig.attrCase);
+ styleOptionsS->attributeQuotation->setCurrentItem( (qConfig.attrValueQuotation == '"') ? 0 : 1);
+ styleOptionsS->tagAutoClose->setChecked( qConfig.closeTags );
+ styleOptionsS->optionalTagAutoClose->setChecked( qConfig.closeOptionalTags );
+ styleOptionsS->useAutoCompletion->setChecked( qConfig.useAutoCompletion );
+ styleOptionsS->tagUpdateClosing->setChecked(qConfig.updateClosingTags);
+ styleOptionsS->replaceAccented->setChecked(qConfig.replaceAccented);
+
+ // Environment options
+ //TODO FileMasks name is not good anymore
+ page=kd->addVBoxPage(i18n("Environment"), QString::null, UserIcon("files", KIcon::SizeMedium ) );
+ FileMasks *fileMasks = new FileMasks((QWidget *)page);
+
+ fileMasks->lineMarkup->setText( qConfig.markupMimeTypes );
+ fileMasks->lineScript->setText( qConfig.scriptMimeTypes );
+ fileMasks->lineImage->setText( qConfig.imageMimeTypes );
+ fileMasks->lineText->setText( qConfig.textMimeTypes );
+ fileMasks->showDTDSelectDialog->setChecked(qConfig.showDTDSelectDialog);
+ m_config->setGroup("General Options");
+ fileMasks->showSplash->setChecked(m_config->readBoolEntry("Show Splash", true));
+ fileMasks->reloadProject->setChecked(m_config->readBoolEntry("Reload Project", true));
+ fileMasks->reloadFiles->setChecked(m_config->readBoolEntry("Reload Files", true));
+ if(!m_config->readEntry("Autosave interval").isEmpty())
+ fileMasks->sbAutoSave->setValue(m_config->readNumEntry("Autosave interval"));
+ //else default value 15
+
+ QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ fileMasks->encodingCombo->insertStringList( availableEncodingNames );
+ QStringList::ConstIterator iter;
+ int iIndex = -1;
+ for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
+ {
+ ++iIndex;
+ if ((*iter).lower() == qConfig.defaultEncoding.lower())
+ {
+ fileMasks->encodingCombo->setCurrentItem(iIndex);
+ break;
+ }
+ }
+ QStringList lst = DTDs::ref()->nickNameList(true);
+ uint pos = 0;
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ fileMasks->defaultDTDCombo->insertItem(lst[i]);
+ if (lst[i] == DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType.lower()))
+ pos = i;
+ }
+ fileMasks->defaultDTDCombo->setCurrentItem(pos);
+
+ // Preview options
+ page=kd->addVBoxPage(i18n("User Interface"), QString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
+ PreviewOptions *uiOptions = new PreviewOptions( (QWidget *)page );
+
+ uiOptions->setPosition(qConfig.previewPosition);
+ uiOptions->setDocPosition(qConfig.docPosition);
+ uiOptions->setWindowLayout(qConfig.windowLayout);
+ uiOptions->setCloseButtons(qConfig.showCloseButtons);
+ uiOptions->setToolviewTabs(qConfig.toolviewTabs);
+ uiOptions->setHiddenFiles(qConfig.showHiddenFiles);
+ uiOptions->setSaveTrees(qConfig.saveTrees);
+ if (m_config->hasGroup("Notification Messages"))
+ {
+ m_config->setGroup("Notification Messages");
+ uiOptions->warnBinaryOpening->setChecked(m_config->readEntry("Open Everything") != "yes");
+ uiOptions->warnEventActions->setChecked((m_config->readEntry("Warn about internal actions", "yes") != "yes") && (m_config->readEntry("Warn about external actions", "yes") != "yes"));
+ uiOptions->warnAll->setChecked(false);
+ } else
+ {
+ uiOptions->warnAll->setChecked(true);
+ uiOptions->warnBinaryOpening->setChecked(true);
+ uiOptions->warnEventActions->setChecked(true);
+ }
+ //kafka options
+ page = kd->addVBoxPage(i18n("VPL View"), QString::null, UserIcon("vpl_text", KIcon::SizeMedium));
+ KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (QWidget *)page );
+
+ page=kd->addVBoxPage(i18n("Parser"), QString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
+ ParserOptions *parserOptions = new ParserOptions( m_config, (QWidget *)page );
+
+ parserOptions->refreshFrequency->setValue(qConfig.refreshFrequency);
+ parserOptions->instantUpdate->setChecked(qConfig.instantUpdate);
+ parserOptions->showEmptyNodes->setChecked(qConfig.showEmptyNodes);
+ parserOptions->showClosingTags->setChecked(qConfig.showClosingTags);
+ parserOptions->spinExpand->setValue(qConfig.expandLevel);
+
+ page = kd->addVBoxPage(i18n("Abbreviations"), QString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
+ AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((QWidget*)(page));
+
+ bool reloadTrees = false;
+ kd->adjustSize();
+ if ( kd->exec() )
+ {
+ bool uiRebuildNeeded = false;
+ bool previewSettingsChanged = false;
+
+ qConfig.tagCase = styleOptionsS->tagCase->currentItem();
+ qConfig.attrCase = styleOptionsS->attributeCase->currentItem();
+ qConfig.attrValueQuotation = styleOptionsS->attributeQuotation->currentItem() == 0 ? '"': '\'';
+ qConfig.closeTags = styleOptionsS->tagAutoClose->isChecked();
+ qConfig.closeOptionalTags = styleOptionsS->optionalTagAutoClose->isChecked();
+ qConfig.useAutoCompletion = styleOptionsS->useAutoCompletion->isChecked();
+ qConfig.updateClosingTags = styleOptionsS->tagUpdateClosing->isChecked();
+ qConfig.replaceAccented = styleOptionsS->replaceAccented->isChecked();
+
+ qConfig.markupMimeTypes = fileMasks->lineMarkup->text();
+ qConfig.scriptMimeTypes = fileMasks->lineScript->text();
+ qConfig.imageMimeTypes = fileMasks->lineImage->text();
+ qConfig.textMimeTypes = fileMasks->lineText->text();
+ qConfig.showDTDSelectDialog = fileMasks->showDTDSelectDialog->isChecked();
+ qConfig.autosaveInterval = fileMasks->sbAutoSave->value();
+ autosaveTimer->start(60000 * qConfig.autosaveInterval, false);
+ m_config->setGroup("General Options");
+ m_config->writeEntry("Show Splash", fileMasks->showSplash->isChecked());
+ m_config->writeEntry("Reload Project", fileMasks->reloadProject->isChecked());
+ m_config->writeEntry("Reload Files", fileMasks->reloadFiles->isChecked());
+
+ qConfig.defaultEncoding = fileMasks->encodingCombo->currentText();
+ QString tmpStr = uiOptions->closeButtons();
+ if (tmpStr != qConfig.showCloseButtons)
+ uiRebuildNeeded = true;
+ qConfig.showCloseButtons = tmpStr;
+ uint tmp = uiOptions->toolviewTabs();
+ if (tmp != qConfig.toolviewTabs)
+ uiRebuildNeeded = true;
+ qConfig.toolviewTabs = tmp;
+ if (uiRebuildNeeded)
+ {
+ initTabWidget();
+ }
+ reloadTrees = (qConfig.showHiddenFiles != uiOptions->hiddenFiles());
+ qConfig.showHiddenFiles = uiOptions->hiddenFiles();
+ qConfig.saveTrees = uiOptions->saveTrees();
+ if (uiOptions->warnAll->isChecked())
+ m_config->deleteGroup("Notification Messages");
+ else
+ {
+ m_config->setGroup("Notification Messages");
+ m_config->writeEntry("Open Everything", uiOptions->warnBinaryOpening->isChecked() ? "" : "yes");
+ m_config->writeEntry("Warn about internal actions", uiOptions->warnEventActions->isChecked() ? "" : "yes");
+ m_config->writeEntry("Warn about external actions", uiOptions->warnEventActions->isChecked() ? "" : "yes");
+ }
+
+ qConfig.showEmptyNodes = parserOptions->showEmptyNodes->isChecked();
+ qConfig.showClosingTags = parserOptions->showClosingTags->isChecked();
+ qConfig.instantUpdate = parserOptions->instantUpdate->isChecked();
+ qConfig.refreshFrequency = parserOptions->refreshFrequency->value();
+ if (!qConfig.instantUpdate && qConfig.refreshFrequency > 0)
+ {
+ refreshTimer->changeInterval(qConfig.refreshFrequency*1000);
+ } else
+ {
+ refreshTimer->stop();
+ }
+ qConfig.expandLevel = parserOptions->spinExpand->value();
+ parserOptions->updateConfig();
+
+ kafkaOptions->updateConfig();
+ qConfig.quantaRefreshOnFocus = kafkaOptions->sourceFocusRefresh->isChecked();
+ qConfig.quantaRefreshDelay = kafkaOptions->sourceDelay->value();
+ qConfig.kafkaRefreshOnFocus = kafkaOptions->kafkaFocusRefresh->isChecked();
+ qConfig.kafkaRefreshDelay = kafkaOptions->kafkaDelay->value();
+ QuantaView *view = ViewManager::ref()->activeView();
+ if (view && view->document())
+ view->reloadUpdateTimers();
+ /**(static_cast<HTMLEnhancer *>(quantaApp->view()->getKafkaInterface()->mainEnhancer))->
+ showIconsForScripts(kafkaOptions->showScriptsIcon->isChecked());*/
+
+
+ qConfig.defaultDocType = DTDs::ref()->getDTDNameFromNickName(fileMasks->defaultDTDCombo->currentText());
+
+ abbreviationOptions->saveTemplates();
+
+ tmpStr = uiOptions->position();
+ if (tmpStr != qConfig.previewPosition)
+ {
+ if (m_previewVisible || m_previewToolView)
+ previewSettingsChanged = true;
+ slotShowPreviewWidget(false);
+ }
+ qConfig.previewPosition = tmpStr;
+ if (previewSettingsChanged)
+ slotShowPreviewWidget(true);
+ qConfig.docPosition = uiOptions->docPosition();
+ qConfig.windowLayout = uiOptions->layout();
+
+ m_htmlPart->closeURL();
+ m_htmlPart->begin( Project::ref()->projectBaseURL());
+ m_htmlPart->write(" ");
+ m_htmlPart->end();
+
+ reparse(true);
+ slotNewStatus();
+ }
+
+ m_config->sync();
+
+ saveOptions();
+
+ delete kd;
+ if (reloadTrees) emit reloadAllTrees();
+
+}
+
+void QuantaApp::slotShowPreviewWidget(bool show)
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if (!view) return;
+ if (m_previewVisible == show) return;
+ if (show)
+ {
+ if (qConfig.previewPosition == "Editor")
+ {
+ delete m_previewToolView;
+ m_previewToolView = 0L;
+ view->addCustomWidget(m_htmlPart->view(), QString::null);
+ } else
+ {
+ if (!m_previewToolView)
+ {
+ m_previewToolView= addToolWindow(m_htmlPart->view(), prevDockPosition(m_htmlPart->view(), KDockWidget::DockBottom), getMainDockWidget());
+ connect(m_previewToolView->wrapperWidget(), SIGNAL(iMBeingClosed
+()), this, SLOT(slotPreviewBeingClosed()));
+ }
+ m_htmlPart->view()->show();
+ m_previewToolView->show();
+ }
+ m_previewVisible = true;
+ slotRepaintPreview();
+ } else
+ {
+ m_noFramesPreview = false;
+ m_previewVisible = false;
+ m_htmlPart->view()->reparent(this, 0, QPoint(), false);
+ m_htmlPart->view()->resize(0, 0);
+ m_htmlPart->view()->hide();
+ if (qConfig.previewPosition == "Editor")
+ {
+ view->addCustomWidget(0L, QString::null);
+ delete m_previewToolView;
+ m_previewToolView = 0L;
+ } else
+ {
+ delete m_previewToolView;
+ m_previewToolView = 0L;
+ }
+ if (m_previewedDocument)
+ {
+ KURL url = m_previewedDocument->url();
+ url.setFileName("preview-" + url.fileName());
+ KIO::NetAccess::del(url, this);
+ Document *w = view->document();
+ if (w)
+ w->view()->setFocus();
+ }
+ }
+
+ KToggleAction *ta = 0L;
+ int viewLayout = view->currentViewsLayout();
+ if (viewLayout == QuantaView::SourceOnly)
+ ta = (KToggleAction *) actionCollection()->action( "show_quanta_editor" );
+ else if (viewLayout == QuantaView::VPLOnly)
+ ta = (KToggleAction *) actionCollection()->action( "show_kafka_view" );
+ else if (viewLayout == QuantaView::SourceAndVPL)
+ {
+ ta = (KToggleAction *) actionCollection()->action( "show_kafka_and_quanta" );
+ }
+ if (ta)
+ {
+ ta->setChecked(!show);
+ }
+}
+
+void QuantaApp::slotChangePreviewStatus()
+{
+ if (qConfig.previewPosition == "Editor")
+ {
+ slotShowPreviewWidget(false);
+ } else
+ if (m_previewToolView && m_htmlPart->view()->isVisible())
+ {
+ //hiding the preview when it's in a toolview means that the current tab has changed,
+ //so we just repaint the content and restore the document on the disc.
+ m_previewVisible = true;
+ if (m_previewedDocument)
+ {
+ KURL url = m_previewedDocument->url();
+ url.setFileName("preview-" + url.fileName());
+ KIO::NetAccess::del(url, this);
+ }
+ slotRepaintPreview();
+ m_previewedDocument = 0L;
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ w->view()->setFocus();
+ }
+}
+
+void QuantaApp::slotPreviewHasFocus(bool focus)
+{
+ if (m_previewToolView)
+ {
+ if (focus)
+ slotRepaintPreview();
+ else
+ {
+ if (m_previewedDocument)
+ {
+ KURL url = m_previewedDocument->url();
+ url.setFileName("preview-" + url.fileName());
+ KIO::NetAccess::del(url, this);
+ }
+ m_previewedDocument = 0L;
+ }
+ }
+}
+
+void QuantaApp::slotToggleShowPreview()
+{
+ Document *w =ViewManager::ref()->activeDocument();
+ if (!w)
+ {
+ m_previewVisible = false;
+ return;
+ }
+ if (m_previewToolView)
+ {
+ m_previewVisible = m_htmlPart->view()->isVisible();
+ }
+ slotShowPreviewWidget(!m_previewVisible);
+ m_noFramesPreview = false;
+}
+
+void QuantaApp::slotShowNoFramesPreview()
+{
+ m_noFramesPreview = true;
+ slotToggleShowPreview();
+}
+
+
+void QuantaApp::newCursorPosition(const QString &file, int lineNumber, int columnNumber)
+{
+ Q_UNUSED(file);
+ typingInProgress = true;
+ startIdleTimer();
+ // updateTreeViews();
+ QString linenumber;
+ linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber);
+ statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
+ statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR);
+ statusBar()->changeItem("",IDS_MODIFIED);
+}
+
+void QuantaApp::newDebuggerPosition(const QString &file, int lineNumber)
+{
+ newCursorPosition(file, lineNumber, 0);
+}
+
+void QuantaApp::openFile(const QString &file, int lineNumber, int columnNumber)
+{
+ gotoFileAndLine(file, lineNumber, columnNumber);
+ slotNewStatus();
+}
+
+void QuantaApp::slotNewLineColumn()
+{
+ typingInProgress = true;
+ startIdleTimer();
+ // updateTreeViews();
+ QString linenumber;
+ oldCursorLine = cursorLine;
+ oldCursorCol = cursorCol;
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ w->viewCursorIf->cursorPosition(&cursorLine, &cursorCol);
+ linenumber = i18n("Line: %1 Col: %2").arg(cursorLine+1).arg(cursorCol+1);
+ statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
+}
+
+void QuantaApp::updateTreeViews()
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if (!view)
+ return;
+ Document *w = view->document();
+ if (w)
+ {
+ w->viewCursorIf->cursorPositionReal(&cursorLine, &cursorCol);
+ Node *node = parser->nodeAt(cursorLine, cursorCol);
+ if (node)
+ {
+ StructTreeView::ref()->showTagAtPos(node);
+ }
+ if(view->hadLastFocus() == QuantaView::SourceFocus)
+ aTab->setCurrentNode(node);
+ }
+}
+
+void QuantaApp::slotIdleTimerExpired()
+{
+ if (idleTimer)
+ {
+ typingInProgress = false;
+ updateTreeViews();
+ }
+}
+
+void QuantaApp::startIdleTimer()
+{
+ if (m_idleTimerEnabled && idleTimer)
+ idleTimer->start(500, true);
+}
+
+bool QuantaApp::slotEnableIdleTimer(bool enable)
+{
+ bool status = m_idleTimerEnabled;
+ if (enable)
+ startIdleTimer();
+ else
+ if (idleTimer)
+ idleTimer->stop();
+ m_idleTimerEnabled = enable;
+ return status;
+}
+
+void QuantaApp::slotReparse()
+{
+ reparse(false);
+}
+
+void QuantaApp::slotForceReparse()
+{
+ reparse(true);
+}
+
+/** reparse current document and initialize node. */
+void QuantaApp::reparse(bool force)
+{
+ if (!parser || !m_parserEnabled)
+ return;
+ //temp
+// if (!parser->activated()) return;
+ typingInProgress = false;
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ if (force)
+ {
+ baseNode = parser->parse(w, true);
+ }
+
+ if (w->hasChanged() || force)
+ {
+ slotReloadStructTreeView();
+ }
+
+ if (force)
+ {
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col);
+ if (StructTreeView::ref()->isVisible() && node)
+ StructTreeView::ref()->showTagAtPos(node);
+ aTab->setCurrentNode(node);
+ }
+ }
+
+ return;
+}
+
+void QuantaApp::setCursorPosition( int row, int col )
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ int numLines = w->editIf->numLines();
+
+ if ( row < numLines )
+ w->viewCursorIf->setCursorPositionReal(row, col);
+ else
+ w->viewCursorIf->setCursorPositionReal(numLines - 1, col);
+ }
+}
+
+void QuantaApp::gotoFileAndLine(const QString& filename, int line, int column)
+{
+ // First, check if we're already showing this file
+ Document *w = ViewManager::ref()->activeDocument();
+ KURL currentfilename, newfilename;
+ if(w)
+ {
+ currentfilename = w->url();
+ newfilename.setPath(filename);
+ }
+
+ // If a filename is specified and that file is not already active, openn it
+ if (!filename.isEmpty() && !currentfilename.equals(filename))
+ {
+ QuantaView* view = ViewManager::ref()->isOpened(KURL::fromPathOrURL(filename));
+ // If it's already opened, just activate it
+ if (view)
+ {
+ view->activate();
+ view->activated();
+ } else
+ {
+ // Otherwise open it
+ m_doc->openDocument( KURL::fromPathOrURL( filename ) );
+ }
+ }
+ // We have to do this again, in case activedocument changed since last check (ie a file was opened)
+ w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ int numLines = w->editIf->numLines();
+ if ( numLines > line && line >= 0 )
+ {
+ // Jump to the correct line/col
+ w->viewCursorIf->setCursorPositionReal(line, column);
+ }
+ w->view()->setFocus();
+ }
+}
+
+void QuantaApp::selectArea(int line1, int col1, int line2, int col2)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ int numLines = w->editIf->numLines();
+
+ if ( line1 > numLines-1 )
+ line1 = numLines-1;
+
+ if ( line2 > numLines-1 )
+ line2 = numLines-1;
+
+ w->viewCursorIf->setCursorPositionReal(line2, col2);
+ if (w->selectionIf)
+ w->selectionIf->setSelection(line1, col1, line2, col2);
+ }
+}
+
+void QuantaApp::openDoc(const QString& url)
+{
+ if (qConfig.docPosition == "Tab")
+ {
+ QuantaView *docView = ViewManager::ref()->documentationView();
+ delete m_documentationToolView;
+ m_documentationToolView = 0L;
+ docView->activate();
+ } else
+ {
+ QuantaView *docView = ViewManager::ref()->documentationView(false);
+ if (docView)
+ ViewManager::ref()->removeView(docView);
+ if (!m_documentationToolView)
+ m_documentationToolView= addToolWindow(m_htmlPartDoc->view(), prevDockPosition(m_htmlPartDoc->view(), KDockWidget::DockBottom), getMainDockWidget());
+ m_htmlPartDoc->view()->show();
+ m_documentationToolView->show();
+ }
+ m_htmlPartDoc->view()->setFocus(); // activates the part
+
+ QString urlStr = url;
+ if (urlStr.startsWith("/"))
+ urlStr.prepend("file:");
+ KURL u(urlStr);
+ if (u == m_htmlPartDoc->url())
+ return;
+
+ m_htmlPartDoc->closeURL();
+ m_htmlPartDoc->openURL(u);
+ m_htmlPartDoc->show();
+ m_htmlPartDoc->addToHistory(urlStr);
+}
+
+void QuantaApp::slotContextHelp()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QString currentWord = "";
+ parser->setSAParserEnabled(false);
+ reparse(true);
+ parser->setSAParserEnabled(true);
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col);
+ if (node && node->tag->type == Tag::XmlTag)
+ {
+ currentWord = node->tag->name;
+ } else
+ {
+ currentWord = w->currentWord();
+ }
+ const DTDStruct *dtd = w->currentDTD(true);
+ QString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
+ if (url)
+ openDoc(*url);
+ }
+}
+
+void QuantaApp::slotShowMessagesView()
+{
+ makeDockVisible(dynamic_cast<KDockWidget*>(m_messageOutputView->wrapperWidget()));
+}
+
+void QuantaApp::slotShowProblemsView()
+{
+ makeDockVisible(dynamic_cast<KDockWidget*>(m_problemsOutputView->wrapperWidget()));
+}
+
+void QuantaApp::slotShowAnnotationView()
+{
+ makeDockVisible(dynamic_cast<KDockWidget*>(m_annotationOutputView->wrapperWidget()));
+}
+
+QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+{
+
+ QString tabname = element.attribute( "i18ntabname", "" );
+ QString idStr = element.attribute( "id", "" );
+
+ if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty())
+ {
+//avoid QToolBar warning in the log
+ QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
+ ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
+ QWidget *w = new QWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
+ QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name"), true, true);
+ tb->loadState(element);
+ tb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
+
+ //kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl;
+ if (toolbarTab->iconText() == KToolBar::IconTextBottom)
+ {
+ tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
+ toolbarTab->setFixedHeight(toolbarTab->tabHeight() + tb->height() + 3);
+ } else
+ {
+ tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + 10);
+ toolbarTab->setFixedHeight(toolbarTab->tabHeight() + tb->height() + 3);
+ }
+/*
+ kdDebug(24000) << "tb->height() " << tb->height() << endl;
+ kdDebug(24000) << "toolbarTab->height() " << toolbarTab->height() << endl;
+ kdDebug(24000) << "toolbarTab->tabHeight() " << toolbarTab->tabHeight() << endl;
+*/
+ toolbarTab->insertTab(tb, tabname, idStr);
+ qInstallMsgHandler( oldHandler );
+
+ connect(tb, SIGNAL(removeAction(const QString&, const QString&)),
+ SLOT(slotRemoveAction(const QString&, const QString&)));
+ connect(tb, SIGNAL(editAction(const QString&)),
+ SLOT(slotEditAction(const QString&)));
+ return tb;
+ }
+
+ return KMainWindow::createContainer( parent, index, element, id );
+
+}
+
+void QuantaApp::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
+{
+ if (dynamic_cast<QuantaToolBar*>(container))
+ {
+ ToolbarTabWidget::ref()->removePage(container);
+ }
+ else
+ KMainWindow::removeContainer( container, parent, element, id );
+}
+
+void QuantaApp::slotBack()
+{
+ if (ViewManager::ref()->documentationView(false) == ViewManager::ref()->activeView())
+ {
+ m_htmlPartDoc->back();
+ } else
+ if (m_previewVisible && (!m_previewToolView || m_htmlPart->view()->hasFocus()))
+ {
+ m_htmlPart->back();
+ } else
+ {
+ activatePrevWin();
+ }
+}
+
+void QuantaApp::slotForward()
+{
+ if (ViewManager::ref()->documentationView(false) == ViewManager::ref()->activeView())
+ {
+ m_htmlPartDoc->forward();
+ } else
+ if (m_previewVisible && (!m_previewToolView || m_htmlPart->view()->hasFocus()))
+ {
+ m_htmlPart->forward();
+ } else
+ {
+ activateNextWin();
+ }
+}
+
+void QuantaApp::slotInsertFile(const KURL& url)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ w->insertFile(url);
+ }
+}
+
+void QuantaApp::slotContextMenuAboutToShow()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("popup_editor",this));
+ QString name;
+ uint line, col;
+ int bl, bc, el, ec;
+ QString tagStr;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col, false);
+ if (node)
+ {
+ if (node->tag->dtd()->family == Script)
+ {
+ StructTreeGroup group;
+ uint count = node->tag->dtd()->structTreeGroups.count();
+ for (uint i = 0; i < count; i++)
+ {
+ group = node->tag->dtd()->structTreeGroups[i];
+ if (group.hasFileName)
+ {
+ if (!group.hasDefinitionRx )
+ continue;
+ tagStr = node->tag->tagStr();
+ int pos = 0;
+ while (pos != -1)
+ {
+ pos = group.definitionRx.search(node->tag->cleanStr, pos);
+ if (pos != -1)
+ {
+ QString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
+ name = tagStr.mid(pos, group.definitionRx.matchedLength());
+ node->tag->beginPos(bl, bc);
+ QString tmpStr = tagStr.left(pos);
+ int newLines = tmpStr.contains('\n');
+ bl += newLines;
+ int l = tmpStr.findRev('\n'); //the last EOL
+ bc = (l == -1) ? bc+pos : pos - l - 1;
+ newLines = name.contains('\n');
+ l = name.length();
+ el = bl + newLines;
+ ec = (newLines > 0) ? l - name.findRev('\n') : bc + l - 1;
+ pos += l;
+ int p = group.definitionRx.search(cleanName);
+ if (p != -1)
+ {
+ name = name.mid(p, group.definitionRx.matchedLength());
+ } else
+ name = "";
+ if (QuantaCommon::isBetween(line, col, bl, bc, el, ec) == 0)
+ {
+ break;
+ } else
+ {
+ name = "";
+ }
+ }
+ }
+ name.remove(group.fileNameRx);
+ if (!name.isEmpty())
+ break;
+ }
+ }
+ } else
+ {
+ QMap<QString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
+
+ if (it != node->tag->dtd()->xmlStructTreeGroups.constEnd())
+ {
+ XMLStructGroup group = it.data();
+ uint count = group.attributes.count();
+ for (uint j = 0; j < count; j++ )
+ if (node->tag->hasAttribute(group.attributes[j]))
+ {
+ name.append(node->tag->attributeValue(group.attributes[j]));
+ name.append(" | ");
+ }
+ name = name.left(name.length()-3);
+ name.remove('\n');
+ }
+ }
+ }
+ KAction *action = actionCollection()->action("open_file_under_cursor");
+ if (action)
+ {
+ if (!name.isEmpty())
+ {
+ KURL baseUrl = QExtFileInfo::path(w->url());
+ urlUnderCursor = baseUrl;
+ QuantaCommon::setUrl(urlUnderCursor, name.stripWhiteSpace());
+ urlUnderCursor = QExtFileInfo::toAbsolute(urlUnderCursor, baseUrl);
+ action->setText(i18n("Open File: %1").arg(KStringHandler::lsqueeze(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol), 80)));
+ action->setEnabled(true);
+ } else
+ {
+ action->setText(i18n("Open File: none"));
+ action->setEnabled(false);
+ }
+ }
+ action = actionCollection()->action("upload_file");
+ if (action)
+ {
+ action->setEnabled(Project::ref()->contains(w->url()));
+ }
+
+ // If we have a debugger session active...
+ if(debugger() && debugger()->hasClient())
+ {
+ int startpos;
+ QString word;
+
+ // If we have a selection made, thats what we want to use for watching, setting etc
+ if (w->selectionIf && w->selectionIf->hasSelection())
+ {
+ word = w->selectionIf->selection();
+ }
+ else
+ {
+ // Otherwise, find the word under the cursor
+ word = w->editIf->textLine(w->viewCursorIf->cursorLine());
+ startpos = word.findRev(QRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
+
+ word.remove(0, startpos);
+ if(word.left(1) != "$")
+ word.remove(0, 1);
+
+ word = word.left(word.find(QRegExp("[^a-zA-Z0-9_]"), 1));
+ }
+ // If we have a linebreak, take everything before the break
+ startpos = word.find("\n");
+ if(startpos > 0)
+ word = word.left(startpos);
+
+ // Trim whitespace from the beginning and end of the string
+ word = word.stripWhiteSpace();
+
+ // now we have a word, possibly the name of a variable
+ popupWord = word;
+
+ // The word we display in the popup will be cut off not to make an obeast pop up menu
+ if(word.length() > 23)
+ {
+ word.mid(20);
+ word += "...";
+ }
+
+ // If we have the addwatch action...
+ action = actionCollection()->action("debug_addwatch");
+ if(action)
+ {
+ action->setText(i18n("Add Watch: '%1'").arg(word));
+ action->setEnabled(!word.isEmpty());
+
+ if(!action->isPlugged(popup))
+ action->plug(popup);
+ }
+
+ // Dito for the set action
+ action = actionCollection()->action("debug_variable_set");
+ if(action)
+ {
+ action->setText(i18n("Set Value of '%1'").arg(word));
+ action->setEnabled(!word.isEmpty());
+
+ if(!action->isPlugged(popup))
+ action->plug(popup);
+ }
+
+ // Dito for the "break when" action
+ action = actionCollection()->action("debug_conditional_break");
+ if(action)
+ {
+ action->setText(i18n("Break When '%1'...").arg(word));
+ action->setEnabled(!word.isEmpty());
+
+ if(!action->isPlugged(popup))
+ action->plug(popup);
+ }
+ }
+ else
+ {
+ action = actionCollection()->action("debug_addwatch");
+ if(action && action->isPlugged(popup))
+ action->unplug(popup);
+ action = actionCollection()->action("debug_variable_set");
+ if(action && action->isPlugged(popup))
+ action->unplug(popup);
+ action = actionCollection()->action("debug_conditional_break");
+ if(action && action->isPlugged(popup))
+ action->unplug(popup);
+ }
+ }
+
+}
+
+void QuantaApp::slotOpenFileUnderCursor()
+{
+ if (QExtFileInfo::exists(urlUnderCursor, true, this))
+ {
+ if (QuantaCommon::checkMimeGroup(urlUnderCursor, "text" ))
+ {
+ slotFileOpen(urlUnderCursor, defaultEncoding());
+ }
+ else if (QuantaCommon::checkMimeGroup(urlUnderCursor, "image" ))
+ {
+ slotShowPreviewWidget(true);
+ slotImageOpen(urlUnderCursor);
+ }
+ } else
+ {
+ KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg(urlUnderCursor.prettyURL(0, KURL::StripFileProtocol)));
+
+ }
+}
+
+/** Load an user toolbar file from the disk. */
+void QuantaApp::slotLoadToolbarFile(const KURL& url)
+{
+ QDictIterator<ToolbarEntry> it(m_toolbarList);
+ ToolbarEntry *p_toolbar;
+ while (it.current())
+ {
+ p_toolbar = it.current();
+ ++it;
+ if (url == p_toolbar->url)
+ return;
+ }
+ QDomDocument actionDom;
+
+ QTextStream str;
+ str.setEncoding(QTextStream::UnicodeUTF8);
+ QString fileName = url.path();
+
+ if ( url.fileName().endsWith(toolbarExtension) )
+ {
+ QDomDocument *toolbarDom = new QDomDocument();
+//extract the files from the archives
+ KTar tar(fileName);
+ if (tar.open(IO_ReadOnly))
+ {
+ QString base = QFileInfo(fileName).baseName();
+ KArchiveFile* file = (KArchiveFile *) tar.directory()->entry(base+".toolbar");
+ if (file)
+ {
+ QIODevice *device = file->device();
+ toolbarDom->setContent(device);
+ delete device;
+ }
+ file = (KArchiveFile *) tar.directory()->entry(base+".actions");
+ if (file)
+ {
+ QIODevice *device = file->device();
+ actionDom.setContent(device);
+ delete device;
+ }
+
+ tar.close();
+ }
+ if ( (toolbarDom->toString().isEmpty()) ) //|| (actionContent.isEmpty()))
+ {
+ KMessageBox::error(this, i18n("Cannot load the toolbars from the archive.\nCheck that the filenames inside the archives begin with the archive name."));
+ delete toolbarDom;
+ return;
+ }
+
+ QDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
+ QString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
+
+ //search for another toolbar with the same name
+ QPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
+ QString newName = name;
+ QString i18nName = i18n(name.utf8());
+ QString origName = name;
+ bool found = false;
+ bool nameModified = false;
+ int count = 2;
+ do
+ {
+ uint index = 0;
+ while (index < xml_clients.count())
+ {
+ name = newName;
+ if (index == 0)
+ found = false;
+ nodeList = xml_clients.at(index)->domDocument().elementsByTagName("ToolBar");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower())
+ {
+ newName = origName + QString(" (%1)").arg(count);
+ i18nName = i18n(origName.utf8()) + QString(" (%1)").arg(count);
+ nameModified = true;
+ count++;
+ found = true;
+ break;
+ }
+ }
+ if (found)
+ {
+ index = 0;
+ } else
+ {
+ index++;
+ }
+ }
+ } while (name == newName && found);
+ name = newName;
+
+ p_toolbar = new ToolbarEntry;
+
+ QDomDocument *dom = new QDomDocument();
+ dom->setContent(toolbarDom->toString());
+ p_toolbar->dom = dom;
+ p_toolbar->nameModified = nameModified;
+
+ QString s = i18nName.lower();
+ QString toolbarId = s;
+ QRegExp rx("\\s|\\.");
+ toolbarId.replace(rx, "_");
+ int n = 1;
+ while (m_toolbarList.find(toolbarId) != 0L)
+ {
+ toolbarId = s + QString("%1").arg(n);
+ toolbarId.replace(rx, "_");
+ n++;
+ }
+
+
+ userToolbarsCount++;
+
+ //Change the name also in the XML File -> create a temp XML file
+ KTempFile* tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+
+ nodeList = toolbarDom->elementsByTagName("ToolBar");
+ QDomElement el = nodeList.item(0).toElement();
+ el.setAttribute("name", name.lower());
+ el.setAttribute("tabname", name);
+ el.setAttribute("i18ntabname", i18nName);
+ el.setAttribute("id", toolbarId);
+ nodeList = toolbarDom->elementsByTagName("text");
+ el.firstChild().setNodeValue(name);
+ tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ * (tempFile->textStream()) << toolbarDom->toString();
+ tempFile->close();
+
+ //create the new toolbar GUI from the temp file
+ ToolbarXMLGUI * toolbarGUI = new ToolbarXMLGUI(tempFile->name());
+
+ //setup the actions
+ nodeList = actionDom.elementsByTagName("action");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ QDomNode node = nodeList.item(i).cloneNode();
+ el = node.toElement();
+ QString actionName = el.attribute("name");
+ //if there is no such action yet, add to the available actions
+ if (!actionCollection()->action(actionName))
+ {
+ bool toggable = (el.attribute("toggable", "") == "true");
+ TagAction *tagAction = new TagAction(&el, this, toggable);
+ m_tagActions.append(tagAction);
+
+ //add the actions to every toolbar xmlguiclient
+ QDictIterator<ToolbarEntry> it(m_toolbarList);
+ while (it.current())
+ {
+ it.current()->guiClient->actionCollection()->insert(tagAction);
+ ++it;
+ }
+
+ //Compatility code (read the action shortcuts from quantaui.rc)
+ //TODO: Remove after upgrade from 3.1 is not supported
+ if (oldShortcuts.contains(actionName))
+ {
+ tagAction->setModified(true);
+ tagAction->data().setAttribute("shortcut", oldShortcuts[actionName]);
+ tagAction->setShortcut(KShortcut(oldShortcuts[actionName]));
+ }
+ } else
+ {
+ // kdDebug(24000) << "The action " << actionName << " is already present!" << endl;
+ TagAction *tagAction = dynamic_cast<TagAction*>(actionCollection()->action(actionName));
+ if (tagAction)
+ tagAction->setModified(true);
+ }
+ }
+
+ //add all actions to the xmlguiclient of this toolbar
+ for (uint i = 0 ; i < actionCollection()->count(); i++)
+ toolbarGUI->actionCollection()->insert(actionCollection()->action(i));
+
+ guiFactory()->addClient(toolbarGUI);
+
+ //Plug in the actions & build the menu
+ QPopupMenu *menu = new QPopupMenu;
+ KAction *action;
+ nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ action = actionCollection()->action(nodeList.item(i).cloneNode().toElement().attribute("name") );
+ if (action)
+ {
+ action->plug(menu);
+ }
+ }
+
+ m_tagsMenu->insertItem(i18nName, menu);
+ p_toolbar->menu = menu;
+
+ tempFileList.append(tempFile);
+ p_toolbar->guiClient = toolbarGUI;
+ p_toolbar->name = name;
+ p_toolbar->id = toolbarId;
+ p_toolbar->url = url;
+ p_toolbar->visible = true;
+ p_toolbar->user = true; //TODO
+ m_toolbarList.insert(toolbarId, p_toolbar);
+ delete toolbarDom;
+
+ slotToggleDTDToolbar(!allToolbarsHidden());
+ }
+}
+
+/** Show the toolbar which is in url. If it was not loaded yet, it loads the
+ toolbar from the file */
+void QuantaApp::showToolbarFile(const KURL &url)
+{
+ ToolbarEntry *p_toolbar = toolbarByURL(url);
+ if (!p_toolbar)
+ {
+ slotLoadToolbarFile(url);
+ p_toolbar = toolbarByURL(url);
+ if (p_toolbar)
+ {
+ p_toolbar->user = false;
+ userToolbarsCount--;
+ }
+ } else
+ {
+ QDomNodeList nodeList;
+ QPopupMenu *menu = new QPopupMenu;
+ KAction *action;
+ KActionCollection *ac = actionCollection();
+ nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ action = ac->action(nodeList.item(i).toElement().attribute("name") );
+ if (action)
+ {
+ action->plug(menu);
+ }
+ }
+ m_tagsMenu->insertItem(i18n(p_toolbar->name.utf8()),menu);
+ p_toolbar->menu = menu;
+ p_toolbar->guiClient->reloadXML();
+ guiFactory()->addClient(p_toolbar->guiClient);
+ p_toolbar->visible = true;
+ }
+}
+
+/** Load an user toolbar from the disk. */
+void QuantaApp::slotLoadToolbar()
+{
+ KURL::List urls = KFileDialog::getOpenURLs(locateLocal("data",resourceDir + "toolbars/"), "*"+toolbarExtension, this);
+ if (!urls.isEmpty())
+ {
+ for (KURL::List::ConstIterator it = urls.constBegin(); it != urls.constEnd(); ++it)
+ slotLoadToolbarFile(*it);
+ }
+}
+
+/** Load an user toolbar from the disk. */
+void QuantaApp::slotLoadGlobalToolbar()
+{
+ KURL::List urls = KFileDialog::getOpenURLs(qConfig.globalDataDir +resourceDir + "toolbars/", "*"+toolbarExtension+"\n*", this);
+ if (!urls.isEmpty())
+ {
+ for (KURL::List::ConstIterator it = urls.constBegin(); it != urls.constEnd(); ++it)
+ slotLoadToolbarFile(*it);
+ }
+}
+
+KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFile)
+{
+ KURL tarFile = destFile;
+
+ if (! destFile.fileName().endsWith(toolbarExtension))
+ {
+ tarFile.setFileName(destFile.fileName() + toolbarExtension);
+ }
+
+ QBuffer buffer;
+ buffer.open(IO_ReadWrite);
+ QString toolStr;
+ QTextStream toolStream(&toolStr, IO_ReadWrite);
+ toolStream.setEncoding(QTextStream::UnicodeUTF8);
+
+ QBuffer buffer2;
+ buffer2.open(IO_WriteOnly);
+ QTextStream actStr(&buffer2);
+ actStr.setEncoding(QTextStream::UnicodeUTF8);
+
+ QDomNodeList nodeList, nodeList2;
+
+ toolStream << "<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n";
+ actStr << QString("<!DOCTYPE actionsconfig>\n<actions>\n");
+
+//look up the clients
+ QPtrList<KXMLGUIClient> xml_clients = factory()->clients();
+ for (uint index = 0; index < xml_clients.count(); index++)
+ {
+ nodeList = xml_clients.at(index)->domDocument().elementsByTagName("ToolBar");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ //find the actual toolbar in the XML GUI
+ if ((nodeList.item(i).cloneNode().toElement().attribute("id") ) == toolbarName)
+ {
+
+ //find the actions registered to the toolbar
+ QDomNode n = nodeList.item(i).firstChild();
+ while (! n.isNull())
+ {
+ QDomElement e = n.toElement();
+ if (e.tagName() == "Action")
+ {
+ TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(e.attribute("name")));
+ if (action)
+ {
+ action->data().save(actStr,1);
+ action->setModified(false);
+ }
+ } else
+ if (e.tagName() == "_Separator_")
+ {
+ e.setTagName("Separator");
+ }
+ n = n.nextSibling();
+ }
+ QDomElement e = nodeList.item(0).toElement();
+ QString i18nName = e.attribute("i18ntabname");
+ QString id = e.attribute("id");
+ e.removeAttribute("i18ntabname");
+ e.removeAttribute("id");
+ nodeList.item(i).save(toolStream,2);
+ e.setAttribute("i18ntabname", i18nName);
+ e.setAttribute("id", id);
+ }
+ }
+ }
+ toolStream << QString("\n</kpartgui>");
+ actStr << QString("\n</actions>");
+ //buffer.flush();
+
+ ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
+ QDomDocument *oldDom = p_toolbar->dom;
+ QDomDocument *dom = new QDomDocument();
+ QString s = toolStr;
+ QString error;
+ int el, ec;
+ if (!dom->setContent(s, &error, &el, &ec))
+ kdError(24000) << QString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
+ p_toolbar->dom = dom;
+
+ QTextStream bufferStr(&buffer);
+ bufferStr.setEncoding(QTextStream::UnicodeUTF8);
+ bufferStr << toolStr;
+ buffer.close();
+ buffer2.close();
+
+ KTempFile *tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ tempFile->close();
+ KTar tar(tempFile->name(), "application/x-gzip");
+ if (!tar.open(IO_WriteOnly))
+ return KURL();
+ if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
+ return KURL();
+ if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
+ return KURL();
+ tar.close();
+ if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this))
+ {
+ KMessageBox::error(this, i18n("<qt>An error happened while saving the <b>%1</b> toolbar.<br>"
+ "Check that you have write permissions for<br><b>%2</b>.<br><br>This might happen if you tried save to save a global toolbar as a simple user. Use <i>Save As</i> or <i>Toolbars->Save Toolbars->Save as Local Toolbar</i> in this case. </qt>").arg(p_toolbar->name).arg(tarFile.prettyURL(0, KURL::StripFileProtocol)), i18n("Toolbar Saving Error"));
+ tarFile = KURL();
+ delete p_toolbar->dom;
+ p_toolbar->dom = oldDom;
+ } else
+ delete oldDom;
+ delete tempFile;
+ return tarFile;
+}
+
+/** Saves a toolbar as local or project specific. */
+bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, const KURL& destURL)
+{
+ int query;
+ KURL url;
+ KURL projectToolbarsURL;
+ QString toolbarName;
+ QString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
+
+ if (toolbarToSave.isEmpty())
+ {
+ ToolbarTabWidget *tb = ToolbarTabWidget::ref();
+
+ QStringList lst;
+ QStringList idLst;
+ int current=0;
+ for (int i = 0; i < tb->count(); i++)
+ {
+ lst << tb->label(i);
+ idLst << tb->id(i);
+ if ( tb->tabLabel(tb->currentPage()) == tb->label(i) ) current=i;
+ }
+
+ bool ok = false;
+ QString res = KInputDialog::getItem(
+ i18n( "Save Toolbar" ),
+ i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
+ if ( !ok )
+ return false;
+
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ if (lst[i] == res)
+ {
+ toolbarName = idLst[i];
+ break;
+ }
+ }
+ } else
+ {
+ toolbarName = toolbarToSave;
+ }
+ ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
+ QString toolbarFileName = p_toolbar->url.fileName(false);
+ QString toolbarRelPath = p_toolbar->url.url();
+ if (toolbarRelPath.startsWith("file://" + qConfig.globalDataDir))
+ {
+ toolbarRelPath.remove("file://" + qConfig.globalDataDir + resourceDir + "toolbars/");
+ toolbarRelPath.remove(toolbarFileName);
+ }
+ else
+ {
+ toolbarRelPath = "";
+ }
+ toolbarFileName.remove(".toolbar.tgz");
+ if (destURL.isEmpty())
+ {
+ do {
+ query = KMessageBox::Yes;
+
+ if (localToolbar)
+ {
+ url = KFileDialog::getSaveURL(localToolbarsDir + toolbarRelPath + toolbarFileName, "*"+toolbarExtension, this);
+ } else
+ {
+ url = KFileDialog::getSaveURL(Project::ref()->toolbarURL().url() + toolbarFileName, "*"+toolbarExtension, this);
+ }
+
+ if (url.isEmpty())
+ return false;
+
+ if (Project::ref()->hasProject())
+ projectToolbarsURL = Project::ref()->toolbarURL();
+ if ( ((!localToolbar) && (projectToolbarsURL.isParentOf(url)) ) ||
+ ((localToolbar) && (KURL(localToolbarsDir).isParentOf(url))) )
+ {
+ if (!QuantaCommon::checkOverwrite(url, this))
+ query = KMessageBox::No;
+ } else
+ {
+ if (!localToolbar)
+ localToolbarsDir = projectToolbarsURL.prettyURL();
+ KMessageBox::sorry(0,i18n("<qt>You must save the toolbars to the following folder: <br><br><b>%1</b></qt>")
+ .arg(localToolbarsDir));
+ query = KMessageBox::No;
+ }
+ } while (query != KMessageBox::Yes);
+ } else
+ {
+ url = destURL;
+ query = KMessageBox::Yes;
+ }
+ if( query != KMessageBox::Cancel )
+ {
+ KURL tarName = saveToolbarToFile(toolbarName, url);
+ if (tarName.isEmpty())
+ {
+ return false;
+ }
+ if (!localToolbar)
+ Project::ref()->insertFile(tarName, true);
+ }
+ return true;
+}
+
+/** Saves a toolbar as localspecific. */
+void QuantaApp::slotSaveLocalToolbar()
+{
+ saveToolbar(true);
+}
+/** Saves a toolbar as project specific. */
+void QuantaApp::slotSaveProjectToolbar()
+{
+ saveToolbar(false);
+}
+
+/** Adds a new, empty toolbar. */
+void QuantaApp::slotAddToolbar()
+{
+ bool ok;
+ QString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
+ if (ok)
+ {
+ userToolbarsCount++;
+
+ QString toolbarId = name;
+ int n = 1;
+ while (m_toolbarList.find(toolbarId) != 0L)
+ {
+ toolbarId = name + QString("%1").arg(n);
+ n++;
+ }
+ toolbarId = toolbarId.lower();
+
+ KTempFile* tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ * (tempFile->textStream()) << QString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
+ .arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name);
+ tempFile->close();
+
+ ToolbarXMLGUI * toolbarGUI = new ToolbarXMLGUI(tempFile->name());
+
+//add all actions to the xmlguiclient of this toolbar
+ for (uint i = 0 ; i < actionCollection()->count(); i++)
+ toolbarGUI->actionCollection()->insert(actionCollection()->action(i));
+
+ guiFactory()->addClient(toolbarGUI);
+ ToolbarTabWidget::ref()->setCurrentPage(ToolbarTabWidget::ref()->count()-1);
+ tempFileList.append(tempFile);
+ ToolbarEntry *p_toolbar = new ToolbarEntry;
+ p_toolbar->guiClient = toolbarGUI;
+
+ QDomDocument *dom = new QDomDocument(toolbarGUI->domDocument());
+
+ p_toolbar->dom = dom;
+ p_toolbar->name = name;
+ p_toolbar->user = true;
+ p_toolbar->visible = true;
+ p_toolbar->nameModified = false;
+ p_toolbar->menu = new QPopupMenu;
+ p_toolbar->id = toolbarId;
+ m_tagsMenu->insertItem(p_toolbar->name, p_toolbar->menu);
+ m_toolbarList.insert(toolbarId, p_toolbar);
+
+ slotToggleDTDToolbar(!allToolbarsHidden());
+ }
+}
+
+
+/** Removes a user toolbar from the toolbars. */
+bool QuantaApp::slotRemoveToolbar()
+{
+ ToolbarTabWidget *tb = ToolbarTabWidget::ref();
+ int i;
+
+ QStringList lst;
+ QStringList idLst;
+ int current=0, j =0;
+ for (i = 0; i < tb->count(); i++)
+ {
+ lst << tb->label(i);
+ idLst << tb->id(i);
+ if ( tb->tabLabel(tb->currentPage()) == tb->label(i) ) current=j;
+ j++;
+ }
+
+ bool ok = false;
+ QString res = KInputDialog::getItem(
+ i18n( "Remove Toolbar" ),
+ i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
+
+ if (ok)
+ {
+ QString id = res;
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ if (lst[i] == res)
+ {
+ id = idLst[i];
+ break;
+ }
+ }
+ return slotRemoveToolbar(id);
+ } else
+ return false;
+
+}
+
+QString QuantaApp::createToolbarTarball()
+{
+ ToolbarTabWidget *tb = ToolbarTabWidget::ref();
+
+ QStringList lst;
+ QStringList idLst;
+ int current = 0;
+ for (int i = 0; i < tb->count(); i++)
+ {
+ lst << tb->label(i);
+ idLst << tb->id(i);
+ if ( tb->tabLabel(tb->currentPage()) == tb->label(i) ) current=i;
+ }
+
+ bool ok = false;
+ QString res = KInputDialog::getItem(
+ i18n( "Send Toolbar" ),
+ i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
+
+ if (!ok)
+ return QString::null;
+
+ QString toolbarName = res;
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ if (lst[i] == toolbarName)
+ {
+ toolbarName = idLst[i];
+ break;
+ }
+ }
+ QString prefix="quanta";
+ KTempDir* tempDir = new KTempDir(tmpDir);
+ tempDir->setAutoDelete(true);
+ tempDirList.append(tempDir);
+ QString tempFileName=tempDir->name() + toolbarName;
+
+ KURL tempURL;
+ tempURL.setPath(tempFileName);
+ saveToolbarToFile(toolbarName, tempURL);
+
+ return tempFileName + ".toolbar.tgz";
+}
+
+/** Sends a toolbar in mail. */
+void QuantaApp::slotSendToolbar()
+{
+
+ QString tempFileName = createToolbarTarball();
+ if (tempFileName.isNull())
+ return;
+
+ QStringList toolbarFile;
+ toolbarFile += tempFileName;
+
+ TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send toolbar in email"));
+ QString toStr;
+ QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
+ QString titleStr;
+ QString subjectStr;
+
+ mailDlg->TitleLabel->setText(i18n("Content:"));
+/* mailDlg->titleEdit->setFixedHeight(60);
+ mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ if ( mailDlg->exec() ) {
+ if ( !mailDlg->lineEmail->text().isEmpty())
+ {
+ toStr = mailDlg->lineEmail->text();
+ subjectStr = (mailDlg->lineSubject->text().isEmpty())?i18n("Quanta Plus toolbar"):mailDlg->lineSubject->text();
+ if ( !mailDlg->titleEdit->text().isEmpty())
+ message = mailDlg->titleEdit->text();
+ } else
+ {
+ KMessageBox::error(this,i18n("No destination address was specified.\n Sending is aborted."),i18n("Error Sending Email"));
+ delete mailDlg;
+ return;
+ }
+
+ kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, toolbarFile);
+ }
+ delete mailDlg;
+}
+
+void QuantaApp::slotDownloadToolbar()
+{
+ if (!m_newToolbarStuff)
+ m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this);
+ m_newToolbarStuff->downloadResource();
+}
+
+void QuantaApp::slotUploadToolbar()
+{
+ QString tempFileName = createToolbarTarball();
+ if (tempFileName.isNull())
+ return;
+ if (!m_newToolbarStuff)
+ m_newToolbarStuff = new QNewToolbarStuff("quanta/toolbar", this);
+// tempDirList.append(m_newToolbarStuff->uploadResource(tempFileName));
+ m_newToolbarStuff->uploadResource(tempFileName);
+}
+
+void QuantaApp::slotRenameToolbar()
+{
+ ToolbarTabWidget *tb = ToolbarTabWidget::ref();
+
+ QStringList lst;
+ QStringList idLst;
+ int current = 0;
+ for (int i = 0; i < tb->count(); i++)
+ {
+ lst << tb->label(i);
+ idLst << tb->id(i);
+ if ( tb->tabLabel(tb->currentPage()) == tb->label(i) ) current=i;
+ }
+
+ bool ok = false;
+ QString res = KInputDialog::getItem(
+ i18n( "Rename Toolbar" ),
+ i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
+ if (ok)
+ {
+ QString id = res;
+ for (uint i = 0; i < lst.count(); i++)
+ {
+ if (lst[i] == res)
+ {
+ id = idLst[i];
+ break;
+ }
+ }
+ slotRenameToolbar(id);
+ }
+}
+
+void QuantaApp::slotRenameToolbar(const QString& name)
+{
+ ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[name];
+ if (p_toolbar)
+ {
+ bool ok;
+ QString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
+ if (ok && newName != p_toolbar->name)
+ {
+ m_toolbarList.take(name);
+ p_toolbar->name = newName;
+ QDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
+ el.setAttribute("tabname", p_toolbar->name);
+ el.removeAttribute("i18ntabname");
+ el.setAttribute("name", p_toolbar->name.lower());
+ QDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
+ nodeList.item(0).firstChild().setNodeValue(p_toolbar->name);
+ //Rename the _Separator_ tags back to Separator, so they are not treated
+ //as changes
+ nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("_Separator_");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ nodeList.item(i).toElement().setTagName("Separator");
+ }
+ KXMLGUIFactory::saveConfigFile(p_toolbar->guiClient->domDocument(),
+ p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance());
+ ToolbarTabWidget *tb = ToolbarTabWidget::ref();
+ for (int i = 0; i < tb->count(); i++)
+ {
+ if (tb->id(i) == name)
+ {
+ tb->setTabLabel(tb->page(i)->parentWidget(), i18n(p_toolbar->name.utf8()));
+ m_tagsMenu->changeItem(m_tagsMenu->idAt(i + 2), i18n(p_toolbar->name.utf8()));
+ break;
+ }
+ }
+ m_toolbarList.insert(name, p_toolbar);
+ }
+ }
+}
+
+/** Ask for save all the modified user toolbars. */
+bool QuantaApp::removeToolbars()
+{
+ QStringList names;
+ QDictIterator<ToolbarEntry> it(m_toolbarList);
+ for (;it.current();++it)
+ {
+ names += it.currentKey();
+ }
+ for (QStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
+ {
+ if (!slotRemoveToolbar(*iter))
+ return false;
+ }
+
+ QString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
+ m_actions->setContent(s);
+ TagAction *action;
+ for (uint i = 0; i < actionCollection()->count(); i++)
+ {
+ action = dynamic_cast<TagAction *>(actionCollection()->action(i));
+ if (action)
+ {
+ QDomElement el = action->data();
+ m_actions->firstChild().appendChild(el);
+ }
+ }
+
+ QFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
+ if (f.open( IO_ReadWrite | IO_Truncate ))
+ {
+ if (!m_actions->firstChild().firstChild().isNull())
+ {
+ QTextStream qts(&f);
+ qts.setEncoding(QTextStream::UnicodeUTF8);
+ m_actions->save(qts,0);
+ f.close();
+ } else
+ f.remove();
+ }
+
+ return true;
+}
+
+void QuantaApp::slotDeleteAction(KAction *action)
+{
+//remove all references to this action
+ QDomElement el = static_cast<TagAction*>(action)->data();
+ QString text = el.attribute("text");
+ QString actionName = action->name();
+
+ QPtrList<KXMLGUIClient> guiClients = factory()->clients();
+ KXMLGUIClient *guiClient = 0;
+ QDomNodeList nodeList;
+ for (uint i = 0; i < guiClients.count(); i++)
+ {
+ guiClient = guiClients.at(i);
+ guiClient->domDocument().setContent(KXMLGUIFactory::readConfigFile( guiClient->xmlFile(), guiClient->instance() ));
+ nodeList = guiClient->domDocument().elementsByTagName("Action");
+ for (uint j = 0; j < nodeList.count(); j++)
+ {
+ //we found a toolbar that contains the action
+ if (nodeList.item(j).toElement().attribute("name") == actionName)
+ {
+ nodeList.item(j).parentNode().removeChild(nodeList.item(j));
+ KXMLGUIFactory::saveConfigFile(guiClient->domDocument(), guiClient->xmlFile());
+ break;
+ }
+ }
+ guiClient->actionCollection()->take(action);
+ }
+ action->unplugAll();
+ delete action;
+ action = 0L;
+}
+
+void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_actionName)
+{
+ KAction *action = 0L;
+ QString actionName = a_actionName;
+ actionName.replace('&',"&&");
+ KActionCollection *ac = actionCollection();
+ uint actionCount = ac->count();
+ QString str;
+ for (uint i = 0; i < actionCount; i++)
+ {
+ str = ac->action(i)->text();
+ if (str == actionName || str.remove('&') == actionName)
+ {
+ action = ac->action(i);
+ break;
+ }
+ }
+ if (!action) //workaround for actionnames ending with "...". It's stripped from the end
+ //of the text when plugged into a toolbar.
+ {
+ actionName += "...";
+ for (uint i = 0; i < actionCount; i++)
+ {
+ if (ac->action(i)->text() == actionName)
+ {
+ action = ac->action(i);
+ break;
+ }
+ }
+ }
+
+ if (action)
+ {
+ ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[toolbarName];
+ if (p_toolbar)
+ {
+ QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ while (!node.isNull())
+ {
+ if (node.nodeName() == "Action" &&
+ node.toElement().attribute("name") == action->name())
+ {
+ action->unplug(ToolbarTabWidget::ref()->page(toolbarName));
+ action->unplug(p_toolbar->menu);
+ node.parentNode().removeChild(node);
+ }
+ node = node.nextSibling();
+ }
+ KXMLGUIFactory::saveConfigFile(p_toolbar->guiClient->domDocument(),
+ p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance());
+ }
+ }
+}
+
+void QuantaApp::slotEditAction(const QString& actionName)
+{
+ ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg", true, 0, actionName);
+ dlg.exec();
+}
+
+void QuantaApp::slotNewAction()
+{
+ ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg");
+ dlg.slotNewAction();
+ dlg.exec();
+}
+
+void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const QString& a_interpreter)
+{
+ ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg");
+ QString name = a_scriptURL.fileName();
+ name.truncate(name.length() - QFileInfo(name).extension().length() - 1);
+ dlg.createScriptAction(name, a_interpreter + " " + a_scriptURL.path());
+ dlg.exec();
+}
+
+void QuantaApp::setDtep(const QString& dtepName, bool convert)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
+ if (!DTDs::ref()->find(dtep))
+ return;
+ w->setDTDIdentifier(dtep);
+ const DTDStruct *dtd = DTDs::ref()->find(w->getDTDIdentifier());
+ if (convert && dtd->family == Xml)
+ {
+ Tag *tag = 0L;
+ w->findDTDName(&tag);
+ if (tag)
+ {
+ int bLine, bCol, eLine, eCol;
+ tag->beginPos(bLine,bCol);
+ tag->endPos(eLine,eCol);
+ w->editIf->removeText(bLine, bCol, eLine, eCol+1);
+ w->viewCursorIf->setCursorPositionReal((uint)bLine, (uint)bCol);
+ w->insertText("<!DOCTYPE" + dtd->doctypeStr +">");
+ delete tag;
+ } else
+ {
+ w->viewCursorIf->setCursorPositionReal(0,0);
+ w->insertText("<!DOCTYPE" + dtd->doctypeStr + ">\n");
+ }
+ }
+ slotLoadToolbarForDTD(w->getDTDIdentifier());
+ QuantaView *view = ViewManager::ref()->activeView();
+ if (view)
+ view->activated();
+ reparse(true);
+ }
+}
+
+void QuantaApp::slotChangeDTD()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ KDialogBase dlg(this, 0L, true, i18n("DTD Selector"), KDialogBase::Ok | KDialogBase::Cancel);
+ DTDSelectDialog *dtdWidget = new DTDSelectDialog(&dlg);
+ dtdWidget->setMinimumHeight(130);
+ dlg.setMainWidget(dtdWidget);
+ int pos = -1;
+ int defaultIndex = 0;
+
+ QString oldDtdName = w->getDTDIdentifier();
+ QString defaultDocType = Project::ref()->defaultDTD();
+ QStringList lst = DTDs::ref()->nickNameList(true);
+
+ QString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
+ QString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
+ for(uint i = 0; i < lst.count(); i++)
+ {
+ dtdWidget->dtdCombo->insertItem(lst[i]);
+ if (lst[i] == oldDtdNickName) pos = i;
+ if (lst[i] == defaultDtdNickName) defaultIndex = i;
+ }
+
+ if (pos == -1)
+ pos = defaultIndex;
+ dtdWidget->dtdCombo->setCurrentItem(pos);
+ dtdWidget->messageLabel->setText(i18n("Change the current DTD."));
+ dtdWidget->currentDTD->setText(DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier()));
+ //dlg->useClosestMatching->setShown(false);
+ delete dtdWidget->useClosestMatching;
+ dtdWidget->useClosestMatching = 0L;
+ dtdWidget->adjustSize();
+ if (dlg.exec())
+ {
+ setDtep(dtdWidget->dtdCombo->currentText(), dtdWidget->convertDTD->isChecked());
+ }
+ }
+}
+
+void QuantaApp::slotEditDTD()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QStringList lst(DTDs::ref()->nickNameList());
+ QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ bool ok = false;
+ QString res = KInputDialog::getItem(
+ i18n( "Edit DTD" ),
+ i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
+
+ QString s = i18n("Create a new DTEP description");
+ s = i18n("Load DTEP description from disk");
+ if (!ok)
+ return;
+
+ QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+
+ KDialogBase editDlg(this, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
+ DTEPEditDlg dtepDlg(DTDs::ref()->find(dtdName)->fileName, &editDlg);
+ editDlg.setMainWidget(&dtepDlg);
+ if (editDlg.exec())
+ {
+ dtepDlg.saveResult();
+ }
+ }
+}
+
+void QuantaApp::focusInEvent(QFocusEvent* e)
+{
+ KDockMainWindow::focusInEvent(e);
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ w->view()->setFocus();
+ w->checkDirtyStatus();
+ }
+}
+
+void QuantaApp::slotShowCompletion()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w && w->codeCompletionIf)
+ w->codeCompletionRequested();
+}
+
+void QuantaApp::slotShowCompletionHint()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w && w->codeCompletionIf)
+ w->codeCompletionHintRequested();
+}
+
+void QuantaApp::slotMakeDonation()
+{
+ DonationDialog *dlg = new DonationDialog(this);
+ dlg->closeButton->setIconSet(SmallIconSet("fileclose"));
+ connect(dlg->closeButton, SIGNAL(clicked()), dlg, SLOT(accept()));
+ dlg->exec();
+ delete dlg;
+}
+
+void QuantaApp::slotHelpHomepage()
+{
+ kapp->invokeBrowser("http://quanta.kdewebdev.org");
+}
+
+void QuantaApp::slotHelpUserList()
+{
+ kapp->invokeBrowser("http://mail.kde.org/mailman/listinfo/quanta");
+}
+
+/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
+void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
+{
+ const DTDStruct *oldDtd = 0L;
+
+ if (!currentToolbarDTD.isEmpty())
+ {
+ oldDtd = DTDs::ref()->find(currentToolbarDTD);
+ if (!oldDtd)
+ oldDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
+ }
+ QString fileName;
+ const DTDStruct *newDtd = DTDs::ref()->find(dtdName);
+ if (!newDtd)
+ {
+ newDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
+ if (!newDtd)
+ newDtd = DTDs::ref()->find(qConfig.defaultDocType); //extreme case
+ }
+
+ ToolbarEntry *p_toolbar;
+ if (m_debugger->UI())
+ {
+ p_toolbar = m_toolbarList["Debug"];
+ if (p_toolbar)
+ {
+ guiFactory()->removeClient(p_toolbar->guiClient);
+ p_toolbar->visible = false;
+ delete p_toolbar->menu;
+ p_toolbar->menu = 0L;
+ }
+ }
+ if (newDtd != oldDtd)
+ {
+ KURL::List newToolbars;
+ for (uint i = 0; i < newDtd->toolbars.count(); i++)
+ {
+ KURL url;
+ //first load the local version if it exists
+ fileName = locateLocal("data", resourceDir + "toolbars/"+newDtd->toolbars[i]);
+ QuantaCommon::setUrl(url, fileName);
+ if (QExtFileInfo::exists(url, true, this))
+ {
+ //showToolbarFile(url);
+ newToolbars += url;
+ } else
+ {
+ fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+newDtd->toolbars[i];
+ QuantaCommon::setUrl(url, fileName);
+ if (QExtFileInfo::exists(url, true, this))
+ {
+ newToolbars += url;// showToolbarFile(url);
+ }
+ }
+ }
+ //remove the toolbars of the oldDtdName
+ if (!currentToolbarDTD.isEmpty())
+ {
+ for (uint i = 0; i < oldDtd->toolbars.count(); i++)
+ {
+ KURL url;
+ QString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
+ QuantaCommon::setUrl(url, fileName);
+ KURL urlLocal;
+ fileName = locateLocal("data", resourceDir + "toolbars/"+oldDtd->toolbars[i]);
+ QuantaCommon::setUrl(urlLocal, fileName);
+ if (newToolbars.contains(url) == 0)
+ {
+ QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ for( ; iter.current(); ++iter )
+ {
+ p_toolbar = iter.current();
+ if (p_toolbar->url == url || p_toolbar->url == urlLocal)
+ {
+ guiFactory()->removeClient(p_toolbar->guiClient);
+ p_toolbar->visible = false;
+ delete p_toolbar->menu;
+ p_toolbar->menu = 0L;
+ break;
+ }
+ }
+ } else
+ {
+ newToolbars.remove(url);
+ }
+ }
+ }
+
+ //Load the toolbars for dtdName
+ KURL::List::Iterator it;
+ for (it = newToolbars.begin(); it != newToolbars.end(); ++it)
+ {
+ showToolbarFile(*it);
+ }
+ ToolbarTabWidget::ref()->setCurrentPage(0);
+ }
+ currentToolbarDTD = newDtd->name;
+ slotToggleDTDToolbar(!allToolbarsHidden());
+}
+
+/** Remove the toolbar named "name". */
+bool QuantaApp::slotRemoveToolbar(const QString& a_name)
+{
+ QString name = a_name; // increase reference counter for this string
+ ToolbarEntry *p_toolbar = m_toolbarList[name];
+ QRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
+ QRegExp idRx("\\sid=\"[^\"]*\"");
+ if (p_toolbar)
+ {
+ KXMLGUIClient* toolbarGUI = p_toolbar->guiClient;
+
+ if (toolbarGUI)
+ {
+ KAction *action;
+ //Rename the _Separator_ tags back to Separator, so they are not treated
+ //as changes
+ QDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ nodeList.item(i).toElement().setTagName("Separator");
+ }
+ //check if the actions on the toolbar were modified or not
+ bool actionsModified = false;
+ nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ action = actionCollection()->action(nodeList.item(i).toElement().attribute("name"));
+ if (dynamic_cast<TagAction*>(action) &&
+ dynamic_cast<TagAction*>(action)->isModified())
+ {
+ actionsModified = true;
+ break;
+ }
+ }
+
+ //check if the toolbar's XML GUI was modified or not
+ QString s1 = p_toolbar->dom->toString();
+ QString s2 = toolbarGUI->domDocument().toString();
+ s1.remove(i18ntabnameRx);
+ s2.remove(i18ntabnameRx);
+ s1.remove(idRx);
+ s2.remove(idRx);
+ if (p_toolbar->nameModified)
+ {
+ QRegExp tabnameRx("\\stabname=\"[^\"]*\"");
+ tabnameRx.search(s2);
+ QString name1 = tabnameRx.cap();
+ name1.remove(" tab");
+ QString name2 = name1;
+ name2.remove(QRegExp("[\\s]\\([0-9]+\\)"));
+ s2.replace(name1, name2);
+ s2.replace(name1.lower(), name2.lower());
+ }
+ bool useToolbarGUI = true;
+ if ( s1 != s2 /*|| actionsModified */)
+ {
+ int result;
+ if (p_toolbar->url.isEmpty())
+ {
+ result = KMessageBox::warningYesNoCancel(this, i18n("<qt>Toolbar <b>%1</b> is new and unsaved. Do you want to save it before it is removed?</qt>").arg(p_toolbar->name),
+ i18n("Save Toolbar"), KStdGuiItem::save(), KStdGuiItem::discard());
+ } else
+ {
+ FourButtonMessageBox dlg(this, 0, true);
+ dlg.textLabel->setText(i18n("<qt>The toolbar <b>%1</b> was modified. Do you want to save it before it is removed?</qt>").arg(p_toolbar->name));
+ dlg.setCaption(i18n("Save Toolbar"));
+ dlg.pixmapLabel->setPixmap(BarIcon("messagebox_info", KIcon::SizeMedium));
+ dlg.exec();
+ result = dlg.status();
+ switch (result)
+ {
+ case -1: result = KMessageBox::Cancel;
+ break;
+ case 1: result = KMessageBox::Continue; //hack - this means Save
+ break;
+ case 2: result = KMessageBox::Yes; //hack - this means Save As
+ break;
+ case 3: result = KMessageBox::No; //this means Don't Save
+ break;
+ }
+ }
+ switch (result)
+ {
+ case KMessageBox::Yes:
+ {
+ bool local = true;
+ if (Project::ref()->hasProject() && p_toolbar->url.url().startsWith(Project::ref()->projectBaseURL().url())) local = false;
+ if (!saveToolbar(local, p_toolbar->id))
+ return false;
+ break;
+ }
+ case KMessageBox::Continue:
+ {
+ bool local = true;
+ if (Project::ref()->hasProject() && p_toolbar->url.url().startsWith(Project::ref()->projectBaseURL().url())) local = false;
+ if (!saveToolbar(local, p_toolbar->id, p_toolbar->url))
+ return false;
+ break;
+ }
+ case KMessageBox::No:
+ {
+ useToolbarGUI = false;
+ break;
+ }
+ case KMessageBox::Cancel: return false;
+
+ }
+ }
+
+ guiFactory()->removeClient(toolbarGUI);
+ delete p_toolbar->menu;
+//unplug the actions and remove them if they are not used in other places
+ if (useToolbarGUI)
+ nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
+ else
+ nodeList = p_toolbar->dom->elementsByTagName("Action");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ action = actionCollection()->action(nodeList.item(i).toElement().attribute("name"));
+ if (action && !action->isPlugged())
+ {
+ if (dynamic_cast<TagAction*>(action) &&
+ !dynamic_cast<TagAction*>(action)->isModified())
+ {
+ //take out the action from every toolbar's xmlguiclient
+ //this avoid a crash when removing a toolbar
+ QDictIterator<ToolbarEntry> it(m_toolbarList);
+ while (it.current())
+ {
+ it.current()->guiClient->actionCollection()->take(action);
+ ++it;
+ }
+ delete action;
+ }
+ }
+ }
+ delete p_toolbar->dom;
+ delete p_toolbar->guiClient;
+ m_toolbarList.remove(name);
+ }
+ }
+
+ slotToggleDTDToolbar(!allToolbarsHidden());
+ emit toolbarRemoved(name);
+ return true;
+}
+
+/** Show or hide the DTD toolbar */
+void QuantaApp::slotToggleDTDToolbar(bool show)
+{
+ if (show)
+ {
+ ToolbarTabWidget::ref()->show();
+ } else
+ {
+ ToolbarTabWidget::ref()->hide();
+ }
+ qConfig.enableDTDToolbar = show;
+ if (ViewManager::ref()->activeView())
+ ViewManager::ref()->activeView()->refreshWindow();
+}
+
+void QuantaApp::slotRefreshActiveWindow()
+{
+//FIXME: Find a good way to redraw the editor view when the toolbar height
+//changes
+// if (ViewManager::ref()->activeView())
+ //ViewManager::ref()->activeView()->activated();
+}
+
+
+void QuantaApp::slotShowGroupsForDTEP(const QString& dtepName, bool show)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ if (dtepName == "clear")
+ {
+ w->resetGroupsForDTEPList();
+ } else
+ {
+ w->enableGroupsForDTEP(dtepName, show);
+ }
+ w->setChanged(true);
+ reparse(false);
+ }
+}
+
+KURL QuantaApp::projectBaseURL() const
+{
+ return Project::ref()->projectBaseURL();
+}
+
+void QuantaApp::slotBuildPrjToolbarsMenu()
+{
+ static bool buildInProgress = false;
+ if (buildInProgress)
+ return;
+ KURL::List toolbarList;
+ if (Project::ref()->hasProject())
+ {
+ buildInProgress = true;
+ toolbarList = QExtFileInfo::allFiles(Project::ref()->toolbarURL(), "*"+toolbarExtension, this);
+ buildInProgress = false;
+ projectToolbarFiles->setMaxItems(toolbarList.count());
+ for (uint i = 0; i < toolbarList.count(); i++)
+ {
+ projectToolbarFiles->addURL(toolbarList[i]);
+ }
+ } else
+ {
+ projectToolbarFiles->clearURLList();
+ }
+}
+
+/** Returns the project (if there is one loaded) or global default encoding. */
+QString QuantaApp::defaultEncoding()
+{
+ QString encoding = qConfig.defaultEncoding;
+ if (Project::ref()->hasProject())
+ {
+ encoding = Project::ref()->defaultEncoding();
+ }
+ return encoding.lower();
+}
+
+void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
+{
+ ToolbarEntry *p_toolbar;
+ QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ for( ; iter.current(); ++iter )
+ {
+ p_toolbar = iter.current();
+ if (p_toolbar->user && p_toolbar->visible)
+ {
+ list->append(p_toolbar->url);
+ }
+ }
+}
+
+ToolbarEntry *QuantaApp::toolbarByURL(const KURL& url)
+{
+ ToolbarEntry *p_toolbar = 0L;
+ QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ for( ; iter.current(); ++iter )
+ {
+ p_toolbar = iter.current();
+ if (p_toolbar->url == url)
+ {
+ return p_toolbar;
+ }
+ }
+
+ return 0L;
+}
+
+
+/** Returns true if all toolbars are hidden, false otherwise. */
+bool QuantaApp::allToolbarsHidden() const
+{
+ bool result = true;
+ showDTDToolbar->setEnabled(false);
+ ToolbarEntry *p_toolbar = 0L;
+ QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ for( ; iter.current(); ++iter )
+ {
+ p_toolbar = iter.current();
+ if (p_toolbar->visible)
+ {
+ showDTDToolbar->setEnabled(true);
+ result = false;
+ break;
+ }
+ }
+
+ if (!showDTDToolbar->isChecked())
+ result = true;
+ return result;
+}
+
+
+void QuantaApp::slotLoadDTEP()
+{
+ QString dirName = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select DTEP Directory"));
+ if (!dirName.isEmpty())
+ {
+ DTDs::ref()->slotLoadDTEP(dirName, true);
+ }
+}
+
+QString QuantaApp::createDTEPTarball()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QStringList lst(DTDs::ref()->nickNameList());
+ QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ bool ok = false;
+ QString res = KInputDialog::getItem(
+ i18n( "Send DTD" ),
+ i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
+
+ if (!ok)
+ return QString::null;
+
+ QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+
+ QString prefix="quanta";
+ KTempDir* tempDir = new KTempDir(tmpDir);
+ tempDir->setAutoDelete(true);
+ tempDirList.append(tempDir);
+ QString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(QRegExp("\\s|\\."), "_") + ".tgz";
+
+ //pack the .tag files and the description.rc into a .tgz file
+ KTar tar(tempFileName, "application/x-gzip");
+ tar.open(IO_WriteOnly);
+
+ KURL dirURL;
+ dirURL.setPath(DTDs::ref()->find(dtdName)->fileName);
+ dirURL.setPath(dirURL.directory(false));
+
+ KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this);
+ for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ {
+ QString name = (*it_f).fileName();
+
+ QFile file(dirURL.path()+name);
+ file.open(IO_ReadOnly);
+ QByteArray bArray = file.readAll();
+ tar.writeFile(dirURL.fileName()+"/"+name, "user", "group", bArray.size(), bArray.data());
+ file.close();
+
+ }
+ tar.close();
+ return tempFileName;
+ }
+ return QString::null;
+}
+
+void QuantaApp::slotEmailDTEP()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QString tempFileName = createDTEPTarball();
+ if (tempFileName.isNull())
+ return;
+ QStringList dtdFile;
+ dtdFile += tempFileName;
+
+ TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send DTEP in Email"));
+ QString toStr;
+ QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
+ QString titleStr;
+ QString subjectStr;
+
+ mailDlg->TitleLabel->setText(i18n("Content:"));
+/* mailDlg->titleEdit->setFixedHeight(60);
+ mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ if ( mailDlg->exec() )
+ {
+ if ( !mailDlg->lineEmail->text().isEmpty())
+ {
+ toStr = mailDlg->lineEmail->text();
+ subjectStr = (mailDlg->lineSubject->text().isEmpty())?i18n("Quanta Plus DTD"):mailDlg->lineSubject->text();
+ if ( !mailDlg->titleEdit->text().isEmpty())
+ message = mailDlg->titleEdit->text();
+ } else
+ {
+ KMessageBox::error(this,i18n("No destination address was specified.\n Sending is aborted."),i18n("Error Sending Email"));
+ delete mailDlg;
+ return;
+ }
+
+ kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, dtdFile);
+ }
+ delete mailDlg;
+ }
+}
+
+void QuantaApp::slotDownloadDTEP()
+{
+ if (!m_newDTEPStuff)
+ m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this);
+ m_newDTEPStuff->downloadResource();
+}
+
+void QuantaApp::slotUploadDTEP()
+{
+ QString tempFileName = createDTEPTarball();
+ if (tempFileName.isNull())
+ return;
+ if (!m_newDTEPStuff)
+ m_newDTEPStuff = new QNewDTEPStuff("quanta/dtep", this);
+// tempDirList.append(m_newDTEPStuff->uploadResource(tempFileName));
+ m_newDTEPStuff->uploadResource(tempFileName);
+}
+
+void QuantaApp::slotSmartTagInsertion()
+{
+ KAction *action = actionCollection()->action("smart_tag_insertion");
+ if(!action)
+ return;
+ if(!ViewManager::ref()->activeDocument() || !ViewManager::ref()->activeView() ||
+ ViewManager::ref()->activeDocument()->defaultDTD()->name.contains("HTML", false) == 0)
+ {
+ KMessageBox::error(this, "Smart Tag Insertion is available only for (X)HTML for the moment.");
+ qConfig.smartTagInsertion = false;
+ (static_cast<KToggleAction* >(action))->setChecked(false);
+ return;
+ }
+ qConfig.smartTagInsertion = (static_cast<KToggleAction* >(action))->isChecked();
+}
+
+void QuantaApp::slotDownloadTemplate()
+{
+ if (!m_newTemplateStuff)
+ m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
+ m_newTemplateStuff->downloadResource();
+}
+
+void QuantaApp::slotUploadTemplate(const QString &fileName)
+{
+ if (!m_newTemplateStuff)
+ m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
+// tempDirList.append(m_newTemplateStuff->uploadResource(fileName));
+ m_newTemplateStuff->uploadResource(fileName);
+}
+
+void QuantaApp::slotDownloadScript()
+{
+ if (!m_newScriptStuff)
+ m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
+ m_newScriptStuff->downloadResource();
+}
+
+void QuantaApp::slotUploadScript(const QString &fileName)
+{
+ if (!m_newScriptStuff)
+ m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
+// tempDirList.append(m_newScriptStuff->uploadResource(fileName));
+ m_newScriptStuff->uploadResource(fileName);
+}
+
+void QuantaApp::slotDownloadDoc()
+{
+ if (!m_newDocStuff)
+ {
+ m_newDocStuff = new QNewDocStuff("quanta/documentation", this);
+ connect(m_newDocStuff, SIGNAL(installFinished()), dTab, SLOT(slotRefreshTree()));
+ }
+ m_newDocStuff->downloadResource();
+}
+
+void QuantaApp::slotCodeFormatting()
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if(!view || !view->document() || (view->currentViewsLayout() != QuantaView::SourceOnly &&
+ view->hadLastFocus() == QuantaView::VPLFocus))
+ {
+ KMessageBox::error(this, i18n("Code formatting can only be done in the source view."));
+ return;
+ }
+ view->document()->docUndoRedo->codeFormatting();
+}
+
+void QuantaApp::slotDocumentProperties()
+{
+ documentProperties(false);
+}
+
+void QuantaApp::documentProperties(bool forceInsertionOfMinimalTree)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ if (w->defaultDTD()->name.contains("HTML", false) == 0)
+ {
+ KMessageBox::information(this, i18n("The Document Properties Dialog is only for HTML and XHTML."));
+ return;
+ }
+ htmlDocumentProperties htmlPropsDlg(this, forceInsertionOfMinimalTree);
+ htmlPropsDlg.exec();
+ w->setModified(true);
+ }
+}
+
+/** Returns the interface number for the currently active editor. */
+int QuantaApp::currentEditorIfNum() const
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ return w->editIf->editInterfaceNumber();
+ } else
+ {
+ QuantaView * view = ViewManager::ref()->lastActiveEditorView();
+ if (view)
+ return view->document()->editIf->editInterfaceNumber();
+ else
+ return 0L;
+ }
+}
+
+QString QuantaApp::projectURL() const
+{
+ return Project::ref()->projectBaseURL().url();
+}
+
+QStringList QuantaApp::openedURLs() const
+{
+ QStringList list;
+ QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ KMdiChildView *view;
+ QuantaView *qView;
+ while ( (view = childIt.current()) != 0 )
+ {
+ ++childIt;
+ qView = dynamic_cast<QuantaView*>(view);
+ if (qView)
+ {
+ Document *w = qView->document();
+ if ( w )
+ {
+ list.prepend( QString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
+ }
+ }
+ }
+
+ return list;
+}
+
+void QuantaApp::slotExpandAbbreviation()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ const DTDStruct *dtd = w->currentDTD();
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ QString text = w->text(line, 0, line, col - 1);
+ text = w->findWordRev(text) + " ";
+ QString textToInsert;
+ QMap<QString, Abbreviation>::ConstIterator it;
+ for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it)
+ {
+ bool found = false;
+ Abbreviation abbrev = it.data();
+ if (abbrev.dteps.contains(dtd->name))
+ {
+ QMap<QString, QString>::ConstIterator it2;
+ for (it2 = abbrev.abbreviations.constBegin(); it2 != abbrev.abbreviations.constEnd(); ++it2)
+ {
+ if (it2.key().startsWith(text))
+ {
+ textToInsert = it2.data();
+ found = true;
+ break;
+ }
+ }
+ }
+ if (found)
+ break;
+ }
+ if (!textToInsert.isEmpty())
+ {
+ w->activateParser(false);
+ w->editIf->removeText(line, col - text.length() + 1, line, col);
+ w->activateParser(true);
+ col -= (text.length() - 1);
+ int pos = textToInsert.find('|');
+ if (pos != -1)
+ {
+ text = textToInsert.left(pos);
+ if (text.contains('\n'))
+ {
+ line += text.contains('\n');
+ col = text.length() - text.findRev('\n') - 1;
+ } else
+ {
+ col += pos;
+ }
+ }
+ textToInsert.replace('|',"");
+ w->insertText(textToInsert, false);
+ w->viewCursorIf->setCursorPositionReal(line, col);
+ }
+ }
+}
+
+void QuantaApp::slotUploadFile(QuantaView *view)
+{
+ if (!view)
+ view = ViewManager::ref()->activeView();
+ bool quick = true;
+ if (KMessageBox::questionYesNo(this, i18n("Do you want to review the upload?"), i18n("Enable Quick Upload"), i18n("Review"), i18n("Do Not Review"), "EnableQuickUpload") == KMessageBox::Yes)
+ quick = false;
+ Project::ref()->slotUploadURL(view->document()->url(), "", quick, false);
+}
+
+
+void QuantaApp::slotUploadOpenedFiles()
+{
+}
+
+void QuantaApp::slotDeleteFile(QuantaView *view)
+{
+ if (!view)
+ view = ViewManager::ref()->activeView();
+ Document *w = view->document();
+ KURL url = w->url();
+ bool modified = w->isModified();
+ w->setModified(false); //don't ask for save
+ if (QuantaNetAccess::del(url, this, true))
+ {
+ ViewManager::ref()->removeView(view);
+ } else
+ w->setModified(modified);
+}
+
+
+bool QuantaApp::structTreeVisible() const
+{
+ return StructTreeView::ref()->isVisible();
+}
+
+QStringList QuantaApp::tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent) const
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ return w->tagAreas(tag, includeCoordinates, skipFoundContent);
+ else
+ return QStringList();
+}
+
+QString QuantaApp::documentFolderForURL(const QString &url)
+{
+ KURL u = KURL::fromPathOrURL(url);
+ return Project::ref()->documentFolderForURL(u).url();
+}
+
+QString QuantaApp::urlWithPreviewPrefix(const QString &url)
+{
+ KURL u = KURL::fromPathOrURL(url);
+ return Project::ref()->urlWithPrefix(u).url();
+}
+
+void QuantaApp::addFileToProject(const QString &url)
+{
+ if (Project::ref()->hasProject())
+ {
+ Project::ref()->slotInsertFile(KURL::fromPathOrURL(url));
+ }
+}
+
+void QuantaApp::addFolderToProject(const QString &url)
+{
+ if (Project::ref()->hasProject())
+ {
+ Project::ref()->slotAddDirectory(KURL::fromPathOrURL(url), true);
+ }
+}
+
+void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markOnly)
+{
+ if (Project::ref()->hasProject())
+ {
+ Project::ref()->slotUploadURL(url, profile, true, markOnly);
+ }
+}
+
+void QuantaApp::slotAutosaveTimer()
+{
+ m_config->reparseConfiguration();
+ QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ KMdiChildView *view;
+ QuantaView *qView;
+ while ( (view = childIt.current()) != 0 )
+ {
+ ++childIt;
+ qView = dynamic_cast<QuantaView*>(view);
+ if (qView)
+ {
+ Document *w = qView->document();
+ if ( w )
+ {
+ w->createBackup(m_config);
+ }
+ }
+ }
+
+}
+
+/** Get script output */
+void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
+{
+ QCString tmp( buf, buflen + 1 );
+ m_scriptOutput = QString::null;
+ m_scriptOutput = QString::fromLocal8Bit(tmp).remove(" ");
+}
+
+/** Get script error*/
+void QuantaApp::slotGetScriptError(KProcess* ,char* buf,int buflen)
+{
+//TODO: Implement some error handling?
+ Q_UNUSED(buf);
+ Q_UNUSED(buflen);
+}
+/** Notify when process exits*/
+void QuantaApp::slotProcessExited(KProcess* process)
+{
+ slotProcessTimeout();
+ delete process;
+}
+
+/** Timeout occurred while waiting for some network function to return. */
+void QuantaApp::slotProcessTimeout()
+{
+ if (m_loopStarted)
+ {
+ qApp->exit_loop();
+ m_loopStarted = false;
+ }
+}
+
+void QuantaApp::slotActivePartChanged(KParts::Part * part)
+{
+ if (m_oldKTextEditor && part) // if part == 0L the pointer m_oldKTextEditor is not useable
+ {
+ guiFactory()->removeClient(m_oldKTextEditor);
+ m_oldKTextEditor = 0L;
+ }
+ createGUI(part);
+ QWidget * activeWid = m_partManager->activeWidget();
+ if ( activeWid && activeWid->inherits("KTextEditor::View"))
+ {
+ m_oldKTextEditor = dynamic_cast<KTextEditor::View *>(activeWid);
+ if (m_oldKTextEditor)
+ guiFactory()->addClient(m_oldKTextEditor);
+ }
+}
+
+void QuantaApp::slotConvertCase()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ w->convertCase();
+ }
+}
+
+void QuantaApp::slotReloadStructTreeView(bool groupOnly)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (StructTreeView::ref()->isVisible() && w)
+ {
+ StructTreeView::ref()->setParsingDTDs(w->groupsForDTEPs());
+ int expandLevel = qConfig.expandLevel;
+ if (expandLevel == 0)
+ expandLevel = 40;
+ StructTreeView::ref()->slotReparse(w, baseNode, expandLevel, groupOnly);
+ } else
+ StructTreeView::ref()->slotReparse(0L, 0L, 0); //delete the tree
+
+ if (!groupOnly && w)
+ {
+ m_annotationOutput->clearAnnotations();
+ w->clearAnnotations();
+ Node *node = baseNode;
+ while (node)
+ {
+ if (node->tag->type == Tag::Comment)
+ {
+ Node *n = node;
+ if (node->child)
+ {
+ n = node->child;
+ }
+ Tag *commentTag = n->tag;
+ QString text = commentTag->tagStr();
+ int pos = text.find("@annotation");
+ if (pos != -1)
+ {
+ pos += 11;
+ QString receiver;
+ if (text[pos] == '(')
+ {
+ int p = pos;
+ pos = text.find(')');
+ if (pos != -1)
+ {
+ receiver = text.mid(p + 1, pos - p - 1);
+ pos += 2;
+ }
+ } else
+ pos++;
+ text = text.mid(pos).stripWhiteSpace();
+ int l, c;
+ if (n->next)
+ n->next->tag->beginPos(l, c);
+ else
+ n->tag->endPos(l, c);
+ commentTag->write()->addAnnotation(l, qMakePair(text, receiver));
+ }
+ }
+ node = node->nextSibling();
+ }
+ }
+}
+
+QString QuantaApp::saveCurrentFile()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w)
+ return QString::null;
+ if (w->isModified())
+ {
+ if ( KMessageBox::questionYesNo(this,
+ i18n("The file must be saved before external preview.\n"
+ "Do you want to save and preview?"),
+ i18n("Save Before Preview"),
+ KStdGuiItem::save(),KStdGuiItem::dontSave(), "AskForSaveBeforePreview")
+ == KMessageBox::Yes)
+ {
+ if (w->isUntitled())
+ {
+ quantaApp->slotFileSaveAs();
+ }
+ else
+ {
+ w->save();
+ }
+ } else
+ {
+ return QString::null;
+ }
+ }
+ KURL url = Project::ref()->urlWithPrefix(w->url());
+ return url.url();
+}
+
+void QuantaApp::slotReportBug()
+{
+ KAboutData aboutData( "quanta", I18N_NOOP("Quanta"), QUANTA_VERSION);
+ KBugReport bugReportDlg(this, true, &aboutData);
+ bugReportDlg.exec();
+}
+
+void QuantaApp::slotNewPart(KParts::Part *newPart, bool setActiv)
+{
+ m_partManager->addPart(newPart, setActiv);
+}
+
+
+bool QuantaApp::queryClose()
+{
+ if (m_quantaInit)
+ return false; //not loaded completely
+ bool canExit = true;
+ if (quantaStarted)
+ {
+ m_config->setGroup("General Options");
+ QStringList urlStrList;
+ KURL::List urlList = ViewManager::ref()->openedFiles();
+ KURL u;
+ for (KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it)
+ {
+ KURL u = *it;
+ u.setPass("");
+ urlStrList += u.url();
+ }
+ m_config->writePathEntry("List of opened files", urlStrList);
+ QStringList encodings;
+ QValueList<Document*> documents = ViewManager::ref()->openedDocuments();
+ for (QValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
+ {
+ if (!(*it)->isUntitled())
+ {
+ QString encoding = defaultEncoding();
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>((*it)->doc());
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+ if (encoding.isEmpty())
+ encoding = "utf8"; //final fallback
+ encodings += encoding;
+ }
+ }
+ m_config->writePathEntry("Encoding of opened files", encodings);
+ parser->setParsingEnabled(false);
+ canExit = ViewManager::ref()->closeAll(false);
+ if (canExit)
+ canExit = Project::ref()->queryClose();
+ if (canExit)
+ canExit = removeToolbars();
+ parser->setParsingEnabled(true);
+ }
+ if (canExit)
+ {
+ saveOptions();
+ // kdDebug(24000) << "Quanta will exit" << endl;
+ emit eventHappened("quanta_exit", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ } else
+ slotFileNew();
+ return canExit;
+}
+
+void QuantaApp::saveOptions()
+{
+ if (m_config)
+ {
+ m_config->setGroup ("General Options");
+
+ m_config->writeEntry("Geometry", size());
+
+ m_config->writeEntry("Show Toolbar", toolBar("mainToolBar")->isVisible());
+ m_config->writeEntry("Show DTD Toolbar", showDTDToolbar->isChecked());
+
+ m_config->writeEntry("Markup mimetypes", qConfig.markupMimeTypes );
+ m_config->writeEntry("Script mimetypes", qConfig.scriptMimeTypes );
+ m_config->writeEntry("Image mimetypes", qConfig.imageMimeTypes );
+ m_config->writeEntry("Text mimetypes", qConfig.textMimeTypes );
+
+ m_config->writeEntry("Capitals for tags", qConfig.tagCase);
+ m_config->writeEntry("Capitals for attr", qConfig.attrCase);
+ m_config->writeEntry("Attribute quotation", qConfig.attrValueQuotation=='"' ? "double":"single");
+ m_config->writeEntry("Close tag if optional", qConfig.closeOptionalTags);
+ m_config->writeEntry("Close tags", qConfig.closeTags);
+ m_config->writeEntry("Auto completion", qConfig.useAutoCompletion);
+ m_config->writeEntry("Update Closing Tags", qConfig.updateClosingTags);
+ m_config->writeEntry("Replace Accented Chars", qConfig.replaceAccented);
+ m_config->writeEntry("Replace Chars Not In Current Encoding", qConfig.replaceNotInEncoding);
+
+ m_config->writeEntry("Default encoding", qConfig.defaultEncoding);
+ m_config->writeEntry("Default DTD", qConfig.defaultDocType);
+
+ m_config->writeEntry("Preview area", qConfig.previewPosition);
+ m_config->writeEntry("Documentation area", qConfig.docPosition);
+
+ m_config->writeEntry("Smart Tag Insertion", qConfig.smartTagInsertion);
+
+ m_config->writeEntry("Window layout", qConfig.windowLayout);
+ m_config->writeEntry("Follow Cursor", StructTreeView::ref()->followCursor() );
+ //If user choose the timer interval, it needs to restart the timer too
+ m_config->writeEntry("Autosave interval", qConfig.autosaveInterval);
+ m_config->writePathEntry("Top folders", fTab->topURLList.toStringList());
+ QStringList aliasList;
+ for (KURL::List::Iterator it2 = fTab->topURLList.begin(); it2 != fTab->topURLList.end(); ++it2)
+ {
+ aliasList.append(fTab->topURLAliases[(*it2).url()]);
+ }
+ m_config->writePathEntry("Top folder aliases", aliasList);
+ m_config->writeEntry("Version", QUANTA_VERSION); // version
+ m_config->writeEntry("Close Buttons", qConfig.showCloseButtons);
+ m_config->writeEntry("MDI mode", mdiMode());
+ m_config->writeEntry("MDI style", qConfig.toolviewTabs);
+ m_config->writeEntry("IconTextMode", ToolbarTabWidget::ref()->iconText());
+
+ m_config->deleteGroup("RecentFiles");
+ fileRecent->saveEntries(m_config);
+ m_config->writeEntry("Show Hidden Files", qConfig.showHiddenFiles);
+ m_config->writeEntry("Save Local Trees", qConfig.saveTrees);
+
+ m_config->setGroup("Parser options");
+ m_config->writeEntry("Instant Update", qConfig.instantUpdate);
+ m_config->writeEntry("Show Empty Nodes", qConfig.showEmptyNodes);
+ m_config->writeEntry("Show Closing Tags", qConfig.showClosingTags);
+ m_config->writeEntry("Refresh frequency", qConfig.refreshFrequency);
+ m_config->writeEntry("Expand Level", qConfig.expandLevel);
+ m_config->writeEntry("Show DTD Select Dialog", qConfig.showDTDSelectDialog);
+
+ manager()->writeConfig(m_config);
+ saveMainWindowSettings(m_config);
+ writeDockConfig(m_config);
+ // save settings of treeviews
+ fTab->saveLayout( m_config, fTab->className() );
+ ProjectTreeView::ref()->saveLayout(m_config, ProjectTreeView::ref()->className() );
+ TemplatesTreeView::ref()->saveLayout(m_config, TemplatesTreeView::ref()->className() );
+ scriptTab->saveLayout(m_config, scriptTab->className() );
+
+ m_config->sync();
+ }
+}
+
+void QuantaApp::statusBarTimeout()
+{
+ statusBar()->changeItem("", IDS_STATUS);
+}
+
+QStringList QuantaApp::selectors(const QString &tag)
+{
+ return dcopQuanta->selectors(tag);
+}
+
+QStringList QuantaApp::idSelectors()
+{
+ return dcopQuanta->idSelectors();
+}
+
+void QuantaApp::slotEditCurrentTag()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ if (parser->parsingNeeded())
+ baseNode = parser->rebuild(w);
+ //avoid reparsing while the dialog is shown
+ typingInProgress = true;
+ slotEnableIdleTimer(false);
+ uint line,col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col, false);
+ bool isUnknown = true;
+ QString tagName;
+ if (node && node->tag)
+ {
+ Tag *tag = new Tag(*node->tag); //create a copy, as a reparse might happen meantime and that would make node (and node->tag) invalid
+ tagName = tag->name;
+ if ( QuantaCommon::isKnownTag(tag->dtd()->name,tagName) )
+ {
+ isUnknown = false;
+ QString selection;
+ if (w->selectionIf)
+ selection = w->selectionIf->selection();
+ TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(tag->dtd(),tagName), tag, selection, ViewManager::ref()->activeView()->baseURL() );
+ if (dlg->exec())
+ {
+ w->changeTag(tag, dlg->getAttributes() );
+ }
+ delete tag;
+ delete dlg;
+ }
+ }
+ if (isUnknown)
+ {
+ const DTDStruct *dtd = w->defaultDTD();
+ if (dtd->family == Xml)
+ {
+ QString currentLine = w->editIf->textLine(line);
+ int sPos = currentLine.findRev('<', col);
+ if (sPos != -1)
+ {
+ int ePos = currentLine.find('>', col);
+ if (ePos != -1)
+ {
+ AreaStruct area(line, sPos, line, ePos);
+ Tag *tag = new Tag(area, w, dtd, true);
+ if ( QuantaCommon::isKnownTag(dtd->name, tag->name) )
+ {
+ isUnknown = false;
+ QString selection;
+ if (w->selectionIf)
+ selection = w->selectionIf->selection();
+ TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(dtd, tag->name), tag, selection, ViewManager::ref()->activeView()->baseURL() );
+ if (dlg->exec())
+ {
+ w->changeTag(tag, dlg->getAttributes() );
+ }
+ delete dlg;
+ }
+ delete tag;
+ }
+ }
+ }
+ }
+ typingInProgress = false;
+ slotEnableIdleTimer(true);
+ if (isUnknown)
+ {
+ QString message = i18n("Unknown tag: %1").arg(tagName);
+ slotStatusMsg( message );
+ }
+}
+
+void QuantaApp::slotSelectTagArea(Node *node)
+{
+ int bLine, bCol, eLine, eCol;
+ Tag *tag = node->tag;
+ tag->beginPos(bLine, bCol);
+ if (tag->single || !node->next)
+ {
+ tag->endPos(eLine, eCol);
+ } else
+ if (tag->closingMissing && node->child)
+ {
+ Node *childNode = node->child;
+ while (childNode->child || childNode->next)
+ {
+ if (childNode->next)
+ {
+ childNode = childNode->next;
+ } else
+ {
+ childNode = childNode->child;
+ }
+ }
+ childNode->tag->endPos(eLine, eCol);
+ } else
+ {
+ node->next->tag->endPos(eLine, eCol);
+ }
+ quantaApp->selectArea(bLine, bCol, eLine, eCol + 1);
+}
+
+void QuantaApp::slotSelectTagArea()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w)
+ return;
+ uint line,col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col);
+ slotSelectTagArea(node);
+}
+
+void QuantaApp::slotFrameWizard()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w)
+ return;
+ QStringList list = w->tagAreas("frameset", true, true);
+ bool framesetExists = !list.isEmpty();
+ int bl, bc, el, ec;
+ bl = bc = el = ec = 0;
+ QStringList l;
+ QStringList l2;
+ QuantaCommon::normalizeStructure(list[0],l2);
+ if (framesetExists)
+ {
+ l = QStringList::split('\n',list[0],true);
+ QStringList coordList = QStringList::split(',', l[0], true);
+ bl = coordList[0].toInt();
+ bc = coordList[1].toInt();
+ el = coordList[2].toInt();
+ ec = coordList[3].toInt();
+ l.remove(l.begin());
+ }
+
+ FrameWizard dlg(this);
+
+ if (!w->isUntitled())
+ {
+ dlg.setSaved(true);
+ }
+ dlg.setMarkupLanguage(w->currentDTD(true)->name);
+ dlg.loadExistingFramesetStructure(l2);
+
+ if ( dlg.exec() )
+ {
+ QString tag =
+QString("\n")+dlg.generateFramesetStructure()+QString("\n");
+ if (framesetExists)
+ {
+ w->activateParser(false);
+ w->editIf->removeText(bl, bc, el, ec + 1);
+ w->viewCursorIf->setCursorPositionReal((uint)bl, (uint)bc);
+ w->activateParser(true);
+ }
+ w->insertTag(tag);
+ }
+}
+
+
+/** edit/insert CSS */
+void QuantaApp::slotInsertCSS()
+{
+ 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;
+
+ while (styleNode && styleNode->parent && styleNode->tag->name.lower() != "style" && styleNode->tag->dtd()->name == "text/css")
+ styleNode = styleNode->parent;
+
+ Node *parentNode = node;
+ if (parentNode->tag->type == Tag::XmlTagEnd && parentNode->prev)
+ parentNode = parentNode->prev;
+ else
+ while (parentNode && parentNode->parent &&
+ parentNode->tag->type != Tag::XmlTag)
+ parentNode = parentNode->parent;
+ QString fullDocument = w->editIf->text().stripWhiteSpace();
+
+ if (styleNode->tag->name.lower() == "comment block" && styleNode->parent) {
+ if (styleNode->parent->tag->name.lower() == "style") {
+ styleNode = styleNode->parent;
+ }
+ }
+
+ if (styleNode && styleNode->tag->name.lower() == "style" && styleNode->next) //inside <style> invoke the selector editor
+ {
+ styleNode->tag->endPos(bLine, bCol);
+ QString header(w->text(0, 0, bLine, bCol));// beginning part of the file
+ styleNode->next->tag->endPos(eLine, eCol);
+ QString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
+
+ styleNode->next->tag->beginPos(eLine, eCol);
+ QString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
+ kdDebug(24000) << "Style tag contains: " << endl << styleTagContent << endl;
+ CSSSelector *dlg = new CSSSelector;
+
+ dlg->setCallingFrom("XHTML");
+ QFileInfo fi(ViewManager::ref()->currentURL());
+ dlg->setFileToPreview(projectBaseURL().path() + fi.baseName());
+
+
+ dlg->setHeader(header);
+ dlg->setFooter(footer);
+
+ dlg->loadCSSContent(styleTagContent);
+ if(!dlg->errorOnProcessingStylesheet())
+ if( dlg->exec() ){
+ w->activateParser(false);
+ w->editIf->removeText(bLine, bCol+1, eLine, eCol);
+ w->viewCursorIf->setCursorPositionReal((uint)bLine, (uint)bCol+1);
+ w->activateParser(true);
+ w->insertTag( /*"\n<!--" + */ dlg->generateFormattedStyleSection() /*+ "-->\n"*/);
+ }
+ delete dlg;
+
+ } else
+ if (!node || w->currentDTD(true)->name == "text/css")
+ {
+ kdDebug(24000) << "[CSS editor] This is a pure CSS document" << endl;
+
+ CSSSelector *dlg = new CSSSelector;
+
+ dlg->setCallingFrom("CSS");
+
+ if (!fullDocument.isEmpty())
+ dlg->loadCSSContent(fullDocument);
+ dlg->enableApplyToFile();
+ if(!dlg->errorOnProcessingStylesheet())
+ if (dlg->exec())
+ {
+ w->activateParser(false);
+ w->editIf->clear();
+ w->activateParser(true);
+ w->insertTag(dlg->generateFormattedStyleSection());
+ }
+ delete dlg;
+ } else
+ if (parentNode && parentNode->tag->type == Tag::XmlTag)
+ {
+ kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << parentNode->tag->name << endl;
+ CSSEditor *dlg = new CSSEditor(this);
+ QFileInfo fi(ViewManager::ref()->currentURL());
+ dlg->setFileToPreview(projectBaseURL().path() + fi.baseName(),false);
+
+
+ parentNode->tag->beginPos(bLine, bCol);
+ parentNode->tag->endPos(eLine, eCol);
+ dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol));
+
+ QString temp;
+ if (parentNode->tag->hasAttribute("style"))
+ {
+ dlg->setInlineStyleContent(parentNode->tag->attributeValue("style"));
+ Tag tempTag(*(parentNode->tag));
+ tempTag.deleteAttribute("style");
+ temp = tempTag.toString();
+
+ } else {
+ dlg->setInlineStyleContent(QString::null);
+ temp = parentNode->tag->toString();
+ }
+ //using QString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
+ 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() )
+ {
+ w->changeTagAttribute(parentNode->tag, "style", dlg->generateProperties());
+ }
+ delete dlg;
+ } else
+ KMessageBox::sorry(this, i18n("The CSS Editor cannot be invoked here.\nTry to invoke it on a tag or on a style section."));
+}
+
+/** for <a href=mailto> tag */
+void QuantaApp::slotTagMail()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+
+ TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Email Link (mailto)"));
+
+ if ( mailDlg->exec() ) {
+ QString tag = QString(QuantaCommon::tagCase("<a"));
+
+ if ( !QString(mailDlg->lineEmail->text()).isEmpty())
+ {
+ tag += QuantaCommon::attrCase(" href=")+qConfig.attrValueQuotation+"mailto:"+mailDlg->lineEmail->text();
+ if ( !QString(mailDlg->lineSubject->text()).isEmpty())
+ tag += "?subject="+KURL::encode_string(mailDlg->lineSubject->text());
+ tag += qConfig.attrValueQuotation;
+ }
+
+ if ( !QString(mailDlg->titleEdit->text()).isEmpty())
+ tag += QuantaCommon::attrCase(" title=")+qConfig.attrValueQuotation+mailDlg->titleEdit->text()+qConfig.attrValueQuotation;
+ tag += QString(">");
+ w->insertTag(tag,QuantaCommon::tagCase("</a>"));
+ }
+ delete mailDlg;
+}
+
+/** Add the starting and closing text for a
+user specified tag. */
+void QuantaApp::slotTagMisc()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+
+ static QString element = "";
+ static bool addClosingTag = true;
+
+ TagMiscDlg * miscDlg = new TagMiscDlg( this, 0L, addClosingTag, element );
+
+ if ( miscDlg->exec() )
+ {
+ QString tag;
+ element = miscDlg->elementTagName();
+ element.remove('<');
+ element.remove('>');
+ if ( !element.isEmpty())
+ {
+ tag += "<" + QuantaCommon::attrCase(element)+">";
+ if ( (addClosingTag = miscDlg->addClosingTag()) == true)
+ {
+ w->insertTag(tag,QuantaCommon::tagCase( "</"+QuantaCommon::attrCase(element)+">"));
+ } else
+ {
+ w->insertTag(tag,QuantaCommon::tagCase(""));
+ }
+ }
+ }
+ delete miscDlg;
+}
+
+
+/** do quick list */
+void QuantaApp::slotTagQuickList()
+{
+ QString space =" " ;
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+
+ TagQuickListDlg *listDlg = new TagQuickListDlg(this,i18n("Generate List"));
+ if ( listDlg->exec() ) {
+ int i;
+ int n = listDlg->spinBoxRows->value();
+
+ QString tag;
+ if ( listDlg->radioOrdered->isChecked())
+ tag = QString("<ol>\n")+space;
+ else tag = QString("<ul>\n")+space;
+
+ for ( i=0;i<n;i++)
+ if ( qConfig.closeTags )
+ tag += QString(" <li> </li>\n")+space;
+ else
+ tag += QString(" <li> \n")+space;
+
+ if ( listDlg->radioOrdered->isChecked())
+ tag += QString("</ol>");
+ else tag += QString("</ul>");
+
+ w->insertTag( QuantaCommon::tagCase(tag));
+ }
+ delete(listDlg);
+}
+
+void QuantaApp::slotTagEditTable()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ baseNode = parser->rebuild(w);
+ QStringList list = w->tagAreas("table", true, false);
+ bool tableExists = false;
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ int bl, bc, el, ec;
+ int bLine, bCol, eLine, eCol;
+ bLine = bCol = eLine = eCol = 0;
+ QStringList l;
+ QStringList l2;
+ for (QStringList::Iterator it = list.begin(); it != list.end(); ++it)
+ {
+ QuantaCommon::normalizeStructure(*it, l2);
+ l = QStringList::split('\n', *it, true);
+ QStringList coordList = QStringList::split(',', l[0], true);
+ bl = coordList[0].toInt();
+ bc = coordList[1].toInt();
+ el = coordList[2].toInt();
+ ec = coordList[3].toInt();
+ if (QuantaCommon::isBetween(line, col, bl, bc, el, ec) == 0)
+ {
+ tableExists = true;
+ bLine = bl;
+ bCol = bc;
+ eLine = el;
+ eCol = ec;
+ }
+ l.remove(l.begin());
+ }
+
+ TableEditor editor;
+ bool tableRead = true;
+ if (tableExists)
+ {
+ editor.setBaseURL(ViewManager::ref()->activeView()->baseURL());
+ tableRead = editor.setTableArea(bLine, bCol, eLine, eCol, parser);
+ if (!tableRead)
+ {
+ KMessageBox::error(this, i18n("The table structure is invalid. Most probably you forgot to close some tags."), i18n("Cannot Read Table"));
+ }
+ } else
+ {
+ Node *node = parser->nodeAt(line, col);
+ const DTDStruct *dtd = w->defaultDTD();
+ if (node)
+ dtd = node->tag->dtd();
+ bLine = line;
+ bCol = col;
+ eLine = line;
+ eCol = col;
+ editor.createNewTable(w, dtd);
+ }
+ if (tableRead && editor.exec())
+ {
+ QString tableString = editor.readModifiedTable();
+ w->activateParser(false);
+//#ifdef BUILD_KAFKAPART
+// if(w->editIfExt)
+// w->editIfExt->editBegin();
+//#endif
+ if (eLine != bLine || (eLine == bLine && eCol != bCol))
+ w->editIf->removeText(bLine, bCol, eLine, eCol + 1);
+ w->viewCursorIf->setCursorPositionReal((uint)bLine, (uint)bCol);
+ w->insertText(tableString, false);
+//#ifdef BUILD_KAFKAPART
+// if(w->editIfExt)
+// w->editIfExt->editEnd();
+//#endif
+ w->viewCursorIf->setCursorPositionReal(line, col);
+ reparse(true);
+ }
+}
+
+/** Open color Dialog and insert color in the text */
+void QuantaApp::slotTagColor()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ QColor color;
+
+ if (KColorDialog::getColor( color )) {
+ char c[8];
+ sprintf(c,"#%2X%2X%2X",color.red(),color.green(),color.blue());
+ for (int i=0;i<7;i++) if (c[i] == ' ') c[i] = '0';
+ QString scolor = (char *)c;
+ w->insertTag(scolor);
+ }
+}
+
+/** insert date */
+void QuantaApp::slotTagDate()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ time_t tektime;
+ time( &tektime);
+ QString stime = ctime( &tektime);
+
+ w->insertTag( stime);
+}
+
+/** for select form */
+void QuantaApp::slotTagSelect()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ w->insertTag(QuantaCommon::tagCase("<select")+ QuantaCommon::attrCase("name")+QuantaCommon::tagCase("=\"\"><option>"),QuantaCommon::tagCase("</select>"));
+}
+
+void QuantaApp::slotViewInKFM()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ if (w->isModified())
+ {
+ if ( KMessageBox::questionYesNo(this,
+ i18n("The file must be saved before external preview.\n"
+ "Do you want to save and preview?"),
+ i18n("Save Before Preview"),
+ KStdGuiItem::save(),KStdGuiItem::dontSave(), "AskForSaveBeforePreview")
+ == KMessageBox::Yes)
+ {
+ if (w->isUntitled())
+ {
+ quantaApp->slotFileSaveAs();
+ }
+ else
+ {
+ w->save();
+ }
+ } else
+ {
+ return;
+ }
+ }
+ if ( !w->isUntitled() )
+ {
+ KProcess *show = new KProcess(this);
+ KURL url = Project::ref()->urlWithPrefix(w->url());
+ *show << "kfmclient" << "newTab" << url.url();
+ show->start( KProcess::DontCare );
+ }
+}
+
+void QuantaApp::slotViewInLynx()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ if (w->isModified())
+ {
+ if ( KMessageBox::questionYesNo(this,
+ i18n("The file must be saved before external preview.\n"
+ "Do you want to save and preview?"),
+ i18n("Save Before Preview"),KStdGuiItem::save(),KStdGuiItem::dontSave(), "AskForSaveBeforePreview")
+ == KMessageBox::Yes)
+ {
+ if (w->isUntitled())
+ {
+ quantaApp->slotFileSaveAs();
+ }
+ else
+ {
+ w->save();
+ }
+ } else
+ {
+ return;
+ }
+ }
+ if ( !w->isUntitled() )
+ {
+ KProcess *show = new KProcess(this);
+ KURL url = Project::ref()->urlWithPrefix(w->url());
+ *show << "konsole"
+ << "--nohist"
+ << "--notoolbar"
+ << "--caption"
+ << "Lynx Preview - Quanta"
+ << "-e"
+ << "lynx"
+ << url.url();
+ show->start( KProcess::DontCare );
+ }
+}
+
+/** insert clipboard contents (but quote them for HTML first) */
+void QuantaApp::slotPasteHTMLQuoted()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QClipboard *cb = qApp->clipboard();
+ QString text = cb->text();
+
+ if ( ( !text.isNull() ) && (!text.isEmpty() ) )
+ {
+ text.replace( "&", "&amp;" );
+ text.replace( "<", "&lt;" );
+ text.replace( "\"", "&quot;" );
+ text.replace( ">", "&gt;" );
+
+//TODO: Replace only the chars not present in the current encoding.
+ QString encoding = defaultEncoding();
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
+ if (encodingIf)
+ encoding = encodingIf->encoding();
+ if (encoding != "UTF-8" && encoding != "UTF-16" && encoding != "ISO-10646-UCS-2")
+ {
+ for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ {
+ QString s = *it;
+ int begin = s.find("(&#") + 3;
+ if (begin == 1)
+ continue;
+ int length = s.find(";)") - begin + 1;
+ s = s.mid(begin, length - 1);
+ bool ok;
+ int code = s.toInt(&ok);
+ if (!ok || code < 191)
+ continue;
+ text.replace(QChar(code), QString("&#%1;").arg(s));
+ }
+ }
+ unsigned int line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ w->editIf->insertText(line, col, text );
+ }
+ }
+}
+
+/** insert clipboard contents (but quote them as a URL first) */
+void QuantaApp::slotPasteURLEncoded()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ QClipboard *cb = qApp->clipboard();
+ QString text = cb->text();
+
+ if ( ( !text.isNull() ) && (!text.isEmpty() ) )
+ {
+ text = KURL::encode_string( text );
+ unsigned int line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ w->editIf->insertText(line, col, text );
+ }
+ }
+}
+
+
+/** Kate related slots. */
+
+void QuantaApp::slotUndo ()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus && w)
+ {
+ /**MessageBox::information(this, i18n("VPL does not support this functionality yet."),
+ QString::null, "show undo unavailable");*/
+ w->docUndoRedo->undo();
+ return;
+ }
+ if (w)
+ {
+ bool updateClosing = qConfig.updateClosingTags;
+ qConfig.updateClosingTags = false;
+//#ifdef BUILD_KAFKAPART
+// write()->docUndoRedo.undo(false);
+//#else
+ KTextEditor::UndoInterface* undoIf = dynamic_cast<KTextEditor::UndoInterface*>(w->doc());
+ if (undoIf)
+ undoIf->undo();
+//#endif
+ qConfig.updateClosingTags = updateClosing;
+ }
+}
+
+void QuantaApp::slotRedo ()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ {
+ /**KMessageBox::information(this, i18n("VPL does not support this functionality yet."),
+ QString::null, "show redo unavailable");*/
+ w->docUndoRedo->redo();
+ return;
+ }
+ if (w)
+ {
+ bool updateClosing = qConfig.updateClosingTags;
+ qConfig.updateClosingTags = false;
+//#ifdef BUILD_KAFKAPART
+// write()->docUndoRedo.redo(false);
+//#else
+ KTextEditor::UndoInterface* undoIf = dynamic_cast<KTextEditor::UndoInterface*>(w->doc());
+ if (undoIf)
+ undoIf->redo();
+//#endif
+ qConfig.updateClosingTags = updateClosing;
+ }
+}
+
+/** insert special character */
+void QuantaApp::slotInsertChar()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ {
+ SpecialCharDialog S( this, "special_char" );
+ if (S.exec())
+ w->insertTag(S.selection());
+ }
+}
+
+void QuantaApp::slotCut()
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+ Document *w = ViewManager::ref()->activeDocument();
+ if(view && view->hadLastFocus() == QuantaView::VPLFocus)
+ {
+ /*
+ KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
+ QString::null, "show cut unavailable");
+ */
+ KafkaDocument::ref()->slotCut();
+ return;
+ }
+ if(w)
+ {
+ KTextEditor::ClipboardInterface* clip = dynamic_cast<KTextEditor::ClipboardInterface*>(w->view());
+ if(clip)
+ clip->cut();
+ }
+}
+
+void QuantaApp::slotCopy()
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+ Document *w = ViewManager::ref()->activeDocument();
+ if(view && view->hadLastFocus() == QuantaView::VPLFocus)
+ {
+ //KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
+ //QString::null, "show copy unavailable");
+ KafkaDocument::ref()->slotCopy();
+ return;
+ }
+ if (w)
+ {
+ KTextEditor::ClipboardInterface* clip = dynamic_cast<KTextEditor::ClipboardInterface*>(w->view());
+ if (clip)
+ clip->copy();
+ }
+ if (m_htmlPart->view()->hasFocus())
+ {
+ QString selection = m_htmlPart->selectedText();
+ QClipboard *cb = QApplication::clipboard();
+ cb->setText(selection, QClipboard::Clipboard);
+ }
+ else
+ if (m_htmlPartDoc->view()->hasFocus())
+ {
+ QString selection = m_htmlPartDoc->selectedText();
+ QClipboard *cb = QApplication::clipboard();
+ cb->setText(selection, QClipboard::Clipboard);
+ }
+
+}
+
+void QuantaApp::slotPaste()
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+ Document *w = ViewManager::ref()->activeDocument();
+ if(view && view->hadLastFocus() == QuantaView::VPLFocus)
+ {
+ //KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
+ //QString::null, "show paste unavailable");
+ KafkaDocument::ref()->slotPaste();
+ return;
+ }
+ if(w)
+ {
+ KTextEditor::ClipboardInterface* clip = dynamic_cast<KTextEditor::ClipboardInterface*>(w->view());
+ if(clip)
+ clip->paste();
+ }
+}
+
+Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &attr)
+{
+ Node *n = 0L;
+ QuantaView *view = ViewManager::ref()->activeView();
+ if(view && view->document())
+ {
+ Document *w = view->document();
+
+ QString selection;
+ if(view->hadLastFocus() == QuantaView::VPLFocus)
+ selection = KafkaDocument::ref()->getKafkaWidget()->selectedText();
+
+ TagDialog *dlg = new TagDialog(QuantaCommon::tagFromDTD(w->getDTDIdentifier(),tag), selection, attr, ViewManager::ref()->activeView()->baseURL());
+ if (dlg->exec())
+ {
+ n= dlg->buildNode(w);
+ }
+
+ delete dlg;
+ }
+ return n;
+}
+
+
+void QuantaApp::slotShowSourceEditor()
+{
+ if (!showVPLAction->isChecked() && !showSourceAction->isChecked() && !showVPLSourceAction->isChecked())
+ showSourceAction->activate();
+ else
+ ViewManager::ref()->activeView()->slotSetSourceLayout();
+}
+
+void QuantaApp::slotShowVPLAndSourceEditor()
+{
+ if (!showVPLAction->isChecked() && !showSourceAction->isChecked() && !showVPLSourceAction->isChecked())
+ showSourceAction->activate();
+ else
+ ViewManager::ref()->activeView()->slotSetSourceAndVPLLayout();
+}
+
+void QuantaApp::slotShowVPLOnly()
+{
+ if (!showVPLAction->isChecked() && !showSourceAction->isChecked() && !showVPLSourceAction->isChecked())
+ showSourceAction->activate();
+ else
+ ViewManager::ref()->activeView()->slotSetVPLOnlyLayout();
+}
+
+void QuantaApp::initTabWidget(bool closeButtonsOnly)
+{
+ KTabWidget *tab = tabWidget();
+ KAcceleratorManager::setNoAccel(tab);
+ if (tab)
+ {
+ if (qConfig.showCloseButtons == "ShowAlways")
+ {
+ tab->setHoverCloseButton(true);
+ tab->setHoverCloseButtonDelayed(false);
+ } else
+ if (qConfig.showCloseButtons == "ShowDelayed")
+ {
+ tab->setHoverCloseButton(true);
+ tab->setHoverCloseButtonDelayed(true);
+ } else
+ {
+ tab->setHoverCloseButton(false);
+ }
+ if (!closeButtonsOnly)
+ {
+ tab->setTabReorderingEnabled(true);
+ tab->setTabPosition(QTabWidget::Bottom);
+ connect(tab, SIGNAL( contextMenu( QWidget *, const QPoint & ) ), ViewManager::ref(), SLOT(slotTabContextMenu( QWidget *, const QPoint & ) ) );
+ connect(tab, SIGNAL(initiateTabMove(int, int)), this, SLOT(slotTabAboutToMove(int, int))); connect(tab, SIGNAL(movedTab(int, int)), this, SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
+ }
+ }
+ if (!closeButtonsOnly)
+ setToolviewStyle(qConfig.toolviewTabs);
+}
+
+void QuantaApp::slotFileClosed(Document *w)
+{
+ if (w)
+ {
+ KURL url = w->url();
+ if (Project::ref()->hasProject() && Project::ref()->contains(url))
+ {
+ KURL u = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL());
+ m_annotationOutput->writeAnnotations(QuantaCommon::qUrl(u), w->annotations());
+ }
+ }
+}
+
+void QuantaApp::slotCVSCommandExecuted(const QString& command, const QStringList& files)
+{
+ QString file;
+ for (uint i = 0; i < files.count(); i++)
+ {
+ file = files[i];
+ if (Project::ref()->contains(KURL::fromPathOrURL(file)))
+ {
+ emit eventHappened("after_" + command, file, QString::null);
+ }
+ }
+}
+
+//overridden KMdiMainFrm slots
+void QuantaApp::closeActiveView()
+{
+ ViewManager::ref()->removeActiveView();
+}
+
+void QuantaApp::closeAllViews()
+{
+ ViewManager::ref()->closeAll();
+}
+
+void QuantaApp::resetDockLayout()
+{
+ QStringList groupList = m_config->groupList();
+ for (QStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
+ {
+ if ((*it).startsWith("dock_setting_default"))
+ {
+ m_config->deleteGroup(*it);
+ }
+ }
+ m_config->sync();
+ QWidget *mainDockWidget = getMainDockWidget();
+ addToolWindow(fTab, KDockWidget::DockLeft, mainDockWidget);
+ addToolWindow(ProjectTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
+ addToolWindow(TemplatesTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
+ addToolWindow(StructTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
+ addToolWindow(scriptTab, KDockWidget::DockLeft, mainDockWidget);
+ addToolWindow(dTab, KDockWidget::DockRight, mainDockWidget);
+ addToolWindow(aTab, KDockWidget::DockRight, mainDockWidget);
+ addToolWindow(m_messageOutput, KDockWidget::DockBottom, mainDockWidget);
+ addToolWindow(m_problemOutput, KDockWidget::DockBottom, mainDockWidget);
+ addToolWindow(m_annotationOutput, KDockWidget::DockBottom, mainDockWidget);
+ if (m_previewToolView)
+ m_previewToolView = addToolWindow(m_htmlPart->view(), KDockWidget::DockBottom, mainDockWidget);
+ if (m_documentationToolView)
+ m_documentationToolView= addToolWindow(m_htmlPartDoc->view(), KDockWidget::DockBottom, mainDockWidget);
+ for (QMap<QWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
+ {
+ QWidget *widget = it.key();
+ if (dynamic_cast<ServerTreeView*>(widget))
+ addToolWindow(widget, KDockWidget::DockRight, mainDockWidget);
+ if (dynamic_cast<VariablesListView*>(widget))
+ addToolWindow(widget, KDockWidget::DockLeft, mainDockWidget);
+ if (dynamic_cast<DebuggerBreakpointView*>(widget))
+ addToolWindow(widget, KDockWidget::DockBottom, mainDockWidget);
+ }
+}
+
+KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidget::DockPosition def)
+{
+ QMap<KDockWidget::DockPosition,QString> maps;
+ QMap<QString,QString> map;
+ QString dock = widget->name();
+
+ // Which groups to search through
+ maps[KDockWidget::DockTop] = "dock_setting_default::KMdiDock::topDock";
+ maps[KDockWidget::DockLeft] = "dock_setting_default::KMdiDock::leftDock";
+ maps[KDockWidget::DockBottom] = "dock_setting_default::KMdiDock::bottomDock";
+ maps[KDockWidget::DockRight] = "dock_setting_default::KMdiDock::rightDock";
+
+ // Loop the groups
+ for(QMap<KDockWidget::DockPosition,QString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
+ {
+ // Loop the items in the group
+ map = quantaApp->config()->entryMap(itmaps.data());
+ for(QMap<QString,QString>::Iterator it = map.begin(); it != map.end(); ++it )
+ {
+ // If we found it, return the key of the group
+ if(it.data() == dock)
+ return itmaps.key();
+ }
+ }
+ return def;
+}
+
+void QuantaApp::switchToToplevelMode()
+{
+ KMdiMainFrm::switchToToplevelMode();
+ resetDockLayout();
+ initTabWidget();
+}
+
+void QuantaApp::switchToChildframeMode()
+{
+ KMdiMainFrm::switchToChildframeMode();
+ resetDockLayout();
+ initTabWidget();
+}
+
+void QuantaApp::switchToIDEAlMode()
+{
+ KMdiMainFrm::switchToIDEAlMode();
+ resetDockLayout();
+ initTabWidget();
+}
+
+void QuantaApp::switchToTabPageMode()
+{
+ KMdiMainFrm::switchToTabPageMode();
+ resetDockLayout();
+ initTabWidget();
+}
+
+void QuantaApp::slotPreviewBeingClosed()
+{
+ m_previewVisible = false;
+ m_noFramesPreview = false;
+ m_previewToolView = 0L; //this automatically deleted, so set to 0L
+ }
+
+void QuantaApp::slotDockWidgetHasUndocked(KDockWidget *widget)
+{
+ if (m_previewToolView && m_previewToolView->wrapperWidget() == widget)
+ slotPreviewBeingClosed();
+}
+
+void QuantaApp::slotTabDragged(QWidget *widget)
+{
+ QuantaView *view = dynamic_cast<QuantaView*>(widget);
+ if (view && view->document())
+ {
+ QString url = view->document()->url().url();
+ QDragObject *d = new QTextDrag( url, this );
+ d->dragCopy();
+ }
+}
+
+void QuantaApp::setTabToolTip(QWidget *w, const QString &toolTipStr)
+{
+ if (tabWidget())
+ tabWidget()->setTabToolTip(w, toolTipStr);
+}
+
+void QuantaApp::createPreviewPart()
+{
+ m_htmlPart = new WHTMLPart(this, "rightHTML", true);
+ m_htmlPart->view()->resize(0, 0);
+ m_htmlPart->view()->setIcon(UserIcon("preview"));
+ m_htmlPart->view()->setCaption(i18n("Preview"));
+ slotNewPart(m_htmlPart, false);
+ connect(m_htmlPart, SIGNAL(previewHasFocus(bool)), this, SLOT(slotPreviewHasFocus(bool)));
+ connect(m_htmlPart, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
+ connect(m_htmlPart, SIGNAL(openFile(const KURL&, const QString&, bool)), this, SLOT(slotFileOpen(const KURL&, const QString&, bool)));
+ connect(m_htmlPart, SIGNAL(showPreview(bool)), this, SLOT(slotShowPreviewWidget(bool)));
+
+}
+
+void QuantaApp::createDocPart()
+{
+ m_htmlPartDoc = new WHTMLPart(this, "docHTML");
+ m_htmlPartDoc->view()->resize(0, 0);
+ m_htmlPartDoc->view()->setIcon(SmallIcon("contents"));
+ m_htmlPartDoc->view()->setCaption(i18n("Documentation"));
+ slotNewPart(m_htmlPartDoc, false);
+ connect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
+}
+
+void QuantaApp::insertTagActionPoolItem(QString const& action_item)
+{
+ for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ if(action_item == *it)
+ return;
+
+ m_tagActionPool += action_item;
+}
+
+void QuantaApp::removeTagActionPoolItem(QString const& action_item)
+{
+ for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ {
+ if(action_item == *it)
+ {
+ m_tagActionPool.remove(it);
+ return;
+ }
+ }
+}
+
+void QuantaApp::slotHTMLPartDeleted(QObject *object)
+{
+ if (object == m_htmlPart)
+ {
+ createPreviewPart();
+ slotShowPreviewWidget(false);
+ } else
+ createDocPart();
+}
+
+void QuantaApp::slotTabMoved(int from, int to)
+{
+ KMdiChildView *view = m_pDocumentViews->at(from);
+ m_pDocumentViews->remove(from);
+ m_pDocumentViews->insert(to, view);
+ connect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+}
+
+void QuantaApp::slotTabAboutToMove(int from, int to)
+{
+ Q_UNUSED(from);
+ Q_UNUSED(to);
+ disconnect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+}
+
+QString QuantaApp::currentURL() const
+{
+ return ViewManager::ref()->currentURL();
+}
+
+void QuantaApp::slotAnnotate()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ uint line, column;
+ w->viewCursorIf->cursorPositionReal(&line, &column);
+ KDialogBase editDlg(this, "annotate", true, i18n("Annotate Document"), KDialogBase::Ok | KDialogBase::Cancel /*| KDialogBase::User1*/);
+ KTextEdit editor(&editDlg);
+ editor.setTextFormat(PlainText);
+ editor.setText(w->annotationText(line));
+ editDlg.setMainWidget(&editor);
+ //editDlg.setButtonText(KDialogBase::User1, i18n("Clear"));
+ if (editDlg.exec())
+ {
+ w->setAnnotationText(line, editor.text());
+ }
+}
+
+void QuantaApp::dropEvent(QDropEvent* event)
+{
+ if (KURLDrag::canDecode(event))
+ {
+ KURL::List fileList;
+ KURLDrag::decode(event, fileList);
+
+ if(fileList.empty())
+ return;
+
+ slotFileOpen(fileList, defaultEncoding());
+ }
+}
+
+void QuantaApp::dragEnterEvent( QDragEnterEvent *e)
+{
+ e->accept();
+}
+
+#include "quanta.moc"
diff --git a/quanta/src/quanta.desktop b/quanta/src/quanta.desktop
new file mode 100644
index 00000000..dcf8fbda
--- /dev/null
+++ b/quanta/src/quanta.desktop
@@ -0,0 +1,95 @@
+[Desktop Entry]
+Name=Quanta Plus
+Name[br]=Quanta+
+Name[hi]=कà¥à¤µà¤¾à¤‚टा पà¥à¤²à¤¸
+Name[ne]=कà¥à¤µà¤¾à¤¨à¥à¤Ÿà¤¾ पà¥à¤²à¤¸
+Name[sv]=Quanta plus
+Name[ta]=கà¯à®µà®¾à®£à¯à®Ÿà®¾ பà¯à®³à®¸à¯
+Exec=quanta %U
+Icon=quanta
+Type=Application
+MimeType=text/html;application/x-webprj;
+DocPath=quanta/index.html
+GenericName=Web Development Environment
+GenericName[bg]=Разработка на уеб приложениÑ
+GenericName[ca]=Entorn de desenvolupament web
+GenericName[cs]=Vývojové prostředí pro web
+GenericName[da]=Internetudviklingsomgivelser
+GenericName[de]=Web-Entwicklungsumgebung
+GenericName[el]=ΠεÏιβάλλον ανάπτυξης ιστοσελίδων
+GenericName[es]=Entorno de desarrollo web
+GenericName[et]=Veebiarenduskeskkond
+GenericName[eu]=Web garapenerako ingurunea
+GenericName[fa]=محیط توسعۀ وب
+GenericName[fi]=WWW:n kehitysympäristö
+GenericName[fr]=Environnement de développement Internet
+GenericName[gl]=Entorno de desenvolvemento de páxinas web
+GenericName[hi]=वेब डेवलपमेंट वातावरण
+GenericName[hu]=Webfejlesztő környezet
+GenericName[is]=Vefþróunarumhverfi
+GenericName[it]=Ambiente per lo sviluppo Web
+GenericName[ja]=ウェブ開発環境
+GenericName[ka]=ვებ დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბის გáƒáƒ áƒ¡áƒ˜
+GenericName[lt]=Žiniatinklio kūrimo aplinka
+GenericName[ms]=Persekitaran Pembangunan Web
+GenericName[nds]=Ümgeven för Nett-Entwickeln
+GenericName[ne]=वेब विकास परिवेश
+GenericName[nl]=Omgeving voor webdevelopment
+GenericName[pl]=Åšrodowisko do tworzenia stron WWW
+GenericName[pt]=Ambiente de Desenvolvimento Web
+GenericName[pt_BR]=Ambiente de Desenvolvimento Web
+GenericName[ru]=Среда web-разработки
+GenericName[sk]=Prostredie na vývoj Web aplikácií
+GenericName[sl]=Spletno razvijalno okolje
+GenericName[sr]=Окружење за веб развој
+GenericName[sr@Latn]=Okruženje za veb razvoj
+GenericName[sv]=Webbutvecklingsmiljö
+GenericName[ta]=இணைய மேமà¯à®ªà®¾à®Ÿà¯à®Ÿà¯à®šà¯ சூழலà¯
+GenericName[tg]=Фазои тайёр кардани-Web
+GenericName[tr]=Web Geliştirme Ortamı
+GenericName[uk]=Середовище веб-розробки
+GenericName[zh_CN]=Web å¼€å‘环境
+GenericName[zh_HK]=網é é–‹ç™¼ç’°å¢ƒ
+GenericName[zh_TW]=網é é–‹ç™¼ç’°å¢ƒ
+Comment=Web Development Environment
+Comment[bg]=Среда за разработка на уеб приложениÑ
+Comment[ca]=Entorn de desenvolupament web
+Comment[cs]=Vývojové prostředí pro web
+Comment[da]=Internetudviklingsomgivelser
+Comment[de]=Web-Entwicklungsumgebung
+Comment[el]=ΠεÏιβάλλον ανάπτυξης ιστοσελίδων
+Comment[es]=Entorno de desarrollo web
+Comment[et]=Veebiarenduskeskkond
+Comment[eu]=Web garapenerako ingurunea
+Comment[fa]=محیط توسعۀ وب
+Comment[fi]=WWW:n kehitysympäristö
+Comment[fr]=Environnement de développement Internet
+Comment[gl]=Entorno de desenvolvemento de páxinas web
+Comment[hi]=वेब डेवलपमेंट वातावरण
+Comment[hu]=Webfejlesztő környezet
+Comment[is]=Vefþróunarumhverfi
+Comment[it]=Ambiente per lo sviluppo Web
+Comment[ja]=ウェブ開発環境
+Comment[ka]=ვებ დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბის გáƒáƒ áƒ¡áƒ˜
+Comment[lt]=Žiniatinklio kūrimo aplinka
+Comment[ms]=Persekitaran Pembangunan Web
+Comment[nds]=Ümgeven för Nett-Entwickeln
+Comment[ne]=वेब विकास परिवेश
+Comment[nl]=Omgeving voor webdevelopment
+Comment[pl]=Åšrodowisko do tworzenia stron WWW
+Comment[pt]=Ambiente de desenvolvimento Web
+Comment[pt_BR]=Ambiente de Desenvolvimento Web
+Comment[ru]=Среда web-разработки
+Comment[sk]=Prostredie na vývoj Web aplikácií
+Comment[sl]=Spletno razvijalno okolje
+Comment[sr]=Окружење за веб развој
+Comment[sr@Latn]=Okruženje za veb razvoj
+Comment[sv]=Webbutvecklingsmiljö
+Comment[ta]=இணைய மேமà¯à®ªà®¾à®Ÿà¯à®Ÿà¯à®šà¯ சூழலà¯
+Comment[tg]=Фазои тайёр кардани-Web
+Comment[tr]=Web Geliştirme Ortamı
+Comment[uk]=Середовище веб-розробки
+Comment[zh_CN]=Web å¼€å‘环境
+Comment[zh_HK]=網é é–‹ç™¼ç’°å¢ƒ
+Comment[zh_TW]=網é é–‹ç™¼ç’°å¢ƒ
+Categories=Qt;KDE;Development;WebDevelopment;
diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h
new file mode 100644
index 00000000..5cee4c1f
--- /dev/null
+++ b/quanta/src/quanta.h
@@ -0,0 +1,664 @@
+/***************************************************************************
+ quanta.h - description
+ -------------------
+ begin : ?? ??? 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 by Andras Mantia <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 QUANTA_H
+#define QUANTA_H
+
+#define QUANTA_PACKAGE "quanta"
+#define QUANTA_VERSION "3.5.10"
+
+#define IDS_STATUS 1
+#define IDS_INS_OVR 2
+#define IDS_MODIFIED 3
+#define IDS_STATUS_CLM 4
+// Number 5 is used by the debugger, but not added until debugger is activated
+#define IDS_STATUS_DEBUGGER 5
+
+#define IDS_DEFAULT "Ready."
+
+// include files for Qt
+#include <qmap.h>
+#include <qdict.h>
+#include <qvaluelist.h>
+#include <qstrlist.h>
+#include <qptrlist.h>
+
+// include files for KDE
+#include <kdeversion.h>
+#include <kdockwidget.h>
+#include <kparts/browserextension.h>
+#include <kparts/dockmainwindow.h>
+
+#include <kmdimainfrm.h>
+
+//app includes
+#include "dcopwindowmanagerif.h"
+
+// forward declaration
+class DCOPSettings;
+class DCOPQuanta;
+
+class QuantaPluginInterface;
+
+class QuantaDoc;
+class QuantaView;
+class QNewDTEPStuff;
+class QNewToolbarStuff;
+class QNewTemplateStuff;
+class QNewScriptStuff;
+class QNewDocStuff;
+
+class QTabWidget;
+class QWidgetStack;
+class QListViewItem;
+
+class QPopupMenu;
+
+class WHTMLPart;
+class KHTMLView;
+
+class KAction;
+class KToggleAction;
+class KProcess;
+class KSelectAction;
+class KRecentFilesAction;
+class KToolBarPoupAction;
+class KTextEdit;
+
+class TagAction;
+class Node;
+class Parser;
+class DocTreeView;
+class FilesTreeView;
+class ScriptTreeView;
+class EnhancedTagAttributeTree;
+class Project;
+class AnnotationOutput;
+class MessageOutput;
+class QDomDocument;
+class Document;
+class DebuggerManager;
+class QuantaInit;
+class KToolBarPopupAction;
+class KTempFile;
+class KParts::Part;
+class KParts::PartManager;
+namespace KTextEditor
+{
+ class Mark;
+ class View;
+}
+
+struct DirInfo;
+struct EventAction;
+struct ToolbarEntry;
+
+
+/**
+ * The base class for Quanta application windows.
+ */
+class QuantaApp : public KMdiMainFrm, public DCOPWindowManagerIf
+{
+ Q_OBJECT
+
+friend class QuantaInit;
+
+public:
+ QuantaApp(int mdiMode);
+ ~QuantaApp();
+
+ QuantaDoc *doc() const {return m_doc; }
+ QPopupMenu *tagsMenu() const {return m_tagsMenu;}
+ KConfig *config() const {return m_config;}
+
+//TODO: check if we really need these "get" methods (and get rid o get)
+ MessageOutput *messageOutput() const {return m_messageOutput;}
+ MessageOutput *problemOutput() const {return m_problemOutput;}
+ AnnotationOutput *annotationOutput() const {return m_annotationOutput;}
+
+ DebuggerManager *debugger() const {return m_debugger;}
+ KParts::PartManager *partManager() {return m_partManager;}
+
+ QWidget* createContainer(QWidget *parent, int index, const QDomElement &element, int &id );
+ void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, int id );
+/** Returns the project's base URL if it exists, the HOME dir if there is no project and no opened document (or the current opened document was not saved yet), and the base URL of the opened document, if it is saved somewhere.
+
+ maps to the same function in Project*/
+ KURL projectBaseURL() const;
+
+ /** Returns the project (if there is one loaded) or global default encoding. */
+ QString defaultEncoding();
+ /** Returns the interface number for the currently active editor. */
+ int currentEditorIfNum() const;
+ /** Return the URL of the currently active document */
+ QString currentURL() const;
+ /** Return the URL of the currently project */
+ QString projectURL() const;
+ /** Return the list of opened URLs and their editor interface numbers*/
+ QStringList openedURLs() const;
+ QString saveCurrentFile();
+ /**
+ * Sets the DTEP for the current document.
+ * @param dtepName the name (nickname or full name) of the DTEP
+ * @param convert if true, converts the !DOCTYPE line to the new DTEP
+ */
+ void setDtep(const QString& dtepName, bool convert);
+ QStringList tagAreas(const QString& name, bool includeCoordinates, bool skipFoundContent) const;
+ QString documentFolderForURL(const QString &url);
+ QString urlWithPreviewPrefix(const QString &url);
+ void addFileToProject(const QString &url);
+ void addFolderToProject(const QString &url);
+ void uploadURL(const QString &url, const QString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
+ void newCursorPosition(const QString &file, int lineNumber, int columnNumber);
+ void newDebuggerPosition(const QString &file, int lineNumber);
+ void openFile(const QString &file, int lineNumber, int columnNumber);
+
+ /** reparse current document and initialize node. */
+ void reparse(bool force);
+
+ bool structTreeVisible() const;
+ bool previewVisible() const {return m_previewVisible;}
+
+ //return the old Cursor position
+ void oldCursorPos(uint &line, uint &col) {line = oldCursorLine; col = oldCursorCol;}
+
+ QStringList selectors(const QString& tag);
+ QStringList idSelectors();
+ WHTMLPart *documentationPart() {return m_htmlPartDoc;}
+ /** Show the toolbar which is in url. If it was not loaded yet, it loads the
+ toolbar from the file */
+ void showToolbarFile(const KURL &url);
+
+ void setParserEnabled(bool enabled) {m_parserEnabled = enabled;}
+
+ /** tabs for left panel */
+ DocTreeView *dTab;
+ EnhancedTagAttributeTree *aTab;
+
+/**
+ * Show a TagDialog of Node tag, with attrs attr.
+ * @param tag The name of the new Node to create.
+ * @param attr The string containing the attrs of the new Node to create.
+ * @return Returns a new Node created according to the contents of the TagDialog.
+ */
+ Node *showTagDialogAndReturnNode(const QString &tag, const QString &attr = QString::null);
+ /** Returns the baseURL of the document. */
+ KURL baseURL();
+
+ void startIdleTimer();
+
+ /** Called when a document was closed. Resets some variables. */
+ void slotFileClosed(Document *w);
+ void setTabToolTip(QWidget *w, const QString& toolTipStr);
+
+ void createPreviewPart();
+ void createDocPart();
+
+ /**
+ * This is a pool for actions waiting for being applied (VPL only yet).
+ * For example, whee a user presses the bold action, it isn't immediately applied on the document.
+ * If the user presses a key right away the character is inserted inside the tags for the queued actions.
+ * If the user changes the place of the cursor, the actions waiting for being inserted are removed.
+ */
+ QStringList const& tagActionPool() const {return m_tagActionPool;}
+ void insertTagActionPoolItem(QString const& action_item);
+ void removeTagActionPoolItem(QString const& action_item);
+ void removeAllTagActionPoolItems() {m_tagActionPool.clear();}
+ /** Updates the structure and attribute treeview. */
+ void updateTreeViews();
+ void setTitle(const QString&);
+
+ QPtrList<TagAction> const& tagActions() const {return m_tagActions;}
+
+ /** Clicked word or selected text for context sensitive menu in editor */
+ QString popupWord;
+
+signals: // Signals
+ /** signal used to hide the splash screen */
+ void showSplash(bool);
+ // trees need reload because hidden files option changed
+ void reloadAllTrees();
+
+ /** Emitted when some kind of event that can have associated actions has happened. */
+ void eventHappened(const QString&, const QString&, const QString& );
+
+ void toolbarRemoved(const QString&);
+
+ void showMessage(const QString&, bool);
+ void clearMessages();
+
+public slots:
+ void slotFileNew();
+ void slotFileOpen();
+ void slotFileOpen(const KURL &url);
+ void slotFileOpen(const KURL &url, const QString &encoding);
+ void slotFileOpen(const KURL &url, const QString &encoding, bool readOnly);
+ void slotFileOpen(const KURL::List &urls, const QString& encoding);
+ void slotFileSave();
+ bool slotFileSaveAs(QuantaView *viewToSave = 0L);
+ void slotFileSaveAsLocalTemplate();
+ void slotFileSaveAsProjectTemplate();
+ void slotFileSaveSelectionAsLocalTemplate();
+ void slotFileSaveSelectionAsProjectTemplate();
+ void slotFileSaveAll();
+ void slotFileReload(QuantaView *view = 0L);
+ void slotFileReloadAll();
+ /** Close the document specified in the parameter if it's opened */
+ void slotFileClose(const KURL &url);
+ void slotFileCloseAll();
+ void slotFileQuit();
+
+ void slotOpenFileInPreview(const KURL &url);
+ void slotImageOpen(const KURL &url);
+ void slotFileOpenRecent(const KURL &url);
+ void slotInsertTag(const KURL&, DirInfo);
+
+ void slotEditFindInFiles();
+ /// open url in documentation window
+ void openDoc(const QString& url);
+
+ void slotContextHelp();
+
+ void slotBack();
+ void slotForward();
+
+ void statusBarTimeout();
+ /** Shows the message in the status bar.
+ WARNING: Don't use in place where nothing should happen until the function
+ exits (like in startup code, DTD reading, etc.) as it calls processEvents() and
+ unexpected things may happen. */
+ void slotStatusMsg(const QString &text);
+
+ void slotNewStatus();
+ void slotNewLineColumn();
+// void slotUpdateStatus(QWidget*);FIXME:
+
+ /** repaint preview */
+ void slotRepaintPreview();
+ /** toggles showing the preview */
+ void slotToggleShowPreview();
+ /** Shows the preview widget and repaints the preview or
+ hides the preview widget and restores the original document
+ */
+ void slotShowPreviewWidget(bool show);
+ /** Called from the view manager when the status of the preview must change:
+ - hide if the preview was in the editor area
+ - update if the preview is in a toolview
+ */
+ void slotChangePreviewStatus();
+ /** Called when the preview widget got or lost the focus */
+ void slotPreviewHasFocus(bool focus);
+
+ void slotShowMessagesView();
+ void slotShowProblemsView();
+ void slotShowAnnotationView();
+
+ void slotContextMenuAboutToShow();
+
+ /** options slots */
+ void slotShowMenuBar();
+ void slotPreviewOptions();
+ void slotOptions();
+ void slotOptionsConfigureKeys();
+ void slotOptionsConfigureToolbars();
+ void slotNewToolbarConfig();
+ /** Configure toolbars, show defaultToolbar by default */
+ void slotConfigureToolbars(const QString& defaultToolbar = QString::null);
+ void slotOptionsConfigureActions();
+
+ void setCursorPosition(int row, int col );
+ void gotoFileAndLine(const QString& filename, int line, int column);
+
+ void selectArea(int line1, int col1, int line2, int col2);
+
+ /** Insert the content of the url into the current document. */
+ void slotInsertFile(const KURL& url);
+ /** Sends a toolbar in mail. */
+ void slotSendToolbar();
+ /** Removes a user toolbar from the toolbars. */
+ bool slotRemoveToolbar();
+ /** Adds a new, empty toolbar. */
+ void slotAddToolbar();
+ /** Saves a toolbar as local specific. */
+ void slotSaveLocalToolbar();
+ /** Saves a toolbar as project specific. */
+ void slotSaveProjectToolbar();
+ /** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
+ void slotLoadToolbarForDTD(const QString& dtdName);
+ /** Load an user toolbar from the disk. */
+ void slotLoadToolbarFile(const KURL& url);
+ /** Load an user toolbar from the disk. */
+ void slotLoadToolbar();
+ /** Load a global toolbar from the disk. */
+ void slotLoadGlobalToolbar();
+ /** Remove the toolbar named "name". */
+ bool slotRemoveToolbar(const QString& name);
+ /** Rename the toolbar named "name". */
+ void slotRenameToolbar(const QString& name);
+ /** Rename the toolbar. */
+ void slotRenameToolbar();
+ /** Delete an action */
+ void slotDeleteAction(KAction *action);
+ /** Remove the action from toolbar*/
+ void slotRemoveAction(const QString&, const QString& actionName);
+ /** Edit the action */
+ void slotEditAction(const QString&);
+ /** Creates a new, empty action */
+ void slotNewAction();
+ /** Creates a script action for a_scriptURL using the a_interpreter as the script
+ interpreter application */
+ void slotAssignActionToScript(const KURL&a_scriptURL, const QString& a_interpreter);
+
+ /** Change the DTD/DTEP of the current document. */
+ void slotChangeDTD();
+ /** Edit a DTD/DTEP description. */
+ void slotEditDTD();
+ /** Called when the user explicetly requested the completion box.*/
+ void slotShowCompletion();
+ /** Called when the user explicetly requested the completion hint.*/
+ void slotShowCompletionHint();
+ /** Show or hide the groups for dtepName in the structure tree.
+ The special value of "clear" for dtepName means show groups
+ for all DTEPs found in the document.*/
+ void slotShowGroupsForDTEP(const QString& dtepName, bool show);
+ /** Build the project specific toolbar menu. */
+ void slotBuildPrjToolbarsMenu();
+
+ void slotReparse();
+ void slotForceReparse();
+
+ void slotExpandAbbreviation();
+
+ /** Format the code of the document */
+ void slotCodeFormatting();
+ /** Show the Document Properties Dialog */
+ void slotDocumentProperties();
+ /** Show the Document Properties Dialog
+ * If forceInsertionOfMinimalTree and the user haven't modified something in the dialog,
+ * it will anyway insert a Minimal tree (HTML, BODY, ...)
+ */
+ void documentProperties(bool forceInsertionOfMinimalTree = false);
+ /** No descriptions */
+ void slotAutosaveTimer();
+
+ void slotHideSplash() {emit showSplash(false);}
+
+ void slotConvertCase();
+
+ /** Reload the tree of the StructTreeView */
+ void slotReloadStructTreeView(bool groupOnly = false);
+
+ void slotReportBug();
+ /** registers a new part in the partmanager */
+ void slotNewPart(KParts::Part *newPart, bool setActiv);
+
+ void slotUploadFile(QuantaView *view=0L);
+ void slotDeleteFile(QuantaView *view=0L);
+
+ /** Called when the CVS command working on files was executed successfully. */
+ void slotCVSCommandExecuted(const QString &command, const QStringList &files);
+
+ /** Called when the preview or documentation part is deleted. */
+ void slotHTMLPartDeleted(QObject *object);
+
+ void slotRefreshActiveWindow();
+
+ bool slotEnableIdleTimer(bool enable);
+
+//Overridden KMdiMainFrm slots
+ virtual void closeAllViews();
+ virtual void closeActiveView();
+ virtual void switchToToplevelMode();
+ virtual void switchToChildframeMode();
+ virtual void switchToIDEAlMode();
+ virtual void switchToTabPageMode();
+ /** appends all visible user toolbar urls to the list */
+ void slotGetUserToolbarFiles(KURL::List *list);
+
+ // Get saved position of dock
+ KDockWidget::DockPosition prevDockPosition(QWidget* dock, KDockWidget::DockPosition def);
+
+protected slots:
+ void slotDockWidgetHasUndocked(KDockWidget *widget);
+ void slotPreviewBeingClosed();
+ /** No descriptions */
+ void slotMakeDonation();
+ /** No descriptions */
+ void slotHelpHomepage();
+ /** Show or hide the DTD toolbar */
+ void slotToggleDTDToolbar(bool show);
+ /** Loads a DTEP*/
+ void slotLoadDTEP();
+ /** Sends a DTEP in email */
+ void slotEmailDTEP();
+ /** Downloads a DTEP from the main server */
+ void slotDownloadDTEP();
+ /** Uploads a DTEP to the main server */
+ void slotUploadDTEP();
+ /** Downloads a toolbar from the main server */
+ void slotDownloadToolbar();
+ /** Uploads a toolbar to the main server */
+ void slotUploadToolbar();
+ /** Enable/Disable Smart Tag Insertion */
+ void slotSmartTagInsertion();
+ /** Downloads a template from the main server */
+ void slotDownloadTemplate();
+ /** Uploads a template to the main server */
+ void slotUploadTemplate(const QString &fileName);
+ /** Downloads a script from the main server */
+ void slotDownloadScript();
+ /** Uploads a script to the main server */
+ void slotUploadScript(const QString &fileName);
+ /** Downloads a documentation from the main server */
+ void slotDownloadDoc();
+ /** Shows tip of the day */
+ void slotHelpTip();
+ /** Show the user mailing list sign up */
+ void slotHelpUserList();
+ void slotOpenFileUnderCursor();
+ void slotUploadOpenedFiles();
+ /** Called after there was no user activity - cursor movement - for xx ms*/
+ void slotIdleTimerExpired();
+ void slotShowNoFramesPreview();
+ /** Get script output */
+ void slotGetScriptOutput(KProcess*, char*, int);
+ /** Get script error */
+ void slotGetScriptError(KProcess*, char*, int);
+ /** Notify when process exits */
+ void slotProcessExited(KProcess*);
+ /** External app execution timeout handling */
+ void slotProcessTimeout();
+
+ /** connected to the part manager, activates a new part */
+ void slotActivePartChanged(KParts::Part * );
+
+ void slotTagMail();
+ void slotTagQuickList();
+ void slotTagEditTable();
+ void slotTagColor();
+ void slotTagDate();
+ void slotTagSelect();
+ /** Add the starting and closing text for a
+ user specified tag. */
+ void slotTagMisc();
+ void slotEditCurrentTag();
+ void slotSelectTagArea();
+ void slotSelectTagArea(Node *node);
+
+ void slotInsertCSS();
+ void slotFrameWizard();
+ void slotViewInKFM();
+ void slotViewInLynx();
+
+ void slotPasteHTMLQuoted();
+ void slotPasteURLEncoded();
+ void slotInsertChar();
+
+//Edit
+ void slotUndo ();
+ void slotRedo ();
+ void slotCut();
+ void slotCopy();
+ void slotPaste();
+
+ void slotShowSourceEditor();
+ void slotShowVPLAndSourceEditor();
+ void slotShowVPLOnly();
+ void slotTabDragged(QWidget *widget);
+ void slotTabMoved(int from, int to);
+ void slotTabAboutToMove(int from, int to);
+ void slotAnnotate();
+
+protected:
+ /** Create a DTEP tarball which can be uploaded or sent in email. Returns
+ * the name of the created file or QString::null if creation has failed.
+ */
+ QString createDTEPTarball();
+
+ /** Create a toolbar tarball which can be uploaded or sent in email. Returns
+ * the name of the created file or QString::null if creation has failed.
+ */
+ QString createToolbarTarball();
+
+ /** Ask for save all the modified user toolbars. */
+ bool removeToolbars();
+ /** Returns true if all toolbars are hidden, false otherwise. */
+ bool allToolbarsHidden() const;
+ /** No descriptions */
+ virtual void focusInEvent(QFocusEvent*);
+ void saveOptions();
+
+ virtual bool queryClose();
+ void saveAsTemplate (bool projectTemplate, bool selectionOnly = false);
+ /** Saves a toolbar as local or project specific. */
+ bool saveToolbar(bool localToolbar = true, const QString& toolbarToSave = QString::null, const KURL& destURL = KURL());
+ /** Saves the toolbar and the actions. Returns the name of the actions file*/
+ KURL saveToolbarToFile(const QString& toolbarName,const KURL& destFile);
+ /** Makes the tabwidget look and behave like we want. If closeButtonsOnly is true,
+ only the close button behavior is changed. */
+ void initTabWidget(bool closeButtonsOnly = false);
+
+ void dropEvent(QDropEvent *ev);
+ void dragEnterEvent ( QDragEnterEvent * );
+
+ void resetDockLayout();
+
+ ScriptTreeView *scriptTab;
+
+private:
+ FilesTreeView *fTab;
+ ToolbarEntry *toolbarByURL(const KURL& url);
+ /** Message output window */
+ MessageOutput *m_messageOutput;
+ MessageOutput *m_problemOutput;
+ AnnotationOutput *m_annotationOutput;
+ KMdiToolViewAccessor* m_messageOutputView;
+ KMdiToolViewAccessor* m_problemsOutputView;
+ KMdiToolViewAccessor* m_annotationOutputView;
+ KMdiToolViewAccessor* m_previewToolView;
+ KMdiToolViewAccessor* m_documentationToolView;
+ Document *m_previewedDocument;
+
+ // Debugger
+ DebuggerManager *m_debugger;
+
+ QuantaPluginInterface *m_pluginInterface;
+
+ QPopupMenu *m_tagsMenu;
+
+ // config
+ KConfig *m_config;
+
+ /** HTML class for preview */
+ WHTMLPart *m_htmlPart;
+ WHTMLPart *m_htmlPartDoc;
+
+ // DOC & VIEW
+ QuantaDoc *m_doc;
+
+ /** parsered tree of document */
+ QTimer *statusbarTimer;
+
+ // ACTIONS
+ KRecentFilesAction *projectToolbarFiles;
+
+ KToggleAction *showVPLAction, *showSourceAction, *showVPLSourceAction, *showDTDToolbar;
+ KToolBarPopupAction *showPreviewAction;
+
+ KAction *saveAction, *saveAllAction;
+
+ KAction *editTagAction, *selectTagAreaAction;
+
+ QDomDocument* m_actions;
+
+ QPtrList<KTextEditor::Mark> markList;
+
+ int currentPageIndex;
+ uint userToolbarsCount;
+ bool previewCopyMade;
+ KTempFile *previewTmpFile;
+
+ uint cursorLine;
+ uint cursorCol;
+ uint oldCursorLine;
+ uint oldCursorCol;
+ bool m_previewVisible;
+ bool m_noFramesPreview;
+ bool m_parserEnabled; ///< enables/disables reparsing. If false, even a forced reparse is ignored (used when opening multiple files)
+
+ QString m_scriptOutput;
+
+ QStringList m_tagActionPool;
+ QPtrList<TagAction> m_tagActions;
+
+protected: // Protected attributes
+ /** Timer to refresh the structure tree. */
+ QTimer *refreshTimer;
+ /** Timer to detect idle periods. Every time the cursor moves the timer is
+ restarted.*/
+ QTimer *idleTimer;
+ /** The toolbars for this DTD are currently shown to the user. */
+ QString currentToolbarDTD;
+ KDockWidget *m_oldTreeViewWidget;
+ /** The ids of the widgets visible before doing the preview/documentation browsing */
+ QValueList<int> previousWidgetList;
+
+ /* Store the old shortcuts from the local quantaui.rc */
+ QMap<QString, QString> oldShortcuts;
+ KURL urlUnderCursor;
+ QTimer *autosaveTimer;
+ DCOPSettings *dcopSettings;
+ DCOPQuanta *dcopQuanta;
+ KParts::PartManager *m_partManager; ///< the pointer to the part manager
+ QGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
+ QNewDTEPStuff *m_newDTEPStuff;
+ QNewToolbarStuff *m_newToolbarStuff;
+ QNewTemplateStuff *m_newTemplateStuff;
+ QNewScriptStuff *m_newScriptStuff;
+ QNewDocStuff *m_newDocStuff;
+ QDict<ToolbarEntry> m_toolbarList;
+
+public: //TODO: check if it's worth to make a read method for them
+ KRecentFilesAction *fileRecent;
+ /** True when the whole quanta is initialized. */
+ bool quantaStarted;
+ bool m_loopStarted; //true if an internal event loop has been started
+ bool m_idleTimerEnabled;
+ QuantaInit *m_quantaInit; ///< the pointer to all the init stuff
+};
+
+#endif // QUANTA_H
diff --git a/quanta/src/quanta_be.desktop b/quanta/src/quanta_be.desktop
new file mode 100644
index 00000000..46578125
--- /dev/null
+++ b/quanta/src/quanta_be.desktop
@@ -0,0 +1,94 @@
+[Desktop Entry]
+Name=Quanta Plus BE
+Name[br]=Quanta+ BE
+Name[ne]=कà¥à¤µà¤¾à¤¨à¥à¤Ÿà¤¾ पà¥à¤²à¤¸ बीई
+Name[sv]=Quanta plus BE
+Name[ta]=கà¯à®µà®¾à®£à¯à®Ÿà®¾ பà¯à®³à®¸à¯ BE
+GenericName=Web Development Environment
+GenericName[bg]=Разработка на уеб приложениÑ
+GenericName[ca]=Entorn de desenvolupament web
+GenericName[cs]=Vývojové prostředí pro web
+GenericName[da]=Internetudviklingsomgivelser
+GenericName[de]=Web-Entwicklungsumgebung
+GenericName[el]=ΠεÏιβάλλον ανάπτυξης ιστοσελίδων
+GenericName[es]=Entorno de desarrollo web
+GenericName[et]=Veebiarenduskeskkond
+GenericName[eu]=Web garapenerako ingurunea
+GenericName[fa]=محیط توسعۀ وب
+GenericName[fi]=WWW:n kehitysympäristö
+GenericName[fr]=Environnement de développement Internet
+GenericName[gl]=Entorno de desenvolvemento de páxinas web
+GenericName[hi]=वेब डेवलपमेंट वातावरण
+GenericName[hu]=Webfejlesztő környezet
+GenericName[is]=Vefþróunarumhverfi
+GenericName[it]=Ambiente per lo sviluppo Web
+GenericName[ja]=ウェブ開発環境
+GenericName[ka]=ვებ დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბის გáƒáƒ áƒ¡áƒ˜
+GenericName[lt]=Žiniatinklio kūrimo aplinka
+GenericName[ms]=Persekitaran Pembangunan Web
+GenericName[nds]=Ümgeven för Nett-Entwickeln
+GenericName[ne]=वेब विकास परिवेश
+GenericName[nl]=Omgeving voor webdevelopment
+GenericName[pl]=Åšrodowisko do tworzenia stron WWW
+GenericName[pt]=Ambiente de Desenvolvimento Web
+GenericName[pt_BR]=Ambiente de Desenvolvimento Web
+GenericName[ru]=Среда web-разработки
+GenericName[sk]=Prostredie na vývoj Web aplikácií
+GenericName[sl]=Spletno razvijalno okolje
+GenericName[sr]=Окружење за веб развој
+GenericName[sr@Latn]=Okruženje za veb razvoj
+GenericName[sv]=Webbutvecklingsmiljö
+GenericName[ta]=இணைய மேமà¯à®ªà®¾à®Ÿà¯à®Ÿà¯à®šà¯ சூழலà¯
+GenericName[tg]=Фазои тайёр кардани-Web
+GenericName[tr]=Web Geliştirme Ortamı
+GenericName[uk]=Середовище веб-розробки
+GenericName[zh_CN]=Web å¼€å‘环境
+GenericName[zh_HK]=網é é–‹ç™¼ç’°å¢ƒ
+GenericName[zh_TW]=網é é–‹ç™¼ç’°å¢ƒ
+Exec=quanta_be
+Icon=quanta_be
+Type=Application
+MimeType=text/html;application/x-webprj
+DocPath=quanta/index.html
+Comment=Web Development Environment
+Comment[bg]=Среда за разработка на уеб приложениÑ
+Comment[ca]=Entorn de desenvolupament web
+Comment[cs]=Vývojové prostředí pro web
+Comment[da]=Internetudviklingsomgivelser
+Comment[de]=Web-Entwicklungsumgebung
+Comment[el]=ΠεÏιβάλλον ανάπτυξης ιστοσελίδων
+Comment[es]=Entorno de desarrollo web
+Comment[et]=Veebiarenduskeskkond
+Comment[eu]=Web garapenerako ingurunea
+Comment[fa]=محیط توسعۀ وب
+Comment[fi]=WWW:n kehitysympäristö
+Comment[fr]=Environnement de développement Internet
+Comment[gl]=Entorno de desenvolvemento de páxinas web
+Comment[hi]=वेब डेवलपमेंट वातावरण
+Comment[hu]=Webfejlesztő környezet
+Comment[is]=Vefþróunarumhverfi
+Comment[it]=Ambiente per lo sviluppo Web
+Comment[ja]=ウェブ開発環境
+Comment[ka]=ვებ დáƒáƒ›áƒ£áƒ¨áƒáƒ•áƒ”ბის გáƒáƒ áƒ¡áƒ˜
+Comment[lt]=Žiniatinklio kūrimo aplinka
+Comment[ms]=Persekitaran Pembangunan Web
+Comment[nds]=Ümgeven för Nett-Entwickeln
+Comment[ne]=वेब विकास परिवेश
+Comment[nl]=Omgeving voor webdevelopment
+Comment[pl]=Åšrodowisko do tworzenia stron WWW
+Comment[pt]=Ambiente de desenvolvimento Web
+Comment[pt_BR]=Ambiente de Desenvolvimento Web
+Comment[ru]=Среда web-разработки
+Comment[sk]=Prostredie na vývoj Web aplikácií
+Comment[sl]=Spletno razvijalno okolje
+Comment[sr]=Окружење за веб развој
+Comment[sr@Latn]=Okruženje za veb razvoj
+Comment[sv]=Webbutvecklingsmiljö
+Comment[ta]=இணைய மேமà¯à®ªà®¾à®Ÿà¯à®Ÿà¯à®šà¯ சூழலà¯
+Comment[tg]=Фазои тайёр кардани-Web
+Comment[tr]=Web Geliştirme Ortamı
+Comment[uk]=Середовище веб-розробки
+Comment[zh_CN]=Web å¼€å‘环境
+Comment[zh_HK]=網é é–‹ç™¼ç’°å¢ƒ
+Comment[zh_TW]=網é é–‹ç™¼ç’°å¢ƒ
+Categories=Qt;KDE;Development;
diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp
new file mode 100644
index 00000000..91f9f043
--- /dev/null
+++ b/quanta/src/quanta_init.cpp
@@ -0,0 +1,1631 @@
+/***************************************************************************
+ quanta.cpp - description
+ -------------------
+ begin : ?? ??? 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev <pdima@users.sourceforge.net,yshurik@linuxfan.com>
+ (C) 2001-2004 by Andras Mantia <amantia@kde.org>
+ (C) 2000, 2003 by Eric Laffoon <sequitur@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. *
+ * *
+ ***************************************************************************/
+
+// include files for QT
+#include <qdir.h>
+#include <qprinter.h>
+#include <qpainter.h>
+#include <qtabwidget.h>
+#include <qwidgetstack.h>
+#include <qlayout.h>
+#include <qeventloop.h>
+#include <qtimer.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qtextcodec.h>
+#include <qpopupmenu.h>
+#include <qdatetime.h>
+#include <qradiobutton.h>
+
+// include files for KDE
+#include <dcopclient.h>
+#include <kaccel.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+#include <kfiledialog.h>
+#include <kglobal.h>
+#include <kmenubar.h>
+#include <klocale.h>
+#include <kconfig.h>
+#include <khtmlview.h>
+#include <kstandarddirs.h>
+#include <kstatusbar.h>
+#include <kaction.h>
+#include <kstdaction.h>
+#include <kpopupmenu.h>
+#include <kprocess.h>
+#include <kprogress.h>
+#include <ktip.h>
+#include <kio/netaccess.h>
+#include <ktabwidget.h>
+#include <kmultitabbar.h>
+#include <ktexteditor/view.h>
+
+#include "wkafkapart.h"
+#include "kafkacommon.h"
+#include "undoredo.h"
+#include <dom/dom_string.h>
+
+// application specific includes
+
+#include "quanta_init.h"
+#include "quanta.h"
+#include "viewmanager.h"
+#include "quantadoc.h"
+#include "resource.h"
+#include "document.h"
+#include "qextfileinfo.h"
+
+#include "project.h"
+#include "debuggermanager.h"
+
+#include "wkafkapart.h"
+#include "whtmlpart.h"
+#include "annotationoutput.h"
+#include "messageoutput.h"
+
+#include "tagaction.h"
+
+#include "filestreeview.h"
+#include "projecttreeview.h"
+#include "doctreeview.h"
+#include "structtreeview.h"
+#include "templatestreeview.h"
+#include "tagattributetree.h"
+#include "scripttreeview.h"
+#include "toolbartabwidget.h"
+
+#ifdef ENABLE_CVSSERVICE
+#include "cvsservice.h"
+#endif
+
+#include "quantaplugin.h"
+#include "quantaplugininterface.h"
+
+
+#include "parser.h"
+#include "filemasks.h"
+#include "dirtydlg.h"
+#include "dirtydialog.h"
+
+#include "dtds.h"
+#include "qpevents.h"
+#include "quantabookmarks.h"
+
+#include "tagactionmanager.h"
+#include "tagactionset.h"
+
+extern QMap<int, QString> replacementMap;
+
+QuantaInit::QuantaInit(QuantaApp * quantaApp)
+ : QObject()
+{
+ m_quanta = quantaApp;
+ connect(this, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+}
+
+QuantaInit::~QuantaInit()
+{
+}
+
+
+/** Delayed initialization. */
+void QuantaInit::initQuanta()
+{
+ m_config = quantaApp->m_config;
+ parser = new Parser();
+
+ QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ QDir dir;
+ tmpDir = tmpDirs[0];
+ for (uint i = 0; i < tmpDirs.count(); i++)
+ {
+ if (tmpDirs[i].contains("kde-"))
+ tmpDir = tmpDirs[i];
+ }
+ dir.mkdir(tmpDir + "quanta");
+ tmpDir += "quanta/quanta";
+
+ scriptBeginRx.setCaseSensitive(false);
+ scriptBeginRx.setPattern("(<script)");
+ scriptEndRx.setCaseSensitive(false);
+ scriptEndRx.setPattern("(/script>)");
+
+ initStatusBar();
+
+ //defaultDocType must be read before the Project object is created!!
+ m_config->setGroup("General Options");
+ qConfig.defaultDocType = m_config->readEntry("Default DTD",DEFAULT_DTD);
+ if (! DTDs::ref()->find(qConfig.defaultDocType))
+ qConfig.defaultDocType = DEFAULT_DTD;
+ DTDs::ref()->find("dtd"); //load on startup
+
+ initView();
+ initDocument(); // after initView because of init of treeViews
+ initProject();
+ initActions();
+
+
+ DTDs::ref(); // create the class, must be before readOptions() !
+ readOptions();
+ initPlugins(); // needs to be before createGUI because some actions are created inside
+ readAbbreviations();
+
+ // Initialize debugger
+ m_quanta->m_debugger = new DebuggerManager(m_quanta);
+ connect(Project::ref(), SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
+ m_quanta->m_debugger, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
+ connect(Project::ref(), SIGNAL(eventHappened(const QString &, const QString &, const QString &)),
+ m_quanta->m_debugger, SLOT(slotHandleEvent(const QString &, const QString &, const QString &)));
+ connect(m_quanta->m_debugger, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+
+ //m_quanta->KDockMainWindow::createGUI( QString::null, false /* conserveMemory */ );
+ m_quanta->createShellGUI(true);
+
+ addToolTreeView(m_quanta->fTab, i18n("Files"), UserIcon("ftab"), KDockWidget::DockLeft);
+ addToolTreeView(m_quanta->dTab, i18n("Documentation"), BarIcon("contents"), KDockWidget::DockRight);
+ addToolTreeView(m_quanta->aTab, i18n("Attribute Editor"), UserIcon("tag_misc"), KDockWidget::DockRight);
+ addToolTreeView(ProjectTreeView::ref(), i18n("Project"), UserIcon("ptab"), KDockWidget::DockLeft);
+ addToolTreeView(TemplatesTreeView::ref(), i18n("Templates"), UserIcon("ttab"), KDockWidget::DockLeft);
+ addToolTreeView(StructTreeView::ref(), i18n("Document Structure"), BarIcon("view_sidetree"), KDockWidget::DockLeft);
+ addToolTreeView(m_quanta->scriptTab, i18n("Scripts"), BarIcon("run"), KDockWidget::DockLeft);
+ m_quanta->m_messageOutputView = addToolTreeView(m_quanta->m_messageOutput, i18n("Messages"), SmallIcon("openterm"), KDockWidget::DockBottom);
+ m_quanta->m_problemsOutputView = addToolTreeView(m_quanta->m_problemOutput, i18n("Problems"), SmallIcon("info"), KDockWidget::DockBottom);
+ m_quanta->m_annotationOutputView = addToolTreeView(m_quanta->m_annotationOutput, i18n("Annotations"), SmallIcon("stamp"), KDockWidget::DockBottom);
+
+ // Restore the dock layout
+ m_config->setGroup ("General Options");
+ QString layout = m_config->readEntry("Window layout", "Default");
+ int mdiMode = m_config->readNumEntry("MDI mode", -1);
+ if (mdiMode != -1 && layout != "Default")
+ {
+ m_quanta->readDockConfig(m_config); //FIXME: This causes the visible widget construction on startup, but is needed to restore the window layout...
+ if (mdiMode != KMdi::IDEAlMode)
+ m_quanta->setToolviewStyle(qConfig.toolviewTabs);
+ }
+
+ m_quanta->initTabWidget(true);
+ qConfig.windowLayout = "Custom";
+ //FIXME: This is a hack to workaround the starting problem when we are in Toplevel mode.
+ //Without this, the editor becomes the child of the widget holding the menus and toolbars...
+ if (mdiMode == KMdi::ToplevelMode)
+ {
+ m_quanta->switchToChildframeMode();
+ QTimer::singleShot(0, m_quanta, SLOT(switchToToplevelMode()));
+ }
+
+ // Always hide debugger toolbar at this point
+ m_quanta->toolBar("debugger_toolbar")->hide();
+
+ m_quanta->m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
+ m_quanta->m_pluginInterface->buildPluginMenu();
+//TODO: Remove after upgrade from 3.1 is not supported
+ QDomDocument doc;
+ doc.setContent(KXMLGUIFactory::readConfigFile(m_quanta->xmlFile(), m_quanta->instance()));
+ QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ QDomNode node = nodeList.item(0).firstChild();
+ while (!node.isNull())
+ {
+ if (node.nodeName() == "Action")
+ {
+ QDomElement el = node.toElement();
+ m_quanta->oldShortcuts.insert(el.attribute("name"), el.attribute("shortcut"));
+ node = node.nextSibling();
+ el.parentNode().removeChild(el);
+ } else
+ {
+ node = node.nextSibling();
+ }
+ }
+
+ m_quanta->applyMainWindowSettings(m_config);
+
+ m_quanta->m_tagsMenu = static_cast<QPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
+ KMenuBar *mb = m_quanta->menuBar();
+ for (uint i = 0 ; i < mb->count(); i++)
+ {
+ if (mb->text(mb->idAt(i)) == i18n("&Settings"))
+ {
+ mb->insertItem(i18n("&Window"), m_quanta->windowMenu(), -1, i);
+ break;
+ }
+ }
+ KActionMenu *toolviewMenu = (KActionMenu*)(m_quanta->actionCollection()->action("kmdi_toolview_menu"));
+ if (toolviewMenu)
+ toolviewMenu->plug(m_quanta->windowMenu());
+
+ QPopupMenu *toolbarsMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
+ connect(toolbarsMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotBuildPrjToolbarsMenu()));
+
+ QPopupMenu *contextMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
+ connect(contextMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotContextMenuAboutToShow()));
+
+ connect(m_quanta->m_messageOutput, SIGNAL(clicked(const QString&, int, int)),
+ m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_quanta->m_problemOutput, SIGNAL(clicked(const QString&, int, int)),
+ m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_quanta->m_annotationOutput->currentFileAnnotations(), SIGNAL(clicked(const QString&, int, int)),
+ m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_quanta->m_annotationOutput, SIGNAL(clicked(const QString&, int, int)),
+ m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+
+ m_quanta->slotFileNew();
+ m_quanta->slotNewStatus();
+ initToolBars();
+ Project::ref()->setProjectToolbarVisible(m_quanta->factory()->container("project_toolbar", m_quanta)->isShown());
+ Project::ref()->slotShowProjectToolbar(Project::ref()->hasProject());
+ KTipDialog::showTip(m_quanta);
+
+ //get the PID of this running instance
+ qConfig.quantaPID = QString::number(int(getpid()), 10);
+ qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/");
+
+ m_quanta->autosaveTimer = new QTimer(m_quanta);
+ connect(m_quanta->autosaveTimer, SIGNAL(timeout()), m_quanta, SLOT(slotAutosaveTimer()));
+ m_quanta->autosaveTimer->start(qConfig.autosaveInterval * 60000, false);
+
+ connect(m_quanta->m_doc, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(parser, SIGNAL(rebuildStructureTree(bool)),
+ m_quanta, SLOT(slotReloadStructTreeView(bool)));
+
+ // Read list of characters
+ QFile file(locate("appdata","chars"));
+ if ( file.open(IO_ReadOnly) ) { // file opened successfully
+ QTextStream t( &file ); // use a text stream
+ t.setEncoding(QTextStream::UnicodeUTF8);
+ QString s;
+ while (!t.eof())
+ {
+ s = t.readLine();
+ charList << i18n(s.utf8()); // line excluding '\n'
+ int begin = s.find("(&") + 1;
+ if (begin == 1)
+ continue;
+ int length = s.find(";)") - begin + 1;
+ QString s2 = s.mid(begin, length - 1);
+ replacementMap[s[0].unicode()] = s2;
+ }
+ file.close();
+ }
+
+ QString infoCss = tmpDir;
+ infoCss.replace(QRegExp("/quanta$"),"");
+ infoCss += "/info.css";
+ QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss));
+
+ checkRuntimeDependencies();
+ ViewManager::ref()->activeDocument()->view()->setFocus();
+
+ m_quanta->refreshTimer = new QTimer(m_quanta);
+ connect(m_quanta->refreshTimer, SIGNAL(timeout()), m_quanta, SLOT(slotReparse()));
+ m_quanta->refreshTimer->start( qConfig.refreshFrequency*1000, false ); //update the structure tree every 5 seconds
+ if (qConfig.instantUpdate || qConfig.refreshFrequency == 0)
+ {
+ m_quanta->refreshTimer->stop();
+ }
+
+}
+
+void QuantaInit::initToolBars()
+{
+ if (m_quanta->m_toolbarList.count() == 0)
+ m_quanta->slotLoadToolbarForDTD(Project::ref()->defaultDTD());
+}
+
+void QuantaInit::initStatusBar()
+{
+ m_quanta->statusbarTimer = new QTimer(m_quanta);
+ connect(m_quanta->statusbarTimer,SIGNAL(timeout()),
+ m_quanta, SLOT(statusBarTimeout()));
+
+ progressBar = new KProgress(m_quanta->statusBar());
+ progressBar->setTextEnabled(false);
+ progressBar->setMaximumHeight(progressBar->fontMetrics().height());
+ progressBar->show();
+ m_quanta->statusBar()->insertItem(i18n(IDS_DEFAULT),IDS_STATUS, 1);
+ m_quanta->statusBar()->addWidget(progressBar);
+ m_quanta->statusBar()->insertItem("", IDS_INS_OVR );
+ m_quanta->statusBar()->insertFixedItem(" * ", IDS_MODIFIED );
+ m_quanta->statusBar()->insertFixedItem(i18n("Line: 00000 Col: 000"), IDS_STATUS_CLM, true);
+
+ m_quanta->statusBar()->changeItem("", IDS_INS_OVR);
+ m_quanta->statusBar()->changeItem("", IDS_MODIFIED);
+ m_quanta->statusBar()->changeItem("", IDS_STATUS_CLM);
+ m_quanta->statusBar()->setItemAlignment(IDS_STATUS, AlignLeft);
+}
+
+
+void QuantaInit::initDocument()
+{
+ m_quanta->m_doc = new QuantaDoc(0L);
+ connect(m_quanta->m_doc, SIGNAL(newStatus()),
+ m_quanta, SLOT(slotNewStatus()));
+}
+
+void QuantaInit::initProject()
+{
+ Project *m_project = Project::ref(m_quanta);
+
+ connect(m_project, SIGNAL(getTreeStatus(QStringList *)),
+ pTab, SLOT(slotGetTreeStatus(QStringList *)));
+ connect(m_project, SIGNAL(loadToolbarFile(const KURL &)),
+ m_quanta, SLOT(slotLoadToolbarFile(const KURL &)));
+ connect(m_project, SIGNAL(getUserToolbarFiles(KURL::List *)),
+ m_quanta, SLOT(slotGetUserToolbarFiles(KURL::List *)));
+ connect(m_project, SIGNAL(openFiles(const KURL::List &, const QString&)),
+ m_quanta, SLOT(slotFileOpen(const KURL::List &, const QString&)));
+ connect(m_project, SIGNAL(openFile(const KURL &, const QString&)),
+ m_quanta, SLOT(slotFileOpen(const KURL &, const QString&)));
+ connect(m_project, SIGNAL(closeFile(const KURL &)),
+ m_quanta, SLOT(slotFileClose(const KURL &)));
+ connect(m_project, SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
+ pTab, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
+ connect(m_project, SIGNAL(closeFiles()), ViewManager::ref(), SLOT(closeAll()));
+ connect(m_project, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+
+ connect(m_quanta->fTab, SIGNAL(insertDirInProject(const KURL&)),
+ m_project, SLOT(slotAddDirectory(const KURL&)));
+
+ connect(m_quanta->fTab, SIGNAL(insertFileInProject(const KURL&)),
+ m_project, SLOT(slotInsertFile(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), SIGNAL(insertDirInProject(const KURL&)),
+ m_project, SLOT(slotAddDirectory(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), SIGNAL(insertFileInProject(const KURL&)),
+ m_project, SLOT(slotInsertFile(const KURL&)));
+ connect(TemplatesTreeView::ref(), SIGNAL(downloadTemplate()),
+ m_quanta, SLOT(slotDownloadTemplate()));
+ connect(TemplatesTreeView::ref(), SIGNAL(uploadTemplate(const QString&)), m_quanta, SLOT(slotUploadTemplate(const QString&)));
+
+ // inform project if something was renamed
+ connect(pTab, SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(m_quanta->fTab, SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(tTab, SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
+
+ connect(pTab, SIGNAL(insertToProject(const KURL&)),
+ m_project, SLOT(slotInsertFile(const KURL&)));
+ connect(pTab, SIGNAL(removeFromProject(const KURL&)),
+ m_project, SLOT(slotRemove(const KURL&)));
+ connect(pTab, SIGNAL(uploadSingleURL(const KURL&, const QString&, bool, bool)),
+ m_project, SLOT(slotUploadURL(const KURL&, const QString&, bool, bool)));
+ connect(pTab, SIGNAL(rescanProjectDir()), m_project, SLOT(slotRescanPrjDir()));
+ connect(pTab, SIGNAL(showProjectOptions()), m_project, SLOT(slotOptions()));
+ connect(pTab, SIGNAL(uploadProject()), m_project, SLOT(slotUpload()));
+
+ connect(m_quanta->dTab, SIGNAL(reloadProjectDocs()), m_project, SLOT(slotReloadProjectDocs()));
+ connect(m_project, SIGNAL(reloadProjectDocs()), m_quanta->dTab, SLOT(slotReloadProjectDocs()));
+ connect(m_project, SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, SLOT(slotAddProjectDoc(const KURL&)));
+
+ connect(m_project, SIGNAL(enableMessageWidget()),
+ m_quanta, SLOT(slotShowMessagesView()));
+
+ connect(m_project, SIGNAL(messages(const QString&)),
+ m_quanta->m_messageOutput, SLOT(showMessage(const QString&)));
+
+ connect(m_project, SIGNAL(newStatus()),
+ m_quanta, SLOT(slotNewStatus()));
+
+ connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
+ TemplatesTreeView::ref(), SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
+ connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
+ pTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
+ connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
+ m_quanta->fTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
+ connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
+ m_quanta->annotationOutput(), SLOT(updateAnnotations()));
+
+ connect(pTab, SIGNAL(changeFileDescription(const KURL&, const QString&)),
+ m_project, SLOT(slotFileDescChanged(const KURL&, const QString&)));
+ connect(pTab, SIGNAL(changeUploadStatus(const KURL&, int)),
+ m_project, SLOT(slotUploadStatusChanged(const KURL&, int)));
+ connect(pTab, SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
+ m_project, SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
+
+ connect(m_project, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+
+ connect(m_project, SIGNAL(statusMsg(const QString &)),
+ m_quanta, SLOT(slotStatusMsg(const QString & )));
+}
+
+void QuantaInit::initView()
+{
+ ViewManager *m_viewManager = ViewManager::ref(m_quanta);
+ connect(m_quanta, SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, SLOT(slotViewActivated(KMdiChildView*)));
+ connect(m_quanta, SIGNAL(lastChildViewClosed()), m_viewManager, SLOT(slotLastViewClosed()));
+// connect(m_quanta, SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, SLOT(slotViewDeactivated(KMdiChildView*)));
+ KafkaDocument *m_kafkaDocument = KafkaDocument::ref(0, 0, "KafkaPart");
+ m_kafkaDocument->getKafkaWidget()->view()->setMinimumHeight(50);
+ m_kafkaDocument->readConfig(quantaApp->config());
+ loadVPLConfig();
+ ToolbarTabWidget *toolBarTab = ToolbarTabWidget::ref(quantaApp);
+ connect(toolBarTab, SIGNAL(iconTextModeChanged()), quantaApp, SLOT(slotRefreshActiveWindow()));
+
+ //set the toolview and close button style before the GUI is created
+ m_config->setGroup("General Options");
+ int iconTextMode = m_config->readNumEntry("IconTextMode", KToolBar::IconOnly);
+ toolBarTab->setIconText(KToolBar::IconText(iconTextMode));
+ qConfig.toolviewTabs = m_config->readNumEntry("MDI style", KMdi::IconOnly);
+ m_quanta->initTabWidget();
+
+ m_quanta->setStandardMDIMenuEnabled(false);
+ m_quanta->setManagedDockPositionModeEnabled(true);
+
+ m_quanta->fTab = new FilesTreeView(m_config, m_quanta, "filestree");
+ m_quanta->aTab = new EnhancedTagAttributeTree(m_quanta, "TagAttributes");
+ pTab = ProjectTreeView::ref(m_quanta, "Project");
+ tTab = TemplatesTreeView::ref(m_quanta, "Templates"); // creates the treeview
+ m_quanta->dTab = new DocTreeView(m_quanta, "Docs");
+ StructTreeView *sTab = StructTreeView::ref(m_quanta ,"Struct");
+ m_quanta->scriptTab = new ScriptTreeView(m_quanta, "Scripts");
+
+ m_quanta->m_messageOutput = new MessageOutput(m_quanta, "Messages");
+ m_quanta->m_messageOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_messageOutput->showMessage(i18n("Message Window..."));
+ connect(m_quanta, SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
+ connect(m_quanta, SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
+
+ m_quanta->m_problemOutput = new MessageOutput(m_quanta, "Problems");
+ m_quanta->m_problemOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_annotationOutput = new AnnotationOutput(m_quanta, "Annotations");
+ m_quanta->m_annotationOutput->setFocusPolicy(QWidget::NoFocus);
+
+ m_quanta->createPreviewPart();
+ m_quanta->createDocPart();
+
+ connect(m_quanta, SIGNAL(reloadAllTrees()),
+ m_quanta->fTab, SLOT(slotReloadAllTrees()));
+
+ connect(pTab, SIGNAL(loadToolbarFile (const KURL&)),
+ m_quanta, SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(m_viewManager, SIGNAL(viewActivated(const KURL&)),
+ pTab, SLOT(slotViewActivated(const KURL&)));
+
+ connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
+ pTab, SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
+ tTab, SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
+ m_quanta->scriptTab, SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
+ m_quanta->fTab, SLOT(slotDocumentClosed(const KURL&)));
+
+ connect(tTab, SIGNAL(insertFile (const KURL &)),
+ m_quanta, SLOT(slotInsertFile(const KURL &)));
+
+ connect(m_quanta->scriptTab, SIGNAL(openFileInPreview(const KURL &)),
+ m_quanta, SLOT(slotOpenFileInPreview(const KURL &)));
+ connect(m_quanta->scriptTab, SIGNAL(showPreviewWidget(bool)),
+ m_quanta, SLOT(slotShowPreviewWidget(bool)));
+ connect(m_quanta->scriptTab, SIGNAL(assignActionToScript(const KURL &, const QString&)),
+ m_quanta, SLOT(slotAssignActionToScript(const KURL &, const QString&)));
+ connect(m_quanta->scriptTab, SIGNAL(downloadScript()), m_quanta, SLOT(slotDownloadScript()));
+ connect(m_quanta->scriptTab, SIGNAL(uploadScript(const QString&)), m_quanta, SLOT(slotUploadScript(const QString&)));
+ connect(m_quanta->dTab, SIGNAL(downloadDoc()), m_quanta, SLOT(slotDownloadDoc()));
+
+ connect(m_quanta->m_htmlPart, SIGNAL(onURL(const QString&)),
+ m_quanta, SLOT(slotStatusMsg(const QString&)));
+ connect(m_quanta->m_htmlPartDoc, SIGNAL(onURL(const QString&)),
+ m_quanta, SLOT(slotStatusMsg(const QString&)));
+
+ connect(sTab, SIGNAL(newCursorPosition(int,int)), m_quanta, SLOT(setCursorPosition(int,int)));
+ connect(sTab, SIGNAL(selectArea(int,int,int,int)), m_quanta, SLOT( selectArea(int,int,int,int)));
+ connect(sTab, SIGNAL(selectTagArea(Node*)), m_quanta, SLOT(slotSelectTagArea(Node*)));
+ connect(sTab, SIGNAL(needReparse()), m_quanta, SLOT(slotForceReparse()));
+ connect(sTab, SIGNAL(showGroupsForDTEP(const QString&, bool)), m_quanta, SLOT(slotShowGroupsForDTEP(const QString&, bool)));
+ connect(sTab, SIGNAL(openFile(const KURL &)),
+ m_quanta, SLOT (slotFileOpen(const KURL &)));
+ connect(sTab, SIGNAL(openImage (const KURL&)),
+ m_quanta, SLOT(slotImageOpen(const KURL&)));
+ connect(sTab, SIGNAL(showProblemMessage(const QString&)),
+ m_quanta->m_problemOutput, SLOT(showMessage(const QString&)));
+ connect(sTab, SIGNAL(clearProblemOutput()),
+ m_quanta->m_problemOutput, SLOT(clear()));
+ connect(parser, SIGNAL(nodeTreeChanged()), sTab, SLOT(slotNodeTreeChanged()));
+
+ connect(m_quanta->dTab, SIGNAL(openURL(const QString&)), m_quanta, SLOT(openDoc(const QString&)));
+
+ connect(m_viewManager, SIGNAL(dragInsert(QDropEvent *)), tTab, SLOT(slotDragInsert(QDropEvent *)));
+
+ qConfig.windowLayout = "Default";
+}
+
+KMdiToolViewAccessor* QuantaInit::addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position)
+{
+ widget->setIcon(icon);
+ widget->setCaption(name);
+ return m_quanta->addToolWindow(widget, m_quanta->prevDockPosition(widget, position), m_quanta->getMainDockWidget());
+}
+
+void QuantaInit::readOptions()
+{
+ m_config->setGroup("General Options");
+
+ qConfig.markupMimeTypes = m_config->readEntry("Markup mimetypes", qConfig.markupMimeTypes);
+ qConfig.scriptMimeTypes = m_config->readEntry("Script mimetypes", qConfig.scriptMimeTypes);
+ qConfig.imageMimeTypes = m_config->readEntry("Image mimetypes", qConfig.imageMimeTypes);
+ qConfig.textMimeTypes = m_config->readEntry("Text mimetypes", qConfig.textMimeTypes);
+
+ qConfig.tagCase = m_config->readNumEntry("Capitals for tags", 0);
+ qConfig.attrCase = m_config->readNumEntry("Capitals for attr", 0);
+ qConfig.attrValueQuotation = (m_config->readEntry("Attribute quotation", "double") == "double" )? '"':'\'';
+ qConfig.closeOptionalTags = m_config->readBoolEntry("Close tag if optional", true);
+ qConfig.closeTags = m_config->readBoolEntry("Close tags", true);
+ qConfig.useAutoCompletion = m_config->readBoolEntry("Auto completion",true);
+ qConfig.updateClosingTags = m_config->readBoolEntry("Update Closing Tags", true);
+ qConfig.replaceAccented = m_config->readBoolEntry("Replace Accented Chars", false);
+ qConfig.replaceNotInEncoding = m_config->readBoolEntry("Replace Chars Not In Current Encoding", true);
+
+
+ qConfig.defaultEncoding = m_config->readEntry("Default encoding", "UTF8");
+
+ StructTreeView::ref()->setFollowCursor( m_config->readBoolEntry("Follow Cursor", true));
+
+ qConfig.previewPosition = m_config->readEntry("Preview area","Editor");
+ qConfig.docPosition = m_config->readEntry("Documentation area","Tab");
+
+ qConfig.smartTagInsertion = m_config->readBoolEntry("Smart Tag Insertion", false);
+ KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion");
+ (static_cast<KToggleAction* >(action))->setChecked(qConfig.smartTagInsertion);
+
+ QSize s(800,580);
+ m_quanta->resize( m_config->readSizeEntry("Geometry", &s));
+ qConfig.autosaveInterval = m_config->readNumEntry("Autosave interval", 1);
+
+ qConfig.enableDTDToolbar = m_config->readBoolEntry("Show DTD Toolbar",true);
+ m_quanta->showDTDToolbar->setChecked(qConfig.enableDTDToolbar);
+ qConfig.showCloseButtons = m_config->readEntry("Close Buttons", "ShowDelayed");
+// m_quanta->initTabWidget(true);
+ m_quanta->fileRecent ->loadEntries(m_config);
+ qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true);
+ qConfig.saveTrees = m_config->readBoolEntry("Save Local Trees", true);
+ int maxRecentItems = m_config->readNumEntry("Recent Files Limit", 32);
+ m_quanta->fileRecent->setMaxItems(maxRecentItems);
+
+ m_config->setGroup("Parser options");
+ qConfig.showEmptyNodes = m_config->readBoolEntry("Show Empty Nodes", false);
+ qConfig.showClosingTags = m_config->readBoolEntry("Show Closing Tags", false);
+ qConfig.instantUpdate = m_config->readBoolEntry("Instant Update", false);
+ qConfig.refreshFrequency = m_config->readNumEntry("Refresh frequency",5);
+ qConfig.expandLevel = m_config->readNumEntry("Expand Level", 4);
+ qConfig.showDTDSelectDialog = m_config->readBoolEntry("Show DTD Select Dialog", true);
+
+ m_quanta->m_previewVisible = false;
+ m_quanta->m_noFramesPreview = false;
+
+ m_quanta->showVPLAction->setChecked( false );
+
+
+//KNewStuff config
+ m_config->setGroup("KNewStuff");
+ QString str = m_config->readEntry("ProvidersUrl");
+ if (str.isEmpty())
+ {
+ m_config->writeEntry( "ProvidersUrl", "http://quanta.kdewebdev.org/newstuff/providers.xml" );
+ m_config->sync();
+ }
+
+
+ Project::ref()->readConfig(m_config); // project
+}
+
+void QuantaInit::openLastFiles()
+{
+
+ // Reload previously opened files only if setting allows
+ m_config->setGroup("General Options");
+ if (!m_config->readBoolEntry("Reload Files", true))
+ {
+ m_quanta->setParserEnabled(true);
+ m_quanta->reparse(true);
+ return;
+ }
+ // we need to check config
+ // because project now can be
+ // in load stage ( remote prj )
+ m_config->setGroup("Projects");
+ QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+
+ KURL u;
+ QuantaCommon::setUrl(u, pu);
+ bool isPrj = true;
+ if (pu.isEmpty())
+ isPrj = false;
+ if (!u.isValid())
+ isPrj = false;
+
+ m_config->setGroup("General Options");
+
+ QStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
+ QStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
+ m_quanta->m_doc->blockSignals(true);
+ m_quanta->setParserEnabled(false);
+ uint i = 0;
+ for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ {
+ KURL fu;
+ QuantaCommon::setUrl(fu, *it);
+
+ if (!ViewManager::ref()->isOpened(fu) && (!isPrj || fu.isLocalFile()))
+ m_quanta->slotFileOpen(fu, encodings[i]);
+ i++;
+ }
+ m_config->sync();
+ m_quanta->m_doc->blockSignals(false);
+ m_quanta->setParserEnabled(true);
+ m_quanta->reparse(true);
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w) //w==0 might happen on quick close on startup
+ {
+ m_quanta->setTitle(w->url().prettyURL(0, KURL::StripFileProtocol) );
+// m_quanta->slotUpdateStatus(w);//FIXME:
+ }
+}
+
+/** Loads the initial project */
+void QuantaInit::loadInitialProject(const QString& url)
+{
+ if(url.isNull())
+ {
+ if(runningQuantas() == 1)
+ {
+ // Get config
+ KConfig *config = m_quanta->config();
+ config->setGroup("General Options");
+
+ // Reload last project if setting is enabled
+ Project::ref()->loadLastProject(config->readBoolEntry("Reload Project", true));
+ }
+ }
+ else
+ Project::ref()->slotOpenProject(KURL( url ));
+}
+
+
+void QuantaInit::initActions()
+{
+ KActionCollection *ac = m_quanta->actionCollection();
+ new KAction(i18n("Annotate..."), 0, m_quanta, SLOT(slotAnnotate()),ac, "annotate");
+ m_quanta->editTagAction = new KAction( i18n( "&Edit Current Tag..." ), CTRL+Key_E,
+ m_quanta, SLOT( slotEditCurrentTag() ),
+ ac, "edit_current_tag" );
+ m_quanta->selectTagAreaAction = new KAction( i18n( "&Select Current Tag Area" ), 0,
+ m_quanta, SLOT( slotSelectTagArea() ),
+ ac, "select_tag_area" );
+ new KAction( i18n( "E&xpand Abbreviation" ), CTRL+SHIFT+Key_J,
+ m_quanta, SLOT( slotExpandAbbreviation() ),
+ ac, "expand_abbreviation" );
+
+ new KAction(i18n("&Report Bug..."), 0, m_quanta, SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
+
+ //Kate actions
+
+//Edit menu
+ KStdAction::undo(m_quanta, SLOT(slotUndo()), ac);
+ KStdAction::redo(m_quanta, SLOT(slotRedo()), ac);
+ KStdAction::cut(m_quanta, SLOT(slotCut()), ac);
+ KStdAction::copy(m_quanta, SLOT(slotCopy()), ac) ;
+ KStdAction::pasteText(m_quanta, SLOT(slotPaste()), ac);
+
+//help
+ (void) new KAction(i18n("Ti&p of the Day"), "idea", "", m_quanta,
+ SLOT(slotHelpTip()), ac, "help_tip");
+
+ // File actions
+ //
+ KStdAction::openNew( m_quanta, SLOT( slotFileNew() ), ac);
+ KStdAction::open ( m_quanta, SLOT( slotFileOpen() ), ac, "file_open");
+ (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
+
+ m_quanta->fileRecent = KStdAction::openRecent(m_quanta, SLOT(slotFileOpenRecent(const KURL&)),
+ ac, "file_open_recent");
+ m_quanta->fileRecent->setToolTip(i18n("Open / Open Recent"));
+ connect(m_quanta->fileRecent, SIGNAL(activated()), m_quanta, SLOT(slotFileOpen()));
+
+ (void) new KAction( i18n( "Close All" ), 0, m_quanta,
+ SLOT( slotFileCloseAll() ),
+ ac, "file_close_all" );
+
+ m_quanta->saveAction = KStdAction::save(m_quanta, SLOT( slotFileSave() ), ac);
+
+ KStdAction::saveAs( m_quanta, SLOT( slotFileSaveAs() ), ac );
+
+ m_quanta->saveAllAction = new KAction( i18n( "Save All..." ), "save_all", SHIFT+KStdAccel::shortcut(KStdAccel::Save).keyCodeQt(),
+ m_quanta, SLOT( slotFileSaveAll() ),
+ ac, "file_save_all" );
+ (void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, m_quanta,
+ SLOT(slotFileReload()), ac, "file_reload");
+// (void) new KAction(i18n("Reload All "), 0, 0, m_quanta,
+// SLOT(slotFileReloadAll()), ac, "file_reload_all");
+
+ (void) new KAction( i18n( "Save as Local Template..." ), 0,
+ m_quanta, SLOT( slotFileSaveAsLocalTemplate() ),
+ ac, "save_local_template" );
+
+ (void) new KAction( i18n( "Save Selection to Local Template File..." ), 0,
+ m_quanta, SLOT( slotFileSaveSelectionAsLocalTemplate() ),
+ ac, "save_selection_local_template" );
+
+ KStdAction::quit( m_quanta, SLOT( slotFileQuit() ), ac );
+
+ // Edit actions
+
+ (void) new KAction( i18n( "Find in Files..." ),
+ SmallIcon("filefind"), CTRL+ALT+Key_F,
+ m_quanta, SLOT( slotEditFindInFiles() ),
+ ac, "find_in_files" );
+
+ KAction* aux = TagActionManager::self()->actionCollection()->action("apply_source_indentation");
+ aux->setEnabled(false);
+ ac->insert(aux);
+
+ // Tool actions
+
+ (void) new KAction( i18n( "&Context Help..." ), CTRL+Key_H,
+ m_quanta, SLOT( slotContextHelp() ),
+ ac, "context_help" );
+
+ (void) new KAction( i18n( "&Quanta Homepage" ), 0,
+ m_quanta, SLOT( slotHelpHomepage() ),
+ ac, "help_homepage" );
+
+ (void) new KAction( i18n( "&User Mailing List" ), 0,
+ m_quanta, SLOT( slotHelpUserList() ),
+ ac, "help_userlist" );
+
+ (void) new KAction( i18n( "Make &Donation" ), 0,
+ m_quanta, SLOT( slotMakeDonation() ),
+ ac, "help_donation" );
+
+ (void) new KAction( i18n( "Tag &Attributes..." ), ALT+Key_Down,
+ m_quanta->m_doc, SLOT( slotAttribPopup() ),
+ ac, "tag_attributes" );
+
+ (void) new KAction( i18n( "&Change the DTD..." ), 0,
+ m_quanta, SLOT( slotChangeDTD() ),
+ ac, "change_dtd" );
+
+ (void) new KAction( i18n( "&Edit DTD Settings..." ), 0,
+ m_quanta, SLOT( slotEditDTD() ),
+ ac, "edit_dtd" );
+
+ (void) new KAction( i18n( "&Load && Convert DTD..." ), 0,
+ DTDs::ref(), SLOT( slotLoadDTD() ),
+ ac, "load_dtd" );
+ (void) new KAction( i18n( "Load DTD E&ntities..." ), 0,
+ DTDs::ref(), SLOT( slotLoadEntities() ),
+ ac, "load_entities" );
+
+ (void) new KAction( i18n( "Load DTD &Package (DTEP)..." ), 0,
+ m_quanta, SLOT( slotLoadDTEP() ),
+ ac, "load_dtep" );
+
+ (void) new KAction( i18n( "Send DTD Package (DTEP) in E&mail..." ), "mail_send", 0,
+ m_quanta, SLOT( slotEmailDTEP() ),
+ ac, "send_dtep" );
+
+ (void) new KAction( i18n( "&Download DTD Package (DTEP)..." ), "network", 0,
+ m_quanta, SLOT( slotDownloadDTEP() ),
+ ac, "download_dtep" );
+ (void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), "network", 0,
+ m_quanta, SLOT( slotUploadDTEP() ),
+ ac, "upload_dtep" );
+/*
+ (void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), 0,
+ m_quanta, SLOT( slotUploadDTEP() ),
+ ac, "send_dtep" );
+*/
+ (void) new KAction( i18n( "&Document Properties" ), 0,
+ m_quanta, SLOT( slotDocumentProperties() ),
+ ac, "tools_document_properties" );
+
+ (void) new KAction ( i18n ("F&ormat XML Code"), 0,
+ m_quanta, SLOT( slotCodeFormatting() ),
+ ac, "tools_code_formatting");
+
+ (void) new KAction( i18n( "&Convert Tag && Attribute Case..."), 0,
+ m_quanta, SLOT(slotConvertCase()),
+ ac, "tools_change_case");
+
+ // View actions
+
+
+ m_quanta->showSourceAction =
+ new KToggleAction( i18n( "&Source Editor"), UserIcon ("view_text"), ALT+Key_F9,
+ m_quanta, SLOT( slotShowSourceEditor()),
+ ac, "show_quanta_editor");
+ m_quanta->showSourceAction->setExclusiveGroup("view");
+
+ m_quanta->showVPLAction =
+ new KToggleAction( i18n( "&VPL Editor"), UserIcon ("vpl"), CTRL+SHIFT+Key_F9,
+ m_quanta, SLOT( slotShowVPLOnly() ),
+ ac, "show_kafka_view");
+ m_quanta->showVPLAction->setExclusiveGroup("view");
+
+ m_quanta->showVPLSourceAction =
+ new KToggleAction( i18n("VPL && So&urce Editors"), UserIcon ("vpl_text"), Key_F9,
+ m_quanta, SLOT( slotShowVPLAndSourceEditor() ),
+ ac, "show_kafka_and_quanta");
+ m_quanta->showVPLSourceAction->setExclusiveGroup("view");
+ /**kafkaSelectAction = new KSelectAction(i18n("Main &View"), 0, ac,"show_kafka");
+ QStringList list2;
+ list2.append(i18n("&Source Editor"));
+ list2.append(i18n("&VPL Editor (experimental)"));
+ list2.append(i18n("&Both Editors"));
+ kafkaSelectAction->setItems(list2);
+ connect(kafkaSelectAction, SIGNAL(activated(int)), m_quanta, SLOT(slotShowKafkaPartl(int)));*/
+
+
+ (void) new KAction( i18n( "&Reload Preview" ), "reload",
+ KStdAccel::shortcut(KStdAccel::Reload).keyCodeQt(),
+ m_quanta, SLOT(slotRepaintPreview()),
+ ac, "reload" );
+
+ (void) new KAction( i18n( "&Previous File" ), "1leftarrow", KStdAccel::back(),
+ m_quanta, SLOT( slotBack() ),
+ ac, "previous_file" );
+
+ (void) new KAction( i18n( "&Next File" ), "1rightarrow", KStdAccel::forward(),
+ m_quanta, SLOT( slotForward() ),
+ ac, "next_file" );
+
+ // Options actions
+ //
+
+ (void) new KAction( i18n( "Configure &Actions..." ), UserIcon("ball"),0,
+ m_quanta, SLOT( slotOptionsConfigureActions() ),
+ ac, "configure_actions" );
+
+ KStdAction::showMenubar(m_quanta, SLOT(slotShowMenuBar()), ac, "options_show_menubar");
+ KStdAction::keyBindings(m_quanta, SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
+ KStdAction::configureToolbars( m_quanta, SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
+ KStdAction::preferences(m_quanta, SLOT( slotOptions() ), ac, "general_options");
+ new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, SLOT(slotPreviewOptions()), ac, "preview_options");
+
+ // Toolbars actions
+ m_quanta->projectToolbarFiles = new KRecentFilesAction(i18n("Load &Project Toolbar"),0,
+ m_quanta, SLOT(slotLoadToolbarFile(const KURL&)),
+ ac, "toolbars_load_project");
+
+ new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
+ new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
+ new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
+ new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
+ new KAction(i18n("&New User Toolbar..."), 0, m_quanta, SLOT(slotAddToolbar()), ac, "toolbars_add");
+ new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
+ new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, SLOT(slotRenameToolbar()), ac, "toolbars_rename");
+ new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, SLOT(slotSendToolbar()), ac, "toolbars_send");
+ new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
+ new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
+
+ KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, ac, "smart_tag_insertion");
+ connect(toggle, SIGNAL(toggled(bool)), m_quanta, SLOT(slotSmartTagInsertion()));
+
+ m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, ac, "view_dtd_toolbar");
+
+ connect(m_quanta->showDTDToolbar, SIGNAL(toggled(bool)), m_quanta, SLOT(slotToggleDTDToolbar(bool)));
+ m_quanta->showDTDToolbar->setCheckedState(i18n("Hide DTD Toolbar"));
+
+ new KAction(i18n("Complete Text"), CTRL+Key_Space,
+ m_quanta, SLOT(slotShowCompletion()), ac,"show_completion");
+ new KAction(i18n("Completion Hints"), CTRL+SHIFT+Key_Space,
+ m_quanta, SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
+
+ KStdAction::back(m_quanta, SLOT( slotBack() ), ac, "w_back");
+ KStdAction::forward(m_quanta, SLOT( slotForward() ), ac, "w_forward");
+
+ new KAction(i18n("Open File: none"), 0, m_quanta, SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
+ new KAction(i18n("Upload..."), 0, m_quanta, SLOT(slotUploadFile()), ac, "upload_file");
+ new KAction(i18n("Delete File"), 0, m_quanta, SLOT(slotDeleteFile()), ac, "delete_file");
+
+ QString ss = i18n("Upload Opened Project Files...");
+/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
+
+ QString error;
+ int el, ec;
+ m_quanta->m_actions = new QDomDocument();
+//load the global actions
+ QFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
+ if ( f.open( IO_ReadOnly ))
+ {
+ if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
+ {
+ QDomElement docElem = m_quanta->m_actions->documentElement();
+
+ QDomNode n = docElem.firstChild();
+ while( !n.isNull() ) {
+ QDomElement e = n.toElement(); // try to convert the node to an element.
+ if( !e.isNull() ) { // the node was really an element.
+ bool toggable = (e.attribute("toggable", "") == "true");
+ new TagAction(&e, m_quanta, toggable);
+ }
+ n = n.nextSibling();
+ }
+ } else
+ kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ f.close();
+ }
+ m_quanta->m_actions->clear();
+//read the user defined actions
+ QString s = locateLocal("appdata","actions.rc");
+ if (!s.isEmpty())
+ {
+ f.setName(s);
+ if ( f.open( IO_ReadOnly ))
+ {
+ if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
+ {
+ QDomElement docElem = m_quanta->m_actions->documentElement();
+
+ QDomNode n = docElem.firstChild();
+ while( !n.isNull() ) {
+ QDomElement e = n.toElement(); // try to convert the node to an element.
+ if( !e.isNull())
+ { // the node was really an element.
+ delete ac->action(e.attribute("name"));
+ bool toggable = (e.attribute("toggable", "") == "true");
+ new TagAction(&e, m_quanta, toggable);
+ }
+ n = n.nextSibling();
+ }
+ } else
+ kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ f.close();
+ }
+ } else
+ {
+ m_quanta->m_actions->setContent(s);
+ }
+
+ // create the preview action
+ m_quanta->showPreviewAction =
+ new KToolBarPopupAction( i18n( "&Preview" ), "preview", Key_F6,
+ m_quanta, SLOT( slotToggleShowPreview() ),
+ ac, "show_preview" );
+
+ KAction *act = new KAction( i18n( "Preview Without Frames" ), "", 0,
+ m_quanta, SLOT(slotShowNoFramesPreview()),
+ ac, "show_preview_no_frames" );
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+ act = new KAction( i18n( "View with &Konqueror" ), "konqueror", Key_F12,
+ m_quanta, SLOT( slotViewInKFM() ),
+ ac, "view_with_konqueror" );
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+
+ act = ac->action("view_with_firefox");
+ if (act)
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+ act = ac->action("view_with_mozilla");
+ if (act)
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+ act = ac->action("view_with_netscape");
+ if (act)
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+ act = ac->action("view_with_opera");
+ if (act)
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+ act = new KAction( i18n( "View with L&ynx" ), "terminal", 0,
+ m_quanta, SLOT( slotViewInLynx() ),
+ ac, "view_with_lynx" );
+ act->plug(m_quanta->showPreviewAction->popupMenu());
+
+
+ (void) new KAction( i18n( "Table Editor..." ), "quick_table", 0,
+ m_quanta, SLOT( slotTagEditTable() ),
+ ac, "tag_edit_table" );
+
+ (void) new KAction( i18n( "Quick List..." ), "quick_list", 0,
+ m_quanta, SLOT( slotTagQuickList() ),
+ ac, "tag_quick_list" );
+
+ (void) new KAction( i18n( "Color..." ), "colorize", CTRL+SHIFT+Key_C,
+ m_quanta, SLOT( slotTagColor() ),
+ ac, "tag_color" );
+
+
+ (void) new KAction( i18n( "Email..." ), "tag_mail", 0,
+ m_quanta, SLOT( slotTagMail() ),
+ ac, "tag_mail" );
+
+ (void) new KAction( i18n( "Misc. Tag..." ), "tag_misc", CTRL+SHIFT+Key_T,
+ m_quanta, SLOT( slotTagMisc() ),
+ ac, "tag_misc" );
+
+ (void) new KAction( i18n( "Frame Wizard..." ), "frame", 0,
+ m_quanta, SLOT( slotFrameWizard() ),
+ ac, "tag_frame_wizard" );
+
+ (void) new KAction( i18n( "Paste &HTML Quoted" ), "editpaste", 0,
+ m_quanta, SLOT( slotPasteHTMLQuoted() ),
+ ac, "edit_paste_html_quoted" );
+
+ (void) new KAction( i18n( "Paste &URL Encoded" ), "editpaste", 0,
+ m_quanta, SLOT( slotPasteURLEncoded() ),
+ ac, "edit_paste_url_encoded" );
+
+ (void) new KAction( i18n( "Insert CSS..." ),"css", 0,
+ m_quanta, SLOT( slotInsertCSS() ),
+ ac, "insert_css" );
+
+ // special-character combo
+ KAction* char_action = new KAction(
+ i18n( "Insert Special Character" ), "charset", 0,
+ ac, "insert_char" );
+ connect( char_action, SIGNAL(activated()),
+ m_quanta, SLOT(slotInsertChar()) );
+
+ connect(m_quanta, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(m_quanta->doc(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(ViewManager::ref(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+
+ QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(m_quanta));
+ m_bookmarks->createActions(ac);
+ connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+}
+
+/** Initialize the plugin architecture. */
+void QuantaInit::initPlugins()
+{
+ // TODO : read option from plugins.rc to see if we should validate the plugins
+
+ m_quanta->m_pluginInterface = QuantaPluginInterface::ref(m_quanta);
+
+ connect(m_quanta->m_pluginInterface, SIGNAL(hideSplash()),
+ m_quanta, SLOT(slotHideSplash()));
+ connect(m_quanta->m_pluginInterface, SIGNAL(statusMsg(const QString &)),
+ m_quanta, SLOT(slotStatusMsg(const QString & )));
+
+ m_quanta->m_pluginInterface->readConfig();
+ if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace"))
+ {
+ delete m_quanta->actionCollection()->action("find_in_files");
+ }
+}
+
+
+void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
+{
+ m_quanta->m_doc->blockSignals(true);
+
+ execCommandPS("ps -C quanta -C quanta_be -o pid --no-headers");
+ m_PIDlist = QStringList::split("\n", m_quanta->m_scriptOutput);
+
+ m_config->setGroup("Projects");
+ QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+
+ KURL u;
+ QuantaCommon::setUrl(u, pu);
+ bool isPrj = true;
+ if (pu.isEmpty())
+ isPrj = false;
+ if (!u.isValid())
+ isPrj = false;
+
+ m_config->reparseConfiguration();
+ m_config->setGroup("General Options");
+
+ QStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ QStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+
+ QStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
+ for (QStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
+ backedUpUrlsIt != backedUpUrlsEndIt; ++backedUpUrlsIt )
+ {
+ // when quanta crashes and file autoreloading option is on
+ // then if user restarts quanta, the backup copies will reload
+ QString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
+ bool notFound;
+ QString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
+ if (!autosavedPath.isEmpty()) //the current item was autosaved and is not in use by another Quanta
+ {
+ KURL originalVersion;
+ KURL autosavedVersion;
+ QuantaCommon::setUrl(originalVersion, backedUpFileName);
+ QuantaCommon::setUrl(autosavedVersion, autosavedPath);
+ bool isUntitledDocument = false;
+ if (autosavedVersion.path().right(1) == "U")
+ isUntitledDocument = true;
+ if (!isPrj || originalVersion.isLocalFile())
+ {
+ //find some information about local files
+ KIO::UDSEntry entry;
+ KIO::NetAccess::stat(originalVersion, entry, m_quanta);
+ KFileItem* item= new KFileItem(entry, originalVersion, false, true);
+ QString origTime = item->timeString();
+ KIO::filesize_t origSize = item->size();
+ delete item;
+ KIO::NetAccess::stat(autosavedVersion, entry, m_quanta);
+ item= new KFileItem(entry, autosavedVersion, false, true);
+ QString backupTime = item->timeString();
+ KIO::filesize_t backupSize = item->size();
+ delete item;
+
+ if (QFileInfo(autosavedPath).exists()) //if the backup file exists
+ {
+ emit hideSplash();
+ DirtyDlg *dlg = new DirtyDlg(autosavedVersion.path(), originalVersion.path(), false, m_quanta);
+ dlg->setCaption(i18n("Restore File"));
+ DirtyDialog *w = static_cast<DirtyDialog*>(dlg->mainWidget());
+ w->textLabel->setText(i18n("<qt>A backup copy of a file was found:<br><br>"
+ "Original file: <b>%1</b><br>"
+ "Original file size: <b>%2</b><br>"
+ "Original file last modified on: <b>%3</b><br><br>"
+ "Backup file size: <b>%4</b><br>"
+ "Backup created on: <b>%5</b><br><br>"
+ "</qt>")
+ .arg(originalVersion.prettyURL(0, KURL::StripFileProtocol ))
+ .arg(KIO::convertSize(origSize)).arg(origTime)
+ .arg(KIO::convertSize(backupSize)).arg(backupTime));
+ w->buttonLoad->setText(i18n("&Restore the file from backup"));
+ w->buttonIgnore->setText(i18n("Do &not restore the file from backup"));
+ delete w->warningLabel;
+ w->warningLabel = 0L;
+ w->setMinimumHeight(320);
+ dlg->adjustSize();
+ if (KStandardDirs::findExe("kompare").isEmpty() || isUntitledDocument)
+ {
+ w->buttonCompare->setEnabled(false);
+ w->buttonLoad->setChecked(true);
+ }
+ if (dlg->exec())
+ {
+ //backup the current version and restore it from the autosaved backup
+ KURL backupURL = originalVersion;
+ backupURL.setPath(backupURL.path() + "." + QString::number(getpid(),10) + ".backup");
+ QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta);
+ QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta);
+ //we save a list of autosaved file names so "KQApplicationPrivate::init()"
+ //can open them. If autosavedVersion.path().right(1) == "U" then we are recovering
+ //an untitled document
+ if(isUntitledDocument)
+ m_quanta->slotFileOpen(autosavedVersion,
+ m_quanta->defaultEncoding()); // load initial files
+ else
+ recoveredFileNameList += backedUpFileName;
+ }
+ delete dlg;
+ QFile::remove(autosavedPath); //we don't need the backup anymore
+ }
+ }
+ //remove the auto-backup file from the list
+ m_config->setGroup("General Options");
+ QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ QStringList::Iterator entryIt = autosavedFilesEntryList.begin();
+ while(entryIt != autosavedFilesEntryList.end())
+ {
+ if ((*entryIt) == KURL::fromPathOrURL(autosavedPath).url())
+ entryIt = autosavedFilesEntryList.remove(entryIt);
+ else
+ ++entryIt;
+ }
+ m_config->writePathEntry("List of autosaved files", autosavedFilesEntryList);
+
+ autosavedUrlsList = autosavedFilesEntryList;
+ }
+
+ if (notFound)
+ {
+ //remove processed items
+ m_config->setGroup("General Options");
+
+ QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ QStringList::Iterator entryIt = backedupFilesEntryList.begin();
+ while (entryIt != backedupFilesEntryList.end())
+ {
+ if ((*entryIt) == (*backedUpUrlsIt))
+ entryIt = backedupFilesEntryList.remove(entryIt);
+ else
+ ++entryIt;
+ }
+ m_config->writePathEntry("List of backedup files", backedupFilesEntryList);
+ }
+ }
+
+ //clean up auto-backup list, just in case of an old Quanta was used before
+ QStringList::Iterator entryIt = autosavedUrlsList.begin();
+ while (entryIt != autosavedUrlsList.end())
+ {
+ QString quPID = retrievePID((*entryIt));
+
+ //check if the file is opened by another running Quanta or not
+ bool isOrphan = true;
+ QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ {
+ if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
+ {
+ isOrphan = false; //the file is opened
+ break;
+ }
+ }
+ if (isOrphan)
+ entryIt = autosavedUrlsList.remove(entryIt);
+ else
+ ++entryIt;
+ }
+ m_config->writePathEntry("List of autosaved files", autosavedUrlsList);
+
+
+
+}
+
+ void QuantaInit::execCommandPS(const QString& cmd)
+ {
+
+ //We create a KProcess that executes the "ps" *nix command to get the PIDs of the
+ //other instances of quanta actually running
+ KProcess *execCommand = new KProcess();
+ *(execCommand) << QStringList::split(" ",cmd);
+
+ connect(execCommand, SIGNAL(receivedStdout(KProcess*,char*,int)),
+ m_quanta, SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect(execCommand, SIGNAL(receivedStderr(KProcess*,char*,int)),
+ m_quanta, SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect(execCommand, SIGNAL(processExited(KProcess*)),
+ m_quanta, SLOT(slotProcessExited(KProcess*)));
+
+ if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All))
+ {
+ KMessageBox::error(m_quanta, i18n("Failed to query for running Quanta instances."));
+ }
+ else
+ {
+ //To avoid lock-ups, start a timer.
+ QTimer *timer = new QTimer(m_quanta);
+ connect(timer, SIGNAL(timeout()),
+ m_quanta, SLOT(slotProcessTimeout()));
+ timer->start(180*1000, true);
+ QExtFileInfo internalFileInfo;
+ m_quanta->m_loopStarted = true;
+ internalFileInfo.enter_loop();
+ delete timer;
+ }
+ }
+
+
+ QString QuantaInit::searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound)
+{
+ QString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
+ notFound = true;
+ QStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
+ for (QStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
+ autosavedUrlsIt != autosavedUrlsEndIt;
+ ++autosavedUrlsIt)
+ {
+ QString quPID = retrievePID((*autosavedUrlsIt));
+
+ //check if the file is opened by another running Quanta or not
+ bool isOrphan = true;
+ QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ {
+ if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
+ {
+ isOrphan = false; //the file is opened
+ break;
+ }
+ }
+
+ if (backedUpUrlHashedPath == retrieveHashedPath((*autosavedUrlsIt)))
+ {
+ notFound = false;
+ if (isOrphan)
+ return KURL::fromPathOrURL(*autosavedUrlsIt).path(); //the url was autosaved to this file
+ }
+
+ }
+ return QString::null;
+}
+
+/** Retrieves hashed path from the name of a backup file */
+QString QuantaInit::retrieveHashedPath(const QString& filename)
+{
+ int lastPoint = filename.findRev(".");
+ int Ppos = filename.find("P", lastPoint);
+ return filename.mid(lastPoint + 1,
+ Ppos - lastPoint);
+}
+
+
+/** Retrieves PID from the name of a backup file */
+QString QuantaInit::retrievePID(const QString& filename)
+{
+ QString strPID = QString::null;
+ strPID = filename.mid(filename.findRev("P") + 1);
+
+ if (strPID.isEmpty())
+ strPID = filename.mid(filename.findRev("N") + 1);
+
+ if (strPID.endsWith("U"))
+ strPID = strPID.left(strPID.length() - 1);
+
+ return strPID;
+}
+
+
+void QuantaInit::loadVPLConfig()
+{
+ //load the VPL options
+ m_config->setGroup("Kafka Synchronization options");
+ qConfig.quantaRefreshOnFocus = (m_config->readEntry("Source refresh", "delay") == "focus");
+ qConfig.quantaRefreshDelay = m_config->readNumEntry("Source refresh delay", 500);
+ qConfig.kafkaRefreshOnFocus = (m_config->readEntry("Kafka refresh", "focus") == "focus");
+ qConfig.kafkaRefreshDelay = m_config->readNumEntry("Kafka refresh delay", 4000);
+ /**reloadUpdateTimers();*/
+
+ m_config->setGroup("Kafka Indentation options");
+ qConfig.inlineNodeIndentation = m_config->readBoolEntry("Inline Node Indentation");
+}
+
+struct Dependency{
+ QString name;
+ QString execName;
+ QString url;
+ QString description;
+ enum Type{
+ Executable = 0,
+ Plugin
+ };
+ Type type;
+};
+
+void QuantaInit::checkRuntimeDependencies()
+{
+
+ QValueList<Dependency> dependencies;
+ Dependency dependency;
+ dependency.name = "Kommander";
+ dependency.execName = "kmdr-executor";
+ dependency.url = "http://kommander.kdewebdev.org";
+ dependency.description = i18n("various script based dialogs including the Quick Start dialog");
+ dependency.type = Dependency::Executable;
+ dependencies.append(dependency);
+
+ dependency.name = "Tidy";
+ dependency.execName = "tidy";
+ dependency.url = "http://tidy.sourceforge.net";
+ dependency.description = i18n("HTML syntax checking");
+ dependency.type = Dependency::Executable;
+ dependencies.append(dependency);
+
+ dependency.name = "Kompare";
+ dependency.execName = "kompare";
+ dependency.url = "http://bruggie.dnsalias.org/kompare";
+ dependency.description = i18n("comparing of files by content");
+ dependency.type = Dependency::Executable;
+ dependencies.append(dependency);
+
+
+ dependency.name = i18n("Control Center (kdebase)");
+ dependency.execName = "kcmshell";
+ dependency.url = "http://www.kde.org";
+ dependency.description = i18n("preview browser configuration");
+ dependency.type = Dependency::Executable;
+ dependencies.append(dependency);
+
+ dependency.name = "GPG (OpenPGP)";
+ dependency.execName = "gpg";
+ dependency.url = "http://www.gnupg.de";
+ dependency.description = i18n("preview browser configuration");
+ dependency.type = Dependency::Executable;
+ dependencies.append(dependency);
+
+ dependency.name = "KFileReplace";
+ dependency.execName = "KFileReplace";
+ dependency.url = "http://kfilereplace.kdewebdev.org";
+ dependency.description = i18n("search and replace in files");
+ dependency.type = Dependency::Plugin;
+ dependencies.append(dependency);
+
+ dependency.name = "KXSLDbg";
+ dependency.execName = "XSLT Debugger";
+ dependency.url = "http://xsldbg.sourceforge.net/";
+ dependency.description = i18n("XSLT debugging");
+ dependency.type = Dependency::Plugin;
+ dependencies.append(dependency);
+
+
+ dependency.name = "KImageMapEditor";
+ dependency.execName = "KImageMapEditor";
+ dependency.url = "http://www.nongnu.org/kimagemap/";
+ dependency.description = i18n("editing HTML image maps");
+ dependency.type = Dependency::Plugin;
+ dependencies.append(dependency);
+
+
+ dependency.name = "KLinkStatus";
+ dependency.execName = "Link Checker";
+ dependency.url = "http://kde-apps.org/content/show.php?content=12318";
+ dependency.description = i18n("link validity checking");
+ dependency.type = Dependency::Plugin;
+ dependencies.append(dependency);
+
+ dependency.name = "Cervisia";
+ dependency.execName = "CVS Management (Cervisia)";
+ dependency.url = "http://www.kde.org/apps/cervisia";
+ dependency.description = i18n("CVS management plugin");
+ dependency.type = Dependency::Plugin;
+ dependencies.append(dependency);
+
+ QString errorStr;
+ QString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
+ for (QValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
+ {
+ dependency = *it;
+ if (dependency.type == Dependency::Executable)
+ {
+ if (KStandardDirs::findExe(dependency.execName).isNull())
+ errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+
+ } else
+ if (dependency.type == Dependency::Plugin)
+ {
+ if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName)))
+ errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ }
+ }
+
+#ifdef ENABLE_CVSSERVICE
+ QString error;
+ QCString appId;
+
+ KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error,
+ &appId);
+ if (appId.isEmpty())
+ {
+ errorStr += QString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
+ } else
+ {
+ CVSService::ref(m_quanta->actionCollection())->setAppId(appId);
+ connect(CVSService::ref(), SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
+ connect(CVSService::ref(), SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
+ connect(CVSService::ref(), SIGNAL(commandExecuted(const QString&, const QStringList&)), m_quanta, SLOT(slotCVSCommandExecuted(const QString&, const QStringList&)));
+ //connect(CVSService::ref(), SIGNAL(statusMsg(const QString &)), m_quanta, SLOT(slotStatusMsg(const QString & )));
+ m_quanta->fTab->plugCVSMenu();
+ pTab->plugCVSMenu();
+ }
+#endif
+
+ if (!errorStr.isEmpty())
+ {
+ m_quanta->slotHideSplash();
+ errorStr[errorStr.length() - 1] = '.';
+ KMessageBox::information(m_quanta, "<qt>" + i18n("Some applications required for full functionality are missing:<br>") + errorStr + i18n("<br><br>You may download the applications from the specified locations.</qt>"), i18n("Missing Applications"), "RuntimeDependencyCheck");
+ }
+}
+
+void QuantaInit::readAbbreviations()
+{
+ QDomDocument doc;
+ QString groupName;
+ bool mainAbbrevFileFound = false;
+ QStringList mainFileList;
+ mainFileList << qConfig.globalDataDir + resourceDir + "abbreviations.xml";
+ mainFileList << KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
+ for (uint i = 0; i < mainFileList.count(); i++)
+ {
+ if (!QFile::exists(mainFileList[i]))
+ continue;
+ QFile file(mainFileList[i]);
+ if (file.open(IO_ReadOnly))
+ {
+ if (doc.setContent(&file))
+ {
+ QDomNodeList groupList = doc.elementsByTagName("Group");
+ for (uint groupIdx = 0; groupIdx < groupList.count(); groupIdx++)
+ {
+ Abbreviation abbrev;
+ QDomElement el = groupList.item(groupIdx).toElement();
+ groupName = el.attribute("name");
+ QDomNodeList dtepList = el.elementsByTagName("DTEP");
+ for (uint dtepListIdx = 0; dtepListIdx < dtepList.count(); dtepListIdx++)
+ {
+ abbrev.dteps.append(dtepList.item(dtepListIdx).toElement().attribute("name"));
+ }
+ QDomNodeList nodeList = el.elementsByTagName("Template");
+ for (uint nodeIdx = 0; nodeIdx < nodeList.count(); nodeIdx++)
+ {
+ QDomElement e = nodeList.item(nodeIdx).toElement();
+ abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
+ }
+ qConfig.abbreviations.insert(groupName, abbrev);
+ }
+ }
+ mainAbbrevFileFound = true;
+ file.close();
+ }
+ }
+ if (mainAbbrevFileFound) return;
+//Compatibility code: read the abbreviations files from the DTEP directories
+//TODO: Remove when upgrade from 3.2 is not supported.
+ QStringList filenameList = DTDs::ref()->fileNameList(false);
+ QStringList::Iterator it;
+ for (it = filenameList.begin(); it != filenameList.end(); ++it)
+ {
+ int pos =(*it).find('|');
+ QString dirName = (*it).mid(pos + 1);
+ QString dtepName = (*it).left(pos);
+ KURL dirURL(dirName);
+ dirURL.setFileName("");
+ dirName = dirURL.path(1);
+ QString abbrevFile = dirName;
+ QString tmpStr = dirName;
+ QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
+ bool dirFound = false;
+ for (uint i = 0; i < resourceDirs.count(); i++)
+ {
+ if (tmpStr.startsWith(resourceDirs[i]))
+ {
+ dirFound = true;
+ tmpStr = tmpStr.right(tmpStr.length() - resourceDirs[i].length());
+ break;
+ }
+ }
+ if (dirFound)
+ {
+ abbrevFile = KGlobal::dirs()->saveLocation("data", tmpStr) +"/";
+ }
+ abbrevFile.append("abbreviations");
+ if (!QFile::exists(abbrevFile))
+ abbrevFile = dirName + "abbreviations";
+ QFile f(abbrevFile);
+ if (f.open(IO_ReadOnly))
+ {
+ if (doc.setContent(&f))
+ {
+ Abbreviation abbrev;
+ QDomNodeList nodeList = doc.elementsByTagName("Template");
+ for (uint i = 0; i < nodeList.count(); i++)
+ {
+ QDomElement e = nodeList.item(i).toElement();
+ abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
+ }
+ abbrev.dteps.append(dtepName);
+ qConfig.abbreviations.insert(DTDs::ref()->getDTDNickNameFromName(dtepName), abbrev);
+ }
+ f.close();
+ }
+ }
+}
+
+
+int QuantaInit::runningQuantas()
+{
+ QCStringList list = kapp->dcopClient()->registeredApplications();
+ int i = 0;
+ for (QCStringList::iterator it = list.begin(); it != list.end(); ++it)
+ {
+ if (QString(*it).startsWith("quanta", false))
+ ++i;
+ }
+ return i;
+}
+
+#include "quanta_init.moc"
diff --git a/quanta/src/quanta_init.h b/quanta/src/quanta_init.h
new file mode 100644
index 00000000..8013e0bd
--- /dev/null
+++ b/quanta/src/quanta_init.h
@@ -0,0 +1,99 @@
+/***************************************************************************
+ quantaInit.h - description
+ -------------------
+ begin : ?? ??? 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2003 by Andras Mantia <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 QUANTAINIT_H
+#define QUANTAINIT_H
+
+
+// include files for Qt
+#include <qobject.h>
+
+// include files for KDE
+#include <kparts/dockmainwindow.h>
+
+//app includes
+
+class KMdiToolViewAccessor;
+
+class QuantaApp;
+class ViewManager;
+class ProjectTreeView;
+class TemplatesTreeView;
+class ScriptTreeView;
+class KConfig;
+
+/**
+ * The base class for Quanta application windows.
+ */
+class QuantaInit : public QObject
+{
+ Q_OBJECT
+
+public:
+ QuantaInit(QuantaApp * quantaApp);
+ ~QuantaInit();
+
+ /** Loads the initial project */
+ void loadInitialProject(const QString& url);
+
+ /**Executes *nix ps command */
+ void execCommandPS(const QString& cmd);
+ /** if there are backup files, asks user whether wants to restore them or to mantain the originals instead*/
+ void recoverCrashed(QStringList& recoveredFileNameList);
+ /** Delayed initialization. */
+ void initQuanta();
+ void openLastFiles();
+ void loadVPLConfig();
+
+signals: // Signals
+ /** signal used to hide the splash screen */
+ void hideSplash();
+
+private:
+ QuantaApp * m_quanta;
+ void initToolBars();
+ void readOptions();
+
+ void initActions();
+ void initStatusBar();
+ void initDocument();
+ void initView();
+ void initProject();
+ void checkRuntimeDependencies();
+ void readAbbreviations();
+
+ KMdiToolViewAccessor* addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position);
+
+ /** Initialize the plugin architecture. */
+ void initPlugins();
+
+ /** find where was url backed up in the list of autosaved urls*/
+ QString searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound);
+ /** Retrieves hashed path from the name of a backup file */
+ QString retrieveHashedPath(const QString& filename);
+ /** Obtains PID from file extension */
+ QString retrievePID(const QString& filename);
+ ProjectTreeView *pTab;
+ TemplatesTreeView *tTab;
+ // config
+ KConfig *m_config;
+ QStringList m_PIDlist;
+ /** @return number of Quanta instances registered by dcop */
+ int runningQuantas();
+};
+
+#endif // QUANTA_H
diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp
new file mode 100644
index 00000000..9100432e
--- /dev/null
+++ b/quanta/src/quantadoc.cpp
@@ -0,0 +1,375 @@
+/***************************************************************************
+ quantadoc.cpp - description
+ -------------------
+ begin : ���� 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2003 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// include files for Qt
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qwidget.h>
+#include <qtabwidget.h>
+#include <qtabbar.h>
+#include <qlayout.h>
+#include <qdragobject.h>
+#include <qobject.h>
+
+
+// include files for KDE
+#include <klocale.h>
+#include <kaction.h>
+#include <kconfig.h>
+#include <kpopupmenu.h>
+#include <kmessagebox.h>
+#include <kdirwatch.h>
+#include <kdeversion.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+
+#include <ktexteditor/view.h>
+#include <ktexteditor/configinterface.h>
+#include <ktexteditor/highlightinginterface.h>
+#include <ktexteditor/popupmenuinterface.h>
+#include <ktexteditor/markinterface.h>
+#include <ktexteditor/undointerface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/clipboardinterface.h>
+#include <ktexteditor/selectioninterface.h>
+#include <ktexteditor/encodinginterface.h>
+#include <ktexteditor/dynwordwrapinterface.h>
+#include <ktexteditor/editorchooser.h>
+#include <ktexteditor/editinterface.h>
+
+#include <kparts/componentfactory.h>
+
+#include <klibloader.h>
+#include <ktrader.h>
+
+
+// application specific includes
+#include "document.h"
+#include "quanta.h"
+#include "quantadoc.h"
+#include "quantaview.h"
+#include "viewmanager.h"
+
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+#include "resource.h"
+#include "debuggermanager.h"
+
+#include "project.h"
+//#include "dtds.h"
+
+#include "undoredo.h"
+#include "tagactionmanager.h"
+#include "tagactionset.h"
+
+QuantaDoc::QuantaDoc(QWidget *parent, const char *name) : QObject(parent, name)
+{
+ fileWatcher = new KDirWatch(this);
+
+ attribMenu = new KPopupMenu();
+ attribMenu->insertTitle(i18n("Tag"));
+ connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+}
+
+QuantaDoc::~QuantaDoc()
+{
+ //kdDebug(24000) << "QuantaDoc::~QuantaDoc: " << endl;
+}
+
+
+bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting )
+{
+ bool newfile = false;
+ if ( url.url().isEmpty() ) newfile = true;
+ Document *w = 0L;
+ QuantaView *view = ViewManager::ref()->isOpened(url);
+ if (!view || newfile)
+ {
+ w = ViewManager::ref()->activeDocument();
+ if (w && !newfile && !w->isModified() && w->isUntitled() && !w->busy)
+ ViewManager::ref()->removeActiveView(false);
+
+/*
+ // no modi and new -> we can remove !!!!
+ w = ViewManager::ref()->activeDocument();
+ if (w && !w->isModified() &&
+ w->isUntitled() && !w->busy)
+ {
+ //workaround for some strange Katepart behavior. If there is a highlighting mode
+ //selected and new content is loaded, the highlighting is reset to None. To avoid this
+ //remove the untitled document and create a new one, where we don't set the
+ //highlighting
+ ViewManager::ref()->removeActiveView(false);
+ w = ViewManager::ref()->activeDocument();
+
+ if (w && !w->isModified() && w->isUntitled() && !w->busy)
+ return true;
+ }
+*/
+ // now we can create new kwrite
+ ViewManager::ref()->createNewDocument();
+ view = ViewManager::ref()->activeView();
+
+ if (Project::ref()->hasProject())
+ view->document()->processDTD(Project::ref()->defaultDTD());
+ else
+ view->document()->processDTD(qConfig.defaultDocType);
+ }
+ else // select opened
+ if (switchToExisting)
+ {
+ view->document()->checkDirtyStatus();
+ if (view != ViewManager::ref()->activeView())
+ {
+ view->activate();
+ view->activated();
+ }
+ return false; // don't need loadURL
+ }
+
+ return true;
+}
+
+void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
+ bool switchToExisting, bool readOnly)
+{
+ bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
+ KURL url = urlToOpen;
+ if (url.isLocalFile())
+ {
+ QString path = QDir(url.path()).canonicalPath();
+ if (!path.isEmpty())
+ url.setPath(path);
+ }
+ QString encoding = a_encoding;
+ if (!newDocument(url, switchToExisting))
+ {
+ quantaApp->slotEnableIdleTimer(idleTimerStatus);
+ return;
+ }
+ Document *w = ViewManager::ref()->activeDocument();
+ if (readOnly)
+ {
+ //might work only with Kate part
+ KAction *writeLockAction = w->view()->actionCollection()->action("tools_toggle_write_lock");
+ if (writeLockAction)
+ writeLockAction->activate();
+ }
+ if (!url.isEmpty())
+ {
+ if (QExtFileInfo::exists(url, true, quantaApp))
+ {
+ if (encoding.isEmpty())
+ encoding = quantaApp->defaultEncoding();
+ w->disconnect(SIGNAL(openingFailed(const KURL&)));
+ connect(w, SIGNAL(openingFailed(const KURL&)), this, SLOT(slotOpeningFailed(const KURL&)));
+ w->disconnect(SIGNAL(openingCompleted(const KURL&)));
+ connect(w, SIGNAL(openingCompleted(const KURL&)), this, SLOT(slotOpeningCompleted(const KURL&)));
+ w->open(url, encoding);
+ quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
+ }
+ else
+ {
+ slotOpeningFailed(url);
+ }
+ } else
+ {
+ quantaApp->reparse(true);
+ KTextEditor::HighlightingInterface* highlightIf = dynamic_cast<KTextEditor::HighlightingInterface*>(w->doc());
+ if (highlightIf)
+ {
+ QString hlName;
+ int htmlIdx = -1, xmlIdx = -1;
+ for (uint i = 0; i < highlightIf->hlModeCount(); i++)
+ {
+ hlName = highlightIf->hlModeName(i);
+ if (hlName == "HTML")
+ htmlIdx = i;
+ if (hlName == "XML")
+ xmlIdx = i;
+ }
+ const DTDStruct *dtd = w->defaultDTD();
+ if (dtd->family == 1)
+ {
+ if (dtd->singleTagStyle == "xml")
+ highlightIf->setHlMode(xmlIdx);
+ else
+ highlightIf->setHlMode(htmlIdx);
+ }
+ }
+ emit newStatus();
+ }
+ quantaApp->slotEnableIdleTimer(idleTimerStatus);
+}
+
+void QuantaDoc::slotOpeningFailed(const KURL &url)
+{
+ Q_UNUSED(url);
+ bool signalStatus = signalsBlocked();
+ blockSignals(false);
+ emit hideSplash();
+ //Seems to be not needed anymore since KDE 3.2, but keep until it's completely verified
+/*
+ KMessageBox::error(quantaApp, i18n("<qt>Cannot open document <b>%1</b>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
+*/
+ ViewManager::ref()->removeActiveView();
+ blockSignals(signalStatus);
+}
+
+void QuantaDoc::slotOpeningCompleted(const KURL &url)
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ Project::ref()->loadBookmarks(w->url(), dynamic_cast<KTextEditor::MarkInterface*>(w->doc()));
+
+ quantaApp->fileRecent->addURL(url);
+ quantaApp->slotRepaintPreview();
+ quantaApp->reparse(true);
+ if (url.isLocalFile())
+ quantaApp->debugger()->fileOpened(url.prettyURL(0, KURL::StripFileProtocol));
+ quantaApp->slotNewStatus();
+ quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
+ Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view()));
+ emit eventHappened("after_open", url.url(), QString::null);
+
+ bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
+ quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
+}
+
+/** show popup menu with list of attributes for current tag */
+void QuantaDoc::slotAttribPopup()
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+
+ attribMenu->clear();
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+
+ Node *node = parser->nodeAt(line, col, false);
+ if (node && node->tag)
+ {
+ Tag *tag = node->tag;
+ QString tagName = tag->name;
+ QStrIList attrList = QStrIList();
+ QString name;
+
+ for (int i=0; i < tag->attrCount(); i++ )
+ attrList.append( tag->attribute(i) );
+
+ if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) )
+ {
+ QString caption = i18n("Attributes of <%1>").arg(tagName);
+ attribMenu->insertTitle( caption );
+
+ AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName );
+ uint menuId = 0;
+ for ( uint i = 0; i < list->count(); i++ )
+ {
+ name = list->at(i)->name;
+ attribMenu->insertItem( name , i);//list->findIndex(*item) );
+ if (attrList.contains(name))
+ {
+ attribMenu->setItemEnabled( i , false );
+ }
+ menuId++;
+ }
+
+ QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
+ for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ {
+ QPopupMenu* popUpMenu = new QPopupMenu(attribMenu, (*it).latin1());
+ AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
+ for (uint j = 0; j < attrs->count(); j++)
+ {
+ name = attrs->at(j)->name;
+ popUpMenu->insertItem(name, ++menuId);
+ if (attrList.contains(name))
+ {
+ popUpMenu->setItemEnabled( menuId , false );
+ }
+ }
+ connect( popUpMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ attribMenu->insertItem(*it, popUpMenu);
+ }
+
+ if (menuId > 0) // don't show empty menu, may be core dumped
+ {
+ attribMenu->setActiveItem( 0);
+
+ QPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
+ QFont font = w->view()->font();
+ globalPos.setY(globalPos.y() + QFontMetrics(font).height());
+ attribMenu->exec(globalPos);
+ }
+ }
+ else {
+ QString message = i18n("Unknown tag: %1").arg(tagName);
+ quantaApp->slotStatusMsg( message );
+ }
+ }
+}
+
+void QuantaDoc::slotInsertAttrib( int id )
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w) return;
+ uint line, col;
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ Node *node = parser->nodeAt(line, col);
+ if (node && node->tag)
+ {
+ Tag *tag = node->tag;
+ QString tagName = tag->name;
+ if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(), tagName) )
+ {
+ int menuId;
+ AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(), tagName);
+ menuId = list->count();
+ QString attrStr;
+ if (id <= menuId)
+ {
+ attrStr = list->at(id)->name;
+ } else
+ {
+ QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
+ for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ {
+ AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
+ menuId += attrs->count();
+ if (id <= menuId)
+ {
+ attrStr = attrs->at(id - (menuId - attrs->count()) -1)->name;
+ break;
+ }
+ }
+ }
+ //now insert the new attribute into the tag
+ int el, ec;
+ tag->endPos(el, ec);
+ w->viewCursorIf->setCursorPositionReal( el, ec );
+ w->insertTag( " " + QuantaCommon::attrCase(attrStr) + "="+qConfig.attrValueQuotation, qConfig.attrValueQuotation );
+ }
+
+ delete attribMenu;
+ attribMenu = new KPopupMenu();
+ attribMenu->insertTitle(i18n("Tag"));
+ connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ }
+}
+
+
+#include "quantadoc.moc"
diff --git a/quanta/src/quantadoc.h b/quanta/src/quantadoc.h
new file mode 100644
index 00000000..f825d72e
--- /dev/null
+++ b/quanta/src/quantadoc.h
@@ -0,0 +1,59 @@
+/***************************************************************************
+ quantadoc.h - description
+ -------------------
+ begin : ���� 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2003 Andras Mantia <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 QUANTADOC_H
+#define QUANTADOC_H
+
+// include files for QT
+
+// forward declaration of the Quanta classes
+class Document;
+class KConfig;
+class KURL;
+
+class QuantaDoc : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ QuantaDoc(QWidget *parent, const char *name=0);
+ ~QuantaDoc();
+
+ bool newDocument(const KURL&, bool switchToExisting = true);
+ void openDocument(const KURL&, const QString& a_encoding = QString::null, bool switchToExisting = true, bool readOnly = false);
+
+public slots:
+ /** close documents. */
+ /** show popup menu with list of attributes for current tag */
+ void slotInsertAttrib( int id );
+ void slotAttribPopup();
+
+ void slotOpeningCompleted(const KURL &url);
+ void slotOpeningFailed(const KURL &url);
+
+signals:
+ void newStatus();
+ void hideSplash();
+ void eventHappened(const QString&, const QString&, const QString& );
+
+private:
+ KPopupMenu *attribMenu;
+ bool m_eventLoopStarted;
+};
+
+#endif // QUANTADOC_H
diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp
new file mode 100644
index 00000000..39cff3bc
--- /dev/null
+++ b/quanta/src/quantaview.cpp
@@ -0,0 +1,1185 @@
+/***************************************************************************
+ quantaview.cpp - description
+ -------------------
+ begin : ���� 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2005 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// include files for Qt
+#include <qprinter.h>
+#include <qpainter.h>
+#include <qtabbar.h>
+#include <qtabwidget.h>
+#include <qtimer.h>
+#include <qlayout.h>
+#include <qwidgetstack.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qevent.h>
+#include <qwidget.h>
+#include <qsplitter.h>
+#include <qpoint.h>
+#include <qscrollview.h>
+
+// include files for KDE
+#include <kaction.h>
+#include <kdebug.h>
+#include <kdirwatch.h>
+#include <khtmlview.h>
+#include <klocale.h>
+#include <kstandarddirs.h>
+#include <kmenubar.h>
+#include <kiconloader.h>
+#include <kmessagebox.h>
+#include <kurldrag.h>
+#include <kdeversion.h>
+#include <kparts/partmanager.h>
+#include <kstatusbar.h>
+
+#include "undoredo.h"
+#include "kafkacommon.h"
+#include "wkafkapart.h"
+
+#include <ktexteditor/document.h>
+#include <ktexteditor/selectioninterface.h>
+#include <ktexteditor/selectioninterfaceext.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/viewcursorinterface.h>
+
+// application specific includes
+#include "document.h"
+#include "resource.h"
+#include "quantaview.h"
+#include "quanta.h"
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+#include "viewmanager.h"
+
+#include "tagaction.h"
+#include "toolbartabwidget.h"
+#include "quantaplugin.h"
+#include "project.h"
+#include "structtreeview.h"
+
+#include "tagdialog.h"
+
+extern int NN;
+extern QValueList<Node*> nodes;
+
+QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption )
+ : KMdiChildView(parent, name)
+ , m_document(0L)
+ , m_plugin(0L)
+ , m_customWidget(0L)
+ , m_kafkaDocument(0L)
+ , m_currentFocus(SourceFocus)
+{
+ setMDICaption(caption);
+//Connect the VPL update timers
+ connect(&m_sourceUpdateTimer, SIGNAL(timeout()), this, SLOT(sourceUpdateTimerTimeout()));
+ connect(&m_VPLUpdateTimer, SIGNAL(timeout()), this, SLOT(VPLUpdateTimerTimeout()));
+
+//create the source and VPL holding widgets
+ m_documentArea = new QWidget(this);
+
+//get the reference to the user toolbar holding widget
+ ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
+ m_toolbarTab->reparent(this, 0, QPoint(), true);
+ m_toolbarTab ->setFocusPolicy( QWidget::NoFocus );
+
+//create a splitter to separate the VPL and document area
+ m_splitter = new QSplitter(Qt::Vertical, this);
+//place the widgets in a grid
+ m_viewLayout = new QGridLayout(this, 2, 0);
+ m_viewLayout->setRowStretch(0, 0);
+ m_viewLayout->setRowStretch(1,1);
+ m_viewLayout->addWidget( m_toolbarTab, 0, 0);
+ m_viewLayout->addWidget( m_documentArea, 1, 0);
+
+ m_documentArea->show();
+
+ setAcceptDrops(true); // [MB02] Accept drops on the view
+}
+
+QuantaView::~QuantaView()
+{
+ // quantaApp is undefined if the destructor of QuantaApp is active
+ if (quantaApp)
+ quantaApp->slotFileClosed(m_document);
+ if (m_document)
+ {
+ m_document->view()->reparent(0L, 0, QPoint(), false);
+ if (quantaApp)
+ emit documentClosed(m_document->url());
+ }
+ delete m_document;
+ m_document = 0L;
+}
+
+bool QuantaView::mayRemove()
+{
+ emit hidePreview();
+ if (m_plugin)
+ {
+ m_plugin->unload(false);
+ } else
+ {
+ bool unmodifiedUntitled = false;
+ if (m_document && m_document->isUntitled() && !m_document->isModified())
+ unmodifiedUntitled = true;
+ if (m_customWidget)
+ m_customWidget->reparent(0L, 0, QPoint(), false);
+ if (!saveModified())
+ return false;
+ slotSetSourceLayout();
+ if (static_cast<QuantaView *>(quantaApp->activeWindow()) == this)
+ {
+ parser->setSAParserEnabled(false);
+ kdDebug(24000) << "Node objects before delete = " << NN << " ; list count = " << nodes.count() << endl;
+ Node::deleteNode(baseNode);
+ baseNode = 0L;
+ kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl;
+ QValueList<Node*> nList = nodes;
+/* for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+ Node::deleteNode(*it);
+ kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl;*/
+ }
+ if (m_document)
+ {
+ KURL url = m_document->url();
+ Project::ref()->saveBookmarks(url, dynamic_cast<KTextEditor::MarkInterface*>(m_document->doc()));
+ if (!unmodifiedUntitled)
+ emit eventHappened("before_close", url.url(), QString::null);
+ m_currentViewsLayout = -1;
+// m_document->closeTempFile();
+ if (!m_document->isUntitled() && url.isLocalFile())
+ {
+ fileWatcher->removeFile(url.path());
+// kdDebug(24000) << "removeFile[mayRemove]: " << url.path() << endl;
+ }
+ Project::ref()->saveCursorPosition(url, dynamic_cast<KTextEditor::ViewCursorInterface*>(m_document->view()));
+
+ quantaApp->menuBar()->activateItemAt(-1);
+ quantaApp->guiFactory()->removeClient(m_document->view());
+ if (!unmodifiedUntitled)
+ emit eventHappened("after_close", url.url(), QString::null);
+ }
+/* kdDebug(24000) << "Calling reparse from close " << endl;
+ parser->setSAParserEnabled(true);
+ quantaApp->reparse(true);*/
+ }
+ return true;
+}
+
+void QuantaView::addDocument(Document *document)
+{
+ if (!document)
+ return;
+ m_document = document;
+ connect(m_document, SIGNAL(editorGotFocus()), this, SLOT(slotSourceGetFocus()));
+ connect(m_document->view(), SIGNAL(cursorPositionChanged()), this, SIGNAL(cursorPositionChanged()));
+
+
+ m_kafkaDocument = KafkaDocument::ref();
+
+ connect(m_kafkaDocument->getKafkaWidget(), SIGNAL(hasFocus(bool)),
+ this, SLOT(slotVPLGetFocus(bool)));
+ connect(m_kafkaDocument, SIGNAL(newCursorPosition(int,int)),
+ this, SLOT(slotSetCursorPositionInSource(int, int)));
+ connect(m_kafkaDocument, SIGNAL(loadingError(Node *)),
+ this, SLOT(slotVPLLoadingError(Node *)));
+
+ m_kafkaReloadingEnabled = true;
+ m_quantaReloadingEnabled = true;
+ m_curCol = m_curLine = m_curOffset = 0;
+
+//init the VPL part
+ m_currentViewsLayout = SourceOnly;//to correctly reload the timers.
+
+ reloadUpdateTimers();
+
+ m_currentViewsLayout = -1; //force loading of this layout
+ slotSetSourceLayout();
+}
+
+void QuantaView::addPlugin(QuantaPlugin *plugin)
+{
+ ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
+ m_toolbarTab->reparent(0, 0, QPoint(), false);
+ m_plugin = plugin;
+ m_splitter->hide();
+ QWidget *w = m_plugin->widget();
+ if (w)
+ {
+ w->reparent(m_documentArea, 0, QPoint(), true);
+ w->resize(m_documentArea->size());
+ }
+ m_documentArea->reparent(this, 0, QPoint(), true);
+ m_viewLayout->addWidget(m_documentArea, 1, 0);
+ activated();
+ updateTab();
+}
+
+void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
+{
+ if (widget)
+ {
+ ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ m_customWidget = widget;
+ m_splitter->hide();
+ widget->reparent(m_documentArea, 0, QPoint(), true);
+ widget->resize(m_documentArea->size());
+ if (!label.isEmpty())
+ {
+ widget->setCaption(label);
+ updateTab();
+ }
+ m_viewLayout->addWidget(m_documentArea, 1, 0);
+ m_documentArea->show();
+ } else
+ if (m_customWidget)
+ {
+ ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
+ m_customWidget = 0L; //avoid infinite recursion
+ reloadLayout();
+ }
+ if (m_documentArea->height() + ToolbarTabWidget::ref()->height() > height() && ToolbarTabWidget::ref()->isVisible())
+ resize(m_documentArea->width(), m_documentArea->height() - ToolbarTabWidget::ref()->height());
+ else if (ToolbarTabWidget::ref()->isHidden())
+ resize(width(), height());
+}
+
+void QuantaView::reloadLayout()
+{
+ int currentViewsLayout = m_currentViewsLayout;
+ m_currentViewsLayout = -1; //force loading of this layout
+ switch (currentViewsLayout)
+ {
+ case SourceOnly:
+ slotSetSourceLayout();
+ break;
+ case SourceAndVPL:
+ slotSetSourceAndVPLLayout();
+ break;
+ case VPLOnly:
+ slotSetVPLOnlyLayout();
+ break;
+ }
+}
+
+void QuantaView::updateTab()
+{
+ if (qConfig.showCloseButtons == "ShowAlways")
+ {
+ setIcon(SmallIcon("fileclose"));
+ }
+ if (m_document)
+ {
+ // try to set the icon from mimetype
+ QIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
+ if (mimeIcon.isNull())
+ mimeIcon = QIconSet(SmallIcon("document"));
+ QString urlStr = QExtFileInfo::shortName(m_document->url().path());
+ if (m_document->isModified())
+ {
+ if (qConfig.showCloseButtons == "ShowAlways")
+ {
+ setMDICaption(urlStr + " " + i18n("[modified]"));
+ } else
+ {
+ setIcon(SmallIcon("filesave"));
+ setMDICaption(urlStr);
+ }
+ m_szCaption = urlStr + " " + i18n("[modified]");
+ } else
+ {
+ if (qConfig.showCloseButtons != "ShowAlways")
+ {
+ setIcon(mimeIcon.pixmap());
+ }
+ setMDICaption(urlStr);
+ quantaApp->setTabToolTip(this, m_document->url().prettyURL(0, KURL::StripFileProtocol));
+ }
+ } else
+ if (m_plugin)
+ {
+ if (qConfig.showCloseButtons != "ShowAlways")
+ {
+ setIcon(SmallIcon(m_plugin->icon()));
+ }
+ setMDICaption(m_plugin->name());
+ } else
+ if (m_customWidget)
+ {
+ if (qConfig.showCloseButtons != "ShowAlways")
+ {
+ setIcon(*(m_customWidget->icon()));
+ }
+ setMDICaption(m_customWidget->caption());
+ }
+}
+
+QString QuantaView::tabName()
+{
+ if (m_document)
+ {
+ return m_document->url().fileName();
+ } else
+ if (m_plugin)
+ {
+ return m_plugin->name();
+ } else
+ if (m_customWidget)
+ {
+ return m_customWidget->caption();
+ } else
+ return "";
+}
+
+void QuantaView::slotSetSourceLayout()
+{
+ emit hidePreview();
+ if (m_currentViewsLayout == SourceOnly || !m_document)
+ return;
+
+ if(m_currentViewsLayout == SourceAndVPL)
+ m_splitterSizes = m_splitter->sizes();
+
+ KToggleAction *ta = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" );
+ if (ta)
+ ta->setChecked(true);
+
+ //hide the VPL widget, reload the source if necessary
+ if ((m_currentViewsLayout == SourceAndVPL && m_kafkaDocument->getKafkaWidget()->view()->hasFocus()) ||
+ m_currentViewsLayout == VPLOnly)
+ {
+ reloadSourceView();
+ }
+ if (m_kafkaDocument->isLoaded())
+ m_kafkaDocument->unloadDocument();
+
+//show the document if full size
+ m_splitter->hide();
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
+ m_document->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_document->view()->resize(m_documentArea->size());
+ m_viewLayout->addWidget(m_documentArea, 1, 0);
+ m_document->view()->setFocus();
+
+ m_currentViewsLayout = SourceOnly;
+
+//update timers are not needed in source only mode
+ m_sourceUpdateTimer.stop();
+ m_VPLUpdateTimer.stop();
+}
+
+
+void QuantaView::slotSetSourceAndVPLLayout()
+{
+ emit hidePreview();
+ if (m_currentViewsLayout == SourceAndVPL || !m_document)
+ return;
+
+ KToggleAction *ta = (KToggleAction *) quantaApp->actionCollection()->action( "show_kafka_and_quanta" );
+
+ if (m_document->defaultDTD()->name.contains("HTML", false) == 0)
+ {
+ KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").arg(m_document->defaultDTD()->nickName));
+ KToggleAction *ta2 = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" );
+ if (ta2)
+ ta2->setChecked(true);
+ return;
+ }
+
+ if (ta)
+ ta->setChecked(true);
+
+
+ if (!m_kafkaDocument->isLoaded())
+ m_kafkaDocument->loadDocument(m_document);
+ if (m_currentViewsLayout == VPLOnly)
+ {
+ reloadSourceView();
+ }
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_splitter->moveToFirst(m_kafkaDocument->getKafkaWidget()->view());
+ m_document->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_viewLayout->addWidget(m_splitter, 1, 0);
+ m_splitter->setSizes(m_splitterSizes);
+ m_splitter->show();
+
+ if ( m_currentViewsLayout == SourceOnly &&
+ (!baseNode || (baseNode->tag->type == Tag::Empty &&
+ !baseNode->next && !baseNode->child)))
+ {
+ quantaApp->documentProperties(true);
+ }
+
+ m_currentViewsLayout = SourceAndVPL;
+
+ reloadUpdateTimers();
+}
+
+void QuantaView::slotSetVPLOnlyLayout()
+{
+ emit hidePreview();
+ if (m_currentViewsLayout == VPLOnly || !m_document)
+ return;
+
+ if(m_currentViewsLayout == SourceAndVPL)
+ m_splitterSizes = m_splitter->sizes();
+
+ KToggleAction *ta = (KToggleAction *) quantaApp->actionCollection()->action( "show_kafka_view" );
+
+ if (m_document->defaultDTD()->name.contains("HTML", false) == 0)
+ {
+ KMessageBox::information(this, i18n("The VPL Mode does not support the current DTD, at the moment: %1").arg(m_document->defaultDTD()->nickName));
+ KToggleAction *ta2 = (KToggleAction *) quantaApp->actionCollection()->action( "show_quanta_editor" );
+ if (ta2)
+ ta2->setChecked(true);
+ return;
+ }
+
+ if (ta)
+ ta->setChecked(true);
+
+ m_splitter->hide();
+ if (!m_kafkaDocument->isLoaded())
+ m_kafkaDocument->loadDocument(m_document);
+
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->resize(m_documentArea->size());
+ m_viewLayout->addWidget(m_documentArea, 1, 0);
+ m_kafkaDocument->getKafkaWidget()->view()->setFocus();
+
+ if ( m_currentViewsLayout == SourceOnly &&
+ (!baseNode || (baseNode->tag->type == Tag::Empty &&
+ !baseNode->next && !baseNode->child)))
+ {
+ quantaApp->documentProperties(true);
+ }
+
+ m_currentViewsLayout = VPLOnly;
+
+
+//update timers are not needed in VPL only mode
+ m_sourceUpdateTimer.stop();
+ m_VPLUpdateTimer.stop();
+}
+
+void QuantaView::reloadUpdateTimers()
+{
+ QuantaView* view=ViewManager::ref()->activeView();
+
+ m_sourceUpdateTimer.stop();
+ m_VPLUpdateTimer.stop();
+
+ if (m_kafkaDocument->isLoaded() && m_currentViewsLayout == SourceAndVPL && view && view == this)
+ {
+ if (m_currentFocus == VPLFocus && !qConfig.quantaRefreshOnFocus)
+ m_sourceUpdateTimer.start(qConfig.quantaRefreshDelay);
+ if (m_currentFocus == SourceFocus && !qConfig.kafkaRefreshOnFocus)
+ m_VPLUpdateTimer.start(qConfig.kafkaRefreshDelay);
+ }
+}
+
+void QuantaView::slotVPLGetFocus(bool focus)
+{
+ // is Quanta exiting?
+ if (!quantaApp) return;
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "slotVPLGetFocus(" << focus << ")" << endl;
+#endif
+ int contentsX, contentsY;
+ KAction *action;
+
+ if(focus)
+ {
+ //We reload the kafka part from the Node Tree
+ if (m_currentViewsLayout == SourceAndVPL && m_currentFocus == SourceFocus)
+ {
+
+ contentsX = m_kafkaDocument->getKafkaWidget()->view()->contentsX();
+ contentsY = m_kafkaDocument->getKafkaWidget()->view()->contentsY();
+
+ //Reload the kafka Editor only if Quanta was modified or if something has happened (e.g. a reparse)
+ //and NEED a kafka reload.
+ if (parser->parsingNeeded())
+ baseNode = parser->rebuild(m_document);
+ reloadVPLView();
+ //doesn't work!
+ m_kafkaDocument->getKafkaWidget()->view()->setContentsPos(contentsX, contentsY);
+ }
+
+ //We disable some actions which doesn't work on kafka for the moment
+ action = quantaApp->actionCollection()->action("tag_edit_table");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_quick_list");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_color");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_mail");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_misc");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_frame_wizard");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("insert_css");
+ if(action)
+ action->setEnabled(false);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("insert_char");
+ if(action)
+ action->setEnabled(false);
+
+ //TEMPORARY: Enable VPL undo/redo logging
+ m_document->docUndoRedo->turnOn(true);
+
+ m_currentFocus = VPLFocus;
+ reloadUpdateTimers();
+ }
+}
+
+void QuantaView::slotSourceGetFocus()
+{
+ // is Quanta exiting?
+ if (!quantaApp) return;
+#ifdef LIGHT_DEBUG
+ kdDebug(25001)<< "slotSourceGetFocus(true)" << endl;
+#endif
+ KAction *action;
+
+ quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view());
+ //We reload the quanta view from the Node Tree.
+ if (m_currentViewsLayout == SourceAndVPL && m_currentFocus == VPLFocus)
+ {
+ reloadSourceView();
+
+ //FIXME: the tree (and the output)is right, the pos aren't.
+ //This will reparse the whole Node tree and reload kafka.
+ baseNode = parser->parse(m_document);
+ }
+
+ m_currentFocus = SourceFocus;
+ reloadUpdateTimers();
+
+ //We enable some actions which doesn't work on kafka for the moment
+ action = quantaApp->actionCollection()->action("tag_edit_table");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_quick_list");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_color");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_mail");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_misc");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("tag_frame_wizard");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("insert_css");
+ if(action)
+ action->setEnabled(true);
+ action = 0L;
+ action = quantaApp->actionCollection()->action("insert_char");
+ if(action)
+ action->setEnabled(true);
+
+ //TEMPORARY: Disable VPL undo/redo logging
+ m_document->docUndoRedo->turnOn(false);
+
+}
+
+/** Reloads both views ONLY when changes have been made to the Node tree ONLY. */
+void QuantaView::reloadBothViews(bool force)
+{
+ reloadSourceView(force);
+ reloadVPLView(force);
+}
+
+/** reload the Kafka view from the Node Tree. Set force to true if you want to reload even if not necessary. */
+void QuantaView::reloadVPLView(bool force)
+{
+ if (m_document && (m_kafkaReloadingEnabled || force))
+ m_document->docUndoRedo->reloadKafkaEditor(force);
+}
+
+/** reload the Quanta view from the Node Tree. Set force to true if you want to reload even if not necessary. */
+void QuantaView::reloadSourceView(bool force)
+{
+ if (m_quantaReloadingEnabled || force)
+ m_document->docUndoRedo->reloadQuantaEditor(force);
+}
+
+
+void QuantaView::VPLUpdateTimerTimeout()
+{
+ if(quantaApp && m_currentFocus == SourceFocus)
+ reloadVPLView();
+}
+
+void QuantaView::sourceUpdateTimerTimeout()
+{
+ if(quantaApp && m_currentFocus == VPLFocus)
+ reloadSourceView();
+}
+
+void QuantaView::slotVPLLoadingError(Node *)
+{
+ emit showProblemsView();
+}
+
+
+void QuantaView::slotSetCursorPositionInSource(int col, int line)
+{
+ m_curCol = col;
+ m_curLine = line;
+ if (m_currentViewsLayout == SourceAndVPL || m_currentViewsLayout == SourceOnly)
+ m_document->viewCursorIf->setCursorPositionReal(line, col);
+}
+
+void QuantaView::dragEnterEvent(QDragEnterEvent *e)
+{
+ e->accept(KURLDrag::canDecode(e));
+}
+
+void QuantaView::dropEvent(QDropEvent *e)
+{
+ emit dragInsert(e);
+}
+
+void QuantaView::resizeEvent(QResizeEvent *e)
+{
+ QWidget::resizeEvent(e);
+ resize(m_documentArea->width(), m_documentArea->height());
+}
+
+void QuantaView::resize(int width, int height)
+{
+ if (m_plugin && m_plugin->widget())
+ {
+ m_plugin->widget()->resize(width, height);
+ return;
+ } else
+ if (m_customWidget)
+ {
+ m_customWidget->resize(width, height);
+ return;
+ } else
+ if (!m_document)
+ return;
+ if (m_currentViewsLayout == SourceOnly)
+ m_document->view()->resize(width, height);
+ else
+ if (m_currentViewsLayout == VPLOnly)
+ m_kafkaDocument->getKafkaWidget()->view()->resize(width,height);
+ else
+ if (m_currentViewsLayout == SourceAndVPL)
+ {
+ m_splitter->resize(width, height);
+ m_splitterSizes = m_splitter->sizes();
+ }
+}
+
+void QuantaView::insertTag(const char *tag)
+{
+ if (!m_document )
+ return;
+ QString tagStr = QuantaCommon::tagCase(tag);
+ const DTDStruct *dtd = m_document->currentDTD(true);
+ bool single = QuantaCommon::isSingleTag(dtd->name, tagStr);
+ bool optional = QuantaCommon::isOptionalTag(dtd->name, tagStr);
+
+ QString startTag = tagStr;
+ startTag.prepend("<");
+ if ( dtd->singleTagStyle == "xml" &&
+ ( single || (optional && !qConfig.closeOptionalTags))
+ )
+ {
+ startTag.append(" /");
+ }
+ startTag.append(">");
+
+ if ( (qConfig.closeTags && !single && !optional) ||
+ (qConfig.closeOptionalTags && optional) )
+ {
+ m_document->insertTag( startTag, QString("</")+tagStr+">");
+ }
+ else
+ {
+ m_document->insertTag(startTag);
+ }
+}
+
+//FIXME: Move out from here??
+/** Insert a new tag by bringing up the TagDialog. */
+void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool insertInLine)
+{
+ if (m_document)
+ {
+ if (m_currentFocus == QuantaView::VPLFocus ||
+ (m_currentFocus == QuantaView::SourceFocus && qConfig.smartTagInsertion))
+ insertOutputInTheNodeTree("", "", quantaApp->showTagDialogAndReturnNode(tag, attr));
+ else
+ {
+ QString selection;
+ if (m_document->selectionIf)
+ selection = m_document->selectionIf->selection();
+ TagDialog *dlg = new TagDialog(QuantaCommon::tagFromDTD(m_document->getDTDIdentifier(), tag), selection, attr, baseURL());
+ if (dlg->exec())
+ {
+ dlg->insertTag(m_document, insertInLine);
+ }
+
+ delete dlg;
+ }
+ }
+}
+
+void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &str2, Node *node)
+{
+ if (!m_document)
+ return;
+#ifdef LIGHT_DEBUG
+ if (node)
+ kdDebug(25001)<< "QuantaView::insertOutputInTheNodeTree() - node : " << node->tag->name <<
+ " - type : " << node->tag->type << endl;
+ else
+ kdDebug(25001)<< "QuantaView::insertOutputInTheNodeTree() - str1 : " << str1 <<
+ " - str2 : " << str2 << endl;
+#endif
+ KafkaWidget *kafkaPart = m_kafkaDocument->getKafkaWidget();
+ NodeModifsSet *modifs;
+ DOM::Node domNode, domStartContainer, domEndContainer;
+ QString tagName;
+ QTag *nodeQTag, *qTag, *nodeParentQTag;
+ Node *nodeCursor, *startContainer, *endContainer, *nodeParent, *dummy;
+ QPtrList<QTag> qTagList;
+ int startCol, startLine, endCol, endLine;
+ bool specialTagInsertion = false;
+ long nodeOffset, startOffset, endOffset, domNodeOffset;
+ QValueList<int> loc;
+ uint line, col;
+ bool smartTagInsertion, hasSelection, nodeTreeModified;
+
+ if (!node && str1.isEmpty() || node && !str1.isEmpty())
+ return;
+
+ //Three cases :
+ //- Tag insertion in VPL
+ //- Normal tag insertion in kate
+ //- Smart tag insertion in kate
+ smartTagInsertion = (m_currentFocus == QuantaView::SourceFocus && qConfig.smartTagInsertion);
+
+ if (m_currentFocus == QuantaView::VPLFocus || smartTagInsertion)
+ {
+ modifs = new NodeModifsSet();
+ if (!node && !str1.isEmpty())
+ {
+ //We build the node from the str1
+ node = kafkaCommon::createNode("", "", Tag::XmlTag, m_document);
+ node->tag->parse(str1, m_document);
+ node->tag->name = QuantaCommon::tagCase(node->tag->name);
+ node->tag->single = QuantaCommon::isSingleTag(m_document->defaultDTD()->name,
+ node->tag->name);
+ }
+ if (m_currentFocus == QuantaView::VPLFocus)
+ {
+ kafkaPart->getCurrentNode(domNode, domNodeOffset);
+ nodeCursor = m_kafkaDocument->getNode(domNode);
+ }
+ else
+ {
+ m_document->viewCursorIf->cursorPositionReal(&line, &col);
+ nodeCursor = parser->nodeAt(line, col, false);
+ }
+
+ if (!nodeCursor)
+ return;
+
+ nodeParent = nodeCursor;
+ if (nodeParent->tag->type == Tag::Text)
+ nodeParent = nodeParent->parent;
+
+ //Checking if at least one parent of node can have a Text Node as child, otherwise
+ //it is impossible for the
+ //user to add this node. In that case, try to insert the Node in the closest parent accepting it.
+ //e.g. TR : a normal insertion would require to have the caret in the TABLE Node, but it is
+ //impossible
+ nodeQTag = QuantaCommon::tagFromDTD(m_document->defaultDTD(),
+ node->tag->name);
+
+ if (!nodeQTag)
+ return;
+
+ qTagList = nodeQTag->parents();
+#ifdef HEAVY_DEBUG
+ kdDebug(25001)<< "nodeQTag name : " << nodeQTag->name() << endl;
+ /**kdDebug(25001)<< nodeQTag->isChild("#text", false) << endl;
+ kdDebug(25001)<< nodeQTag->isChild("#text", true) << endl;*/
+#endif
+ for (qTag = qTagList.first(); qTag; qTag = qTagList.next())
+ {
+ if (qTag->isChild("#text", false))
+ break;
+ if (qTag == qTagList.getLast())
+ specialTagInsertion = true;
+ }
+
+ if (m_currentFocus == QuantaView::VPLFocus)
+ {
+ m_kafkaDocument->translateKafkaIntoNodeCursorPosition(domNode, domNodeOffset, &dummy, nodeOffset);
+ kafkaPart->selection(domStartContainer, startOffset, domEndContainer, endOffset);
+ m_kafkaDocument->translateKafkaIntoNodeCursorPosition(domStartContainer, startOffset,
+ &startContainer, startOffset);
+ m_kafkaDocument->translateKafkaIntoNodeCursorPosition(domEndContainer, endOffset,
+ &endContainer,endOffset);
+ hasSelection = kafkaPart->hasSelection();
+ }
+ else
+ if (m_document->selectionIfExt)
+ {
+ m_kafkaDocument->translateQuantaIntoNodeCursorPosition(line, col, &dummy, nodeOffset);
+ startCol = m_document->selectionIfExt->selStartCol();
+ startLine = m_document->selectionIfExt->selStartLine();
+ endCol = m_document->selectionIfExt->selEndCol();
+ endLine = m_document->selectionIfExt->selEndLine();
+ m_kafkaDocument->translateQuantaIntoNodeCursorPosition((unsigned)startLine, (unsigned)startCol,
+ &startContainer, startOffset);
+ m_kafkaDocument->translateQuantaIntoNodeCursorPosition((unsigned)endLine, (unsigned)endCol,
+ &endContainer, endOffset);
+ hasSelection = m_document->selectionIf->hasSelection();
+ if (startContainer == endContainer && startContainer->tag->type == Tag::Empty)
+ {
+ hasSelection = false;
+ }
+ if (endContainer && endContainer->tag->type == Tag::XmlTag && endOffset < (signed)endContainer->tag->tagStr().length())
+ {
+ endContainer = endContainer->previousSibling();
+ endOffset = (endContainer)?endContainer->tag->tagStr().length():0;
+ }
+ /**else
+ {
+ if (startContainer && startContainer->tag->type == Tag::Empty)
+ startContainer = startContainer->nextNE();
+ if (endContainer && endContainer->tag->type == Tag::Empty)
+ endContainer = endContainer->prevNE();
+ }*/
+ }
+
+ nodeTreeModified = false;
+ if (specialTagInsertion)
+ {
+ //let's try to insert this node in the closest parent accepting it.
+ while (nodeParent)
+ {
+ nodeParentQTag =
+ QuantaCommon::tagFromDTD(m_document->defaultDTD(),
+ nodeParent->tag->name);
+ if (nodeParentQTag && nodeParentQTag->isChild(node))
+ {
+ nodeCursor = kafkaCommon::createMandatoryNodeSubtree(node,
+ m_document);
+ nodeOffset = 0;
+ kafkaCommon::insertNodeSubtree(node, nodeParent, 0L, 0L, modifs);
+ nodeTreeModified = true;
+ break;
+ }
+ nodeParent = nodeParent->parent;
+ }
+ }
+ else if (hasSelection && !nodeQTag->isSingle())
+ {
+ //If some text is selected in kafka, surround the selection with the new Node.
+ if(!startContainer || !endContainer)
+ return;
+ nodeTreeModified = kafkaCommon::DTDinsertRemoveNode(node, startContainer, (int)startOffset,
+ endContainer, (int)endOffset, m_document, &nodeCursor,
+ nodeOffset, modifs);
+ }
+ else
+ {
+ //Nothing is selected, simply inserting the Node if it is not an inline.
+/* if(!kafkaCommon::isInline(node->tag->name) || nodeQTag->isSingle())
+ {*/
+ nodeTreeModified = kafkaCommon::DTDinsertRemoveNode(node, nodeCursor, (int)nodeOffset, nodeCursor,
+ (int)nodeOffset, m_document, &nodeCursor, nodeOffset, modifs);
+// }
+ }
+
+ m_document->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+ if (m_currentFocus == QuantaView::VPLFocus)
+ {
+ //view->reloadVPLView();
+ //Now update the VPL cursor position
+ m_kafkaDocument->translateNodeIntoKafkaCursorPosition(nodeCursor, nodeOffset, domNode,
+ domNodeOffset);
+ if (!domNode.isNull() && domNode.nodeType() != DOM::Node::TEXT_NODE &&
+ !domNode.firstChild().isNull() && domNode.firstChild().nodeType() ==
+ DOM::Node::TEXT_NODE)
+ domNode = domNode.firstChild();
+ if (!domNode.isNull())
+ kafkaPart->setCurrentNode(domNode, domNodeOffset);
+ }
+ else
+ {
+ //view->reloadSourceView();
+ //Now update the source cursor position
+ m_kafkaDocument->translateNodeIntoQuantaCursorPosition(nodeCursor, nodeOffset, line, col);
+ m_document->viewCursorIf->setCursorPositionReal(line, col);
+ }
+ if (!nodeTreeModified)
+ quantaApp->slotStatusMsg(i18n("Cannot insert the tag: invalid location."));
+
+ }
+ else
+ {
+ m_document->insertTag(str1, str2);
+ }
+}
+
+
+/** Returns the baseURL of the document. */
+KURL QuantaView::baseURL()
+{
+ KURL base;
+ if (m_document && !m_document->isUntitled() )
+ {
+ base = QuantaCommon::convertToPath(m_document->url());
+ } else
+ {
+ base = Project::ref()->projectBaseURL();
+ }
+ return base;
+}
+
+void QuantaView::refreshWindow()
+{
+ if (!m_document)
+ {
+ if (m_plugin)
+ quantaApp->partManager()->setActivePart(m_plugin->part(), m_plugin->widget());
+ resize(width(), height());
+ } else
+ {
+/*
+ kdDebug(24000) << "m_documentArea->height(): " << m_documentArea->height() << endl;
+ kdDebug(24000) << "ToolbarTabWidget::ref()->height(): " << ToolbarTabWidget::ref()->height() << " hidden: " << ToolbarTabWidget::ref()->isHidden() << " visible: " << ToolbarTabWidget::ref()->isVisible() << endl;
+ kdDebug(24000) <<"sum: " << m_documentArea->height() + ToolbarTabWidget::ref()->height() << endl;
+ kdDebug(24000) << "height(): " << height() << endl;
+ */
+ if (m_documentArea->height() + ToolbarTabWidget::ref()->height() - 1 > height() && !ToolbarTabWidget::ref()->isHidden()) //don't use isVisible alone instead of isHidden!
+ resize(m_documentArea->width(), m_documentArea->height() - ToolbarTabWidget::ref()->height());
+ else if (ToolbarTabWidget::ref()->isHidden())
+ resize(width(), height());
+ }
+}
+
+void QuantaView::activated()
+{
+ if (!m_document)
+ {
+ parser->setSAParserEnabled(false);
+ quantaApp->slotReloadStructTreeView();
+ refreshWindow();
+ return;
+ }
+ ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
+ quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view());
+ m_document->checkDirtyStatus();
+ StructTreeView::ref()->useOpenLevelSetting = true;
+ quantaApp->slotLoadToolbarForDTD(m_document->getDTDIdentifier());
+
+ //TEMP : If the activated document is not a (X)HTML document, disable smartTagInsertion
+ //Will be removed when VPL will support every DTD
+ KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion");
+ if(action && m_document->defaultDTD()->name.contains("HTML", false) == 0)
+ {
+ qConfig.smartTagInsertion = false;
+ (static_cast<KToggleAction* >(action))->setChecked(false);
+ }
+
+ reloadLayout();
+ refreshWindow();
+ }
+
+
+void QuantaView::deactivated()
+{
+ if (m_plugin)
+ {
+ quantaApp->statusBar()->changeItem("", IDS_STATUS);
+ }
+ m_sourceUpdateTimer.stop();
+ m_VPLUpdateTimer.stop();
+}
+
+bool QuantaView::saveModified(bool ask)
+{
+ if (!m_document)
+ return true;
+
+ bool completed=true;
+ QString fileName = m_document->url().fileName();
+
+ if (m_document->isModified() )
+ {
+ if (m_currentFocus == VPLFocus)
+ reloadSourceView();
+ int want_save;
+ if (ask)
+ want_save = KMessageBox::warningYesNoCancel(this,
+ i18n("The file \"%1\" has been modified.\nDo you want to save it?").arg(fileName),
+ i18n("Warning"), KStdGuiItem::save(), KStdGuiItem::discard());
+ else
+ want_save = KMessageBox::Yes;
+
+ switch (want_save)
+ {
+ case KMessageBox::Yes :
+ if (m_document->isUntitled())
+ {
+ completed = quantaApp->slotFileSaveAs(this);
+ }
+ else
+ {
+ completed = saveDocument(m_document->url());
+ };
+
+ break;
+
+ case KMessageBox::No :
+ {
+ m_document->removeBackup(quantaApp->config());
+ completed=true;
+ }
+ break;
+
+ case KMessageBox::Cancel :
+ completed=false;
+ break;
+
+ default:
+ completed=false;
+ break;
+ }
+ } else
+ m_document->removeBackup(quantaApp->config());
+ return completed;
+}
+
+bool QuantaView::saveDocument(const KURL& url)
+{
+ if (url.isEmpty())
+ return false;
+
+ emit eventHappened("before_save", url.url(), QString::null);
+ m_saveResult = true;
+ KURL oldURL = m_document->url();
+ if (!m_document->isUntitled() && oldURL.isLocalFile())
+ {
+ fileWatcher->removeFile(oldURL.path());
+// kdDebug(24000) << "removeFile[saveDocument]: " << oldURL.path() << endl;
+ }
+ if (url.isLocalFile())
+ {
+ if (!m_document->saveAs(url))
+ {
+ fileWatcher->addFile(oldURL.path());
+// kdDebug(24000) << "addFile[saveDocument]: " << oldURL.path() << endl;
+ return false; //saving to a local file failed
+ } else //successful saving to a local file
+ {
+ m_document->setDirtyStatus(false);
+ m_document->removeBackup(quantaApp->config());
+ fileWatcher->addFile(m_document->url().path());
+// kdDebug(24000) << "addFile[saveDocument, 2]: " << m_document->url().path() << endl;
+ }
+ } else //saving to a remote file
+ {
+ KTextEditor::Document *doc = m_document->doc();
+ m_eventLoopStarted = false;
+ connect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
+ connect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ m_saveResult = m_document->saveAs(url);
+ if (m_saveResult)
+ {
+ //start an event loop and wait until the saving finished
+ QExtFileInfo internalFileInfo;
+ m_eventLoopStarted = true;
+ internalFileInfo.enter_loop();
+ }
+ disconnect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
+ disconnect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ if (!m_saveResult) //there was an error while saving
+ {
+ if (oldURL.isLocalFile())
+ {
+ fileWatcher->addFile(oldURL.path());
+// kdDebug(24000) << "addFile[saveDocument, 3]: " << oldURL.path() << endl;
+ }
+ return false;
+ }
+ }
+ // everything went fine
+ if (oldURL != m_document->url())
+ {
+ setCaption(m_document->url().fileName());
+ }
+ emit eventHappened("after_save", m_document->url().url(), QString::null);
+ return true;
+}
+
+void QuantaView::slotSavingFailed(const QString &error)
+{
+ Q_UNUSED(error);
+ m_saveResult = false;
+ if (m_eventLoopStarted)
+ qApp->exit_loop();
+}
+
+void QuantaView::slotSavingCompleted()
+{
+ m_saveResult = true;
+ m_document->setDirtyStatus(false);
+ m_document->removeBackup(quantaApp->config());
+ if (m_eventLoopStarted)
+ qApp->exit_loop();
+}
+
+#include "quantaview.moc"
diff --git a/quanta/src/quantaview.h b/quanta/src/quantaview.h
new file mode 100644
index 00000000..24ecd776
--- /dev/null
+++ b/quanta/src/quantaview.h
@@ -0,0 +1,233 @@
+/***************************************************************************
+ quantaview.h - description
+ -------------------
+ begin : ���� 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2005 Andras Mantia <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 QUANTAVIEW_H
+#define QUANTAVIEW_H
+
+// include files for Qt
+#include <qguardedptr.h>
+#include <qwidget.h>
+#include <qptrlist.h>
+#include <qvaluelist.h>
+#include <qtimer.h>
+
+//kde includes
+#include <kmdichildview.h>
+
+#include <dom/dom_node.h>
+
+class QuantaDoc;
+class Document;
+class ToolbarTabWidget;
+class KafkaDocument;
+class QuantaPlugin;
+
+class QSplitter;
+class KURL;
+class QGridLayout;
+
+namespace DOM
+{
+ class Node;
+}
+
+namespace KTextEditor
+{
+ class Mark;
+}
+class QSplitter;
+class Node;
+
+/** The QuantaView class provides the view widget for the QuantaApp
+ * instance. The View instance inherits QWidget as a base class and
+ * represents the view object of a KTMainWindow. As QuantaView is part
+ * of the docuement-view model, it needs a reference to the document
+ * object connected with it by the QuantaApp class to manipulate and
+ * display the document structure provided by the QuantaDoc class.
+ *
+ * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
+ * @version KDevelop version 0.4 code generation */
+class QuantaView : public KMdiChildView
+{
+ Q_OBJECT
+
+public:
+
+ QuantaView(QWidget *parent = 0, const char *name=0, const QString &caption = QString::null);
+ ~QuantaView();
+
+ /** returns true if the view can be removed, false otherwise */
+ bool mayRemove();
+
+ /**Adds a Document object to the view. Also creates the VPL widget for the document. */
+ void addDocument(Document *document);
+
+ /** Adds a custom widget to the view. */
+ void addCustomWidget(QWidget *widget, const QString &label);
+
+ /** returns the Document object associated with this view. Returns 0L if the view holds
+ a non-Document object */
+ Document *document() {return m_document;};
+
+ /**Adds a QuantaPlugin object to the view.*/
+ void addPlugin(QuantaPlugin *plugin);
+
+ QWidget* documentArea() {return m_documentArea;}
+
+ bool saveDocument(const KURL&);
+ /** Saves the document if it's modified. Ask the user if their
+ @param ask is true. */
+ bool saveModified(bool ask = true);
+ /** Returns the baseURL of the document. */
+ KURL baseURL();
+
+ /** Tells which widget had the focus the more recently */
+ int hadLastFocus() {return m_currentFocus;}
+ /** Reloads both views ONLY when changes have been made to the Node tree ONLY.
+ * Set force to true if you want to reload even if not necessary.*/
+ void reloadBothViews(bool force = false);
+ /** reload the Kafka view from the Node Tree. Set force to true if you want to reload even if not necessary. */
+ void reloadVPLView(bool force = false);
+ /** reload the Quanta view from the Node Tree. Set force to true if you want to reload even if not necessary. */
+ void reloadSourceView(bool force = false);
+ /** Return the curren views layout*/
+ int currentViewsLayout() {return m_currentViewsLayout;}
+
+ void reloadLayout();
+
+ /** Called when this view become the active one */
+ void activated();
+ /** Called when this view lost the active status */
+ void deactivated();
+
+ void resizeEvent(QResizeEvent* e);
+ /** Resize the current view */
+ void resize(int width, int height);
+ /** Redraws the view, resizes the components to their correct size */
+ void refreshWindow();
+
+ /** Updates the icon at the name on the view tab */
+ void updateTab();
+
+ /** Returns the tab name associated with this view */
+ QString tabName();
+
+ void insertTag( const char *tag);
+
+ /** Insert a new tag by bringing up the TagDialog. */
+ void insertNewTag(const QString &tag, const QString &attr = QString::null, bool insertInLine = true);
+ /**
+ * This function take the output of the TagAction, parse it into Nodes and insert it
+ * in the Node tree. Then kafka will take care of updating itself from the Node Tree.
+ */
+ void insertOutputInTheNodeTree(const QString &str1, const QString &str2 = QString::null, Node *node = 0L);
+
+ enum ViewFocus {
+ SourceFocus = 0,
+ VPLFocus
+ };
+
+ enum ViewLayout {
+ SourceOnly = 0,
+ SourceAndVPL,
+ VPLOnly
+ };
+
+
+public slots:
+ void slotSetSourceLayout();
+ void slotSetSourceAndVPLLayout();
+ void slotSetVPLOnlyLayout();
+
+ /**
+ * Called whenever the KafkaWidget widget get/lost the focus.
+ */
+ void slotVPLGetFocus(bool focus);
+
+ /**
+ * Called whenever the KTextEditor::View widget get the focus.
+ */
+ void slotSourceGetFocus();
+
+ /**
+ * Called when we want to set the Quanta cursor.
+ * Record the position until Quanta get the focus again.
+ * Useful when we want to set it when quanta doesn't have the focus.
+ */
+ void slotSetCursorPositionInSource(int col, int line);
+ /**
+ * Called when an error occured when loading kafka.
+ * Pop up the Error reporter dialog.
+ */
+ void slotVPLLoadingError(Node *node);
+
+ /** Restarts the update timers according to the current settings */
+ void reloadUpdateTimers();
+
+private slots:
+ void slotSavingCompleted();
+ void slotSavingFailed(const QString& error);
+
+ /**
+ * Called to update VPL.
+ */
+ void VPLUpdateTimerTimeout();
+
+ /**
+ * Called to update the source.
+ */
+ void sourceUpdateTimerTimeout();
+
+signals:
+ /** emitted when a file from the template view is dropped on the view */
+ void dragInsert(QDropEvent *);
+ /** asks for hiding the preview widget */
+ void hidePreview();
+ void showProblemsView();
+ void cursorPositionChanged();
+ void title(const QString &);
+ /** emitted if this view contained an editor and it is closed */
+ void documentClosed(const KURL&);
+
+ void eventHappened(const QString&, const QString&, const QString& );
+
+private:
+/** Kafka stuff */
+ QValueList<int> m_splitterSizes;
+ int m_curCol, m_curLine, m_curOffset;
+ DOM::Node curNode;
+ bool m_kafkaReloadingEnabled, m_quantaReloadingEnabled;
+ QTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
+
+ QWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
+ Document *m_document;
+ QuantaPlugin *m_plugin;
+ QWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
+ QGuardedPtr<KafkaDocument> m_kafkaDocument;
+ QSplitter *m_splitter;
+ QGridLayout *m_viewLayout;
+ int m_currentViewsLayout; ///< holds the current layout, which can be SourceOnly, VPLOnly or SourceAndVPL
+ int m_currentFocus;
+ bool m_saveResult;
+ bool m_eventLoopStarted;
+
+protected:
+ virtual void dropEvent(QDropEvent *e);
+ virtual void dragEnterEvent(QDragEnterEvent *e);
+};
+
+#endif // QUANTAVIEW_H
diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp
new file mode 100644
index 00000000..f02108e9
--- /dev/null
+++ b/quanta/src/viewmanager.cpp
@@ -0,0 +1,756 @@
+/***************************************************************************
+ viewmanager - implementation
+ begin : Fri Mar 26 2004
+ copyright : (C) 2004 by Andras Mantia <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.
+ *
+ ***************************************************************************/
+
+//qt includes
+#include <qdir.h>
+
+//kde includes
+#include <kdirwatch.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmdimainfrm.h>
+#include <kurl.h>
+#include <kpopupmenu.h>
+#include <ktexteditor/view.h>
+#include <ktexteditor/encodinginterface.h>
+#include <ktexteditor/highlightinginterface.h>
+#include <ktexteditor/popupmenuinterface.h>
+#include <ktexteditor/editorchooser.h>
+#include <ktexteditor/markinterface.h>
+#include <kio/netaccess.h>
+
+
+//app includes
+#include "undoredo.h"
+#include "wkafkapart.h"
+#include "tagactionmanager.h"
+#include "tagactionset.h"
+
+#include "whtmlpart.h"
+#include "document.h"
+#include "quantaview.h"
+#include "viewmanager.h"
+#include "project.h"
+#include "resource.h"
+#include "quanta.h"
+#include "quantabookmarks.h"
+#include "toolbartabwidget.h"
+#include "parser.h"
+#include "qextfileinfo.h"
+#include "qpevents.h"
+#include "ksavealldialog.h"
+#include "annotationoutput.h"
+
+#ifdef ENABLE_CVSSERVICE
+#include "cvsservice.h"
+#endif
+
+#define SEPARATOR_INDEX 3
+#define RELOAD_ID 11
+#define UPLOAD_ID 12
+#define DELETE_ID 13
+
+ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, name)
+{
+ m_lastActiveView = 0L;
+ m_lastActiveEditorView = 0L;
+ m_documentationView = 0L;
+ m_tabPopup = new KPopupMenu(quantaApp);
+ m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, SLOT(slotCloseView()));
+ m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, SLOT(slotCloseOtherTabs()));
+ m_tabPopup->insertItem(i18n("Close &All"), this, SLOT(closeAll()));
+ m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReloadFile()), 0, RELOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, SLOT(slotUploadFile()), 0, UPLOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, SLOT(slotDeleteFile()), 0, DELETE_ID);
+ m_tabPopup->insertSeparator();
+ m_fileListPopup = new KPopupMenu(quantaApp);
+ connect(m_fileListPopup, SIGNAL(aboutToShow()), this, SLOT(slotFileListPopupAboutToShow()));
+ connect(m_fileListPopup, SIGNAL(activated(int)), this, SLOT(slotFileListPopupItemActivated(int)));
+ m_bookmarks = new QuantaBookmarks(this, QuantaBookmarks::Position, true);
+ m_bookmarksMenu = new KPopupMenu(quantaApp);
+ m_bookmarks->setBookmarksMenu(m_bookmarksMenu);
+ connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), quantaApp, SLOT(gotoFileAndLine(const QString&, int, int)));
+ m_bookmarksMenuId = m_tabPopup->insertItem(SmallIconSet("bookmark"), i18n("&Bookmarks"), m_bookmarksMenu);
+ m_tabPopup->insertItem(i18n("&Switch To"), m_fileListPopup);
+ m_contextView = 0L;
+ m_cvsMenuId = -1;
+ m_separatorVisible = false;
+}
+
+QuantaView* ViewManager::createView(const QString &caption)
+{
+ QuantaView *view = new QuantaView(quantaApp, "", caption);
+ quantaApp->addWindow(view);
+ connect(view, SIGNAL(cursorPositionChanged()), quantaApp, SLOT(slotNewLineColumn()));
+ connect(view, SIGNAL(title(const QString &)), quantaApp, SLOT(slotNewLineColumn()));
+ connect(view, SIGNAL(dragInsert(QDropEvent*)), this, SIGNAL(dragInsert(QDropEvent *)));
+ connect(view, SIGNAL(hidePreview()), quantaApp, SLOT(slotChangePreviewStatus()));
+ disconnect(view, SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
+ connect(view, SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, SLOT(slotCloseRequest(KMdiChildView*)));
+ connect(view, SIGNAL(documentClosed(const KURL&)), this, SLOT(slotDocumentClosed(const KURL&)));
+ connect(view, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+
+ return view;
+}
+
+void ViewManager::createNewDocument()
+{
+ int i = 1;
+ while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++;
+ QString fname = i18n("Untitled%1").arg(i);
+ QuantaView *view = createView(fname);
+
+#ifdef ENABLE_EDITORS
+ KTextEditor::Document *doc =
+ KTextEditor::EditorChooser::createDocument(
+ view,
+ "KTextEditor::Document"
+ );
+#else
+ KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", view, "KTextEditor::Document");
+#endif
+ Document *w = new Document(doc, 0L);
+ connect(w, SIGNAL(showAnnotation(uint, const QString&, const QPair<QString, QString>&)), quantaApp->annotationOutput(), SLOT(insertAnnotation(uint, const QString&, const QPair<QString, QString>&)));
+ QString encoding = quantaApp->defaultEncoding();
+ KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(doc);
+ if (encodingIf)
+ encodingIf->setEncoding(encoding);
+
+ KTextEditor::View * v = w->view();
+
+ //[MB02] connect all kate views for drag and drop
+ connect(w->view(), SIGNAL(dropEventPass(QDropEvent *)), this, SIGNAL(dragInsert(QDropEvent *)));
+
+ w->setUntitledUrl( fname );
+ KTextEditor::PopupMenuInterface* popupIf = dynamic_cast<KTextEditor::PopupMenuInterface*>(w->view());
+ if (popupIf)
+ popupIf->installPopup((QPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
+
+ quantaApp->setFocusProxy(w->view());
+ w->view()->setFocusPolicy(QWidget::WheelFocus);
+ connect( v, SIGNAL(newStatus()), quantaApp, SLOT(slotNewStatus()));
+
+ quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active
+ view->addDocument(w);
+ view->activate(); //if we don't call this manually, the activeView() won't return the newly created view
+ view->activated(); //the previous activate does not call this, because it detects that the view was not changed (createView() also calls activate())
+ m_lastActiveView = view;
+ m_lastActiveEditorView = view;
+ quantaApp->newCursorPosition("", 1 , 1);
+}
+
+bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
+{
+ if (!view) return false;
+ int noOfViews = 0;
+ QValueList<Document*> list;
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ for (it->first(); !it->isDone(); it->next())
+ {
+ noOfViews++;
+ if (noOfViews > 1)
+ break;
+ }
+ delete it;
+ if (noOfViews == 1 && view->document() && view->document()->isUntitled() && !view->document()->isModified() && createNew)
+ {
+ quantaApp->slotShowPreviewWidget(false);
+ return true;
+ }
+ bool mayRemove = view->mayRemove();
+ if (mayRemove)
+ {
+ if (force || mayRemove)
+ {
+ if (view == m_documentationView)
+ m_documentationView = 0L;
+ if (view == m_lastActiveView)
+ m_lastActiveView = 0L;
+ if (view == m_lastActiveEditorView)
+ m_lastActiveEditorView = 0L;
+ if (view == activeView())
+ ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ if (!createNew)
+ disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ quantaApp->closeWindow(view);
+ if (createNew)
+ {
+ if (allEditorsClosed())
+ {
+ quantaApp->slotFileNew();
+ }
+ } else
+ connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ return true;
+ }
+ }
+ return false;
+}
+
+Document *ViewManager::activeDocument()
+{
+ QuantaView *view = activeView();
+ return view ? view->document() : 0L;
+}
+
+QuantaView* ViewManager::activeView()
+{
+ return static_cast<QuantaView *>(quantaApp->activeWindow());
+}
+
+void ViewManager::slotViewActivated(KMdiChildView *view)
+{
+ if (!quantaApp || m_lastActiveView == view)
+ return;
+ if (m_lastActiveView)
+ {
+ m_lastActiveView->deactivated();
+ }
+ QuantaView *qView = static_cast<QuantaView*>(view);
+ qView->activated();
+
+#ifdef DEBUG_PARSER
+// kdDebug(24000) << "Calling clearGroups from ViewManager::slotViewActivated" << endl;
+#endif
+ parser->clearGroups();
+ parser->setSAParserEnabled(true);
+ quantaApp->reparse(true); //FIXME
+ quantaApp->slotNewStatus();
+ quantaApp->slotNewLineColumn();
+ typingInProgress = false; //need to reset, as it's set to true in the above slots
+ m_lastActiveView = qView;
+ if (m_lastActiveView->document())
+ {
+ m_lastActiveEditorView = m_lastActiveView;
+ }
+
+ Document *w = qView->document();
+ if (w && !w->isUntitled())
+ {
+ emit viewActivated(w->url());
+
+ bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
+ quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
+ }
+}
+
+void ViewManager::slotCloseOtherTabs()
+{
+ KMdiChildView *currentView;
+ KMdiChildView *view;
+ QuantaView *qView;
+ if (m_contextView)
+ currentView = m_contextView;
+ else
+ currentView = quantaApp->activeWindow();
+ if (dynamic_cast<QuantaView*>(currentView) && !static_cast<QuantaView*>(currentView)->document())
+ ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ //save the children first to a list, as removing invalidates our iterator
+ QValueList<KMdiChildView *> children;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ children.append(it->currentItem());
+ }
+ delete it;
+ KURL::List modifiedList;
+ QValueListIterator<KMdiChildView *> childIt;
+ for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ {
+ view = *childIt;
+ qView = dynamic_cast<QuantaView*>(view);
+ if (qView && view != currentView)
+ {
+ Document *w = qView->document();
+ if (w && w->isModified())
+ {
+ modifiedList += w->url();
+ }
+ }
+ }
+ if (!modifiedList.isEmpty())
+ {
+ KURL::List filesToSave;
+ KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
+ if (dlg.exec() == QDialog::Accepted)
+ {
+ filesToSave = dlg.filesToSave();
+ for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ {
+ view = *childIt;
+ qView = dynamic_cast<QuantaView*>(view);
+ if (view && view != currentView)
+ {
+ Document *w = qView->document();
+ if (w)
+ {
+ if (filesToSave.contains(w->url()))
+ if (!qView->saveModified(false))
+ {
+ return; //save aborted
+ }
+ w->setModified(false);
+ qView->updateTab();
+ }
+ }
+ }
+ } else
+ {
+ return; //save aborted
+ }
+ }
+
+ for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ {
+ view = *childIt;
+ if (view != currentView)
+ {
+ if (dynamic_cast<QuantaView*>(view) && !static_cast<QuantaView*>(view)->mayRemove() )
+ continue;
+ quantaApp->closeWindow(view);
+ }
+ }
+}
+
+QuantaView* ViewManager::isOpened(const KURL& url)
+{
+ KURL url2 = url;
+ if (url2.isLocalFile() && !url.path().startsWith(i18n("Untitled")))
+ {
+ QDir dir(url2.path());
+ url2.setPath(dir.canonicalPath());
+ }
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view && view->document() && view->document()->url() == url2)
+ {
+ delete it;
+ return view;
+ }
+ }
+ delete it;
+ return 0L;
+}
+
+KURL::List ViewManager::openedFiles(bool noUntitled)
+{
+ KURL::List list;
+
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view)
+ {
+ Document *w = view->document();
+ if ( w && (!w->isUntitled() || !noUntitled) )
+ list.append( w->url() );
+ }
+ }
+ delete it;
+ return list;
+}
+
+QValueList<Document*> ViewManager::openedDocuments()
+{
+ QValueList<Document*> list;
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view)
+ {
+ Document *w = view->document();
+ if (w)
+ list.append(w);
+ }
+ }
+ delete it;
+ return list;
+}
+
+bool ViewManager::saveAll()
+{
+ bool flagsave = true;
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view)
+ {
+ Document *w = view->document();
+ if ( w && w->isModified())
+ {
+ if (!w->isUntitled())
+ {
+ emit eventHappened("before_save", w->url().url(), QString::null);
+ w->docUndoRedo->fileSaved();
+ w->save();
+ w->removeBackup(quantaApp->config());
+ if (w->isModified())
+ flagsave = false;
+ emit eventHappened("after_save", w->url().url(), QString::null);
+ } else
+ {
+ if (!view->saveModified())
+ flagsave = false;
+ }
+ }
+ view->updateTab();
+ }
+ }
+ delete it;
+
+ return flagsave;
+}
+
+bool ViewManager::closeAll(bool createNew)
+{
+ quantaApp->slotShowPreviewWidget(false);
+ parser->setSAParserEnabled(false);
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ //save the children first to a list, as removing invalidates our iterator
+ QValueList<KMdiChildView *> children;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ children.append(it->currentItem());
+ }
+ delete it;
+ KURL::List modifiedList;
+ QValueListIterator<KMdiChildView *> childIt;
+ for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ {
+ view = dynamic_cast<QuantaView*>(*childIt);
+ if (view)
+ {
+ Document *w = view->document();
+ if (w && w->isModified())
+ {
+ modifiedList += w->url();
+ }
+ }
+ }
+ if (!modifiedList.isEmpty())
+ {
+ KURL::List filesToSave;
+ KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
+ if (dlg.exec() == QDialog::Accepted)
+ {
+ filesToSave = dlg.filesToSave();
+ for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ {
+ view = dynamic_cast<QuantaView*>(*childIt);
+ if (view)
+ {
+ Document *w = view->document();
+ if (w)
+ {
+ if (filesToSave.contains(w->url()))
+ if (!view->saveModified(false))
+ {
+ emit filesClosed(false);
+ return false; //save aborted
+ }
+ w->setModified(false);
+ view->updateTab();
+ }
+ }
+ }
+ } else
+ {
+ emit filesClosed(false);
+ return false; //save aborted
+ }
+ }
+ disconnect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+
+ for (childIt = children.begin(); childIt != children.end(); ++childIt)
+ {
+ view = dynamic_cast<QuantaView*>(*childIt);
+ if (view)
+ {
+ Document *w = view->document();
+ if (w)
+ {
+ if (view->mayRemove())
+ {
+ if (!w->isUntitled() && w->url().isLocalFile())
+ {
+ fileWatcher->removeFile(w->url().path());
+// kdDebug(24000) << "removeFile[closeAll]: " << w->url().path() << endl;
+ }
+ quantaApp->guiFactory()->removeClient(w->view());
+ if (view == m_lastActiveEditorView)
+ m_lastActiveEditorView = 0L;
+ if (view == m_lastActiveView)
+ m_lastActiveView = 0L;
+ quantaApp->closeWindow(view);
+ } else
+ {
+ //actually this code should be never executed
+ connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ view->activated();
+ emit filesClosed(false);
+ return false;
+ }
+ } else
+ {
+ if (view == m_documentationView)
+ m_documentationView = 0L;
+ view->mayRemove(); //unloads the plugin and reparents the custom widget
+ quantaApp->closeWindow(view);
+ }
+ }
+ }
+ connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ if (createNew)
+ {
+ createNewDocument();
+ quantaApp->slotNewStatus();
+ }
+ emit filesClosed(true);
+ return true;
+}
+
+bool ViewManager::isOneModified()
+{
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view)
+ {
+ Document *w = view->document();
+ if (w && w->isModified())
+ {
+ delete it;
+ return true;
+ }
+ }
+ }
+ delete it;
+
+ return false;
+}
+
+QuantaView* ViewManager::documentationView(bool create)
+{
+ if (!m_documentationView && create)
+ {
+ m_documentationView = createView();
+ m_documentationView->addCustomWidget((QWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
+ }
+ return m_documentationView;
+}
+
+void ViewManager::slotLastViewClosed()
+{
+ quantaApp->slotFileNew();
+}
+
+bool ViewManager::allEditorsClosed()
+{
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view && view->document())
+ {
+ delete it;
+ return false;
+ }
+ }
+ delete it;
+ return true;
+}
+
+void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
+{
+ if (m_separatorVisible)
+ m_tabPopup->removeItemAt(SEPARATOR_INDEX);
+ m_separatorVisible = false;
+ m_contextView = dynamic_cast<QuantaView*>(widget);
+ Document *w = 0L;
+ if (m_contextView)
+ w = m_contextView->document();
+ if (w)
+ {
+ if (!w->isUntitled())
+ {
+ m_separatorVisible = true;
+ m_tabPopup->insertSeparator(SEPARATOR_INDEX);
+ }
+ if (Project::ref()->hasProject() && Project::ref()->contains(w->url()))
+ m_tabPopup->setItemVisible(UPLOAD_ID, true);
+ else
+ m_tabPopup->setItemVisible(UPLOAD_ID, false);
+ if (w->isUntitled())
+ {
+ m_tabPopup->setItemVisible(RELOAD_ID, false);
+ m_tabPopup->setItemVisible(DELETE_ID, false);
+ } else
+ {
+ m_tabPopup->setItemVisible(RELOAD_ID, true);
+ m_tabPopup->setItemVisible(DELETE_ID, true);
+ }
+ } else
+ {
+ m_tabPopup->setItemVisible(RELOAD_ID, false);
+ m_tabPopup->setItemVisible(UPLOAD_ID, false);
+ m_tabPopup->setItemVisible(DELETE_ID, false);
+ }
+ bool bookmarksFound = false;
+ if (w && w->markIf)
+ {
+ m_bookmarks->setDocument(w);
+ QPtrList<KTextEditor::Mark> m = w->markIf->marks();
+ QPtrListIterator<KTextEditor::Mark> it(m);
+ for(; *it; ++it)
+ {
+ if ((*it)->type & KTextEditor::MarkInterface::markType01)
+ {
+ bookmarksFound = true;
+ break;
+ }
+ }
+ }
+ m_tabPopup->setItemVisible(m_bookmarksMenuId, bookmarksFound);
+#ifdef ENABLE_CVSSERVICE
+ if (w && w->url().isLocalFile() && !w->isUntitled() && CVSService::ref()->exists())
+ {
+ if (m_cvsMenuId == -1)
+ {
+ m_tabPopup->insertSeparator();
+ m_cvsMenuId = m_tabPopup->insertItem(SmallIcon("cervisia"), i18n("CVS"), CVSService::ref()->menu());
+ }
+ if (Project::ref()->contains(w->url()))
+ CVSService::ref()->setRepository(Project::ref()->projectBaseURL().path());
+ else
+ CVSService::ref()->setRepository(w->url().directory());
+ CVSService::ref()->setCurrentFile(w->url().path());
+ } else
+ if (m_cvsMenuId != -1)
+ {
+ int idx = m_tabPopup->indexOf(m_cvsMenuId);
+ m_tabPopup->removeItemAt(idx-1);
+ m_tabPopup->removeItem(m_cvsMenuId);
+ m_cvsMenuId = -1;
+ }
+#endif
+ m_tabPopup->exec(point);
+}
+
+void ViewManager::slotFileListPopupAboutToShow()
+{
+ m_fileListPopup->clear();
+ QStringList viewList;
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ int id = 0;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view)
+ {
+ m_fileListPopup->insertItem(view->tabName(), id);
+ id++;
+ }
+ }
+ delete it;
+}
+
+void ViewManager::slotFileListPopupItemActivated(int id)
+{
+ KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
+ QuantaView *view;
+ int id2 = 0;
+ for (it->first(); !it->isDone(); it->next())
+ {
+ view = dynamic_cast<QuantaView*>(it->currentItem());
+ if (view && id == id2)
+ {
+ view->activate();
+ view->activated();
+ break;
+ }
+ id2++;
+ }
+ delete it;
+}
+
+void ViewManager::slotReloadFile()
+{
+ quantaApp->slotFileReload(m_contextView);
+}
+
+void ViewManager::slotUploadFile()
+{
+ quantaApp->slotUploadFile(m_contextView);
+}
+
+void ViewManager::slotDeleteFile()
+{
+ quantaApp->slotDeleteFile(m_contextView);
+}
+
+void ViewManager::slotCloseView()
+{
+ removeView(m_contextView);
+}
+
+void ViewManager::slotCloseRequest(KMdiChildView *widget)
+{
+ QuantaView *view = dynamic_cast<QuantaView *>(widget);
+ if (view)
+ removeView(view);
+}
+
+
+void ViewManager::slotDocumentClosed(const KURL& url)
+{
+ emit documentClosed(url);
+}
+
+/** Return the URL of the currently active document */
+QString ViewManager::currentURL()
+{
+ Document *w = activeDocument();
+ if (w)
+ {
+ return w->url().url();
+ } else
+ {
+ QuantaView * view = lastActiveEditorView();
+ if (view)
+ return view->document()->url().url();
+ else
+ return "";
+ }
+}
+
+
+#include "viewmanager.moc"
diff --git a/quanta/src/viewmanager.h b/quanta/src/viewmanager.h
new file mode 100644
index 00000000..e7a4fb31
--- /dev/null
+++ b/quanta/src/viewmanager.h
@@ -0,0 +1,144 @@
+/***************************************************************************
+ viewmanager - description
+ begin : Fri Mar 26 2004
+ copyright : (C) 2004 by Andras Mantia <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 VIEWMANAGER_H
+#define VIEWMANAGER_H
+
+#include <kurl.h>
+
+//forward declarations
+class Document;
+class QuantaView;
+class QuantaBookmarks;
+class KafkaDocument;
+class KPopupMenu;
+
+class KMdiChildView;
+
+/** This singleton class takes care of creating new views for documents, help, plugins, preview and so.
+* As the name says, it also manages the views. */
+
+class ViewManager : public QObject
+{
+ Q_OBJECT
+public:
+ /** Returns a reference to the viewmanager object */
+ static ViewManager* const ref(QObject *parent = 0L, const char *name = 0L)
+ {
+ static ViewManager *m_ref;
+ if (!m_ref) m_ref = new ViewManager(parent, name);
+ return m_ref;
+ }
+ /** The destructor. */
+ virtual ~ViewManager(){};
+
+ /** Creates a QuantaView object */
+ QuantaView *createView(const QString &caption = QString::null);
+ /** Removes a QuantaView object. Returns false on failure (eg. the view was not saved and it refused
+ the delete itself.) If force is true, the view is removed without asking for save.
+ */
+ bool removeView(QuantaView *view, bool force = false, bool createNew = true);
+ /** Returns the active view */
+ QuantaView *activeView();
+ /** Returns the active document or 0L */
+ Document *activeDocument();
+ /** Returns the view holding the document loaded from url. */
+ QuantaView *isOpened(const KURL &url);
+
+ bool saveAll();
+
+ /** Returns true if at least one view has the modified flag set. */
+ bool isOneModified();
+
+ void createNewDocument();
+/** Returns a list with the URLs of the opened documents */
+ KURL::List openedFiles(bool noUntitled=true);
+ /** Returns a list with the Document* object of the opened documents */
+ QValueList<Document*> openedDocuments();
+
+ /** Returns the view holding the documentation widget. If create is true and there is no such view yet,
+ it creates one. */
+ QuantaView *documentationView(bool create = true);
+
+ /** Returns the last active view which had an editor inside or 0 if there was no such view */
+ QuantaView *lastActiveEditorView() {return m_lastActiveEditorView;}
+
+ /** Return the URL of the currently active document */
+ QString currentURL();
+
+public slots:
+ /**called when a new view was activated */
+ void slotViewActivated(KMdiChildView *view);
+
+ /** Removes the active view Returns false on failure (eg. the view was not saved and it refused the delete itself.) */
+ bool removeActiveView(bool createNew = true) { return removeView(activeView(), false, createNew); }
+ /** closes all the other but active tabs */
+ void slotCloseOtherTabs();
+ /** closes all views. If createNew is true, it creates a new view after closing the others. Return true if all documents were closed.*/
+ bool closeAll(bool createNew = true);
+ /** called when the last view is closed */
+ void slotLastViewClosed();
+
+ /** called when the context menu was invoked on a tab */
+ void slotTabContextMenu(QWidget *widget, const QPoint & point);
+ /** called when the user requests to close a tab with the close button */
+ void slotCloseRequest(KMdiChildView *widget);
+ /** called from the views and just emits the signal @ref documentClosed */
+ void slotDocumentClosed(const KURL&);
+
+signals:
+ /** emitted when a file from the template view is dropped on a view */
+ void dragInsert(QDropEvent *);
+ /** emitted when a view was activated */
+ void viewActivated(const KURL &);
+ /** emitted when a view was closed */
+ void documentClosed(const KURL&);
+ void eventHappened(const QString&, const QString&, const QString& );
+ /** emitted when all files were closed. The argument is true if the closes
+ was successful, false if the unser canceled the closing */
+ void filesClosed(bool);
+
+private slots:
+ /** called before the file list menu shows up, so it can be updated */
+ void slotFileListPopupAboutToShow();
+ /** called when an item is selected in the file list menu */
+ void slotFileListPopupItemActivated(int id);
+
+ /** Handle tab context menus for editor views */
+ void slotReloadFile();
+ void slotUploadFile();
+ void slotDeleteFile();
+ void slotCloseView();
+
+private:
+ /** Private constructor for the singleton object. */
+ ViewManager(QObject * parent = 0, const char * name = 0);
+ /** Returns true if there isn't any opened view holding an editor */
+ bool allEditorsClosed();
+
+ QuantaView *m_lastActiveView; ///< Holds the last active view. Used to deactivate it when a new view is selected
+ QuantaView *m_lastActiveEditorView; ///< Contains the last active view which has an editor inside
+ QuantaView *m_documentationView; ///< Contains the view which holds the documentation browser
+ KPopupMenu *m_tabPopup; ///< the menu which pops up when the user clicks on a view tab
+ KPopupMenu *m_fileListPopup; ///< a menu containing the opened views as menu items
+ KPopupMenu *m_bookmarksMenu;
+ QuantaBookmarks *m_bookmarks;
+
+ QuantaView *m_contextView; ///<the tab where the context menu was requested
+ bool m_separatorVisible;
+ int m_cvsMenuId;
+ int m_bookmarksMenuId;
+};
+
+#endif
diff --git a/quanta/src/x-webprj.desktop b/quanta/src/x-webprj.desktop
new file mode 100644
index 00000000..510b4778
--- /dev/null
+++ b/quanta/src/x-webprj.desktop
@@ -0,0 +1,51 @@
+[Desktop Entry]
+Comment=Quanta Project
+Comment[bg]=Проект на Quanta
+Comment[br]=Raktres Quanta
+Comment[ca]=Projecte Quanta
+Comment[cs]=Quanta projekt
+Comment[da]=Quanta-projekt
+Comment[de]=Quanta Projekt
+Comment[el]=ΈÏγο Quanta
+Comment[es]=Proyecto Quanta
+Comment[et]=Quanta projekt
+Comment[eu]=Quanta proiektua
+Comment[fa]=پروژۀ Quanta
+Comment[fi]=Quanta projekti
+Comment[fr]=Projet Quanta
+Comment[ga]=Tionscadal Quanta
+Comment[hu]=Quanta-projekt
+Comment[is]=Quanta verkefnið
+Comment[it]=Progetto Quanta
+Comment[ja]=Quanta プロジェクト
+Comment[ka]=Quanta პრáƒáƒ”ქტი
+Comment[lt]=Quanta projektas
+Comment[ms]=Projek Quanta
+Comment[nds]=Quanta-Projekt
+Comment[ne]=कà¥à¤µà¤¾à¤¨à¥à¤Ÿà¤¾ परियोजना
+Comment[nl]=Quanta project
+Comment[pl]=Projekt Quanta
+Comment[pt]=Projecto Quanta
+Comment[pt_BR]=Projeto do Quanta
+Comment[ro]=Proiect Quanta
+Comment[ru]=Проект Quanta
+Comment[sk]=Quanta projekt
+Comment[sl]=Projekt Quante
+Comment[sr]=Quanta пројекат
+Comment[sr@Latn]=Quanta projekat
+Comment[sv]=Quanta-projekt
+Comment[ta]=கà¯à®µà®¾à®£à¯à®Ÿà®¾ திடà¯à®Ÿà®ªà¯à®ªà®£à®¿
+Comment[tg]=Ðақшаи Quanta
+Comment[tr]=Quanta Projesi
+Comment[uk]=Проект Quanta
+Comment[zh_CN]=Quanta 工程
+Comment[zh_HK]=Quanta 專案
+Comment[zh_TW]=Quanta 專案
+Icon=quanta
+Type=MimeType
+MimeType=application/x-webprj
+Patterns=*.webprj
+
+[Property::X-KDE-text]
+Type=bool
+Value=true
diff --git a/quanta/treeviews/Makefile.am b/quanta/treeviews/Makefile.am
new file mode 100644
index 00000000..c32c617d
--- /dev/null
+++ b/quanta/treeviews/Makefile.am
@@ -0,0 +1,24 @@
+noinst_LTLIBRARIES = libtreeviews.la
+
+METASOURCES = AUTO
+
+libtreeviews_la_SOURCES = uploadtreeview.cpp uploadtreefolder.cpp uploadtreefile.cpp fileinfodlg.ui quantapropertiespage.ui newtemplatedirdlg.cpp templatedirform.ui templatestreeview.cpp projecttreeview.cpp structtreeview.cpp doctreeview.cpp docitem.cpp docfolder.cpp structtreetag.cpp filestreeview.cpp tagattributetree.cpp tagattributeitems.cpp scripttreeview.cpp basetreeview.cpp servertreeview.cpp
+
+if include_cvsservice
+CVSSERVICE_INCLUDE = -I$(top_srcdir)/quanta/components/cvsservice
+endif
+
+AM_CPPFLAGS = -I$(top_srcdir)/quanta/utility \
+ -I$(top_srcdir)/quanta/parsers \
+ -I$(top_srcdir)/quanta/src \
+ -I$(top_srcdir)/quanta/project \
+ -I$(top_srcdir)/quanta/dialogs/tagdialogs \
+ -I$(top_srcdir)/quanta/dialogs \
+ -I$(top_srcdir)/quanta/messages \
+ -I$(top_srcdir)/quanta/parts/kafka \
+ -I$(top_srcdir)/quanta/components/csseditor \
+ -I$(top_srcdir)/lib \
+ -I$(top_builddir)/quanta/dialogs/tagdialogs \
+ -I$(top_builddir)/quanta/components/csseditor \
+ -I$(top_srcdir)/quanta/plugins \
+ $(KMDI_INCLUDES) $(CVSSERVICE_INCLUDE) $(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS) $(all_includes)
diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp
new file mode 100644
index 00000000..8d8fad11
--- /dev/null
+++ b/quanta/treeviews/basetreeview.cpp
@@ -0,0 +1,1233 @@
+/***************************************************************************
+ basetreeview.cpp - description
+ -------------------
+ begin : Thu Jun 1 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <amantoa@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 <qeventloop.h>
+#include <qlayout.h>
+#include <qfileinfo.h>
+#include <qlabel.h>
+#include <qimage.h>
+#include <qregexp.h>
+#include <qclipboard.h>
+#include <qpoint.h>
+#include <qregexp.h>
+#include <qlineedit.h>
+#include <qfont.h>
+#include <qpainter.h>
+#include <qtooltip.h>
+#include <qptrstack.h>
+
+// KDE includes
+#include <kaction.h>
+#include <kdebug.h>
+#include <krun.h>
+#include <kinputdialog.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kopenwith.h>
+#include <kmessagebox.h>
+#include <kpropertiesdialog.h>
+#include <kfiledialog.h>
+#include <kprogress.h>
+#include <kstandarddirs.h>
+#include <kurldrag.h>
+#include <kurl.h>
+#include <ktar.h>
+#include <ktempfile.h>
+#include <ktrader.h>
+#include <kapplication.h>
+#include <kcursor.h>
+#include <kprotocolinfo.h>
+
+// app includes
+#include "basetreeview.h"
+#include "fileinfodlg.h"
+#include "project.h"
+#include "resource.h"
+#include "quanta.h"
+#include "qextfileinfo.h"
+#include "viewmanager.h"
+#include "quantanetaccess.h"
+#include "quantaplugininterface.h"
+#include "quantaplugin.h"
+
+#include <X11/Xlib.h>
+
+class BaseTreeViewToolTip : public QToolTip
+{
+public:
+ BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv );
+
+ void maybeTip( const QPoint &pos );
+
+private:
+ BaseTreeView *m_view;
+
+};
+
+BaseTreeViewToolTip::BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv )
+ : QToolTip( parent ), m_view( lv )
+{
+}
+
+void BaseTreeViewToolTip::maybeTip( const QPoint &pos )
+{
+ if ( !parentWidget() || !m_view || !m_view->showToolTips() )
+ return;
+
+ QListViewItem *item = m_view->itemAt(pos);
+ if (!item)
+ return;
+ QString text;
+ KFileTreeViewItem * kftvi = dynamic_cast<BaseTreeViewItem *> (item);
+ if (kftvi) {
+ QString desc = kftvi->text(1);
+ text = kftvi->fileItem()->getToolTipText();
+ if ( !desc.isEmpty() )
+ text.prepend("&nbsp;<i>" + desc + "</i><br>");
+ } else
+ { // show something for the branchroot
+ text = item->text(0);
+ if ( ! item->text(1).isEmpty() )
+ text.append( "<br>" + item->text(1));
+ }
+ if ( !text.isEmpty() )
+ tip(m_view->itemRect(item), text);
+}
+
+
+//BaseTreeViewItem implementation
+BaseTreeViewItem::BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch )
+: KFileTreeViewItem( parent, item, brnch)
+{
+}
+
+QString BaseTreeViewItem::key(int column, bool ascending) const
+{
+ if (ascending)
+ if (isDir())
+ return text(column).prepend(" ");
+ else
+ return text(column);
+ else
+ if (isDir())
+ return text(column);
+ else
+ return text(column).prepend(" ");
+}
+
+int BaseTreeViewItem::compare(QListViewItem *i, int col,
+ bool ascending) const
+{
+ return key(col, ascending).compare(i->key(col, ascending));
+}
+
+void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+ int column, int width, int align)
+{
+ QColorGroup _cg( cg );
+ if (column == 0)
+ {
+ QFont f = p->font();
+ if (quantaApp)
+ f.setBold(ViewManager::ref()->isOpened(url()));
+ p->setFont(f);
+ } else
+ {
+ int h, s, v;
+ p->pen().color().getHsv(&h, &s, &v);
+ v = (v < 155 ? v + 100 : 255);
+ _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ };
+ KFileTreeViewItem::paintCell( p, _cg, column, width, align );
+}
+
+void BaseTreeViewItem::refreshIcon()
+{
+ fileItem()->refreshMimeType();
+}
+
+
+//BaseTreeBranch implementation
+BaseTreeBranch::BaseTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden ,
+ KFileTreeViewItem *branchRoot)
+ : KFileTreeBranch(parent, url, name, pix, showHidden, branchRoot)
+{
+ bool localFile = url.isLocalFile();
+ setAutoUpdate(localFile);
+ setChildRecurse(false);
+
+}
+
+bool BaseTreeBranch::matchesFilter(const KFileItem *item) const
+{
+ if (!excludeFilterRx.isEmpty())
+ if (excludeFilterRx.exactMatch(item->url().path()))
+ return false;
+
+ return KFileTreeBranch::matchesFilter(item);
+}
+
+KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *parent,
+ KFileItem *fileItem)
+{
+ BaseTreeViewItem *tvi = 0;
+ if( parent && fileItem)
+ {
+ tvi = new BaseTreeViewItem(parent, fileItem, this);
+ // we assume there are childs
+ if (tvi)
+ {
+ tvi->setExpandable(tvi->isDir());
+ }
+ }
+ else
+ kdDebug(24000) << "createTreeViewItem: Have no parent" << endl;
+ return tvi;
+}
+
+
+void BaseTreeBranch::addOpenFolder(QStringList* openFolder)
+{
+ if (! openFolder) // just in case
+ return;
+ KFileTreeViewItem *newItem;
+ KFileTreeViewItem *item = root();
+ while (item) {
+ if (item->isDir() && item->isOpen()) {
+ openFolder->append( item->url().url() );
+ // dive into the tree first
+ newItem = dynamic_cast<KFileTreeViewItem *>(item->firstChild());
+ if (newItem) {
+ // found child go ahead
+ item = newItem;
+ continue;
+ };
+ };
+ // move up in the tree
+ while (item && item != root())
+ {
+ if (item->nextSibling())
+ {
+ item = dynamic_cast<KFileTreeViewItem *>(item->nextSibling());
+ break;
+ }
+ else
+ {
+ item = dynamic_cast<KFileTreeViewItem *>(item->parent());
+ }
+ }
+ if (item == root())
+ break;
+ };
+}
+
+
+void BaseTreeBranch::reopenFolder()
+{
+ if (folderToOpen.isEmpty())
+ return;
+ KFileTreeViewItem *item;
+ for (QStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
+ KURL url( (*it) );
+ item = findTVIByURL(url);
+ if (item) {
+ // erase the url in the list
+ (*it) = "";
+ // open the folder
+ item->setExpandable(true);
+ item->setOpen(true);
+ }
+ }
+}
+
+
+void BaseTreeBranch::updateOpenFolder()
+{
+ KFileTreeViewItem *newItem;
+ KFileTreeViewItem *item = root();
+ while (item) {
+ if (item->isDir() && item->isOpen()) {
+ updateDirectory( item->url() );
+ kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ // dive into the tree first
+ newItem = dynamic_cast<KFileTreeViewItem *>(item->firstChild());
+ if (newItem) {
+ // found child go ahead
+ item = newItem;
+ continue;
+ };
+ };
+ // go up if no sibling available
+ if (! item->nextSibling())
+ item = dynamic_cast<KFileTreeViewItem *>(item->parent());
+ if (item == root())
+ break;
+ if (item)
+ item = dynamic_cast<KFileTreeViewItem *>(item->nextSibling());
+ };
+}
+
+
+////////////////////////////////////////////////////////////////////////////////////
+//
+// BaseTreeView implementation
+//
+////////////////////////////////////////////////////////////////////////////////////
+
+BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
+: KFileTreeView(parent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1)
+{
+ m_parent = parent;
+ QToolTip::remove(viewport()); // remove the tooltip from QListView
+ m_tooltip = new BaseTreeViewToolTip(viewport(), this);
+ setFrameStyle( Panel | Sunken );
+ setRootIsDecorated(true);
+ setSorting(0);
+ setLineWidth(2);
+ setFullWidth(true);
+ setShowSortIndicator(true);
+ setFocusPolicy(QWidget::ClickFocus);
+ setShowFolderOpenPixmap(false);
+
+ connect(this, SIGNAL(returnPressed(QListViewItem *)),
+ this, SLOT(slotReturnPressed(QListViewItem *)));
+
+ connect(this, SIGNAL(dropped(QWidget *, QDropEvent *, KURL::List&, KURL&)),
+ this, SLOT(slotDropped(QWidget *, QDropEvent *, KURL::List&, KURL&)));
+
+ connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int )),
+ this, SLOT(slotRenameItem(QListViewItem*, const QString &, int )));
+
+ connect(this, SIGNAL(executed(QListViewItem *)),
+ this, SLOT(slotSelectFile(QListViewItem *)));
+
+ connect(this, SIGNAL(openFile(const KURL &)),
+ quantaApp, SLOT(slotFileOpen(const KURL &)));
+
+ connect(this, SIGNAL(openImage(const KURL &)),
+ quantaApp, SLOT(slotImageOpen(const KURL &)));
+
+ connect(this, SIGNAL(closeFile(const KURL &)),
+ quantaApp, SLOT(slotFileClose(const KURL &)));
+
+ connect(this, SIGNAL(insertTag(const KURL &, DirInfo)),
+ quantaApp, SLOT(slotInsertTag(const KURL &, DirInfo)));
+}
+
+
+BaseTreeView::~BaseTreeView()
+{
+ QToolTip::remove(viewport());
+ delete m_tooltip;
+}
+
+
+void BaseTreeView::itemRenamed(const KURL& oldURL, const KURL& newURL)
+{
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if (! curItem) return;
+
+ if (curItem->isDir())
+ {
+ KURL n = newURL;
+ n.adjustPath(1);
+ KURL o = oldURL;
+ o.adjustPath(1);
+ emit renamed(o, n);
+ }
+ else
+ {
+ emit renamed(oldURL, newURL);
+ }
+}
+
+
+/** Called for: double click, return, Open */
+void BaseTreeView::slotSelectFile(QListViewItem *item)
+{
+ KFileTreeViewItem* kftvi = currentKFileTreeViewItem();
+ if (!kftvi || kftvi->isDir()) return;
+
+ KURL urlToOpen = kftvi->url();
+ if (!urlToOpen.isEmpty())
+ {
+ if ( QuantaCommon::checkMimeGroup(urlToOpen,"text") )
+ {
+ emit openFile(urlToOpen);
+ item->repaint();
+ }
+ else if ( QuantaCommon::checkMimeGroup(urlToOpen, "image") ) //it may be an image
+ {
+ emit openImage( urlToOpen);
+ }
+ else if ( expandArchiv(kftvi)) //it may be an archiv
+ {
+ }
+ else //it is an unknown type, maybe binary
+ {
+ if (QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
+ {
+ emit openFile(urlToOpen);
+ item->repaint();
+ }
+ }
+ }
+}
+
+
+/** expands an archiv, if possible */
+bool BaseTreeView::expandArchiv (KFileTreeViewItem *item)
+{
+ if (!item) return false;
+ KURL urlToOpen = item->url();
+
+ if ( ! urlToOpen.isLocalFile()) return false;
+
+ QString mimeType = KMimeType::findByURL(urlToOpen)->name();
+
+ if ( mimeType == "application/x-tgz" ||
+ mimeType == "application/x-tbz" ||
+ mimeType == "application/x-tar" ) //it is an archiv
+ urlToOpen.setProtocol("tar");
+ else
+ if ( mimeType == "application/x-zip" ) //it is an archiv
+ urlToOpen.setProtocol("zip");
+ else
+ return false;
+
+ // change status if there is already a sub branch
+ if (item->isExpandable()) {
+ item->setOpen( ! item->isOpen());
+ return true;
+ };
+
+ KFileTreeBranch *kftb = new BaseTreeBranch(this, urlToOpen, item->text(0), *(item->pixmap(0)), true, item);
+ addBranch(kftb); // connecting some signals
+ kftb->populate(urlToOpen, item);
+ item->setExpandable(true);
+ item->setOpen(true);
+ return true;
+}
+
+
+/** Properties dialog addon*/
+FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
+{
+ //If the item is a file, add the Quanta file info page
+ FileInfoDlg *quantaFileProperties = 0L;
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+
+ QFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
+ QVBoxLayout *topLayout = new QVBoxLayout( quantaFilePage);
+ quantaFileProperties = new FileInfoDlg( quantaFilePage, i18n("Quanta") );
+
+ int fsize,fimgsize=0;
+ int ct=0,imgct=0,position=0;
+ KURL u = currentURL();
+ if (u.isLocalFile()) //get the file info only for local file. TODO: for non-local ones
+ {
+ QString nameForInfo = u.path();
+ QString path =u.directory(0,0); //extract path for images
+ QString sourcename=u.fileName(0);
+
+ QFile qfile(nameForInfo);
+ fsize=qfile.size(); //html file size
+
+ QString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
+ if (mimetype.contains("text"))
+ {
+ qfile.open(IO_ReadOnly);
+ QString imgname,imgpath;
+ QTextStream stream(&qfile);
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ while (!stream.atEnd()) //open & parse file
+ {
+ imgname = stream.readLine();
+ ct++;
+ position=imgname.find("<img",0,false); //check for images
+ if (position!=-1)
+ {
+ imgname.remove(0,position+4);
+ position=imgname.find("src=",0,false); //extract images names
+ imgname.remove(0,position+4);
+ if (imgname.startsWith("\"")) imgname.remove(0,1);
+ if (imgname.startsWith("'")) imgname.remove(0,1);
+ position=imgname.find(" ",0,false);
+ if (position!=-1) imgname=imgname.left(position);
+ position=imgname.find(">",0,false);
+ if (position!=-1) imgname=imgname.left(position);
+ position=imgname.find("\"",0,false);
+ if (position!=-1) imgname=imgname.left(position);
+ position=imgname.find("'",0,false);
+ if (position!=-1) imgname=imgname.left(position);
+ if (!quantaFileProperties->imageList->findItem(imgname,Qt::ExactMatch)) //check if image was already counted
+ {
+ KURL v(KURL::fromPathOrURL( path ),imgname);
+ imgpath=v.path();
+ QFile qimage(imgpath);
+ if (qimage.exists() && v.isLocalFile())
+ {
+ fimgsize+=qimage.size();
+ quantaFileProperties->imageList->insertItem(imgname);
+ imgct++;
+ }
+ }
+ }
+ }
+ qfile.close();
+
+ quantaFileProperties->lineNum->setText(i18n("Number of lines: %1").arg(ct));
+ quantaFileProperties->imageNum->setText(i18n("Number of images included: %1").arg(imgct));
+ quantaFileProperties->imageSize->setText(i18n("Size of the included images: %1 bytes").arg(fimgsize));
+ quantaFileProperties->totalSize->setText(i18n("Total size with images: %1 bytes").arg(fsize+fimgsize));
+ }
+ else if (mimetype.contains("image"))
+ { // assume it's an image file
+ QImage imagefile=QImage(nameForInfo);
+ quantaFileProperties->lineNum->setText(i18n("Image size: %1 x %2").arg(imagefile.width()).arg(imagefile.height()));
+ quantaFileProperties->imageNum->hide();
+ quantaFileProperties->imageSize->hide();
+ quantaFileProperties->totalSize->hide();
+ quantaFileProperties->includedLabel->hide();
+ quantaFileProperties->imageList->hide();
+ }
+ quantaFileProperties->fileDescLbl->setText(i18n("Description:"));
+ quantaFileProperties->fileDesc->setText(currentKFileTreeViewItem()->text(1));
+ // disable per default
+ quantaFileProperties->fileDescLbl->hide();
+ quantaFileProperties->fileDesc->hide();
+ topLayout->addWidget(quantaFileProperties);
+ } //if localfile
+ }
+ return quantaFileProperties;
+}
+
+
+void BaseTreeView::slotClose()
+{
+ if (currentItem())
+ {
+ emit closeFile(currentURL());
+ }
+}
+
+
+void BaseTreeView::slotOpen()
+{
+ QListViewItem *item = currentItem();
+ if (item)
+ {
+ emit open(item);
+ item->repaint();
+ }
+}
+
+
+void BaseTreeView::slotOpenWith()
+{
+ if (currentItem())
+ {
+ KURL::List list;
+ KURL urlToOpen = currentURL();
+ list.append( urlToOpen );
+ KRun::displayOpenWithDialog( list );
+ }
+}
+
+void BaseTreeView::slotOpenWithApplication()
+{
+ KService::Ptr ptr = KService::serviceByDesktopPath(sender()->name());
+ if (ptr)
+ {
+ KURL::List list;
+ list << currentURL();
+ KRun::run(*ptr, list);
+ }
+}
+
+void BaseTreeView::slotOpenWithActivated(int id)
+{
+ if (m_pluginIds.contains(id))
+ {
+ QuantaPlugin *plugin = m_pluginIds[id];
+ plugin->unload(true);
+ if (plugin->load())
+ {
+ int input = plugin->input();
+ plugin->setInput(-1); //disable input
+ plugin->run();
+ if (plugin->part())
+ plugin->part()->openURL(currentURL());
+ plugin->setInput(input);
+ }
+ }
+}
+
+void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
+{
+ if (m_openWithMenuId != -1)
+ menu->removeItem(m_openWithMenuId);
+ for (uint i = 0; i < m_openWithActions.count(); i++)
+ {
+ KAction *action = m_openWithActions[i];
+ delete action;
+ }
+ m_openWithActions.clear();
+ KURL urlToOpen = currentURL();
+ QString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
+ KTrader::OfferList offers = KTrader::self()->query(mimeType, "Type == 'Application'");
+ QDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
+ m_pluginIds.clear();
+
+ if (offers.count() > 0 || plugins.count() > 0)
+ {
+ m_openWithMenu = new KPopupMenu(this);
+ if (offers.count() > 0)
+ {
+ KTrader::OfferList::Iterator it;
+ for (it = offers.begin(); it != offers.end(); ++it)
+ {
+ KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, QFile::encodeName((*it)->desktopEntryPath()).data());
+ connect(action, SIGNAL(activated()), this, SLOT(slotOpenWithApplication()));
+ action->plug(m_openWithMenu);
+ m_openWithActions.append(action);
+ }
+ m_openWithMenu->insertSeparator();
+ }
+ if (plugins.count() > 0)
+ {
+ m_openWithMenu->insertTitle(i18n("Plugins"));
+ QDictIterator<QuantaPlugin> it2(plugins);
+ for(;it2.current();++it2)
+ {
+ int id = m_openWithMenu->insertItem(KGlobal::iconLoader()->loadIconSet(it2.current()->icon(),KIcon::Small), it2.current()->name());
+ m_pluginIds[id] = it2.current();
+ }
+ connect(m_openWithMenu, SIGNAL(activated(int)), SLOT(slotOpenWithActivated(int)));
+ m_openWithMenu->insertSeparator();
+ }
+ m_openWithMenu->insertItem(i18n("&Other..."), this, SLOT(slotOpenWith()));
+ m_openWithMenuId = menu->insertItem(i18n("Open &With"), m_openWithMenu, -1, position);
+ } else
+ m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()), 0, -1, position);
+}
+
+void BaseTreeView::slotInsertTag()
+{
+ if (currentItem() )
+ {
+ DirInfo dirInfo;
+
+ dirInfo.mimeType = "";
+ dirInfo.preText = "";
+ dirInfo.postText = "";
+ emit insertTag( currentURL(), dirInfo );
+ }
+}
+
+
+void BaseTreeView::slotCopy()
+{
+ if (currentItem())
+ {
+ QClipboard *cb = QApplication::clipboard();
+ cb->setText( currentURL().prettyURL() );
+ }
+}
+
+
+void BaseTreeView::slotPaste()
+{
+ if (currentItem())
+ {
+ QClipboard *cb = QApplication::clipboard();
+ KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+
+ KURL url = currentURL();
+ if ( ! currentKFileTreeViewItem()->isDir() )
+ url.setFileName(""); // don't paste on files but in dirs
+ QuantaNetAccess::dircopy(list, url, m_parent, true);
+ }
+}
+
+
+void BaseTreeView::slotPercent(KIO::Job *job, unsigned long value)
+{
+ Q_UNUSED(job);
+ progressBar->setProgress(value);
+}
+
+
+void BaseTreeView::slotDelete()
+{
+ if (!currentKFileTreeViewItem()) return;
+ KURL url = currentURL();
+ if (currentKFileTreeViewItem()->isDir())
+ url.adjustPath(+1);
+ QuantaNetAccess::del(url, m_parent, true);
+}
+
+
+void BaseTreeView::slotPopulateFinished(KFileTreeViewItem *item)
+{
+ progressBar->setTotalSteps(1);
+ progressBar->setProgress(-1);
+ progressBar->setTextEnabled(false);
+
+ if ( !item ) return;
+
+ if( item->isDir() )
+ stopAnimation( item );
+
+ if (item->childCount() == 0) {
+ item->setOpen(false);
+ item->setExpandable(false);
+ } else {
+ QString url = item->url().url();
+ BaseTreeBranch *btb = dynamic_cast<BaseTreeBranch *>(item->branch());
+ if (btb && ! btb->folderToOpen.empty()) {
+ btb->reopenFolder();
+ }
+ }
+}
+
+
+void BaseTreeView::slotInsertInProject()
+{
+ if (currentItem() )
+ {
+ emit insertFileInProject( currentURL());
+ }
+}
+
+
+void BaseTreeView::slotInsertDirInProject()
+{
+ if ( currentItem() )
+ {
+ emit insertDirInProject( currentURL() );
+ }
+}
+
+
+/** Bring up the properites dialog, and extend it for files */
+void BaseTreeView::slotProperties()
+{
+ if (! currentKFileTreeViewItem())
+ return;
+
+ propDlg = new KPropertiesDialog(currentKFileTreeViewItem()->fileItem(), this, 0L, false, false); //autodeletes itself
+ fileInfoDlg = 0L;
+ if (!currentKFileTreeViewItem()->isDir())
+ {
+ fileInfoDlg = addFileInfoPage(propDlg);
+ }
+ connect(propDlg, SIGNAL( applied() ), this, SLOT( slotPropertiesApplied()) );
+ propDlg->exec();
+}
+
+
+void BaseTreeView::slotPropertiesApplied()
+{
+ if (! propDlg) return;
+ // check if renamed
+ KURL url = currentURL();
+ if (url != propDlg->kurl())
+ {
+ itemRenamed(url, propDlg->kurl());
+ }
+ KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
+ if (fileInfoDlg && kftvi)
+ {
+ // has description changed?
+ QString newDesc = fileInfoDlg->fileDesc->text();
+ if (kftvi->text(1) != newDesc)
+ itemDescChanged(kftvi, newDesc);
+ }
+ BaseTreeViewItem * btvi = dynamic_cast<BaseTreeViewItem *> (kftvi);
+ if (btvi)
+ {
+ btvi->refreshIcon();
+ }
+/* not working as expected
+ if (kftvi && kftvi->url().isLocalFile()) {
+ slotReloadAllTrees(); // refresh the icons for local url's, they might have changed
+ }*/
+}
+
+
+void BaseTreeView::slotReloadAllTrees()
+{
+ QPtrStack<BaseTreeBranch> stack;
+ BaseTreeBranch *btb;
+ KFileTreeBranchIterator it( branches() );
+ for ( ; it.current(); ++it)
+ {
+ btb = dynamic_cast<BaseTreeBranch *>( (*it) );
+ if (btb && btb->rootUrl().isLocalFile()) {
+ stack.push(btb);
+ }
+ }
+ while (! stack.isEmpty())
+ {
+ reload(stack.pop());
+ }
+}
+
+
+void BaseTreeView::slotReload()
+{
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if (curItem)
+ reload(dynamic_cast<BaseTreeBranch *>(curItem->branch()));
+}
+
+
+void BaseTreeView::reload(BaseTreeBranch *btb)
+{
+ // remember the old status
+ QStringList folderToOpen;
+ btb->addOpenFolder(&folderToOpen);
+ KURL url = btb->rootUrl();
+ // remove and open again
+ removeBranch(btb);
+ btb = dynamic_cast<BaseTreeBranch *>(newBranch(url));
+ if (btb) {
+ btb->folderToOpen = folderToOpen;
+ btb->reopenFolder();
+ btb->updateOpenFolder();
+ }
+}
+
+
+void BaseTreeView::slotJobFinished(KIO::Job *job)
+{
+ if ( job->error() )
+ job->showErrorDialog(this);
+
+ progressBar->setTotalSteps(1);
+ progressBar->setProgress(-1);
+ progressBar->setTextEnabled(false);
+}
+
+
+void BaseTreeView::slotReturnPressed(QListViewItem *item)
+{
+ emit executed(item);
+}
+
+
+bool BaseTreeView::acceptDrag(QDropEvent* e ) const
+{
+ QPoint p (contentsToViewport(e->pos()));
+ QListViewItem *atpos = itemAt(p);
+ KFileTreeViewItem *kftvi = dynamic_cast <KFileTreeViewItem *> (atpos);
+ if (kftvi)
+ return (KFileTreeView::acceptDrag(e) && kftvi->isDir()); // accept only on folders
+ else
+ return (KFileTreeView::acceptDrag(e));
+}
+
+
+void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
+{
+ if(fileList.empty())
+ return;
+
+ // Check what the destination can do
+ if (!KProtocolInfo::supportsWriting(dest))
+ return;
+ bool sLinking = KProtocolInfo::supportsLinking(dest);
+
+ // Check what the source can do
+ KURL url = fileList.first(); // we'll assume it's the same for all URLs (hack)
+ bool sReading = KProtocolInfo::supportsReading(url);
+ bool sDeleting = KProtocolInfo::supportsDeleting(url);
+ bool sMoving = KProtocolInfo::supportsMoving(url);
+
+ // Check the state of the modifiers key at the time of the drop
+ Window root;
+ Window child;
+ int root_x, root_y, win_x, win_y;
+ uint keybstate;
+ XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ &root_x, &root_y, &win_x, &win_y, &keybstate );
+
+ int result;
+ if (keybstate & ControlMask) {
+ result = 1; // copy
+ } else {
+ if (keybstate & ShiftMask) {
+ result = 2; // move
+ } else {
+
+ // create the popup menu
+ QPopupMenu popup;
+ if (sMoving || (sReading && sDeleting))
+ popup.insertItem(SmallIconSet("goto"), i18n("&Move Here"), 2 );
+ if (sReading)
+ popup.insertItem(SmallIconSet("editcopy"), i18n("&Copy Here"), 1 );
+ if (sLinking)
+ popup.insertItem(SmallIconSet("www"), i18n("&Link Here"), 3 );
+ popup.insertSeparator();
+ popup.insertItem(SmallIconSet("cancel"), i18n("C&ancel"), 5);
+
+ result = popup.exec( QCursor::pos() );
+ }
+ }
+ bool tooltip = showToolTips();
+ KIO::Job *job;
+ switch ( result ) {
+ case 1 : setShowToolTips(false);
+ setDragEnabled(false);
+ QuantaNetAccess::dircopy(fileList, dest, m_parent, true);
+ setDragEnabled(true);
+ setShowToolTips(tooltip);
+ return;
+ case 2 : setShowToolTips(false);
+ setDragEnabled(false);
+ QuantaNetAccess::move(fileList, dest, m_parent, true);
+ setDragEnabled(true);
+ setShowToolTips(tooltip);
+ return;
+ case 3 : job = KIO::link(fileList, dest);
+ break;
+ default : return ;
+ }
+ if (!job)
+ return;
+
+ connect(job, SIGNAL( result(KIO::Job *) ),
+ this, SLOT( slotJobFinished(KIO::Job *) ) );
+ progressBar->setTotalSteps(100);
+ connect(job, SIGNAL(percent( KIO::Job *, unsigned long)),
+ this, SLOT(slotPercent( KIO::Job *, unsigned long)));
+}
+
+
+void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+{
+ QPoint p (contentsToViewport(pos));
+ QListViewItem *atpos = itemAt(p);
+// if (atpos && atpos->parent()) {
+// after = atpos;
+// parent = atpos->parent();
+// } else {
+ after = atpos;
+ parent = atpos;
+// }
+}
+
+
+void BaseTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &)
+{
+ m_projectName = name;
+ m_projectBaseURL = baseURL;
+}
+
+
+bool BaseTreeView::isFileOpen(const KURL &url)
+{
+ return ViewManager::ref()->isOpened(url);
+}
+
+
+bool BaseTreeView::isPathInClipboard()
+{
+ QClipboard *cb = QApplication::clipboard();
+ KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it )
+ {
+ if ( !(*it).isValid() )
+ return false;
+ }
+ return true;
+}
+
+
+void BaseTreeView::slotDocumentClosed(const KURL& url)
+{
+ KFileTreeViewItem * item;
+ KFileTreeBranchIterator it( branches() );
+ for ( ; it.current(); ++it)
+ {
+ item = (*it)->findTVIByURL(url);
+ if (item)
+ {
+ item->repaint();
+ }
+ }
+/* QListViewItemIterator iter(this);
+ for ( ; iter.current(); ++iter )
+ {
+ iter.current()->repaint();
+ }*/
+}
+
+
+void BaseTreeView::slotStartRename()
+{
+ KFileTreeViewItem * item = currentKFileTreeViewItem();
+ if (item) {
+ setRenameable(0, true);
+ rename(item, 0);
+ };
+}
+
+
+void BaseTreeView::cancelRename(int col)
+{
+ // reset the inline rename option for file/folder name
+ if (col == 0) {
+ setRenameable(0, false);
+ }
+}
+
+
+void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText, int col)
+{
+ if (!item)
+ return;
+
+ // reset the inline rename option for file/folder name
+ if (col == 0) {
+ setRenameable(0, false);
+ KFileTreeViewItem * kvtvi = dynamic_cast<KFileTreeViewItem *>(item);
+ if (kvtvi)
+ doRename(kvtvi, newText);
+ }
+}
+
+
+void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
+{
+ if (! kftvi)
+ return;
+
+ KURL oldURL = kftvi->url();
+ KURL newURL = oldURL;
+
+ if (kftvi->isDir())
+ {
+ newURL.setPath(QFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
+ oldURL.adjustPath(1);
+ } else
+ {
+ newURL.setFileName(newName);
+ }
+ if ( oldURL != newURL )
+ {
+ bool proceed = true;
+ if (QExtFileInfo::exists(newURL, false, this))
+ {
+ proceed = KMessageBox::warningContinueCancel(this, i18n("<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(newURL.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue;
+ }
+ if (proceed)
+ {
+ //start the rename job
+ oldURL.adjustPath(-1);
+ newURL.adjustPath(-1);
+ if (!QuantaNetAccess::file_move(oldURL, newURL, -1, true, false, m_parent, true))
+ {
+ kftvi->setText(0, kftvi->fileItem()->text()); // reset the text
+ }
+ } else
+ {
+ kftvi->setText(0, kftvi->fileItem()->text()); // reset the text
+ }
+ }
+}
+
+
+void BaseTreeView::saveLayout(KConfig *config, const QString &group)
+{
+ KListView::saveLayout(config, group);
+ if (! m_saveOpenFolder || ! qConfig.saveTrees)
+ return;
+
+ KConfigGroupSaver saver(config, group);
+ BaseTreeBranch *btb;
+ int i = 0;
+ KFileTreeBranchIterator it( branches() );
+ for ( ; it.current(); ++it)
+ {
+ btb = dynamic_cast<BaseTreeBranch *>( (*it) );
+ if (btb && btb->rootUrl().isLocalFile()) {
+ ++i;
+ QStringList folderList;
+ // remember the root url so that I find the branch on restore
+ folderList.append(btb->rootUrl().url());
+ btb->addOpenFolder(&folderList);
+ config->writePathEntry("OpenFolderList" + QString::number(i), folderList);
+ }
+ }
+ config->writeEntry("NumOpenFolderList", i);
+}
+
+
+void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
+{
+ KListView::restoreLayout(config, group);
+ KConfigGroupSaver saver(config, group);
+ setShowToolTips( config->readBoolEntry("ShowToolTips", true) );
+
+ if (! m_saveOpenFolder || ! qConfig.saveTrees)
+ return;
+
+ BaseTreeBranch *btb;
+ KFileTreeBranchIterator it( branches() );
+ int maxBranch = config->readNumEntry("NumOpenFolderList", 0);
+ for (int i = 1; i <= maxBranch; ++i)
+ {
+ QStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + QString::number(i));
+ if (folderList.count() > 1) {
+ KURL rootURL = (*folderList.begin());
+ folderList.remove(folderList.begin()); // remove the root URL
+ KFileTreeBranchIterator it( branches() );
+ for ( ; it.current(); ++it)
+ {
+ if ((*it)->rootUrl() == rootURL) {
+ btb = dynamic_cast<BaseTreeBranch *>( (*it) );
+ if (btb) {
+ btb->folderToOpen = folderList;
+ btb->reopenFolder();
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
+
+void BaseTreeView::slotCreateSiteTemplate()
+{
+ QString startDir;
+ if (Project::ref()->hasProject())
+ {
+ startDir = Project::ref()->templateURL().url();
+ } else
+ {
+ startDir = locateLocal("data", resourceDir + "templates/");
+ }
+ KURL targetURL;
+ bool valid;
+ do {
+ valid = false;
+ targetURL = KFileDialog::getSaveURL(startDir, "*.tgz", this, i18n("Create Site Template File"));
+ if (targetURL.isEmpty())
+ return;
+ if (targetURL.url().startsWith(KURL::fromPathOrURL(locateLocal("data", resourceDir + "templates/")).url()))
+ valid = true;
+ if (Project::ref()->hasProject() && targetURL.url().startsWith(Project::ref()->templateURL().url()))
+ valid = true;
+ if (!valid)
+ KMessageBox::error(this, i18n("Templates should be saved to the local or project template folder."));
+ }while (!valid);
+
+ KURL url = currentURL();
+ //TODO: Implement creation from remote folders as well. Requires downloading of the files to a
+ //temporary directory
+ if (url.protocol() != "file")
+ {
+ KMessageBox::sorry(this, i18n("Currently you can create site templates only from local folders."), i18n("Unsupported Feature"));
+ return;
+ }
+
+ KTempFile *tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ tempFile->close();
+ KTar tar(tempFile->name(), "application/x-gzip");
+ bool error = false;
+ if (tar.open(IO_WriteOnly))
+ {
+ KURL::List fileList = QExtFileInfo::allFiles(url, "*", this);
+ for (KURL::List::Iterator it = fileList.begin(); it != fileList.end(); ++it)
+ {
+ if (!(*it).path().endsWith("/"))
+ {
+ QFile f((*it).path());
+ if (f.open(IO_ReadOnly))
+ {
+ QByteArray buffer(f.readAll());
+ if (!tar.writeFile((*it).path().remove(url.path()), "user", "group", buffer.size(), buffer.data()))
+ {
+ error = true;
+ }
+ f.close();
+ } else
+ error = true;
+ }
+ }
+ tar.close();
+ } else
+ error = true;
+ if (!QuantaNetAccess::copy(KURL::fromPathOrURL(tempFile->name()), targetURL, m_parent, false))
+ error = true;
+
+ if (error)
+ KMessageBox::error(this, i18n("<qt>There was an error while creating the site template tarball.<br>Check that you can read the files from <i>%1</i>, you have write access to <i>%2</i> and that you have enough free space in your temporary folder.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)).arg(targetURL.prettyURL(0, KURL::StripFileProtocol)), i18n("Template Creation Error"));
+ delete tempFile;
+}
+
+void BaseTreeView::slotCreateFolder()
+{
+ bool ok;
+ QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ if (ok)
+ {
+ KURL url = currentURL();
+ if (currentKFileTreeViewItem()->isDir())
+ url.setPath(url.path() + "/" + folderName + "/");
+ else
+ url.setPath(url.directory() + "/" + folderName +"/");
+ QuantaNetAccess::mkdir(url, this, -1);
+ }
+}
+
+void BaseTreeView::slotCreateFile()
+{
+ bool ok;
+ QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ if (ok)
+ {
+ KURL url = currentURL();
+ if (currentKFileTreeViewItem()->isDir())
+ url.setPath(url.path() + "/" + fileName);
+ else
+ url.setPath(url.directory() + "/" + fileName);
+ if (QExtFileInfo::exists(url, false, this))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create file, because a file named <b>%1</b> already exists.</qt>").arg(fileName), i18n("Error Creating File"));
+ return;
+ }
+ KTempFile *tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ tempFile->close();
+ if (QuantaNetAccess::copy(KURL::fromPathOrURL(tempFile->name()), url, this))
+ {
+ emit openFile(url);
+ }
+ delete tempFile;
+ }
+}
+
+#include "basetreeview.moc"
diff --git a/quanta/treeviews/basetreeview.h b/quanta/treeviews/basetreeview.h
new file mode 100644
index 00000000..345b5a79
--- /dev/null
+++ b/quanta/treeviews/basetreeview.h
@@ -0,0 +1,362 @@
+/***************************************************************************
+ BaseTreeView.h - description
+ -------------------
+ begin : Thu Jun 1 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <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 BASETREEVIEW_H
+#define BASETREEVIEW_H
+
+//qt includes
+#include <qvaluelist.h>
+
+//kde includes
+#include <kfiletreebranch.h>
+#include <kfiletreeview.h>
+#include <kfiletreeviewitem.h>
+
+// quanta includes
+#include "quantacommon.h"
+
+//foward declarations
+class QListViewItem;
+class QString;
+class QPixmap;
+class QPoint;
+class QRegExp;
+class QCloseEvent;
+
+class KAction;
+class KFileItem;
+class KPopupMenu;
+class KPropertiesDialog;
+class KURL;
+class FileInfoDlg;
+class BaseTreeViewToolTip;
+class QuantaPlugin;
+
+/**
+ * @short a KFileTreeViewItem with some specials.
+ *
+ * @author Jens Herden <jens@kdewebdev.org>
+ */
+class BaseTreeViewItem : public KFileTreeViewItem {
+
+public:
+ BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
+
+ /**
+ sorts folders separate from files
+ */
+ QString key (int column, bool ascending) const;
+
+ /**
+ makes compare independent from locale
+ */
+ int compare( QListViewItem *i, int col, bool ascending ) const;
+
+ /**
+ makes open files bold and the second column lighter
+ */
+ void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+
+ /**
+ refresh icon
+ */
+ void refreshIcon();
+};
+
+/**
+ * @short a KFileTreeBranch that uses @ref BaseTreeViewItem and does some special filtering.
+ *
+ * @author Jens Herden <jens@kdewebdev.org>
+ */
+class BaseTreeBranch : public KFileTreeBranch {
+ Q_OBJECT
+
+public:
+ BaseTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden = false, KFileTreeViewItem *branchRoot = 0);
+ /**
+ get the BaseTreeViewItem
+ */
+ virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem *parent,
+ KFileItem *fileItem );
+ /**
+ does custom filtering
+ */
+ bool matchesFilter(const KFileItem *item) const;
+
+ /**
+ files matching to this will not be shown
+ */
+ QRegExp excludeFilterRx;
+
+ /**
+ adds the current open folders of the branch to a stringslist.
+ Attention: no check for double entries is done
+
+ @param openFolder the list where to add the URL strings
+ */
+ void addOpenFolder(QStringList *openFolder);
+
+ /** opens the next folder in @ref folderToOpen */
+ void reopenFolder();
+
+ /** list of folders to open */
+ QStringList folderToOpen;
+
+ /** inform the dirwatcher to update all open folders */
+ void updateOpenFolder();
+
+};
+
+
+/**
+ * @short the base class for many of Quantas treeviews
+ *
+ * @ref FilesTreeView, @ref ScriptTreeView, @ref ProjectTreeView and
+ * @ref TemplatesTreeView use this class.
+ *
+ */
+class BaseTreeView : public KFileTreeView {
+ Q_OBJECT
+
+public:
+ BaseTreeView(QWidget *parent = 0L, const char *name = 0L);
+ virtual ~BaseTreeView();
+
+ /**
+ * Saves the list view's layout (column widtsh, column order, sort column)
+ * to a KConfig group. Reimplemented to save the open folders.
+ *
+ * @param config the KConfig object to write to
+ * @param group the config group to use
+ */
+ void saveLayout(KConfig *config, const QString &group);
+
+ /**
+ * Reads the list view's layout from a KConfig group as stored with
+ * saveLayout. Reimplemented to load the open folders.
+ *
+ * @param config the KConfig object to read from
+ * @param group the config group to use
+ */
+ void restoreLayout(KConfig *config, const QString &group);
+
+ /**
+ * en/disable saving a list of open folders in @ref saveLayout and
+ * restoring the tree status in @ref restoreLayout
+ */
+ void setSaveOpenFolder(bool b = true) { m_saveOpenFolder = b; };
+
+ /** reads property @ref setSaveOpenFolder */
+ bool saveOpenFolder() { return m_saveOpenFolder; };
+
+public slots:
+ /**
+ sets new project information
+ */
+ void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ /**
+ repaints all treeview items
+ */
+ void slotDocumentClosed(const KURL& url);
+
+protected slots:
+
+ void slotCopy();
+ void slotPaste();
+ void slotDelete();
+ virtual void slotJobFinished( KIO::Job *job);
+ void slotInsertInProject();
+ void slotInsertDirInProject();
+ virtual void slotReturnPressed(QListViewItem *item);
+ virtual void slotDropped (QWidget *, QDropEvent *, KURL::List&, KURL&);
+ /**
+ sends value from KIO::Job to progressbar
+ */
+ virtual void slotPercent(KIO::Job *job, unsigned long value);
+
+ void slotPopulateFinished(KFileTreeViewItem *item);
+ /**
+ shows open with dialog for the current item
+ */
+ void slotOpenWith();
+
+ /** Opens the current item with the selected associated application */
+ void slotOpenWithApplication();
+ /**
+ Called for: double click, return, Open
+
+ emits a signal (@ref openFile or @ref openImage)
+ or expands an archiv (@ref expandArchiv) in the tree
+ */
+ virtual void slotSelectFile(QListViewItem *item);
+ /**
+ emits the signal @ref insertTag
+ */
+ void slotInsertTag();
+ /**
+ reloads the current branch
+ */
+ void slotReload();
+ /**
+ reloads all branches
+ */
+ virtual void slotReloadAllTrees();
+ /**
+ reloads one branche
+ */
+ virtual void reload(BaseTreeBranch *btb);
+ /**
+ opens the properties dialog
+ */
+ void slotProperties();
+ /**
+ applies changed properties
+ */
+ virtual void slotPropertiesApplied();
+ /**
+ emits the signal @ref open
+ */
+ void slotOpen();
+ /**
+ emits the signal @ref closeFile
+ */
+ void slotClose();
+
+ /**
+ starts the inline rename of the current item
+ */
+ void slotStartRename();
+
+ /**
+ connect signal itemRenamed to this slot to handle inline rename
+ */
+ virtual void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ /**
+ create a site template tarball from the selected directory
+ */
+ virtual void slotCreateSiteTemplate();
+ /**
+ Creates a folder under the current item
+ */
+ virtual void slotCreateFolder();
+ /**
+ Creates a file under the current item
+ */
+ virtual void slotCreateFile();
+
+ virtual void slotOpenWithActivated(int id);
+
+protected:
+ /**
+ implement this to create a branch and add this branch to the treeview
+ @param url the root of the branch
+ @return the new branch
+ */
+ virtual KFileTreeBranch* newBranch(const KURL& url) = 0;
+
+ /**
+ called when an item was renamed in the properties dialog
+ the default implementation emits the signal @ref renamed
+ */
+ virtual void itemRenamed(const KURL& , const KURL& );
+
+ /**
+ called when the description of an item was changed,
+ the default implementation does nothing
+ @param item the treeview item
+ @param newDesc the new description of item
+ */
+ virtual void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+ {
+ Q_UNUSED(item);
+ Q_UNUSED(newDesc);
+ };
+ /**
+ @return true if the clipboard contains one or more valid path
+ */
+ bool isPathInClipboard();
+
+ /**
+ adds the Quanta fileinfopage to the properties dialog
+ @param propDlg the dialog where to add the page
+ @return pointer to to just added page
+ */
+ virtual FileInfoDlg* addFileInfoPage(KPropertiesDialog *propDlg);
+
+ /**
+ expands an archiv inside of the tree
+ @return true if expanding was possible
+ */
+ bool expandArchiv (KFileTreeViewItem *item);
+ bool acceptDrag(QDropEvent* e ) const;
+ void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+
+ /**
+ this is for project and template tree to reduce includes there
+ */
+ bool isFileOpen(const KURL &url);
+
+ /** Inserts an Open With submenu into @param menu which lists
+ the possible applications that can open the current item and an
+ "Other" entry to bring up the Open With dialog. If no application
+ is associated with the type of the current item, the menu will bring up the Open With dialog immediately.
+ @param menu the menu where the Open With submenu should be inserted
+ @param position the position in this menu
+ */
+ void insertOpenWithMenu(KPopupMenu *menu, int position);
+ KPropertiesDialog *propDlg;
+ QString m_projectName;
+ KURL m_projectBaseURL;
+ FileInfoDlg* fileInfoDlg;
+ /** the parent of the treeview
+ the passwords are cached there
+ */
+ QWidget * m_parent;
+
+ BaseTreeViewToolTip * m_tooltip;
+ // some stuff for renaming
+ void doRename(KFileTreeViewItem* kvtvi, const QString & newName);
+ /** reimplemented to reset renameable */
+ void cancelRename(int col);
+
+signals:
+ void openFile(const KURL&);
+ void openImage(const KURL&);
+ void open(QListViewItem *name);
+ void insertDirInProject(const KURL&);
+ void insertFileInProject(const KURL&);
+ void insertTag(const KURL &, DirInfo);
+ /**
+ file or folder has been renamed
+ */
+ void renamed(const KURL &, const KURL &);
+ /**
+ close the file in Quanta
+ */
+ void closeFile( const KURL& );
+
+private:
+ bool m_saveOpenFolder;
+ KPopupMenu *m_openWithMenu;
+ int m_openWithMenuId;
+ QValueList<KAction *> m_openWithActions;
+ QMap<int, QuantaPlugin*> m_pluginIds;
+};
+
+#endif
diff --git a/quanta/treeviews/docfolder.cpp b/quanta/treeviews/docfolder.cpp
new file mode 100644
index 00000000..02669a1e
--- /dev/null
+++ b/quanta/treeviews/docfolder.cpp
@@ -0,0 +1,126 @@
+/***************************************************************************
+ docfolder.cpp - description
+ -------------------
+ begin : Fri Mar 3 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002 Andras Mantia <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 <qstrlist.h>
+#include <qpixmap.h>
+
+// KDE includes
+#include <kconfig.h>
+#include <kstandarddirs.h>
+#include <kiconloader.h>
+
+// app includes
+#include "docfolder.h"
+#include "docitem.h"
+
+DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath)
+ : KListViewItem(parent)
+{
+ name = _name;
+ topLevel = false;
+ url = "";
+
+ QStrList list;
+
+ config->readListEntry( name, list );
+
+ char *item;
+
+ for ( list.last(); ( item = list.current() ) ; list.prev() ) {
+ if ( item[0] != '#' ) {
+ QString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, QString(item), basePath+url);
+ el->setPixmap( 0, SmallIcon("info") );
+ } else
+ if ( item[0] == '#' ) { // current item is folder
+ item++; // remove leading #
+ QString l_url = config->readEntry( QString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ if ( ! l_url.isEmpty() )
+ el->url = basePath+l_url;
+ el->setPixmap( 0, UserIcon("mini-book1") );
+ el->setOpen( false );
+ }
+ }
+}
+
+DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath)
+ : KListViewItem(parent)
+{
+ name = _name;
+ topLevel = false;
+ url = "";
+ QStrList list;
+
+ config->readListEntry( name, list );
+
+ char *item;
+
+ for ( list.last(); ( item = list.current() ) ; list.prev() ) {
+ if ( item[0] != '#' ) {
+ QString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, QString(item), basePath+url);
+ el->setPixmap( 0, SmallIcon("info") );
+ } else
+ if ( item[0] == '#' ) { // current item is folder
+ item++; // remove leading #
+ QString l_url = config->readEntry( QString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ if ( ! l_url.isEmpty() )
+ el->url = basePath+l_url;
+ el->setPixmap( 0, UserIcon("mini-book1") );
+ el->setOpen( false );
+ }
+ }
+}
+
+
+
+DocFolder::~DocFolder(){
+}
+
+
+QString DocFolder::text( int i) const
+{
+ if (i == 0)
+ return name;
+ else
+ return "";
+}
+
+void DocFolder::setup()
+{
+ setExpandable( true );
+ QListViewItem::setup();
+}
+/** */
+void DocFolder::setOpen( bool o)
+{
+ QListViewItem::setOpen( o );
+ if ( !topLevel ) {
+ if (o)
+ setPixmap( 0, UserIcon("mini-book2") );
+ else
+ setPixmap( 0, UserIcon("mini-book1") );
+ } else {
+ if (o)
+ setPixmap( 0, SmallIcon("folder_open") );
+ else
+ setPixmap( 0, SmallIcon("folder") );
+ }
+}
diff --git a/quanta/treeviews/docfolder.h b/quanta/treeviews/docfolder.h
new file mode 100644
index 00000000..6b6668e1
--- /dev/null
+++ b/quanta/treeviews/docfolder.h
@@ -0,0 +1,50 @@
+/***************************************************************************
+ docfolder.h - description
+ -------------------
+ begin : Fri Mar 3 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002 Andras Mantia <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 DOCFOLDER_H
+#define DOCFOLDER_H
+
+#include <qwidget.h>
+
+#include <klistview.h>
+
+/**
+Class for forlder for
+Doc tree
+
+ *@author Yacovlev Alexander & Dmitry Poplavsky
+ */
+
+class KConfig;
+
+class DocFolder : public KListViewItem {
+public:
+ DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath);
+ DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath);
+ ~DocFolder();
+ QString text( int column ) const;
+ void setup();
+ /** */
+ void setOpen( bool o);
+
+public:
+ QString url;
+ QString name;
+ bool topLevel;
+};
+
+#endif
diff --git a/quanta/treeviews/docitem.cpp b/quanta/treeviews/docitem.cpp
new file mode 100644
index 00000000..7c9efa83
--- /dev/null
+++ b/quanta/treeviews/docitem.cpp
@@ -0,0 +1,52 @@
+/***************************************************************************
+ docitem.cpp - description
+ -------------------
+ begin : Fri Mar 3 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <qstrlist.h>
+
+#include <kconfig.h>
+
+#include "docitem.h"
+
+DocItem::DocItem(QListViewItem *parent, const QString &_name, const QString &_url)
+ : KListViewItem(parent)
+{
+ url = _url;
+ name = _name;
+}
+
+DocItem::DocItem(QListView *parent, const QString &_name, const QString &_url)
+ : KListViewItem(parent)
+{
+ url = _url;
+ name = _name;
+}
+
+
+DocItem::~DocItem()
+{
+}
+
+
+QString DocItem::text( int i) const
+{
+ if (i == 0)
+ return name;
+ else
+ return "";
+}
+//#include "docitem.moc"
+
diff --git a/quanta/treeviews/docitem.h b/quanta/treeviews/docitem.h
new file mode 100644
index 00000000..94fff375
--- /dev/null
+++ b/quanta/treeviews/docitem.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ docitem.h - description
+ -------------------
+ begin : Fri Mar 3 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002 Andras Mantia <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 DOCITEM_H
+#define DOCITEM_H
+
+#include <qwidget.h>
+
+#include <klistview.h>
+
+class KConfig;
+
+/**
+ *@author Yacovlev Alexander & Dmitry Poplavsky
+ */
+
+class DocItem : public KListViewItem {
+
+public:
+ DocItem(QListViewItem *parent, const QString &_name, const QString &_url);
+ DocItem(QListView *parent, const QString &_name, const QString &_url);
+ ~DocItem();
+ QString text( int column ) const;
+
+public: // Public attributes
+ QString url;
+ QString name;
+
+};
+
+#endif
diff --git a/quanta/treeviews/doctreeview.cpp b/quanta/treeviews/doctreeview.cpp
new file mode 100644
index 00000000..fd9abf65
--- /dev/null
+++ b/quanta/treeviews/doctreeview.cpp
@@ -0,0 +1,194 @@
+/***************************************************************************
+ doctreeview.cpp - description
+ -------------------
+ begin : Sat Mar 4 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002, 2004 Andras Mantia <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 clases
+#include <qstrlist.h>
+#include <qheader.h>
+#include <qpixmap.h>
+#include <qdir.h>
+
+// KDE clases
+#include <kconfig.h>
+#include <kapplication.h>
+#include <klocale.h>
+#include <kpopupmenu.h>
+#include <kstandarddirs.h>
+#include <kiconloader.h>
+#include <kurl.h>
+
+// application clases
+#include "doctreeview.h"
+#include "docfolder.h"
+#include "docitem.h"
+
+DocTreeView::DocTreeView(QWidget *parent, const char *name )
+ : KListView(parent,name)
+{
+
+ contextHelpDict = new QDict<QString>( 101, false );
+
+ setRootIsDecorated( true );
+ header()->hide();
+ setSorting(-1,false);
+
+ setFrameStyle( Panel | Sunken );
+ setLineWidth( 2 );
+ addColumn(i18n("Name"), -1);
+ addColumn("");
+ setFullWidth(true);
+
+ projectDocFolder = new KListViewItem(this, i18n("Project Documentation"));
+ projectDocFolder->setOpen(true);
+ slotRefreshTree();
+ setFocusPolicy(QWidget::ClickFocus);
+
+ connect(this, SIGNAL(executed(QListViewItem *)), SLOT(clickItem(QListViewItem *)) );
+ connect(this, SIGNAL(returnPressed(QListViewItem *)), SLOT(clickItem(QListViewItem *)));
+ connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+
+ m_contextMenu = new KPopupMenu(this);
+ m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, SLOT(slotReloadProjectDocs()));
+ m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, SIGNAL(downloadDoc()));
+ connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
+ this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+}
+
+
+DocTreeView::~DocTreeView(){
+ contextHelpDict->setAutoDelete(true);
+ delete contextHelpDict;
+}
+
+void DocTreeView::slotRefreshTree()
+{
+ for (QValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
+ {
+ delete *it;
+ }
+ m_folderList.clear();
+ QStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
+
+ for ( QStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
+ {
+ QString docDir = *it;
+ QDir dir(docDir, "*.docrc");
+ QStringList files = dir.entryList();
+
+ for ( QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ {
+ KConfig config( docDir + *it_f );
+ config.setGroup("Tree");
+
+ QString relDocDir = config.readEntry("Doc dir");
+ QString name = config.readEntry("Name").lower();
+
+ DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , QDir::cleanDirPath(docDir+relDocDir)+"/");
+ folder->setPixmap( 0, SmallIcon("folder_open") );
+ folder->topLevel = true;
+ folder->setOpen(true);
+ m_folderList.append(folder);
+
+ config.setGroup("Context");
+ QStrList list;
+ config.readListEntry("ContextList", list );
+
+ for ( unsigned int i=0; i<list.count(); i++ )
+ {
+ QString keyword = list.at(i);
+ QString *url = new QString(QDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
+ contextHelpDict->insert( name + "|" + keyword, url );
+ }
+ }
+ }
+
+}
+
+void DocTreeView::clickItem( QListViewItem *)
+{
+ QListViewItem *it = currentItem();
+ if ( !it )
+ return;
+ DocItem *dit = dynamic_cast< DocItem *>(it);
+ if ( dit )
+ if ( ! dit->url.isEmpty() )
+ emit openURL( dit->url);
+
+ DocFolder *dfol = dynamic_cast< DocFolder *>(it);
+ if ( dfol )
+ if ( ! dfol->url.isEmpty() )
+ emit openURL( dfol->url );
+ //else
+ // emit openURL( locate("appdata","doc/documentation.html") );
+}
+
+
+QString * DocTreeView::contextHelp(const QString &keyword)
+{
+ QString word = keyword.mid(keyword.find("|"));
+ if (contextHelpDict->find(keyword))
+ return contextHelpDict->find(keyword);
+ else
+ return contextHelpDict->find(word); //to support old documentation packages
+}
+
+void DocTreeView::slotDoubleClicked(QListViewItem *item )
+{
+ if (item)
+ {
+ item->setOpen(!item->isOpen());
+ }
+}
+
+void DocTreeView::slotAddProjectDoc(const KURL& url)
+{
+ QString path = url.path();
+ int pos = path.find("/doc/");
+ path = path.mid(pos + 5);
+ new DocItem(projectDocFolder, path, url.url());
+}
+
+void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+{
+ m_contextMenu->setItemVisible(m_menuReload, false);
+ if (item)
+ {
+ setSelected(item, true);
+ if (currentItem() == projectDocFolder)
+ {
+ m_contextMenu->setItemVisible(m_menuReload, true);
+ }
+ }
+ m_contextMenu->popup(point);
+}
+
+void DocTreeView::slotNewProjectLoaded(const QString &, const KURL &, const KURL &)
+{
+ slotReloadProjectDocs();
+}
+
+void DocTreeView::slotReloadProjectDocs()
+{
+ QListViewItem *child = projectDocFolder->firstChild();
+ while (child) {
+ QListViewItem *c = child;
+ child = child->nextSibling();
+ delete c;
+ }
+ emit reloadProjectDocs();
+}
+
+#include "doctreeview.moc"
diff --git a/quanta/treeviews/doctreeview.h b/quanta/treeviews/doctreeview.h
new file mode 100644
index 00000000..8061085d
--- /dev/null
+++ b/quanta/treeviews/doctreeview.h
@@ -0,0 +1,71 @@
+/***************************************************************************
+ doctreeview.h - description
+ -------------------
+ begin : Sat Mar 4 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002, 2004 Andras Mantia <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 DOCTREEVIEW_H
+#define DOCTREEVIEW_H
+
+//qt includes
+#include <qdict.h>
+#include <qvaluelist.h>
+
+//kde includes
+#include <klistview.h>
+
+class DocFolder;
+class KPopupMenu;
+
+
+/**
+ *@author Yacovlev Alexander & Dmitry Poplavsky
+ */
+
+class DocTreeView : public KListView {
+ Q_OBJECT
+public:
+ DocTreeView(QWidget *parent=0, const char *name=0);
+ ~DocTreeView();
+
+ QString *contextHelp(const QString &keyword);
+
+public slots:
+ void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotReloadProjectDocs();
+ void slotAddProjectDoc(const KURL& url);
+ /** Re-reads the documentation directories. */
+ void slotRefreshTree();
+
+signals:
+ void openURL(const QString& );
+ void reloadProjectDocs();
+ void downloadDoc();
+
+private slots:
+ void clickItem( QListViewItem *);
+ void slotDoubleClicked(QListViewItem *);
+ void slotMenu(KListView *, QListViewItem *item, const QPoint &point);
+
+
+private:
+
+ QDict<QString> *contextHelpDict;
+ QValueList<DocFolder *> m_folderList;
+ KListViewItem *projectDocFolder;
+ KPopupMenu *m_contextMenu;
+ int m_menuReload;
+};
+
+#endif
diff --git a/quanta/treeviews/fileinfodlg.ui b/quanta/treeviews/fileinfodlg.ui
new file mode 100644
index 00000000..f2fbd5fa
--- /dev/null
+++ b/quanta/treeviews/fileinfodlg.ui
@@ -0,0 +1,94 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>FileInfoDlg</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>FileInfoDlg</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>349</width>
+ <height>266</height>
+ </rect>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>lineNum</cstring>
+ </property>
+ <property name="text">
+ <string>Number of lines:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>imageNum</cstring>
+ </property>
+ <property name="text">
+ <string>Number of images included:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="2" column="0">
+ <property name="name">
+ <cstring>imageSize</cstring>
+ </property>
+ <property name="text">
+ <string>Size of the included images:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>totalSize</cstring>
+ </property>
+ <property name="text">
+ <string>Total file size:</string>
+ </property>
+ </widget>
+ <widget class="QListBox" row="5" column="0">
+ <property name="name">
+ <cstring>imageList</cstring>
+ </property>
+ <property name="selectionMode">
+ <enum>NoSelection</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="4" column="0">
+ <property name="name">
+ <cstring>includedLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Included images:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="6" column="0">
+ <property name="name">
+ <cstring>fileDescLbl</cstring>
+ </property>
+ <property name="text">
+ <string>Description:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>fileDesc</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="7" column="0">
+ <property name="name">
+ <cstring>fileDesc</cstring>
+ </property>
+ </widget>
+ </grid>
+</widget>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp
new file mode 100644
index 00000000..be4c6a7e
--- /dev/null
+++ b/quanta/treeviews/filestreeview.cpp
@@ -0,0 +1,334 @@
+/***************************************************************************
+ filestreeview.cpp - description
+ -------------------
+ begin : Thu Jun 1 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <amantoa@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. *
+ * *
+ ***************************************************************************/
+
+
+// KDE includes
+#include <kdebug.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kinputdialog.h>
+#include <kopenwith.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kfiledialog.h>
+#include <kprogress.h>
+#include <kurl.h>
+
+// app includes
+#include "filestreeview.h"
+#include "resource.h"
+#include "project.h"
+#ifdef ENABLE_CVSSERVICE
+#include "cvsservice.h"
+#endif
+#include "qextfileinfo.h"
+
+
+//FilesTreeView implementation
+
+FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
+ : BaseTreeView(parent, name)
+{
+ setAcceptDrops(true);
+ setDragEnabled(true);
+ setSaveOpenFolder(true);
+
+ m_config = config;
+ m_config->setGroup("General Options");
+ // I must read this here because quanta_init has not done it yet
+ qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true);
+ qConfig.saveTrees = m_config->readBoolEntry("Save Local Trees", true);
+ QStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
+ QStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
+ KURL url;
+ for (uint i = 0; i < topStrList.count(); i++)
+ {
+ url = KURL();
+ QuantaCommon::setUrl(url, topStrList[i]);
+ if (!topURLList.contains(url))
+ {
+ topURLList.append(url);
+ if (i < topStrAliasList.count())
+ topURLAliases.insert(url.url(), topStrAliasList[i]);
+ else
+ topURLAliases.insert(url.url(), url.fileName());
+ }
+ }
+
+ m_config->setGroup("General Options");
+ if (m_config->readBoolEntry("Home-Root Folder On", true))
+ {
+ url = KURL();
+ url.setPath("/");
+ if (!topURLList.contains(url))
+ topURLList.append(url);
+ url = KURL();
+ url.setPath(QExtFileInfo::homeDirPath() + "/");
+ if (!topURLList.contains(url))
+ topURLList.append(url);
+ }
+
+ m_fileMenu = new KPopupMenu(this);
+
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertSeparator();
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+
+ KPopupMenu *createNewMenu = new KPopupMenu(this);
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+
+ m_folderMenu = new KPopupMenu();
+
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()));
+ m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, SLOT(slotAddToTop()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(SmallIcon("empty"), i18n("&Create New"), createNewMenu);
+ m_folderMenu->insertSeparator();
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
+ m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, SLOT(slotChangeAlias()));
+ m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+
+ m_emptyMenu = new KPopupMenu();
+
+ m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()), 0, -1 , 0);
+
+ addColumn(i18n("Files Tree"), -1);
+ addColumn("");
+
+ connect(this, SIGNAL(open(QListViewItem *)),
+ this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
+ this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+
+ // generate top list of directories
+ for (uint i = 0; i < topURLList.count(); i++)
+ {
+ KURL url = topURLList[i];
+ newBranch(url);
+ }
+ restoreLayout(m_config, className());
+ // the restored size of the first column might be too large for the current content
+ // we set it to 10 and the listview will adjust it to the size of the largest entry
+ setColumnWidth(0, 10);
+}
+
+FilesTreeView::~FilesTreeView()
+{
+}
+
+KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
+{
+ BaseTreeBranch* newBrnch = 0;
+ KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, url);
+ if (url.isLocalFile() && url.path() == "/")
+ {
+ newBrnch = new BaseTreeBranch(this, url, i18n("Root Folder"), SmallIcon(fileItem.iconName()), true);
+ } else
+ {
+ if (url.isLocalFile() && url.equals(KURL(QExtFileInfo::homeDirPath() + "/"), true))
+ {
+ newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true);
+ } else
+ {
+ QString s = url.fileName();
+ if (s.isEmpty())
+ s = "/";
+ if (topURLAliases.contains(url.url()))
+ s = topURLAliases[url.url()];
+ s += " [" + url.prettyURL() + "]";
+ newBrnch = new BaseTreeBranch(this, url, s, SmallIcon(fileItem.iconName()), true);
+ }
+ }
+ newBrnch->setShowingDotFiles(qConfig.showHiddenFiles);
+ addBranch(newBrnch);
+ return newBrnch;
+}
+
+
+
+/** RMB pressed, bring up the menu */
+void FilesTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+{
+ Q_UNUSED(listView);
+#ifdef ENABLE_CVSSERVICE
+ KURL url = currentURL();
+ if (Project::ref()->contains(url))
+ CVSService::ref()->setRepository(Project::ref()->projectBaseURL().path());
+ else
+ CVSService::ref()->setRepository(url.directory());
+ if (url.isLocalFile())
+ {
+ CVSService::ref()->setCurrentFile(url.path());
+ }
+ else
+ CVSService::ref()->setCurrentFile("");
+#endif
+ if (item)
+ {
+ bool hasProject = !m_projectName.isNull();
+ m_folderMenu->setItemVisible(m_menuChangeAlias, false);
+ m_folderMenu->setItemVisible(m_menuFolderRename, true);
+ m_folderMenu->setItemVisible(m_insertFolderInProject, hasProject);
+ m_fileMenu->setItemVisible(m_insertFileInProject, hasProject);
+ setSelected(item, true);
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if ( !curItem->isDir() )
+ {
+ m_fileMenu->setItemVisible(m_menuClose, isFileOpen(currentURL()));
+ insertOpenWithMenu(m_fileMenu, 1);
+ m_fileMenu->popup( point);
+ } else {
+ m_folderMenu->setItemVisible( m_menuDel, true );
+ m_folderMenu->setItemVisible( m_menuTop, true );
+ m_folderMenu->setItemVisible(m_menuPasteFolder, isPathInClipboard());
+ KURL url = curItem->url();
+ if ( curItem == curItem->branch()->root() )
+ {
+ m_folderMenu->setItemVisible(m_menuDel, false);
+ m_folderMenu->changeItem(m_menuTop, i18n("Remove From &Top"));
+ m_folderMenu->setItemVisible(m_menuChangeAlias, true);
+ m_folderMenu->setItemVisible(m_menuFolderRename, false);
+
+ m_config->setGroup("General Options");
+ if ((url == KURL("file:/") || url == KURL("file:" + QExtFileInfo::homeDirPath() + "/")) &&
+ m_config->readBoolEntry("Home-Root Folder On", true) )
+ m_folderMenu ->setItemVisible(m_menuTop, false);
+ m_folderMenu ->setItemVisible(m_reloadMenuId, true);
+ }
+ else
+ {
+ m_folderMenu->changeItem( m_menuTop, i18n("&Add Folder to Top"));
+ url.adjustPath(+1);
+ m_folderMenu->setItemVisible(m_menuTop, (topURLList.findIndex(url) == -1));
+ m_folderMenu->setItemVisible(m_reloadMenuId, false);
+ }
+ m_folderMenu->popup( point);
+ }
+ } else {
+ m_emptyMenu->popup( point );
+ }
+}
+
+
+
+/** Add or remove folders to/from the top list */
+void FilesTreeView::slotAddToTop()
+{
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if ( !curItem ) return;
+
+ if ( curItem->isDir() )
+ {
+ KURL url(currentURL().url());
+ url.adjustPath(+1);
+ if ( curItem != curItem->branch()->root() ) //it is not a top folder
+ { // add
+ if (topURLList.findIndex(url) == -1)
+ {
+ topURLList.append(url);
+ bool ok;
+ QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ if (!ok)
+ aliasName = url.fileName();
+ topURLAliases.insert(url.url(), aliasName);
+ newBranch(url);
+ } else {
+ KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url()));
+ }
+ } else
+ { // remove
+ topURLList.remove(url);
+ topURLAliases.remove(url.url());
+ removeBranch(curItem->branch());
+ }
+ }
+}
+
+void FilesTreeView::slotNewTopFolder()
+{
+ KURL url = KFileDialog::getExistingURL(QString::null, this, i18n("Choose Local or Remote Folder"));
+ if (url.isEmpty()) return;
+ url.adjustPath(+1);
+ if (topURLList.findIndex(url) == -1)
+ {
+ bool ok;
+ QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ if (!ok)
+ aliasName = url.fileName();
+ topURLAliases.insert(url.url(), aliasName);
+ newBranch(url);
+ topURLList.append(url);
+ } else {
+ KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url()));
+ }
+}
+
+
+void FilesTreeView::plugCVSMenu()
+{
+#ifdef ENABLE_CVSSERVICE
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("cervisia"), i18n("C&VS"), CVSService::ref()->menu());
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("cervisia"), i18n("C&VS"), CVSService::ref()->menu());
+#endif
+}
+
+void FilesTreeView::slotChangeAlias()
+{
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if ( !curItem ) return;
+
+ if ( curItem->isDir() )
+ {
+ KURL url(currentURL().url());
+ url.adjustPath(+1);
+ if ( curItem == curItem->branch()->root() ) //it is not a top folder
+ {
+ if (topURLList.findIndex(url) != -1)
+ {
+ bool ok;
+ QString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
+ if (ok)
+ {
+ topURLAliases.replace(url.url(), aliasName);
+ removeBranch(curItem->branch());
+ newBranch(url);
+ }
+ } else {
+ KMessageBox::information(this, i18n("<qt><b>%1</b> is already a toplevel entry.</qt>").arg(url.url()));
+ }
+ }
+ }
+}
+
+
+#include "filestreeview.moc"
diff --git a/quanta/treeviews/filestreeview.h b/quanta/treeviews/filestreeview.h
new file mode 100644
index 00000000..a77ba3de
--- /dev/null
+++ b/quanta/treeviews/filestreeview.h
@@ -0,0 +1,81 @@
+/***************************************************************************
+ filestreeview.h - description
+ -------------------
+ begin : Thu Jun 1 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <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 FILESTREEVIEW_H
+#define FILESTREEVIEW_H
+
+//qt includes
+#include <qmap.h>
+
+// quanta includes
+#include "basetreeview.h"
+
+//foward declarations
+class QListViewItem;
+class QPoint;
+class KPopupMenu;
+class KURL;
+
+
+class FilesTreeView : public BaseTreeView {
+ Q_OBJECT
+
+public:
+ FilesTreeView(KConfig *config, QWidget *parent, const char *name = 0L);
+ virtual ~FilesTreeView();
+ KURL::List topURLList;
+ QMap<QString, QString> topURLAliases;
+ void plugCVSMenu();
+
+protected slots:
+ /**
+ opens dialog to choose a url for a new branch
+ */
+ void slotNewTopFolder();
+
+ virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ /**
+ creates a new branch from the current url
+ */
+ void slotAddToTop();
+ /**
+ Changes the alias (alternative name) for a top folder
+ */
+ void slotChangeAlias();
+
+protected:
+ virtual KFileTreeBranch* newBranch(const KURL& url);
+
+ KPopupMenu *m_fileMenu;
+ KPopupMenu *m_folderMenu;
+ KPopupMenu *m_emptyMenu;
+ int m_menuClose; ///< remembers the menu entry
+ int m_menuPasteFolder; ///< remembers the menu entry
+ int m_insertFileInProject;
+ int m_insertFolderInProject;
+ // config
+ KConfig *m_config;
+
+private:
+ int m_menuTop;
+ int m_menuChangeAlias;
+ int m_menuFolderRename;
+ int m_menuDel;
+ int m_reloadMenuId;
+};
+
+#endif
diff --git a/quanta/treeviews/newtemplatedirdlg.cpp b/quanta/treeviews/newtemplatedirdlg.cpp
new file mode 100644
index 00000000..bdf6d87f
--- /dev/null
+++ b/quanta/treeviews/newtemplatedirdlg.cpp
@@ -0,0 +1,29 @@
+/***************************************************************************
+ newtemplatedirdlg.cpp - description
+ -------------------
+ begin : Fri Jun 21 2002
+ copyright : (C) 2002 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <qpushbutton.h>
+#include "newtemplatedirdlg.h"
+#include "newtemplatedirdlg.moc"
+
+NewTemplateDirDlg::NewTemplateDirDlg(QWidget *parent, const char *name ) : TemplateDirForm(parent,name)
+{
+ setCaption(name);
+ connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) );
+ connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) );
+}
+
+NewTemplateDirDlg::~NewTemplateDirDlg()
+{
+}
diff --git a/quanta/treeviews/newtemplatedirdlg.h b/quanta/treeviews/newtemplatedirdlg.h
new file mode 100644
index 00000000..daa6864a
--- /dev/null
+++ b/quanta/treeviews/newtemplatedirdlg.h
@@ -0,0 +1,33 @@
+/***************************************************************************
+ newtemplatedirdlg.h - description
+ -------------------
+ begin : Fri Jun 21 2002
+ copyright : (C) 2002 by Andras Mantia <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 NEWTEMPLATEDIRDLG_H
+#define NEWTEMPLATEDIRDLG_H
+
+#include <qwidget.h>
+#include <templatedirform.h>
+
+/**
+ *@author Andras Mantia
+ */
+
+class NewTemplateDirDlg : public TemplateDirForm {
+ Q_OBJECT
+public:
+ NewTemplateDirDlg(QWidget *parent=0, const char *name=0);
+ ~NewTemplateDirDlg();
+};
+
+#endif
diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp
new file mode 100644
index 00000000..dc8744aa
--- /dev/null
+++ b/quanta/treeviews/projecttreeview.cpp
@@ -0,0 +1,674 @@
+/***************************************************************************
+ projecttreeview.cpp - description
+ -------------------
+ begin : Tue Mar 14 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2001-2004 Andras Mantia <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 <qpainter.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qdict.h>
+
+// KDE includes
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kinputdialog.h>
+#include <kmessagebox.h>
+#include <kdebug.h>
+#include <kpopupmenu.h>
+#include <kpropertiesdialog.h>
+#include <ktempfile.h>
+#include <kapplication.h>
+#include <kstringhandler.h>
+
+// app includes
+#include "projecttreeview.h"
+#include "projectlist.h"
+#include "projecturl.h"
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+#include "resource.h"
+#include "fileinfodlg.h"
+#ifdef ENABLE_CVSSERVICE
+#include "cvsservice.h"
+#endif
+
+//ProjectTreeViewItem implementation
+ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch )
+: BaseTreeViewItem( parent, item, brnch)
+{
+}
+
+void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+ int column, int width, int align)
+{
+ QFont f = p->font();
+ if (ProjectTreeView::ref()->isDocumentFolder(url()))
+ {
+ f.setItalic(true);
+ if (text(1).isEmpty())
+ setText(1, i18n("Document Base Folder"));
+ } else
+ {
+ if (text(1) == i18n("Document Base Folder"))
+ setText(1, "");
+ }
+ p->setFont(f);
+ BaseTreeViewItem::paintCell( p, cg, column, width, align );
+}
+
+//ProjectTreeBranch implementation
+ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden,
+ KFileTreeViewItem *branchRoot)
+ : BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
+{
+}
+
+KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *parent,
+ KFileItem *fileItem )
+{
+ BaseTreeViewItem *tvi = 0;
+ if( parent && fileItem )
+ {
+ tvi = new ProjectTreeViewItem( parent, fileItem, this );
+ if (tvi)
+ {
+ // we assume there are childs
+ tvi->setExpandable(tvi->isDir());
+ if (urlList) {
+ tvi->setVisible(urlList->contains(fileItem->url())); // only listelements
+ }
+ }
+ }
+ else
+ kdDebug(24000) << "ProjectTreeBranch::createTreeViewItem: Have no parent" << endl;
+ return tvi;
+}
+
+//ProjectTreeView implementation
+ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
+ : BaseTreeView(parent,name), m_projectFiles(0)
+{
+ //setSelectionModeExt(KListView::Extended);
+ setRootIsDecorated(false);
+ addColumn(i18n("Project Files"), -1);
+ addColumn(i18n("Description"), -1);
+ setDragEnabled(true);
+ setAcceptDrops(true);
+ setItemsRenameable(true);
+ setRenameable(0, false);
+ setRenameable(1, true);
+
+ m_projectBaseURL = KURL();
+ newBranch(m_projectBaseURL); // create an empty project branch
+ m_projectDir->root()->setEnabled(false);
+
+ m_uploadStatusMenu = new KPopupMenu(this);
+ m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, SLOT(slotAlwaysUpload()));
+ m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, SLOT(slotNeverUpload()));
+ m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, SLOT(slotConfirmUpload()));
+ connect(m_uploadStatusMenu, SIGNAL(aboutToShow()), this, SLOT(slotUploadMenuAboutToShow()));
+
+ m_fileMenu = new KPopupMenu(this);
+
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, SLOT(slotOpen()));
+ m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, SLOT(slotLoadToolbar()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, SLOT(slotUploadSingleURL()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, SLOT(slotQuickUploadURL()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+ m_fileMenu->insertItem( i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+
+ KPopupMenu *createNewMenu = new KPopupMenu(this);
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+
+ m_folderMenu = new KPopupMenu(this);
+
+ m_folderMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, SLOT(slotUploadSingleURL()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, SLOT(slotQuickUploadURL()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+ m_folderMenu->insertItem(i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
+ m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertSeparator();
+ m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, SLOT(slotChangeDocumentFolderStatus()));
+ m_folderMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+
+ m_projectMenu = new KPopupMenu(this);
+ m_projectMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
+ m_projectMenu->insertSeparator();
+ m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, SLOT(slotUploadProject()));
+ m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, SLOT(slotRescan()));
+ m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, SLOT(slotOptions()));
+ m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_projectMenu->insertSeparator();
+ m_projectMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
+
+
+ connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
+ this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+
+ connect(this, SIGNAL(open(QListViewItem *)),
+ this, SLOT(slotSelectFile(QListViewItem *)));
+
+ restoreLayout(kapp->config(), className());
+ // the restored size of the first column might be too large for the current content
+ // we set it to 10 and the listview will adjust it to the size of the largest entry
+ setColumnWidth(0, 10);
+}
+
+ProjectTreeView::~ProjectTreeView(){
+}
+
+
+KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
+{
+ QString m_projectNameStr = m_projectName+" ";
+ if (m_projectName)
+ {
+ if (url.protocol() == "file")
+ {
+ m_projectNameStr += i18n("[local disk]");
+ } else
+ {
+ m_projectNameStr += "[" + url.protocol() + "://" + url.user() + "@" + url.host() + "]";
+ }
+ m_projectDir = new ProjectTreeBranch( this, url, m_projectNameStr, SmallIcon("ptab"), true);
+ m_projectDir->root()->setText(1, url.prettyURL());
+ setDragEnabled(true);
+ setRootIsDecorated(true);
+ } else {
+ m_projectDir = new ProjectTreeBranch( this, url, i18n("No Project"), SmallIcon("ptab"), true);
+ m_projectDir->root()->setText(1, "");
+ setDragEnabled(false);
+ setRootIsDecorated(false);
+ }
+
+ connect(m_projectDir, SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ addBranch(m_projectDir);
+ m_projectDir->urlList = m_projectFiles; // set list for filter
+ if (m_projectName)
+ m_projectDir->populate(m_projectDir->rootUrl(), m_projectDir->root());
+ else
+ m_projectDir->root()->setEnabled(false);
+
+ return m_projectDir;
+}
+
+
+/** slot for context menu */
+void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const QPoint& point)
+{
+ Q_UNUSED(listView);
+ KURL url = currentURL();
+#ifdef ENABLE_CVSSERVICE
+ CVSService::ref()->setRepository(m_projectBaseURL.path());
+ if (url.isLocalFile())
+ {
+ QString path = url.path();
+ if (path == m_projectBaseURL.path())
+ path += "/.";
+ CVSService::ref()->setCurrentFile(path);
+ }
+ else
+ CVSService::ref()->setCurrentFile("");
+#endif
+ ProjectTreeViewItem *curItem = static_cast<ProjectTreeViewItem *>(currentKFileTreeViewItem());
+ if (item && curItem)
+ {
+ setSelected(item, true);
+ if (curItem == curItem->branch()->root())
+ {
+ m_projectMenu->popup(point);
+ } else
+ {
+ if (!curItem->isDir())
+ {
+ if (url.fileName().endsWith(toolbarExtension))
+ {
+ m_fileMenu->setItemVisible(m_openInQuantaId, true);
+ } else
+ {
+ m_fileMenu->setItemVisible(m_openInQuantaId, false);
+ }
+ m_fileMenu->setItemVisible(m_menuClose, isFileOpen(url));
+ insertOpenWithMenu(m_fileMenu, 1);
+ m_fileMenu->popup(point);
+ } else
+ {
+ if (m_documentFolderList.contains(url))
+ m_folderMenu->setItemChecked(m_setDocumentRootId, true);
+ else
+ m_folderMenu->setItemChecked(m_setDocumentRootId, false);
+ m_folderMenu->popup(point);
+ }
+ }
+ } else
+ if (!m_projectName.isNull())
+ {
+ setSelected(firstChild(), true);
+ m_projectMenu->popup(point);
+ }
+}
+
+
+/** Sets the project template directory */
+void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &templateURL)
+{
+ BaseTreeView::slotNewProjectLoaded(name, baseURL, templateURL); // set m_projectName and m_projectBaseURL
+ if (!m_projectName.isNull())
+ {
+ QString projectNameStr = m_projectName+" ";
+ if (m_projectBaseURL.protocol() == "file")
+ {
+ projectNameStr += i18n("[local disk]");
+ } else
+ {
+ projectNameStr += "["+m_projectBaseURL.protocol()+"://"+m_projectBaseURL.user()+"@"+m_projectBaseURL.host()+"]";
+ }
+ m_projectDir->root()->setText(0, projectNameStr);
+ m_projectDir->root()->setText(1, m_projectBaseURL.prettyURL());
+ setDragEnabled(true);
+ }
+ else
+ {
+ m_projectDir->root()->setText(0, i18n("No Project"));
+ m_projectDir->root()->setText(1, "");
+ setDragEnabled(false);
+ }
+ m_documentFolderList.clear();
+ m_documentFolderList.append(m_projectBaseURL);
+}
+
+void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+{
+ m_projectFiles = fileList;
+ m_documentFolderList.clear();
+ m_documentFolderList.append(m_projectBaseURL);
+
+ KURL url;
+ ProjectList::Iterator it( *m_projectFiles );
+ for ( ; it.current(); ++it) {
+ if (it.current()->documentFolder) {
+ url = *(it.current());
+ url.adjustPath(-1);
+ m_documentFolderList.append( url );
+ }
+ }
+
+ if (buildNewTree)
+ {
+ if (m_projectDir)
+ {
+ removeBranch(m_projectDir);
+ m_projectDir = 0L;
+ }
+ BaseTreeBranch *btb = dynamic_cast<BaseTreeBranch *>(newBranch(m_projectBaseURL));
+ if (btb && folderToOpen.count() > 0) {
+ btb->folderToOpen = folderToOpen;
+ btb->reopenFolder();
+ btb->updateOpenFolder();
+ }
+ } else
+ {
+ if (m_projectDir){
+ m_projectDir->urlList = m_projectFiles; // set list for filter
+ KFileTreeViewItem *item;
+ KFileTreeViewItem *rootItem = m_projectDir->root();
+ KURL url;
+ QListViewItemIterator iter(this);
+ for ( ; iter.current(); ++iter )
+ {
+ item = dynamic_cast <KFileTreeViewItem*> (iter.current());
+ item->setVisible(m_projectFiles->contains(item->url()) || item == rootItem);
+ }
+ rootItem->setEnabled(true);
+ }
+ }
+}
+
+void ProjectTreeView::slotOpen()
+{
+ BaseTreeView::slotSelectFile(currentItem());
+}
+
+void ProjectTreeView::slotLoadToolbar()
+{
+ if (currentItem())
+ {
+ KURL urlToOpen = currentURL();
+ if (urlToOpen.fileName().endsWith(toolbarExtension))
+ {
+ emit loadToolbarFile(urlToOpen);
+ }
+ }
+}
+
+void ProjectTreeView::slotCreateFolder()
+{
+ bool ok;
+ QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ if (ok)
+ {
+ KURL url = currentURL();
+ if (currentKFileTreeViewItem()->isDir())
+ url.setPath(url.path() + "/" + folderName + "/");
+ else
+ url.setPath(url.directory() + "/" + folderName +"/");
+ if (QExtFileInfo::createDir(url, this))
+ {
+ emit insertToProject(url);
+ }
+ }
+}
+
+void ProjectTreeView::slotCreateFile()
+{
+ bool ok;
+ QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ if (ok)
+ {
+ KURL url = currentURL();
+ if (currentKFileTreeViewItem()->isDir())
+ url.setPath(url.path() + "/" + fileName);
+ else
+ url.setPath(url.directory() + "/" + fileName);
+ if (QExtFileInfo::exists(url, false, this))
+ {
+ KMessageBox::error(this, i18n("<qt>Cannot create file, because a file named <b>%1</b> already exists.</qt>").arg(fileName), i18n("Error Creating File"));
+ return;
+ }
+ KTempFile *tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ tempFile->close();
+ if (QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), url))
+ {
+ emit insertToProject(url);
+ emit openFile(url);
+ }
+ delete tempFile;
+ }
+}
+
+
+void ProjectTreeView::slotRemoveFromProject(int askForRemove)
+{
+ QListViewItem *item = currentItem();
+ if (item)
+ {
+ KURL url = currentURL();
+ QString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
+ nice = KStringHandler::lsqueeze(nice, 60);
+ if ( !askForRemove ||
+ KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue )
+ {
+ if ( currentKFileTreeViewItem()->isDir() ) url.adjustPath(+1);
+ emit removeFromProject(url);
+ }
+ }
+}
+
+
+void ProjectTreeView::slotUploadSingleURL()
+{
+ if (currentItem())
+ {
+ KURL url = currentURL();
+ if ( currentKFileTreeViewItem()->isDir() ) url.adjustPath(+1);
+ emit uploadSingleURL(url, "", false, false);
+ }
+}
+
+void ProjectTreeView::slotQuickUploadURL()
+{
+ if (currentItem())
+ {
+ KURL url = currentURL();
+ if ( currentKFileTreeViewItem()->isDir() ) url.adjustPath(+1);
+ emit uploadSingleURL(url, "", true, false);
+ }
+}
+
+void ProjectTreeView::slotRescan()
+{
+ emit rescanProjectDir();
+ if (!m_projectBaseURL.isLocalFile())
+ slotReload();
+}
+
+/** Bring up the project options dialog */
+void ProjectTreeView::slotOptions()
+{
+ emit showProjectOptions();
+}
+
+/** No descriptions */
+void ProjectTreeView::slotUploadProject()
+{
+ emit uploadProject();
+}
+
+void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
+{
+ BaseTreeView::slotPopulateFinished(item);
+ // populate descriptions
+ QString desc;
+ KFileTreeViewItem* file_item;
+ ProjectList::Iterator it( *m_projectFiles );
+ for ( ; it.current(); ++it)
+ {
+ desc = it.current()->fileDesc;
+ if (! desc.isEmpty())
+ {
+ file_item = m_projectDir->findTVIByURL( *(it.current()) );
+ if (file_item)
+ file_item->setText(1, desc);
+ }
+ }
+
+ if ( m_projectFiles->isEmpty() )
+ m_projectDir->root()->setExpandable( false );
+ /* FIXME:
+ * The below code can cause infinite recursion, possibly over slow links.
+ * setOpen call KFileTreeBranch::openURL, that calls KDirListerCache::listDir,
+ * that calls KDirListerCache::stop, that emit the signal cancelled, that
+ * is connected to KFileTreeBranch::slotCanceled, that emit populateFinished
+ * and we are back in this same function with item being the same and
+ * everything starts over again. */
+// else
+// m_projectDir->setOpen( true );
+
+}
+
+
+void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+{
+ if (item) {
+ item->setText(1, newDesc);
+ KURL url = item->url();
+ if (item->isDir())
+ url.adjustPath(1);
+ emit changeFileDescription(url, newDesc);
+ }
+}
+
+void ProjectTreeView::slotAlwaysUpload()
+{
+ KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
+ if (! kftvi)
+ return;
+ KURL url = currentURL();
+ if (kftvi->isDir())
+ url.adjustPath(+1);
+ if (m_projectFiles->contains(url) || url == m_projectBaseURL)
+ {
+ emit changeUploadStatus(url, ProjectURL::AlwaysUpload);
+ }
+}
+
+void ProjectTreeView::slotNeverUpload()
+{
+ KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
+ if (! kftvi)
+ return;
+ KURL url = currentURL();
+ if (kftvi->isDir())
+ url.adjustPath(+1);
+ if (m_projectFiles->contains(url) || url == m_projectBaseURL)
+ {
+ emit changeUploadStatus(url, ProjectURL::NeverUpload);
+ }
+}
+
+void ProjectTreeView::slotConfirmUpload()
+{
+ KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
+ if (! kftvi)
+ return;
+ KURL url = currentURL();
+ if (kftvi->isDir())
+ url.adjustPath(+1);
+ if (m_projectFiles->contains(url) || url == m_projectBaseURL)
+ {
+ emit changeUploadStatus(url, ProjectURL::ConfirmUpload);
+ }
+}
+
+void ProjectTreeView::slotUploadMenuAboutToShow()
+{
+ m_uploadStatusMenu->setItemChecked(m_alwaysUploadId, false);
+ m_uploadStatusMenu->setItemChecked(m_neverUploadId, false);
+ m_uploadStatusMenu->setItemChecked(m_confirmUploadId, false);
+ KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
+ if (! kftvi)
+ return;
+ KURL url = currentURL();
+ if (kftvi->isDir())
+ url.adjustPath(+1);
+ ProjectURL *proUrl = m_projectFiles->find( url );
+ if (proUrl)
+ {
+ switch (proUrl->uploadStatus)
+ {
+ case ProjectURL::NeverUpload:
+ {
+ m_uploadStatusMenu->setItemChecked(m_neverUploadId, true);
+ break;
+ }
+ case ProjectURL::ConfirmUpload:
+ {
+ m_uploadStatusMenu->setItemChecked(m_confirmUploadId, true);
+ break;
+ }
+ case ProjectURL::AlwaysUpload:
+ default:
+ {
+ m_uploadStatusMenu->setItemChecked(m_alwaysUploadId, true);
+ break;
+ }
+ }
+ }
+}
+
+void ProjectTreeView::slotChangeDocumentFolderStatus()
+{
+ KFileTreeViewItem *kftvi = currentKFileTreeViewItem();
+ if (! kftvi)
+ return;
+ KURL url = currentURL();
+ if (kftvi->isDir())
+ url.adjustPath(+1);
+ if (!m_documentFolderList.contains(currentURL()))
+ {
+ m_documentFolderList.append(currentURL());
+ emit changeUploadStatus(url, ProjectURL::AlwaysUpload);
+ emit changeDocumentFolderStatus(url, true);
+ } else
+ {
+ m_documentFolderList.remove(currentURL());
+ emit changeUploadStatus(url, false);
+ }
+ currentItem()->repaint();
+}
+
+bool ProjectTreeView::isDocumentFolder(const KURL &url)
+{
+ return (m_documentFolderList.contains(url) > 0);
+}
+
+
+void ProjectTreeView::slotRenameItem(QListViewItem* kftvi, const QString& newText, int col)
+{
+ if (!kftvi)
+ return;
+
+ if (col == 1) {
+ itemDescChanged(dynamic_cast <KFileTreeViewItem*> (kftvi), newText);
+ } else {
+ BaseTreeView::slotRenameItem(kftvi, newText, col);
+ }
+}
+
+
+FileInfoDlg* ProjectTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
+{
+ FileInfoDlg* dlg = BaseTreeView::addFileInfoPage(propDlg);
+ if (dlg) {
+ dlg->fileDescLbl->show();
+ dlg->fileDesc->show();
+ }
+ return dlg;
+}
+
+
+void ProjectTreeView::plugCVSMenu()
+{
+#ifdef ENABLE_CVSSERVICE
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("cervisia"), i18n("C&VS"), CVSService::ref()->menu());
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("cervisia"), i18n("C&VS"), CVSService::ref()->menu());
+ m_projectMenu->insertSeparator();
+ m_projectMenu->insertItem(SmallIcon("cervisia"), i18n("C&VS"), CVSService::ref()->menu());
+#endif
+
+}
+
+
+void ProjectTreeView::slotViewActivated(const KURL& url)
+{
+ if (! m_projectDir) return;
+
+ KFileTreeViewItem* item = m_projectDir->findTVIByURL(url);
+ if (item){
+ ensureItemVisible(item);
+ setSelected(item, true);
+ }
+}
+
+#include "projecttreeview.moc"
diff --git a/quanta/treeviews/projecttreeview.h b/quanta/treeviews/projecttreeview.h
new file mode 100644
index 00000000..3bd7548d
--- /dev/null
+++ b/quanta/treeviews/projecttreeview.h
@@ -0,0 +1,176 @@
+/***************************************************************************
+ projecttreeview.h - description
+ -------------------
+ begin : Tue Mar 14 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2001-2004 Andras Mantia <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 PROJECTTREEVIEW_H
+#define PROJECTTREEVIEW_H
+
+//own includes
+#include "basetreeview.h"
+//#include "projecturl.h"
+
+class KIO::Job;
+class FileInfoDlg;
+class ProjectList;
+
+class ProjectTreeViewItem : public BaseTreeViewItem {
+
+public:
+ ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
+ /** makes document root italics */
+ void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+};
+
+class ProjectTreeBranch : public BaseTreeBranch {
+
+public:
+ ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
+
+ /** check for CVS and visible*/
+ virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *parent,
+ KFileItem *fileItem );
+
+ /** only files in list will be shown */
+ ProjectList *urlList;
+};
+
+
+
+class ProjectTreeView : public BaseTreeView {
+ Q_OBJECT
+
+public:
+ /**
+ * since this class is a singleton you must use this function to access it
+ *
+ * the parameters are only used at the first call to create the class
+ *
+ */
+ static ProjectTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ {
+ static ProjectTreeView *m_ref;
+ if (!m_ref) m_ref = new ProjectTreeView(parent, name);
+ return m_ref;
+ }
+
+ virtual ~ProjectTreeView();
+ bool isDocumentFolder(const KURL &url);
+ ProjectTreeBranch* rootBranch() {return m_projectDir;}
+ void plugCVSMenu();
+
+public slots: // Public slots
+ void slotOpen();
+ void slotLoadToolbar();
+ void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const QStringList &folderToOpen);
+ /** Sets new project information */
+ void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotPopulateFinished(KFileTreeViewItem* );
+ /** makes the url visible in the tree */
+ void slotViewActivated(const KURL&);
+ /** fills the list with the url's of the open folder */
+ void slotGetTreeStatus(QStringList *folderToOpen)
+ {
+ m_projectDir->addOpenFolder(folderToOpen);
+ }
+
+
+
+protected slots:
+ void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ virtual void slotCreateFolder();
+ virtual void slotCreateFile();
+
+signals: // Signals
+ void removeFromProject( const KURL& );
+ /** No descriptions */
+ void rescanProjectDir();
+ /** No descriptions */
+ void showProjectOptions();
+ void insertToProject(const KURL&);
+ void uploadSingleURL(const KURL&, const QString&, bool, bool);
+ void loadToolbarFile(const KURL&);
+ void uploadProject();
+ void changeFileDescription(const KURL& url, const QString& desc);
+ void changeUploadStatus(const KURL& url, int status);
+ void changeDocumentFolderStatus(const KURL& url, bool status);
+ void reloadProject();
+
+private:
+ /** The constructor is privat because we use singleton patter.
+ * If you need the class use ProjectTreeView::ref() for
+ * construction and reference
+ */
+ ProjectTreeView(QWidget *parent, const char *name);
+
+ ProjectTreeBranch *m_projectDir;
+ KPopupMenu *m_fileMenu;
+ KPopupMenu *m_folderMenu;
+ KPopupMenu *m_projectMenu;
+ KURL m_documentRootURL;
+ ProjectTreeViewItem *m_documentRootItem;
+ KURL::List m_documentFolderList;
+ KPopupMenu *m_uploadStatusMenu;
+ ProjectList *m_projectFiles;
+ int m_menuClose; ///< remembers the menu entry
+
+ int m_openInQuantaId; ///< remembers the menu entry
+ int m_setDocumentRootId;
+ int m_alwaysUploadId;
+ int m_neverUploadId;
+ int m_confirmUploadId;
+
+protected:
+ /**
+ creates a branch and adds this branch to the treeview
+ @param url the root of the branch
+ @return the new branch
+ */
+ virtual KFileTreeBranch* newBranch(const KURL& url);
+ /**
+ called when the description of an item was changed,
+ @param item the treeview item
+ @param newDesc the new description of item
+ */
+ void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc);
+ /**
+ adds the Quanta fileinfopage to the properties dialog
+ overwritten to enable the file description
+ @param propDlg the dialog where to add the page
+ @return pointer to to just added page
+ */
+ virtual FileInfoDlg* addFileInfoPage(KPropertiesDialog *propDlg);
+
+private slots: // Private slots
+ /** No descriptions */
+ void slotUploadProject();
+ /** Bring up the project options dialog */
+ void slotOptions();
+ /** No descriptions */
+ void slotRescan();
+ void slotRemoveFromProject(int askForRemove = 1);
+ void slotUploadSingleURL();
+ void slotQuickUploadURL();
+ void slotAlwaysUpload();
+ void slotNeverUpload();
+ void slotConfirmUpload();
+ void slotUploadMenuAboutToShow();
+ void slotChangeDocumentFolderStatus();
+};
+
+#endif
diff --git a/quanta/treeviews/quantapropertiespage.ui b/quanta/treeviews/quantapropertiespage.ui
new file mode 100644
index 00000000..5c7a9096
--- /dev/null
+++ b/quanta/treeviews/quantapropertiespage.ui
@@ -0,0 +1,247 @@
+<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
+<class>QuantaPropertiesPage</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+</comment>
+<author>(C) 2002 Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>QuantaPropertiesPage</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>343</width>
+ <height>443</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>300</width>
+ <height>400</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>Quanta Properties</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QWidgetStack" row="0" column="0">
+ <property name="name">
+ <cstring>typeStack</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>0</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>parentAttr</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Inherit type from parent (nothing)</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Type:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>typesCombo</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="3">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>92</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="KComboBox" row="0" column="2">
+ <property name="name">
+ <cstring>typesCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="4">
+ <property name="name">
+ <cstring>prePostGroup</cstring>
+ </property>
+ <property name="title">
+ <string></string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>usePrePostText</cstring>
+ </property>
+ <property name="text">
+ <string>Use &amp;pre/post text</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel1_2</cstring>
+ </property>
+ <property name="text">
+ <string>Pre-text:</string>
+ </property>
+ </widget>
+ <widget class="QTextEdit" row="2" column="0">
+ <property name="name">
+ <cstring>preTextEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Post-text:</string>
+ </property>
+ </widget>
+ <widget class="QTextEdit" row="4" column="0">
+ <property name="name">
+ <cstring>postTextEdit</cstring>
+ </property>
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <spacer row="0" column="1">
+ <property name="name">
+ <cstring>Spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>93</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>WStackPage</cstring>
+ </property>
+ <attribute name="id">
+ <number>1</number>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>filteringLabel</cstring>
+ </property>
+ <property name="text">
+ <string>Filtering &amp;action:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>actionCombo</cstring>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="0" column="1">
+ <property name="name">
+ <cstring>actionCombo</cstring>
+ </property>
+ </widget>
+ <spacer row="1" column="1">
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>parentAttr</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>typesCombo</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>usePrePostText</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>preTextEdit</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+ <connection>
+ <sender>usePrePostText</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>postTextEdit</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>typesCombo</tabstop>
+ <tabstop>parentAttr</tabstop>
+</tabstops>
+<layoutdefaults spacing="6" margin="11"/>
+</UI>
diff --git a/quanta/treeviews/scripttreeview.cpp b/quanta/treeviews/scripttreeview.cpp
new file mode 100644
index 00000000..191be51c
--- /dev/null
+++ b/quanta/treeviews/scripttreeview.cpp
@@ -0,0 +1,425 @@
+/***************************************************************************
+ scripttreeview.cpp - description
+ -------------------
+ begin : Thu Sep 16 2003
+ copyright : (C) 2003-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+//kde includes
+#include <kapplication.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kprocess.h>
+#include <krun.h>
+#include <kstandarddirs.h>
+#include <ktar.h>
+#include <ktempdir.h>
+#include <ktempfile.h>
+#include <kurl.h>
+#include <kdebug.h>
+
+//qt includes
+#include <qdir.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qregexp.h>
+#include <qstringlist.h>
+#include <qtextedit.h>
+
+//other includes
+#include <libxml/xmlmemory.h>
+#include <libxml/debugXML.h>
+#include <libxml/HTMLtree.h>
+#include <libxml/xmlIO.h>
+#include <libxml/DOCBparser.h>
+#include <libxml/xinclude.h>
+#include <libxml/catalog.h>
+#include <libxslt/xslt.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+
+//app includes
+#include "scripttreeview.h"
+#include "resource.h"
+#include "quantacommon.h"
+#include "tagmaildlg.h"
+
+extern int xmlLoadExtDtdDefaultValue;
+
+ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
+ : BaseTreeView(parent,name)
+{
+ setSaveOpenFolder(true);
+ addColumn(i18n("Scripts"), -1);
+ addColumn("");
+
+ KURL url;
+ url.setPath(qConfig.globalDataDir + resourceDir + "scripts/");
+
+ BaseTreeBranch *m_globalDir;
+ m_globalDir = new BaseTreeBranch(this, url, i18n("Global Scripts"), SmallIcon("run"), true);
+ addBranch(m_globalDir);
+
+ url.setPath(locateLocal("data", resourceDir + "scripts/"));
+
+ BaseTreeBranch *m_localDir;
+ m_localDir = new BaseTreeBranch(this, url, i18n("Local Scripts"), SmallIcon("run"), true);
+ addBranch(m_localDir);
+
+ // here you define which files should not be visible for the users
+ const QString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
+ m_globalDir->excludeFilterRx.setPattern(excludeString);
+ m_localDir->excludeFilterRx.setPattern(excludeString);
+
+ m_fileMenu = new KPopupMenu(this);
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, SLOT(slotRun()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(i18n("&Edit Script"), this, SLOT(slotEditScript()));
+ m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, SLOT(slotEditInQuanta()));
+ m_fileMenu->insertItem(i18n("Edi&t Description"), this, SLOT(slotEditDescription()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, SLOT(slotAssignAction()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, SLOT(slotSendScriptInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, SLOT(slotUploadScript()));
+
+ m_folderMenu = new KPopupMenu(this);
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, SIGNAL(downloadScript()));
+
+
+ connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
+ this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+
+ restoreLayout( kapp->config(), className() );
+ // the restored size of the first column might be too large for the current content
+ // we set it to 10 and the listview will adjust it to the size of the largest entry
+ setColumnWidth(0, 10);
+}
+
+ScriptTreeView::~ScriptTreeView()
+{
+}
+
+void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+{
+ if (!item)
+ {
+ m_folderMenu->setItemVisible(m_downloadMenuId, true);
+ m_folderMenu->popup(point);
+ return;
+ }
+ setSelected(item, true);
+
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if (!curItem->isDir())
+ {
+ m_fileMenu->popup(point);
+ } else
+ {
+ if (curItem == curItem->branch()->root())
+ {
+ m_folderMenu->setItemVisible(m_downloadMenuId, true);
+ } else
+ {
+ m_folderMenu->setItemVisible(m_downloadMenuId, false);
+ }
+ m_folderMenu->popup(point);
+ }
+}
+
+void ScriptTreeView::slotSelectFile(QListViewItem *item)
+{
+ if (item) {
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ KURL urlToOpen = infoFile(currentURL(), true);
+ emit openFileInPreview(urlToOpen);
+ }
+ }
+}
+
+void ScriptTreeView::slotEditDescription()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ KURL urlToOpen = infoFile(currentURL());
+ emit showPreviewWidget(false);
+ emit openFile(urlToOpen);
+ }
+}
+
+void ScriptTreeView::slotEditScript()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ emit showPreviewWidget(false);
+ KURL urlToOpen = currentURL();
+ KURL infoUrl = infoFile(urlToOpen);
+ QString editApp = infoOptionValue(infoUrl, "editor");
+ if (editApp.isEmpty())
+ emit openFile(urlToOpen);
+ else
+ {
+ KProcess *proc = new KProcess();
+ *proc << editApp << urlToOpen.path();
+ proc->start(KProcess::DontCare);
+ }
+ }
+}
+
+
+void ScriptTreeView::slotRun()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ KURL urlToOpen = currentURL();
+ KURL infoUrl = infoFile(urlToOpen);
+ QString execApp = infoOptionValue(infoUrl, "interpreter");
+ if (execApp.isEmpty())
+ {
+ KURL::List list;
+ list.append(urlToOpen);
+ KRun::displayOpenWithDialog(list);
+ }
+ else
+ {
+ KProcess *proc = new KProcess();
+ QStringList argsList = QStringList::split(' ', execApp);
+ *proc << argsList;
+ *proc << urlToOpen.path();
+ proc->start(KProcess::DontCare);
+ }
+ }
+}
+
+
+void ScriptTreeView::slotEditInQuanta()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ KURL urlToOpen = currentURL();
+ emit showPreviewWidget(false);
+ emit openFile(urlToOpen);
+ }
+}
+
+void ScriptTreeView::slotAssignAction()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ KURL url = currentURL();
+ KURL infoURL = infoFile(url);
+ QString execApp = infoOptionValue(infoURL, "interpreter");
+ if (execApp.isEmpty())
+ execApp = "sh";
+ url.setPath(url.path().replace(locateLocal("data", resourceDir + "scripts/"), "%scriptdir/"));
+ url.setPath(url.path().replace(qConfig.globalDataDir + resourceDir + "scripts/", "%scriptdir/"));
+ emit assignActionToScript(url, execApp);
+ }
+}
+
+QString ScriptTreeView::createScriptTarball()
+{
+ KURL url = currentURL();
+ KURL infoURL = infoFile(url);
+
+ KTempDir* tempDir = new KTempDir(tmpDir);
+ tempDir->setAutoDelete(true);
+ tempDirList.append(tempDir);
+ QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+
+ //pack the .tag files and the description.rc into a .tgz file
+ KTar tar(tempFileName, "application/x-gzip");
+ tar.open(IO_WriteOnly);
+
+ KURL::List files;
+ files.append(url);
+ files.append(infoURL);
+ files.append(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.xsl"));
+ for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ {
+ QFile file((*it_f).path());
+ file.open(IO_ReadOnly);
+ QByteArray bArray = file.readAll();
+ tar.writeFile((*it_f).fileName(), "user", "group", bArray.size(), bArray.data());
+ file.close();
+ }
+ tar.close();
+
+ return tempFileName;
+}
+
+void ScriptTreeView::slotSendScriptInMail()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+
+ QStringList attachmentFile;
+ attachmentFile += createScriptTarball();
+
+ TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send script in email"));
+ QString toStr;
+ QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
+ QString titleStr;
+ QString subjectStr;
+
+ mailDlg->TitleLabel->setText(i18n("Content:"));
+/* mailDlg->titleEdit->setFixedHeight(60);
+ mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ if ( mailDlg->exec() )
+ {
+ if ( !mailDlg->lineEmail->text().isEmpty())
+ {
+ toStr = mailDlg->lineEmail->text();
+ subjectStr = (mailDlg->lineSubject->text().isEmpty())?i18n("Quanta Plus Script"):mailDlg->lineSubject->text();
+ if ( !mailDlg->titleEdit->text().isEmpty())
+ message = mailDlg->titleEdit->text();
+ } else
+ {
+ KMessageBox::error(this,i18n("No destination address was specified.\n Sending is aborted."),i18n("Error Sending Email"));
+ delete mailDlg;
+ return;
+ }
+ kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ }
+ delete mailDlg;
+
+ }
+}
+
+void ScriptTreeView::slotUploadScript()
+{
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ QString fileName = createScriptTarball();
+ emit uploadScript(fileName);
+ }
+}
+
+KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
+{
+ KURL returnUrl = url;
+ QString fileName = returnUrl.fileName();
+ //fileName.truncate(fileName.length() - QFileInfo(fileName).extension().length() - 1);
+ fileName.append(".info");
+ returnUrl.setFileName(fileName);
+ if (!QFileInfo(returnUrl.path()).exists())
+ {
+ QFile f(returnUrl.path());
+ if (f.open(IO_WriteOnly))
+ {
+ QTextStream str(&f);
+ str.setEncoding(QTextStream::UnicodeUTF8);
+ str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
+ str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
+ str << "<!DOCTYPE QuantaScriptInfo>" << endl;
+ str << "<INFO>" << endl;
+ str << " <options editor=\"\" interpreter=\"\" />" << endl;
+ str << " <name>" << url.fileName() << "</name>" << endl;
+ str << " <author></author>" << endl;
+ str << " <email></email>" << endl;
+ str << " <website></website>" << endl;
+ str << " <version></version>" << endl;
+ str << " <license></license>" << endl;
+ str << " <about></about>" << endl;
+ str << "</INFO>" << endl;
+ f.close();
+ }
+ }
+
+ if (htmlVersion)
+ {
+ KTempFile *tempInfoFile = 0L;
+ if (!QFileInfo(returnUrl.path()).exists())
+ {
+ tempInfoFile = new KTempFile(tmpDir);
+ tempInfoFile->setAutoDelete(true);
+ returnUrl = KURL::fromPathOrURL(tempInfoFile->name());
+ QTextStream str(tempInfoFile->file());
+ str.setEncoding(QTextStream::UnicodeUTF8);
+ str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
+ str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
+ str << "<!DOCTYPE QuantaScriptInfo>" << endl;
+ str << "<INFO>" << endl;
+ str << " <options editor=\"\" interpreter=\"\" />" << endl;
+ str << " <name>" << url.fileName() << "</name>" << endl;
+ str << " <author></author>" << endl;
+ str << " <email></email>" << endl;
+ str << " <website></website>" << endl;
+ str << " <version></version>" << endl;
+ str << " <license></license>" << endl;
+ str << " <about></about>" << endl;
+ str << "</INFO>" << endl;
+ tempInfoFile->close();
+ tempFileList.append(tempInfoFile);
+ }
+ KTempFile *tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ //apply the stylesheet
+ xsltStylesheetPtr cur = NULL;
+ xmlDocPtr doc, res;
+ xmlSubstituteEntitiesDefault(1);
+ xmlLoadExtDtdDefaultValue = 1;
+ QString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
+ cur = xsltParseStylesheetFile(xmlCharStrndup(xslFile.utf8(), xslFile.utf8().length()));
+ doc = xmlParseFile(returnUrl.path().utf8());
+ res = xsltApplyStylesheet(cur, doc, 0);
+ xsltSaveResultToFile(tempFile->fstream(), res, cur);
+
+ xsltFreeStylesheet(cur);
+ xmlFreeDoc(res);
+ xmlFreeDoc(doc);
+
+ xsltCleanupGlobals();
+ xmlCleanupParser();
+ tempFile->close();
+
+ tempFileList.append(tempFile);
+ return KURL().fromPathOrURL(tempFile->name());
+ } else
+ return returnUrl;
+}
+
+QString ScriptTreeView::infoOptionValue(const KURL& infoURL, const QString& optionName)
+{
+ QString value;
+ QFile f(infoURL.path());
+ if (f.open(IO_ReadOnly))
+ {
+ QDomDocument doc;
+ doc.setContent(&f);
+ f.close();
+ QDomNodeList nodes = doc.elementsByTagName("options");
+ if (nodes.count() > 0)
+ {
+ QDomElement el = nodes.item(0).toElement();
+ value = el.attribute(optionName);
+ }
+ }
+ return value;
+}
+
+
+void ScriptTreeView::slotProperties()
+{
+ KFileTreeViewItem *item = currentKFileTreeViewItem();
+ if (item)
+ slotSelectFile(item);
+}
+
+
+#include "scripttreeview.moc"
diff --git a/quanta/treeviews/scripttreeview.h b/quanta/treeviews/scripttreeview.h
new file mode 100644
index 00000000..7cf2b145
--- /dev/null
+++ b/quanta/treeviews/scripttreeview.h
@@ -0,0 +1,220 @@
+/***************************************************************************
+ scripttreeview.h - description
+ -------------------
+ begin : Thu Sep 16 2003
+ copyright : (C) 2003-2004 by Andras Mantia <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 SCRIPTTREEVIEW_H
+#define SCRIPTTREEVIEW_H
+
+//own includes
+#include "basetreeview.h"
+
+/**
+ * @short treeview with all in Quanta available scripts.
+ *
+ * You can manage and excecute scripts from here.
+ *
+ * There are local and global scripts in different branches.
+ *
+ * For every script should exist an .info file!
+ *
+ * The .info file is an xhtml file with the extention .info and
+ * must be in one folder together with the script.
+ *
+ * Inside of your .info file should be an options tag like this
+ * example:
+ *
+ * <options editor="kmdr-editor" interpreter="kmdr-executor" />
+ *
+ * Here is defined which program is used for editing and executing the script.
+ *
+ * @author Andras Mantia <amantia@kde.org>
+ */
+class ScriptTreeView : public BaseTreeView {
+ Q_OBJECT
+
+
+public:
+ ScriptTreeView(QWidget *parent, const char *name = 0L);
+ ~ScriptTreeView();
+
+protected slots:
+
+ /**
+ * displays the RBM
+ *
+ *
+ * @param listView KListView where the event comes from
+ *
+ * @param item QListViewItem where the mousepointer is hovering
+ *
+ * @param point QPoint coordinates of the event
+ *
+ */
+ virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+
+ /**
+ * slot of QListView
+ *
+ * shows the .info file for the script
+ *
+ * @param item the selected QListViewItem
+ */
+ virtual void slotSelectFile(QListViewItem *item);
+
+ /**
+ * slot for the RBM
+ *
+ * invokes the editor for a script
+ */
+ void slotEditScript();
+
+ /**
+ * slot for the RBM
+ *
+ * opens the script in Quanta
+ *
+ * if @ref infoOptionValue can not find the definition of the editor
+ * in the .info file the script will be opened in Quanta
+ */
+ void slotEditInQuanta();
+
+ /**
+ * slot for the RBM
+ *
+ * opens the .info file of the script in Quanta
+ */
+ void slotEditDescription();
+
+ /**
+ * slot for the RBM
+ *
+ * excecutes the script
+ *
+ * If @ref infoOptionValue can not find the definition of the interpreter
+ * in the .info file you will get a open-with dialog to choose a program.
+ */
+ void slotRun();
+
+ /**
+ * slot for the RBM
+ *
+ * opens an dialog to assign an action to this script
+ */
+ void slotAssignAction();
+
+ /**
+ * slot for the RBM
+ *
+ * packs and sends the script as attachment to an email
+ */
+ void slotSendScriptInMail();
+
+ /**
+ * slot for the RBM
+ *
+ * packs and uploads the script to the main server
+ */
+ void slotUploadScript();
+
+ /**
+ * slot for the RBM
+ *
+ * shows .info file for the script
+ *
+ * calls @ref slotSelectFile
+ */
+ void slotProperties();
+
+protected:
+
+ /**
+ * don't need this in the class but it is abstract in the base class
+ * so I need to implement it
+ */
+ virtual KFileTreeBranch* newBranch(const KURL& url)
+ {
+ Q_UNUSED(url)
+ return 0l;
+ };
+
+signals:
+
+ /**
+ * emited from @ref slotSelectFile to display the .info file
+ */
+ void openFileInPreview(const KURL&);
+
+ /**
+ * emited from @ref slotAssignAction to open the assignment dialog
+ */
+ void assignActionToScript(const KURL&, const QString&);
+
+ /**
+ * emited to make the script describtion visible
+ */
+ void showPreviewWidget(bool);
+
+ /**
+ * emitted to request downloading of a script from the main server
+ */
+ void downloadScript();
+
+ /**
+ * request to upload the @ref fileName script tarball
+ */
+ void uploadScript(const QString& fileName);
+
+private:
+ /**
+ * make the default constructor private to force the use of the other one
+ */
+ ScriptTreeView() { };
+
+ /**
+ * creates the URL of the .info file
+ *
+ * @param url URL of the script file
+ * @param htmlVersion if true returns the HTML version of the file
+ *
+ * @return URL of the matching .info file (no check is done if the file exists)
+ */
+ KURL infoFile(const KURL& url, bool htmlVersion = false);
+
+ /**
+ * query options from the .info file
+ *
+ * inside of your .info file only the first options tag is located
+ *
+ * @param infoURL URL of the .info file
+ *
+ * @param optionName name of the option you want to query
+ *
+ * @return the value of the option
+ */
+ QString infoOptionValue(const KURL& infoURL, const QString& optionName);
+
+ /** Create a script tarball which can be uploaded or sent in email. Returns
+ * the name of the created file or QString::null if creation has failed.
+ */
+ QString createScriptTarball();
+
+ /**
+ * remember the menu for manipulation
+ */
+ KPopupMenu *m_fileMenu;
+ KPopupMenu *m_folderMenu;
+
+ int m_downloadMenuId;
+};
+
+#endif
diff --git a/quanta/treeviews/servertreeview.cpp b/quanta/treeviews/servertreeview.cpp
new file mode 100644
index 00000000..024e31d5
--- /dev/null
+++ b/quanta/treeviews/servertreeview.cpp
@@ -0,0 +1,195 @@
+/***************************************************************************
+ filestreeview.cpp - description
+ -------------------
+ begin : Thu Jun 1 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <amantoa@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 <qpainter.h>
+
+// KDE includes
+#include <kdebug.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kopenwith.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <kfiledialog.h>
+#include <kprogress.h>
+#include <kurl.h>
+
+// app includes
+#include "servertreeview.h"
+#include "resource.h"
+#include "project.h"
+#include "qextfileinfo.h"
+
+
+ServerTreeViewItem::ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch )
+: BaseTreeViewItem( parent, item, brnch)
+{
+}
+
+void ServerTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+ int column, int width, int align)
+{
+ QColorGroup _cg( cg );
+ KURL baseURL = Project::ref()->projectBaseURL();
+ KURL relURL = baseURL;
+ relURL.setPath(QExtFileInfo::toRelative(url(), branch()->url()).path());
+ KURL url = QExtFileInfo::toAbsolute(relURL, baseURL);
+ if ( !Project::ref()->contains(url) )
+ {
+ QFont f = p->font();
+ f.setItalic(true);
+ p->setFont(f);
+ int h, s, v;
+ p->pen().color().getHsv(&h, &s, &v);
+ v = (v < 155 ? v + 100 : 255);
+ _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ };
+ BaseTreeViewItem::paintCell( p, _cg, column, width, align );
+}
+
+//ServerTreeBranch implementation
+ServerTreeBranch::ServerTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden, KFileTreeViewItem *branchRoot)
+ : BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
+{
+}
+
+KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem )
+{
+ BaseTreeViewItem *tvi = 0;
+ if( parent && fileItem )
+ {
+ tvi = new ServerTreeViewItem( parent, fileItem, this );
+ }
+ else
+ kdDebug(24000) << "ServerTreeBranch::createTreeViewItem: Have no parent" << endl;
+ return tvi;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////
+//
+// ServerTreeView implementation
+//
+//
+ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name)
+ : BaseTreeView(parent, name)
+{
+ setAcceptDrops(true);
+ setDragEnabled(true);
+
+ m_config = config;
+ m_config->setGroup("General Options");
+ // I must read this here because quanta_init has not done it yet
+ qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true);
+
+ m_fileMenu = new KPopupMenu();
+
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertSeparator();
+// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+
+ m_folderMenu = new KPopupMenu();
+
+// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+
+ addColumn(i18n("Upload Tree"), -1);
+ addColumn("");
+
+ connect(this, SIGNAL(open(QListViewItem *)),
+ this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
+ this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(Project::ref(), SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
+ this, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
+
+ restoreLayout(m_config, "UploadTreeView"); // a fixed name only for the tooltip configuration
+ // the restored size of the first column might be too large for the current content
+ // we set it to 10 and the listview will adjust it to the size of the largest entry
+ setColumnWidth(0, 10);
+ newBranch(url);
+}
+
+ServerTreeView::~ServerTreeView()
+{
+}
+
+KFileTreeBranch* ServerTreeView::newBranch(const KURL& url)
+{
+ KURL branchURL = url;
+ branchURL.adjustPath(+1);
+ BaseTreeBranch* newBrnch = 0;
+ newBrnch = new ServerTreeBranch(this, branchURL, branchURL.prettyURL(), SmallIcon("up"), true);
+ newBrnch->setShowingDotFiles(qConfig.showHiddenFiles);
+ addBranch(newBrnch);
+ return newBrnch;
+}
+
+
+/** RMB pressed, bring up the menu */
+void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+{
+ Q_UNUSED(listView);
+ if (item)
+ {
+ setSelected(item, true);
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if ( !curItem->isDir() )
+ {
+ m_fileMenu->setItemVisible(m_menuClose, isFileOpen(currentURL()));
+ m_fileMenu->popup(point);
+ } else {
+ m_folderMenu->setItemVisible(m_menuPasteFolder, isPathInClipboard());
+ bool root = (curItem == curItem->branch()->root());
+ m_folderMenu->setItemVisible(m_menuDel, ! root);
+ m_folderMenu->setItemVisible(m_reloadMenuId, root);
+ m_folderMenu->setItemVisible(m_renameId, ! root);
+ m_folderMenu->popup(point);
+ }
+ }
+}
+
+
+void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+{
+ Q_UNUSED(fileList);
+ Q_UNUSED(buildNewTree);
+ Q_UNUSED(folderToOpen);
+
+ QListViewItemIterator iter(this);
+ for ( ; iter.current(); ++iter )
+ {
+ iter.current()->repaint();
+ }
+}
+
+#include "servertreeview.moc"
diff --git a/quanta/treeviews/servertreeview.h b/quanta/treeviews/servertreeview.h
new file mode 100644
index 00000000..c49b5a60
--- /dev/null
+++ b/quanta/treeviews/servertreeview.h
@@ -0,0 +1,92 @@
+/***************************************************************************
+ servertreeview.h - description
+ -------------------
+ begin : Thu Jun 1 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2004 Andras Mantia <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 SERVERTREEVIEW_H
+#define SERVERTREEVIEW_H
+
+// quanta includes
+#include "basetreeview.h"
+
+//foward declarations
+class QListViewItem;
+class QPoint;
+class KPopupMenu;
+class KURL;
+class ProjectList;
+
+/**
+ TreeViewItem with special painter
+*/
+
+class ServerTreeViewItem : public BaseTreeViewItem {
+
+public:
+ ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
+ /** makes document not in project lighter */
+ void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+};
+
+/**
+ the branch for using @ref ServerTreeViewItem
+*/
+
+class ServerTreeBranch : public BaseTreeBranch {
+
+public:
+ ServerTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
+
+ /** check for CVS and visible*/
+ virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *parent,
+ KFileItem *fileItem );
+};
+
+
+class ServerTreeView : public BaseTreeView {
+ Q_OBJECT
+
+public:
+ ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name = 0L);
+ virtual ~ServerTreeView();
+
+protected slots:
+
+ void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+
+ /** repaints the treeview items, because they might be added to or removed from the project*/
+ void slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen);
+
+protected:
+ KFileTreeBranch* newBranch(const KURL& url);
+
+ KPopupMenu *m_fileMenu;
+ KPopupMenu *m_folderMenu;
+ int m_menuClose; ///< remembers the menu entry
+ int m_menuPasteFolder; ///< remembers the menu entry
+ int m_insertFileInProject;
+ int m_insertFolderInProject;
+ // config
+ KConfig *m_config;
+
+private:
+ int m_menuDel;
+ int m_reloadMenuId;
+ int m_renameId;
+};
+
+#endif
diff --git a/quanta/treeviews/structtreetag.cpp b/quanta/treeviews/structtreetag.cpp
new file mode 100644
index 00000000..2742bcea
--- /dev/null
+++ b/quanta/treeviews/structtreetag.cpp
@@ -0,0 +1,217 @@
+/***************************************************************************
+ structtreetag.cpp - description
+ -------------------
+ begin : Sat Apr 29 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002, 2003 Andras Mantia <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 include
+#include <qregexp.h>
+
+// KDE includes
+#include <kiconloader.h>
+#include <klocale.h>
+
+// app includes
+#include "structtreeview.h"
+#include "structtreetag.h"
+#include "messageoutput.h"
+#include "tag.h"
+#include "node.h"
+#include "quantacommon.h"
+#include "document.h"
+#include "resource.h"
+
+StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
+ : KListViewItem(parent, a_title)
+{
+ node = 0L;
+ hasOpenFileMenu = false;
+ groupTag = 0L;
+ parentTree = static_cast<StructTreeView*>(parent);
+}
+
+StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title,
+ QListViewItem *after )
+: KListViewItem(parent, after, a_title)
+{
+ parentTree = parent->parentTree;
+ hasOpenFileMenu = false;
+ groupTag = 0L;
+ static const QString space = " ";
+ static const QRegExp nbspRx("&nbsp;|\\n");
+ node = a_node;
+ if (node)
+ {
+ Tag *tag = node->tag;
+ QString title = tag->name.lower();
+ if (a_title.isEmpty())
+ {
+ switch (tag->type)
+ {
+ case Tag::XmlTag:
+ {
+ if (title == "font")
+ {
+ setPixmap( 0, UserIcon("tag_font_small") );
+ if ( tag->attrCount() )
+ title = space + tag->attribute(0) + "=" + tag->attributeValue(0);
+ else
+ title = "";
+ } else
+ if (title == "img")
+ {
+ setPixmap( 0, SmallIcon("image") );
+ title = space + tag->attributeValue("src");
+
+ } else
+ if (title == "a")
+ {
+ setPixmap( 0, SmallIcon("www") );
+ if ( tag->hasAttribute("href") )
+ title = space + "href "+ tag->attributeValue("href");
+ if ( tag->hasAttribute("name") )
+ title = space + "name "+ tag->attributeValue("name");
+ } else
+ if ( title == "br")
+ {
+ setPixmap( 0, UserIcon("tag_br_small") );
+ title = "";
+ } else
+ if ( title == "hr")
+ {
+ setPixmap( 0, UserIcon("tag_hr_small") );
+ title = "";
+ } else
+ if ( title == "li")
+ {
+ setPixmap( 0, UserIcon("ball") );
+ title = "";
+ } else
+ if ( title == "p")
+ {
+ setPixmap( 0, UserIcon("tag_p") );
+ title = "";
+ }
+
+ if (!typingInProgress)
+ {
+ QTag *parentQTag = 0L;
+ if (node->parent)
+ parentQTag = QuantaCommon::tagFromDTD(node->parent);
+ QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ int line, col;
+ node->tag->beginPos(line, col);
+ if (parentQTag && !parentQTag->childTags.contains(qTagName) &&
+ !parentQTag->childTags.isEmpty())
+ {
+ node->tag->write()->setErrorMark(line);
+ QString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
+ parentTree->showMessage(i18n("Line %1: %2 is not a possible child of %3.\n").arg(line + 1).arg(qTagName).arg(parentTagName));
+ }
+ QString nextTagName;
+ if (node->next)
+ {
+ nextTagName = node->tag->dtd()->caseSensitive ? node->next->tag->name : node->next->tag->name.upper();
+ }
+ parentQTag = QuantaCommon::tagFromDTD(node);
+ if (parentQTag && !parentQTag->isSingle() &&
+ !parentQTag->isOptional() &&
+ (!node->next || ( !node->getClosingNode())) )
+ {
+ node->tag->write()->setErrorMark(line);
+ parentTree->showMessage(i18n("Line %1, column %2: Closing tag for %3 is missing.").arg(line + 1).arg(col + 1).arg(qTagName));
+ } else
+ if (!parentQTag && node->tag->name.upper() != "!DOCTYPE")
+ {
+ node->tag->write()->setErrorMark(line);
+ parentTree->showMessage(i18n("Line %1, column %2: %3 is not part of %4.").arg(line + 1).arg(col + 1).arg(qTagName).arg(node->tag->dtd()->nickName));
+ }
+ }
+ break;
+ }
+ case Tag::Text:
+ {
+ title = tag->tagStr();
+ title = title.left(70).stripWhiteSpace();
+ title.replace( nbspRx," ");
+ break;
+ }
+ case Tag::Comment:
+ {
+ setPixmap( 0, UserIcon("tag_comm") );
+ title = tag->tagStr();
+ title = title.left(70).stripWhiteSpace();
+ title.replace( nbspRx," ");
+ break;
+ }
+ case Tag::ScriptTag:
+ {
+ title = tag->name;
+ break;
+ }
+ case Tag::Empty:
+ {
+ title = i18n("Empty tag");
+ break;
+ }
+ case Tag::ScriptStructureBegin:
+ {
+ title = tag->cleanStr.stripWhiteSpace();
+ break;
+ }
+ default:
+ {
+ if (!typingInProgress && node->tag->type == Tag::XmlTagEnd && !node->tag->name.isEmpty())
+ {
+ int line, col;
+ node->tag->beginPos(line, col);
+ QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ QString qPrevTagName;
+ if (node->prev)
+ qPrevTagName = node->tag->dtd()->caseSensitive ? node->prev->tag->name : node->prev->tag->name.upper();
+ if (!node->prev || qTagName != "/" + qPrevTagName)
+ {
+ node->tag->write()->setErrorMark(line);
+ parentTree->showMessage(i18n("Line %1, column %2: Opening tag for %3 is missing.").arg(line + 1).arg(col + 1).arg(qTagName));
+ }
+ }
+ title = tag->tagStr().left(70).stripWhiteSpace();
+ }
+
+
+ }
+ } else
+ {
+ title = a_title;
+ }
+
+ title.replace(newLineRx," ");
+ setText(0, title);
+ node->listItems.append(this);
+ }
+}
+
+StructTreeTag::StructTreeTag(StructTreeTag *parent, QString a_title )
+: KListViewItem(parent, a_title)
+{
+ node = 0L;
+ hasOpenFileMenu = false;
+ groupTag = 0L;
+ parentTree = parent->parentTree;
+}
+
+
+StructTreeTag::~StructTreeTag(){
+ if (node)
+ node->listItems.remove(node->listItems.find(this));
+}
diff --git a/quanta/treeviews/structtreetag.h b/quanta/treeviews/structtreetag.h
new file mode 100644
index 00000000..0b365b0c
--- /dev/null
+++ b/quanta/treeviews/structtreetag.h
@@ -0,0 +1,45 @@
+/***************************************************************************
+ structtreetag.h - description
+ -------------------
+ begin : Sat Apr 29 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002, 2003 Andras Mantia <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 STRUCTTREETAG_H
+#define STRUCTTREETAG_H
+
+#include <klistview.h>
+
+class Tag;
+class Node;
+class StructTreeView;
+/**tag in structure widget
+ *@author Yacovlev Alexander & Dmitry Poplavsky & Andras Mantia
+ */
+
+class StructTreeTag : public KListViewItem {
+
+public:
+ StructTreeTag(QListView *parent, const QString a_title = QString::null );
+ StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title = QString::null, QListViewItem *after = 0L);
+ StructTreeTag(StructTreeTag *parent, const QString a_title = QString::null );
+ ~StructTreeTag();
+
+ Node *node;
+ bool hasOpenFileMenu;
+ Tag* groupTag;
+ QRegExp fileNameRx;
+ StructTreeView *parentTree;
+};
+
+#endif
diff --git a/quanta/treeviews/structtreeview.cpp b/quanta/treeviews/structtreeview.cpp
new file mode 100644
index 00000000..f6f55b40
--- /dev/null
+++ b/quanta/treeviews/structtreeview.cpp
@@ -0,0 +1,1071 @@
+/***************************************************************************
+ structtreeview.cpp - description
+ -------------------
+ begin : Sat Apr 29 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002, 2003 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// system headers
+#include <assert.h>
+
+// QT headers
+#include <qpixmap.h>
+#include <qheader.h>
+#include <qregexp.h>
+#include <qdatetime.h>
+#include <qdragobject.h>
+#include <qcursor.h>
+
+// KDE headers
+#include <kapplication.h>
+#include <kiconloader.h>
+#include <kpopupmenu.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kconfig.h>
+#include <kdebug.h>
+#include <ktexteditor/view.h>
+
+// app includes
+#include "messageoutput.h"
+#include "node.h"
+#include "qtag.h"
+#include "document.h"
+#include "resource.h"
+#include "qextfileinfo.h"
+#include "quantacommon.h"
+#include "dtds.h"
+#include "viewmanager.h"
+#include "kafkacommon.h"
+#include "cursors.h"
+#include "undoredo.h"
+#include "quantaview.h"
+#include "wkafkapart.h"
+
+#include "structtreetag.h"
+#include "structtreeview.h"
+#include "structtreeview.moc"
+extern GroupElementMapList globalGroupMap;
+
+StructTreeView::StructTreeView(QWidget *parent, const char *name )
+ : KListView(parent,name), m_marker(0), m_draggedItem(0)/*, m_thisWidget(0)*/
+{
+ for (int i = 0; i < 15; i++)
+ groupOpened.append(false);
+ top = 0L;
+ lastTag = 0L;
+ groupsCount = 0;
+ followCursorFlag = true;
+ config = kapp->config();
+
+ topOpened = true;
+ useOpenLevelSetting = true;
+
+ setRootIsDecorated( true );
+ header()->hide();
+ setSorting(-1,false);
+ setAcceptDrops(false); // disabled d&d is broken
+ setDropVisualizer(true);
+ setDragEnabled(false); // disabled d&d is broken
+// setSelectionModeExt(FileManager); disabled d&d is broken
+
+ setFrameStyle( Panel | Sunken );
+ setLineWidth( 2 );
+ addColumn( i18n("Name"), -1 );
+
+ setFocusPolicy(QWidget::ClickFocus);
+
+ dtdMenu = new KPopupMenu(this);
+
+ dtdMenu->insertItem(i18n("All Present DTEP"));
+ dtdMenu->insertSeparator();
+ dtdList = DTDs::ref()->nickNameList();
+ for(uint i = 0; i < dtdList.count(); i++ )
+ {
+ dtdMenu->insertItem(dtdList[i], i, -1);
+ }
+
+ connect(dtdMenu, SIGNAL(activated(int)), this, SLOT(slotDTDChanged(int)));
+
+ connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)),
+ SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*)));
+
+ emptyAreaMenu = new KPopupMenu(this);
+ emptyAreaMenu->insertItem(i18n("Show Groups For"), dtdMenu);
+ emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, SLOT(slotReparseMenuItem()));
+
+ popupMenu = new KPopupMenu(this);
+
+ popupMenu -> insertItem( i18n("Show Groups For"), dtdMenu);
+ popupMenu -> insertSeparator();
+ popupMenu -> insertItem( i18n("Select Tag Area"), this ,SLOT(slotSelectTag()));
+ popupMenu -> insertItem( i18n("Go to End of Tag"), this ,SLOT(slotGotoClosingTag()));
+ openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,SLOT(slotOpenFile()));
+ popupMenu -> insertSeparator();
+ popupMenu -> insertItem( i18n("Open Subtrees"), this ,SLOT(slotOpenSubTree()));
+ popupMenu -> insertItem( i18n("Close Subtrees"),this ,SLOT(slotCloseSubTree()));
+ popupMenu -> insertSeparator();
+#if 0
+ popupMenu -> insertItem( i18n("Remove"),this ,SLOT(slotRemoveTags()));
+ popupMenu -> insertSeparator();
+#endif
+ popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,SLOT(slotReparseMenuItem()));
+ followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,SLOT(changeFollowCursor()));
+
+ popupMenu -> setItemChecked ( followCursorId, followCursor() );
+
+
+ connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
+ this, SLOT (slotMouseClicked(int, QListViewItem*, const QPoint&, int)));
+
+ connect( this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+
+ connect(this, SIGNAL(expanded(QListViewItem *)), SLOT(slotExpanded(QListViewItem *)));
+ connect(this, SIGNAL(collapsed(QListViewItem *)), SLOT(slotCollapsed(QListViewItem *)));
+
+ write = 0L;
+ timer = new QTime();
+ timer->start();
+ m_dirty = true;
+}
+
+
+StructTreeView::~StructTreeView(){
+ delete timer;
+}
+
+/** builds the structure tree */
+void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
+{
+#ifdef DEBUG_PARSER
+ kdDebug(24000) << "Starting to rebuild the structure tree. Grouponly = " << groupOnly << endl;
+#endif
+ if (!groupOnly)
+ {
+ top = new StructTreeTag( this, i18n("Document Structure") );
+ top->setOpen(topOpened);
+ emit clearProblemOutput();
+ }
+ Node *currentNode = baseNode;
+ StructTreeTag *currentItem = top; //after this
+ StructTreeTag *item = 0L;
+ StructTreeTag *parentItem = top; //under this
+ int level = 0;
+ QString title;
+ QString tagStr;
+ QString tmpStr;
+ int groupId = 0;
+ const DTDStruct* parsingDTD;
+ for (uint index = 0; index < m_parsingDTDList.count(); index++)
+ {
+ parsingDTD = m_parsingDTDList[index];
+ if (parsingDTD->family == Script)
+ {
+ StructTreeGroup group;
+ uint gCount = parsingDTD->structTreeGroups.count();
+ for (uint i = 0; i < gCount; i++)
+ {
+ group = parsingDTD->structTreeGroups[i];
+ StructTreeTag *groupTag = new StructTreeTag(this, i18n(group.name.utf8()) + " [" + parsingDTD->nickName+"]");
+ if (!group.icon.isEmpty())
+ {
+ groupTag->setPixmap(0, SmallIcon(group.icon));
+ }
+ groupTag->setOpen(groupOpened[groupId]);
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Grouptag created: " << groupId << " " << groupTag->text(0) << " "<< groupTag << endl;
+#endif
+ groups.append(groupTag);
+ groupIds.insert(group.name + parsingDTD->name, groupId);
+ groupId++;
+ }
+ } else
+ {
+ QMap<QString, XMLStructGroup>::ConstIterator it;
+ for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
+ {
+ XMLStructGroup group = it.data();
+ StructTreeTag *groupTag = new StructTreeTag(this, i18n(group.name.utf8()) + " [" + parsingDTD->nickName+"]");
+ if (!group.icon.isEmpty())
+ {
+ groupTag->setPixmap(0, SmallIcon(group.icon));
+ }
+ groupTag->setOpen(groupOpened[groupId]);
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Grouptag created: " << groupId << " " << groupTag->text(0) << " "<< groupTag << endl;
+#endif
+ groups.append(groupTag);
+ groupIds.insert(group.name + parsingDTD->name, groupId);
+ groupId++;
+ }
+
+ }
+ }
+ groupsCount = groupId;
+ QMap<QString, QListViewItem*> lastItemInGroup;
+ QMap<QString, QListViewItem*> groupItems;
+ while (currentNode)
+ {
+ if (!groupOnly)
+ {
+ title = "";
+ item = new StructTreeTag(parentItem, currentNode, title, currentItem);
+ item->setOpen(level < openLevel);
+ currentNode->mainListItem = item;
+
+ if ( (!qConfig.showEmptyNodes && currentNode->tag->type == Tag::Empty) ||
+ (!qConfig.showClosingTags &&
+ (currentNode->tag->type == Tag::XmlTagEnd ||
+ currentNode->tag->type == Tag::ScriptStructureEnd) ) )
+ {
+ item->setVisible(false);
+ }
+ }
+ const DTDStruct *dtd = currentNode->tag->dtd();
+ //add all the group elements belonging to this node to the tree
+ for (QValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
+ {
+ GroupElement *groupElement = (*it);
+ if (!groupIds.contains(groupElement->group->name + dtd->name))
+ continue;
+ StructTreeTag *groupItem = groups[groupIds[groupElement->group->name + dtd->name]];
+ QListViewItem* insertAfter = 0L;
+ QListViewItem* insertUnder = groupItem;
+ if (groupItems.contains(groupElement->group->name + groupElement->tag->name))
+ insertUnder = groupItems[groupElement->group->name + groupElement->tag->name];
+ if (lastItemInGroup.contains(groupElement->group->name))
+ insertAfter = lastItemInGroup[groupElement->group->name];
+
+ StructTreeTag *item = new StructTreeTag(static_cast<StructTreeTag*>(insertUnder), currentNode, groupElement->tag->name, insertAfter);
+ item->groupTag = groupElement->tag;
+ if (insertUnder == groupItem)
+ {
+ groupItems[groupElement->group->name + groupElement->tag->name] = item;
+ lastItemInGroup[groupElement->group->name] = item;
+ }
+ item->hasOpenFileMenu = groupElement->group->hasFileName;
+ item->fileNameRx = groupElement->group->fileNameRx;
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Tree element "<< groupElement->tag->tagStr() << "[" << groupElement->group->name<<"]"<< " inserted: " << item << " under " <<insertUnder << " after " << insertAfter << endl;
+#endif
+ }
+
+ //go to the child node, if it exists
+ if (currentNode->child)
+ {
+ currentNode = currentNode->child;
+ parentItem = item;
+ currentItem = 0L;
+ level++;
+ } else
+ {
+ //go to the next node if it exists
+ if (currentNode->next)
+ {
+ currentNode = currentNode->next;
+ currentItem = item;
+ } else
+ {
+ //go up some levels, to the parent, if the node has no child or next
+ while (currentNode)
+ {
+ level--;
+ //parentItem = dynamic_cast<StructTreeTag*>(parentItem->parent());
+ if (currentNode->parent && currentNode->parent->next)
+ {
+ currentNode = currentNode->parent->next;
+ break;
+ } else
+ {
+ currentNode = currentNode->parent;
+ }
+ }
+ if (!groupOnly && currentNode)
+ {
+ if (currentNode->prev)
+ currentItem = static_cast<StructTreeTag*>(currentNode->prev->mainListItem);
+ if (currentNode->parent)
+ {
+ parentItem = static_cast<StructTreeTag*>(currentNode->parent->mainListItem);
+ if (!parentItem)
+ {
+ parentItem = top;
+ }
+ }
+ else
+ {
+ parentItem = top;
+ }
+ }
+
+ }
+ }
+ }
+ //add the externally found items to the tree
+ QListViewItem *insertUnder;
+ QListViewItem *insertAfter;
+ QListViewItem *listItem;
+ GroupElementMapList::Iterator it;
+ IncludedGroupElementsMap::Iterator externalIt;
+ for (uint index = 0; index < m_parsingDTDList.count(); index++)
+ {
+ parsingDTD = m_parsingDTDList[index];
+ if (parsingDTD->family == Script)
+ {
+ StructTreeGroup group;
+ uint gCount = parsingDTD->structTreeGroups.count();
+ for (uint i = 0; i < gCount; i++)
+ {
+ group = parsingDTD->structTreeGroups[i];
+ groupId = groupIds[group.name + parsingDTD->name];
+ QString name = group.name+"|";
+ StructTreeTag *groupTag = groups[groupId];
+ for (externalIt = parser->includedMap.begin(); externalIt != parser->includedMap.end(); ++externalIt)
+ {
+ insertUnder = new StructTreeTag(static_cast<StructTreeTag*>(groupTag), 0L, externalIt.key(), groupTag);
+ insertAfter = insertUnder;
+ IncludedGroupElements elements = externalIt.data();
+ GroupElementMapList::Iterator elIt;
+ for (elIt = elements[group.name].begin(); elIt != elements[group.name].end(); ++elIt)
+ {
+ listItem = new StructTreeTag(static_cast<StructTreeTag*>(insertUnder), elIt.data()[0]->node, elIt.key(), insertAfter);
+ static_cast<StructTreeTag*>(listItem)->hasOpenFileMenu = group.hasFileName;
+ static_cast<StructTreeTag*>(listItem)->fileNameRx = group.fileNameRx;
+ insertAfter = listItem;
+ }
+ if (!insertUnder->firstChild())
+ delete insertUnder;
+ else
+ insertUnder->sortChildItems(0, true);
+ }
+ groupTag->sortChildItems(0, true);
+ }
+ }
+ }
+}
+
+/** Delete the items */
+void StructTreeView::deleteList(bool groupOnly)
+{
+ if (!groupOnly && top )
+ {
+ topOpened = top->isOpen();
+ delete top;
+ top = 0L;
+ }
+ for (uint i = 0; i < groupsCount; i++)
+ {
+ groupOpened.append(groups[i]->isOpen());
+#ifdef DEBUG_PARSER
+ kdDebug(24001) << "Grouptag deleted: " << i << " " << groups[i]->text(0) << endl;
+#endif
+ delete groups[i];
+ }
+ groups.clear();
+ groupIds.clear();
+ groupsCount = 0;
+}
+
+/** repaint document structure */
+void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool groupOnly)
+{
+ timer->restart();
+ if (typingInProgress)
+ return;
+ deleteList(groupOnly);
+ if (!node)
+ return;
+ write = w;
+ if (write)
+ write->clearAnnotations();
+ write->clearErrorMarks();
+ buildTree(node, openLevel, groupOnly);
+
+ kdDebug(24000) << "StructTreeView building: " << timer->elapsed() << " ms\n";
+
+ const DTDStruct *parsingDTD;
+ int groupId = 0;
+ for (uint index = 0; index < m_parsingDTDList.count(); index++)
+ {
+ parsingDTD = m_parsingDTDList[index];
+ if (parsingDTD->family == Script)
+ {
+ uint gCount = parsingDTD->structTreeGroups.count();
+ for (uint i = 0; i < gCount; i++)
+ {
+ StructTreeTag *groupTag = groups[groupId];
+ if (groupTag->childCount() == 0)
+ {
+ if (qConfig.showEmptyNodes)
+ {
+ //kdDebug(24000) << "No elements in group: " << groupId << " " << groupTag->text(0) << endl;
+ groupTag->setText(0, i18n(parsingDTD->structTreeGroups[i].noName.utf8()) + " [" + parsingDTD->nickName+"]");
+ } else
+ {
+ groupTag->setVisible(false);
+ }
+ }
+ groupId++;
+ }
+ } else
+ {
+ QMap<QString, XMLStructGroup>::ConstIterator it;
+ uint i = 0;
+ for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
+ {
+ StructTreeTag *groupTag = groups[groupId];
+ if (groupTag->childCount() == 0)
+ {
+ if (qConfig.showEmptyNodes)
+ {
+ //kdDebug(24000) << "No elements in group: " << groupId << " " << groupTag->text(0) << endl;
+ groupTag->setText(0, i18n(it.data().noName.utf8()) + " [" + parsingDTD->nickName+"]");
+ } else
+ {
+ groupTag->setVisible(false);
+ }
+ }
+ i++;
+ groupId++;
+ }
+ }
+ }
+ useOpenLevelSetting = false;
+ m_dirty = false;
+}
+
+void StructTreeView::slotGotoTag( QListViewItem *item )
+{
+ StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
+ if (!m_dirty && it && it->node && it->node->tag)
+ {
+ Tag *tag = new Tag(*it->node->tag);
+ int line, col;
+ tag->beginPos(line, col);
+ if (!it->node->fileName.isEmpty())
+ {
+ KURL url;
+ QuantaCommon::setUrl(url, it->node->fileName);
+ emit openFile(url);
+ }
+ int el, ec;
+ tag->endPos(el, ec);
+/*
+ kdDebug(24000) << "Node area: " << line << ", " << col << ", " << el << ", " << ec << endl;
+ kdDebug(24000) << "Node type: " << tag->type << endl;
+ kdDebug(24000) << "Node str: " << tag->tagStr() << endl;
+ kdDebug(24000) << "Node cleanstr: " << tag->cleanStr << endl;
+*/
+ if (tag->type == Tag::XmlTag || tag->type == Tag::XmlTagEnd)
+ col++; //position the cursor inside the tag
+ emit newCursorPosition(line, col);
+ Document *w = ViewManager::ref()->activeDocument();
+ if (w)
+ w->view()->setFocus();
+ delete tag;
+ }
+}
+
+
+void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPoint& point, int dummy)
+{
+ if (item)
+ {
+ config->setGroup("Parser options");
+
+ QString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
+ QString handleLBM = config->readEntry("LBM", i18n("Find tag"));
+ QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
+
+ setSelected(item, true);
+
+ if (button == Qt::RightButton)
+ {
+ if (dynamic_cast<StructTreeTag*>(item))
+ {
+ popupMenu->setItemVisible(openFileMenuId, static_cast<StructTreeTag*>(item)->hasOpenFileMenu);
+ }
+ popupMenu->popup(point);
+ return;
+ }
+
+ if (button == Qt::LeftButton)
+ {
+ if (handleLBM == i18n("Find Tag && Open Tree"))
+ setOpen(item, !isOpen(item));
+ setSelected(item, true);
+
+ bool const ctrlPressed = KApplication::keyboardMouseState() & Qt::ControlButton;
+
+ if(ctrlPressed)
+ setContiguousSelectedItems();
+
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
+ slotMouseClickedVPL(button, item, point, dummy);
+ else
+ slotGotoTag(item);
+ }
+
+ if (button == Qt::MidButton)
+ {
+ if (handleMBM == i18n("nothing"))
+ return;
+
+ if (handleMBM == i18n("Find Tag && Open Tree"))
+ {
+ setOpen(item, !isOpen(item));
+ setSelected(item, true);
+ slotGotoTag(item);
+ }
+
+ if (handleMBM == i18n("Select Tag Area"))
+ slotSelectTag();
+
+ if (handleMBM == i18n("Go to End of Tag"))
+ slotGotoClosingTag();
+
+ setSelected(item, true);
+ }
+ } else
+ if (button == Qt::RightButton)
+ emptyAreaMenu->popup(point);
+}
+
+
+void StructTreeView::slotDoubleClicked( QListViewItem *item)
+{
+ config->setGroup("Parser options");
+
+ if ( config->readEntry("Double click") != i18n("nothing") )
+ {
+ slotSelectTag();
+ } else
+ {
+ item->setOpen(!item->isOpen());
+ }
+}
+
+
+
+void StructTreeView::slotReparseMenuItem()
+{
+ useOpenLevelSetting = true;
+ emit needReparse();
+}
+
+void StructTreeView::slotGotoClosingTag()
+{
+ QListViewItem *item = currentItem();
+ StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
+ if (!m_dirty && it && it->node)
+ {
+ int newLine, newCol;
+ Tag *tag = it->node->tag;
+ if (tag->single || !it->node->next)
+ {
+ tag->endPos(newLine, newCol);
+ } else
+ {
+ if (tag->closingMissing)
+ {
+ Node *node = it->node;
+ while (node->child) node = node->child;
+ node->tag->endPos(newLine, newCol);
+ } else
+ {
+ it->node->next->tag->endPos(newLine, newCol);
+ }
+ }
+
+ emit newCursorPosition( newLine, newCol + 1 );
+ }
+}
+
+void StructTreeView::slotSelectTag()
+{
+ bool newFileOpened = false;
+ QListViewItem *item = currentItem();
+ StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
+ if (!m_dirty && it && it->node)
+ {
+ int bLine, bCol, eLine, eCol;
+ if (it->node->fileName.isEmpty())
+ {
+ if (it->groupTag)
+ {
+ Tag *tag = it->groupTag;
+ tag->beginPos(bLine, bCol);
+ tag->endPos(eLine, eCol);
+ } else
+ {
+ Tag *tag = it->node->tag;
+ if (tag->single || !it->node->next)
+ {
+ tag->endPos(eLine, eCol);
+ } else
+ {
+ emit selectTagArea(it->node);
+ return;
+ }
+ tag->beginPos(bLine, bCol);
+ }
+ } else
+ {
+ KURL url;
+ QuantaCommon::setUrl(url, it->node->fileName);
+ it->node->tag->beginPos(bLine, bCol);
+ it->node->tag->endPos(eLine, eCol);
+ eCol--;
+ emit openFile(url);
+ newFileOpened = true;
+
+ }
+ emit selectArea( bLine, bCol, eLine, eCol + 1);
+
+ if (!newFileOpened)
+ {
+ setSelected(item, true);
+ it->node->tag->write()->view()->setFocus();
+ }
+ }
+}
+
+
+/** Do the recursive opening or closing of the trees */
+void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
+{
+ if (it)
+ {
+ it->setOpen(open);
+ setOpenSubTree( it->nextSibling(), open );
+ setOpenSubTree( it->firstChild(), open );
+ }
+}
+
+/** Recursively open the tree and all its subtrees */
+void StructTreeView::slotOpenSubTree()
+{
+ QListViewItem *item = currentItem();
+ if (item)
+ {
+ item->setOpen( true );
+ setOpenSubTree( item->firstChild(), true );
+ }
+}
+
+
+/** Recursively close the tree and all its subtrees */
+void StructTreeView::slotCloseSubTree()
+{
+ QListViewItem *item = currentItem();
+ if (item)
+ {
+ item->setOpen( false );
+ setOpenSubTree( item->firstChild(), false );
+ }
+}
+
+/** Show the element in tree according to cursor position (x,y) */
+void StructTreeView::showTagAtPos(Node *node)
+{
+ if (followCursorFlag)
+ {
+ if (node && node->mainListItem)
+ {
+ clearSelection();
+ ensureItemVisible(node->mainListItem);
+ setSelected(node->mainListItem, true);
+ }
+ } //if (followCursorFlag)
+}
+
+void StructTreeView::setFollowCursor(bool follow)
+{
+ followCursorFlag = follow;
+ popupMenu->setItemChecked(followCursorId, follow);
+}
+
+/** No descriptions */
+void StructTreeView::slotExpanded(QListViewItem *item)
+{
+ StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
+ if (!m_dirty && it && it->node)
+ it->node->opened = true;
+}
+
+/** No descriptions */
+void StructTreeView::slotCollapsed(QListViewItem *item)
+{
+ StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
+ if (!m_dirty && it && it->node)
+ it->node->opened = false;
+}
+/** Do a reparse before showing. */
+void StructTreeView::showEvent(QShowEvent* /*ev*/)
+{
+ slotReparseMenuItem();
+}
+
+/** Do a reparse before showing. */
+void StructTreeView::hideEvent(QHideEvent* /*ev*/)
+{
+ emit clearProblemOutput();
+}
+
+enum {
+ DRAG_COPY = 0,
+ DRAG_MOVE = 1,
+ DRAG_CANCEL = 2
+};
+
+void StructTreeView::setContiguousSelectedItems()
+{
+ kdDebug(25001) << "setContiguousSelectedItems" << endl;
+
+ QPtrList<QListViewItem> selected_items = selectedItems(false);
+
+ QListViewItem* first = selected_items.getFirst();
+ QListViewItem* last = selected_items.getLast();
+
+ QListViewItemIterator it(first);
+ while(it.current() && it.current() != last)
+ {
+ QListViewItem* item = it.current();
+ if(!item->isSelected())
+ item->setSelected(true);
+
+ ++it;
+ }
+}
+
+bool StructTreeView::acceptDrag(QDropEvent* e) const
+{
+ static int i = 0;
+ kdDebug(25001) << "acceptDrag: " << ++i << endl;
+
+ QPoint p = contentsToViewport(e->pos());
+ QListViewItem* current_item = itemAt(p);
+
+// assert(m_thisWidget);
+
+ static bool last_accept = false;
+
+ if(current_item == m_marker)
+ {
+ e->accept(last_accept);
+/* if(last_accept)
+ m_thisWidget->setCursor(Qt::ForbiddenCursor);
+ else
+ m_thisWidget->setCursor(Qt::ForbiddenCursor);*/
+ kdDebug(25001) << "Princ�io: " << last_accept << endl;
+
+ return last_accept;
+ }
+ else
+ m_marker = current_item;
+
+ if(current_item == m_draggedItem ||
+ !(e->provides("text/x-struct_tree_tag_item") || e->source() == (QWidget *)this) || !m_marker)
+ {
+ e->accept(false);
+ last_accept = false;
+/* if(last_accept)
+ m_thisWidget->setCursor(Qt::ForbiddenCursor);
+ else
+ m_thisWidget->setCursor(Qt::ForbiddenCursor);*/
+ kdDebug(25001) << "PROIBIDO! #1" << endl;
+ return false;
+ }
+
+ Node* dragged_node = (dynamic_cast<StructTreeTag*> (m_draggedItem))->node;
+ Node* after_node = (dynamic_cast<StructTreeTag*> (m_marker))->node;
+ if(!after_node)
+ {
+ e->accept(false);
+ last_accept = false;
+/* if(last_accept)
+ m_thisWidget->setCursor(Qt::ForbiddenCursor);
+ else
+ m_thisWidget->setCursor(Qt::ForbiddenCursor);*/
+ kdDebug(25001) << "PROIBIDO! #2" << endl;
+ return false;
+ }
+ QTag* nodeQTag = QuantaCommon::tagFromDTD(after_node->parent);
+ bool is_child = (nodeQTag && nodeQTag->isChild(dragged_node));
+
+ if(!is_child)
+ kdDebug(25001) << "PROIBIDO! #3" << endl;
+ else
+ kdDebug(25001) << "ACEITE!" << endl;
+
+ e->accept(is_child);
+ last_accept = is_child;
+// if(last_accept)
+// m_thisWidget->setCursor(Qt::ForbiddenCursor);
+// else
+// m_thisWidget->setCursor(Qt::ForbiddenCursor);
+
+ return is_child;
+}
+
+void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after)
+{
+ if(!e)
+ return;
+ if (e->source() != this)
+ return; // Only internal drags are supported atm
+
+ if(!QTextDrag::canDecode(e))
+ return;
+
+ KPopupMenu *menu = new KPopupMenu( this );
+ menu->insertItem( i18n("&Move Here"), DRAG_MOVE, 0 );
+ menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"), DRAG_COPY, 1 );
+ menu->insertSeparator();
+ menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), DRAG_CANCEL, 3 );
+ int id = menu->exec(QCursor::pos(), 0);
+
+ switch(id) {
+ case DRAG_COPY:
+ copySelectedItems(parent, after);
+ break;
+ case DRAG_MOVE:
+ moveSelectedItems(parent, after);
+ break;
+ case DRAG_CANCEL: // cancelled by menuitem
+ break;
+ case -1: // cancelled by Esc
+ break;
+ default:
+ break;
+ }
+
+ m_draggedItem = 0;
+}
+
+void StructTreeView::startDrag()
+{
+ // This a dummy drag object. Decode is made by the objects selected on the tree.
+ QTextDrag* drag = new QTextDrag(this);
+// m_thisWidget = drag->source();
+ drag->setSubtype("x-struct_tree_tag_item");
+ drag->setPixmap(SmallIcon("node"));
+ drag->dragMove();
+
+}
+
+void StructTreeView::contentsMousePressEvent(QMouseEvent* e)
+{
+ if(e->button() == LeftButton)
+ {
+ QPoint p = contentsToViewport(e->pos());
+ m_draggedItem = itemAt(p);
+ m_marker = m_draggedItem;
+ }
+ KListView::contentsMousePressEvent(e);
+}
+
+void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* after)
+{
+ StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
+ StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
+ if(!parent_item/* || !after_item*/) // can happen if the element is inserted as the first child
+ return;
+
+ QPtrList<QListViewItem> selected_items = selectedItems(false);
+ QListViewItem* first_item = selected_items.getFirst();
+ QListViewItem* last_item = selected_items.getLast();
+
+ Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
+ Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
+ assert(start_node && end_node);
+
+ Node* start_node_subtree = 0;
+ if(start_node == end_node)
+ start_node_subtree = kafkaCommon::duplicateNodeSubtree(start_node, true);
+ else
+ start_node_subtree = kafkaCommon::getNodeSubtree(start_node, 0, end_node, end_node->tag->tagStr().length());
+
+ Node* parent_node = parent_item->node;
+ if(!parent_node)
+ return;
+ Node* next_node = 0;
+ if(after_item)
+ next_node = after_item->node->SNext();
+ else
+ next_node = parent_node->firstChild();
+
+ NodeSelection cursor_holder;
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ kafkaCommon::DTDInsertNodeSubtree(start_node_subtree, parent_node, next_node, cursor_holder, modifs);
+
+ write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, 0, false);
+}
+
+void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* after)
+{
+ StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
+ StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
+ if(!parent_item || !after_item)
+ return;
+
+ QPtrList<QListViewItem> selected_items = selectedItems(false);
+ QListViewItem* first_item = selected_items.getFirst();
+ QListViewItem* last_item = selected_items.getLast();
+
+ Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
+ Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
+ assert(start_node && end_node);
+
+ Node* cursor_node = 0;
+ long cursor_offset = 0;
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ Node* start_node_subtree = 0;
+ if(start_node == end_node)
+ start_node_subtree = kafkaCommon::extractNodeSubtreeAux(start_node, end_node, modifs);
+ else
+ start_node_subtree = kafkaCommon::DTDExtractNodeSubtree(start_node, 0, end_node, end_node->tag->tagStr().length(),
+ &cursor_node, cursor_offset, modifs);
+
+ Node* parent_node = parent_item->node;
+ if(!parent_node)
+ return;
+ Node* next_node = after_item->node->SNext();
+
+ NodeSelection cursor_holder(cursor_node, cursor_offset);
+
+ kafkaCommon::DTDInsertNodeSubtree(start_node_subtree, parent_node, next_node, cursor_holder, modifs);
+
+ write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, &cursor_holder, false);
+}
+
+/** The treeview DTD has changed to id. */
+void StructTreeView::slotDTDChanged(int id)
+{
+ QString text = dtdMenu->text(id);
+ if (dtdMenu->indexOf(id) > 0)
+ {
+ QString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
+ emit showGroupsForDTEP(dtdName, !dtdMenu->isItemChecked(id));
+ } else
+ emit showGroupsForDTEP("clear", true);
+}
+
+void StructTreeView::setParsingDTDs(const QStringList &parsingDTDList)
+{
+ m_parsingDTDList.clear();
+ for (uint i = 0; i < dtdList.count(); i++)
+ {
+ dtdMenu->setItemChecked(i, false);
+ }
+ QString dtdNickName;
+ for (QStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
+ {
+ dtdNickName = DTDs::ref()->getDTDNickNameFromName(*it);
+ for (uint i = 0; i < dtdList.count(); i++)
+ {
+ if (dtdList[i] == dtdNickName)
+ dtdMenu->setItemChecked(i, true);
+ }
+ m_parsingDTDList.append(DTDs::ref()->find(*it));
+ }
+}
+
+void StructTreeView::slotOpenFile()
+{
+ StructTreeTag *item = dynamic_cast<StructTreeTag*>(currentItem());
+ if (!m_dirty && item->node)
+ {
+ QString text = item->groupTag->name;
+ text.remove(item->fileNameRx);
+ KURL baseUrl = QExtFileInfo::path(write->url());
+ KURL url = baseUrl;
+ QuantaCommon::setUrl(url, text.stripWhiteSpace());
+ url = QExtFileInfo::toAbsolute(url, baseUrl);
+ if (QExtFileInfo::exists(url, true, this))
+ {
+ if (QuantaCommon::checkMimeGroup(url, "text" ))
+ {
+ emit openFile(url);
+ }
+ else if (QuantaCommon::checkMimeGroup(url," image" ))
+ {
+ emit openImage(url);
+ }
+ } else
+ KMessageBox::error(this, i18n("<qt>The file <b>%1</b> does not exist or is not a recognized mime type.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
+ }
+}
+
+void StructTreeView::slotNodeTreeChanged()
+{
+ m_dirty = true;
+}
+
+void StructTreeView::showMessage(const QString& message)
+{
+ emit showProblemMessage(message);
+}
+
+void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, const QPoint&, int)
+{
+ ViewManager::ref()->activeView()->setFocus();
+
+ QPtrList<QListViewItem> selected_items = selectedItems(true);
+ if(selected_items.count() == 1)
+ {
+ StructTreeTag* tag_item = dynamic_cast<StructTreeTag*> (item);
+ if(!tag_item)
+ return;
+ Node* node = tag_item->node;
+ if(!node)
+ return;
+ if(node->tag->type == Tag::Text || node->tag->type == Tag::Empty)
+ {
+ KafkaDocument::ref()->setCursor(node, 0);
+ }
+ }
+ else
+ {
+ Node* start_node = (dynamic_cast<StructTreeTag*> (selected_items.getFirst()))->node;
+ Node* end_node = (dynamic_cast<StructTreeTag*> (selected_items.getLast()))->node;
+
+ NodeSelectionInd selection(start_node, 0, end_node, 1/*end_node->tag->tagStr().length()*/);
+ KafkaDocument::ref()->setCursorAndSelection(&selection);
+ }
+}
+
+void StructTreeView::slotRemoveTags()
+{
+ QPtrList<QListViewItem> selected_items = selectedItems(true);
+
+ Node* start_node = (dynamic_cast<StructTreeTag*> (selected_items.getFirst()))->node;
+ Node* end_node = start_node;
+ if(selected_items.count() > 1)
+ end_node = (dynamic_cast<StructTreeTag*> (selected_items.getLast()))->node;
+
+ kafkaCommon::coutTree(start_node, 3);
+
+ Node* cursor_node = 0;
+ long cursor_offset = 0;
+
+ NodeModifsSet *modifs = new NodeModifsSet();
+ kafkaCommon::DTDExtractNodeSubtree(start_node, 0, end_node, end_node->tag->tagStr().length(), &cursor_node, cursor_offset, modifs);
+
+ NodeSelection* selection = new NodeSelection(cursor_node, cursor_offset);
+
+ write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, selection, false);
+}
+
diff --git a/quanta/treeviews/structtreeview.h b/quanta/treeviews/structtreeview.h
new file mode 100644
index 00000000..4f59e7d3
--- /dev/null
+++ b/quanta/treeviews/structtreeview.h
@@ -0,0 +1,176 @@
+/***************************************************************************
+ structtreeview.h - description
+ -------------------
+ begin : Sat Apr 29 2000
+ copyright : (C) 2000 by Yacovlev Alexander & Dmitry Poplavsky <pdima@mail.univ.kiev.ua>
+ (C) 2002, 2003 Andras Mantia <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 STRUCTTREEVIEW_H
+#define STRUCTTREEVIEW_H
+
+#include <qmap.h>
+#include <qvaluelist.h>
+
+#include <klistview.h>
+
+/**view class of document structure
+ *@author Andras Mantia & Paulo Moura Guedes & Yacovlev Alexander & Dmitry Poplavsky
+ */
+
+class KPopupMenu;
+class KConfig;
+class KURL;
+class QTime;
+
+class Node;
+class StructTreeTag;
+class Parser;
+class Document;
+struct DTDStruct;
+
+class StructTreeView : public KListView {
+ Q_OBJECT
+public:
+
+ /**
+ * since this class is a singleton you must use this function to access it
+ *
+ * the parameters are only used at the first call to create the class
+ *
+ */
+ static StructTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ {
+ static StructTreeView *m_ref;
+ if (!m_ref) m_ref = new StructTreeView (parent, name);
+ return m_ref;
+ }
+
+ ~StructTreeView();
+
+
+ void setFollowCursor(bool);
+ bool followCursor() { return followCursorFlag; }
+ /** Show the element in tree according to cursor position (x,y) */
+ void showTagAtPos(Node *node);
+ /** Delete the items */
+ void deleteList(bool groupOnly);
+ void setParsingDTDs(const QStringList &parsingDTDList);
+ void showMessage(const QString& message);
+
+
+ bool useOpenLevelSetting;
+
+public slots: // Public slots
+ /** repaint document structure */
+ void slotReparse(Document *w, Node* node, int openLevel = 3,bool groupOnly=false);
+ void slotMouseClicked(int button, QListViewItem*, const QPoint&, int);
+ void slotDoubleClicked( QListViewItem * );
+
+ // slots for RBM menu
+ void slotReparseMenuItem();
+ void slotSelectTag();
+ void slotGotoTag( QListViewItem *item );
+ void slotGotoClosingTag();
+ /** Recursively open the tree and all its subtrees */
+ void slotOpenSubTree();
+ /** Recursively close the tree and all its subtrees */
+ void slotCloseSubTree();
+ void changeFollowCursor() { setFollowCursor(!followCursorFlag); }
+ /** No descriptions */
+ void slotCollapsed(QListViewItem *item);
+ /** No descriptions */
+ void slotExpanded(QListViewItem *);
+ void slotOpenFile();
+ void slotNodeTreeChanged();
+ void slotRemoveTags();
+
+signals:
+ void newCursorPosition( int col, int row );
+ void selectTagArea(Node* node);
+ void selectArea(int col1, int row1, int col2, int row2 );
+ void needReparse();
+ void onTag( const QString &tag );
+ void showGroupsForDTEP(const QString& dtep, bool show);
+ void openFile(const KURL&);
+ void openImage(const KURL&);
+ void showProblemMessage(const QString&);
+ void clearProblemOutput();
+
+private:
+
+ /** The constructor is private because we use singleton pattern.
+ * If you need the class use StructTreeView::ref() for
+ * construction and reference
+ */
+ StructTreeView(QWidget *parent=0, const char *name=0);
+ /** builds the structure tree */
+ void buildTree(Node *baseNode, int openLevel, bool groupOnly);
+ /** Do the recursive opening or closing of the trees */
+ void setOpenSubTree(QListViewItem *it, bool open);
+
+ /** Make ctrl have the same behavior has shift */
+ void setContiguousSelectedItems();
+
+ void copySelectedItems(QListViewItem* parent, QListViewItem* after);
+ void moveSelectedItems(QListViewItem* parent, QListViewItem* after);
+
+private:
+
+ int followCursorId;
+ bool followCursorFlag;
+
+ KPopupMenu *popupMenu;
+ KPopupMenu *emptyAreaMenu;
+ KPopupMenu *dtdMenu;
+ StructTreeTag *lastTag;
+ KConfig *config;
+ QStringList dtdList;
+ QValueList<const DTDStruct*> m_parsingDTDList;
+ int openFileMenuId;
+ QMap<QString, uint> groupIds;
+ bool m_dirty;
+ StructTreeTag *top;
+ QValueList<StructTreeTag*> groups;
+ uint groupsCount;
+
+ bool topOpened;
+ QValueList<bool> groupOpened;
+
+ mutable QListViewItem* m_marker; //track that has the drag/drop marker under it
+ QListViewItem* m_draggedItem;
+// mutable QWidget* m_thisWidget; // non const this hack for acceptDrag
+
+protected: // Protected methods
+ /** Do a reparse before showing. */
+ virtual void showEvent(QShowEvent*);
+ /** Clear the problem output when hiding. */
+ virtual void hideEvent(QHideEvent*);
+
+ // drag functions
+ virtual bool acceptDrag(QDropEvent* e) const;
+ virtual void startDrag();
+ virtual void contentsMousePressEvent(QMouseEvent* e);
+
+protected slots: // Protected slots
+ /** The treeview DTD has changed to id. */
+ void slotDTDChanged(int id);
+
+ void slotMouseClickedVPL(int button, QListViewItem*, const QPoint&, int);
+ virtual void slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+
+protected: // Protected attributes
+ Document *write;
+ QTime *timer;
+};
+
+#endif
diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp
new file mode 100644
index 00000000..4b74217d
--- /dev/null
+++ b/quanta/treeviews/tagattributeitems.cpp
@@ -0,0 +1,538 @@
+/***************************************************************************
+ tagattributeitems.cpp
+ ---------------------
+ copyright : (C) 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qcombobox.h>
+#include <qheader.h>
+#include <qlineedit.h>
+#include <qlistbox.h>
+#include <qpainter.h>
+#include <qstyle.h>
+
+//kde includes
+#include <dcopref.h>
+#include <kapplication.h>
+#include <kcolorcombo.h>
+#include <klistview.h>
+#include <klocale.h>
+#include <kurlrequester.h>
+#include <kdebug.h>
+
+//app includes
+#include "tagattributeitems.h"
+#include "tagattributetree.h"
+#include "node.h"
+#include "tag.h"
+#include "qtag.h"
+#include "document.h"
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+#include "styleeditor.h"
+
+TopLevelItem::TopLevelItem(KListView* parent, const QString &title)
+: KListViewItem(parent, title)
+{
+}
+
+TopLevelItem::TopLevelItem(KListView* parent, QListViewItem* after, const QString &title)
+: KListViewItem(parent, after, title)
+{
+}
+
+TopLevelItem::~TopLevelItem()
+{
+}
+
+
+void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
+ int column, int width, int align)
+{
+ if ( !p )
+ return;
+
+ // make toplevel item names bold
+ if (column == 0 && !parent())
+ {
+ QFont f = p->font();
+ f.setBold(true);
+ p->setFont(f);
+ }
+ KListViewItem::paintCell( p, cg, column, width, align );
+ if (column == 0)
+ {
+ p->setPen(QPen(QColor(0,0,0)));
+ p->drawLine( width - 1, 0, width - 1, height());
+ }
+}
+
+ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
+: KListViewItem(parent)
+{
+ m_listView = listView;
+ comboBox = new QComboBox(false, m_listView->viewport() );
+ QRect r = m_listView->itemRect( this );
+ if ( !r.size().isValid() )
+ {
+ m_listView->ensureItemVisible( this );
+ r = m_listView->itemRect( this );
+ }
+ r.setX( m_listView->header()->sectionPos( 0 ) + 20);
+ r.setWidth( m_listView->header()->sectionSize( 0 ) - 20);
+ r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ comboBox->resize( r.size() );
+ m_listView->moveChild( comboBox, r.x(), r.y() );
+}
+
+ParentItem::~ParentItem()
+{
+ delete comboBox;
+}
+
+
+void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
+ int column, int width, int align)
+{
+ if ( !p )
+ return;
+
+ KListViewItem::paintCell( p, cg, column, width, align );
+ if (column == 0)
+ {
+ p->setPen(QPen(QColor(0,0,0)));
+ p->drawLine( width - 1, 0, width - 1, height());
+ }
+}
+
+void ParentItem::addNode(Node *node)
+{
+ if (node)
+ {
+ m_nodeList.append(node);
+ comboBox->insertItem(node->tag->name);
+ }
+}
+
+Node* ParentItem::node(int index)
+{
+ return m_nodeList.at(index);
+}
+
+void ParentItem::showList(bool show)
+{
+ if (show)
+ {
+ comboBox->show();
+ QObject::connect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ }
+ else
+ {
+ comboBox->hide();
+ QObject::disconnect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ }
+}
+
+//Generic attribute item
+AttributeItem::AttributeItem(QListViewItem* parent, const QString &title, const QString& title2)
+: KListViewItem(parent, title, title2)
+{
+ lin = 0L;
+ lin2 = 0L;
+}
+
+AttributeItem::AttributeItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+: KListViewItem(parent, title, title2)
+{
+ m_listView = listView;
+ lin = new QLineEdit( m_listView->viewport() );
+ lin2 = new QLineEdit( m_listView->viewport() );
+ QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin->hide();
+ lin2->hide();
+}
+
+AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2)
+: KListViewItem(listView, title, title2)
+{
+ m_listView = listView;
+ lin = new QLineEdit( m_listView->viewport() );
+ lin2 = new QLineEdit( m_listView->viewport() );
+ lin2->setText(title);
+ lin->setText(title2);
+ QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin->hide();
+ lin2->hide();
+}
+
+AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2,
+ QListViewItem* after)
+: KListViewItem(listView, after, title, title2)
+{
+ m_listView = listView;
+ lin = new QLineEdit( m_listView->viewport() );
+ lin2 = new QLineEdit( m_listView->viewport() );
+ lin2->setText(title);
+ lin->setText(title2);
+ QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin->hide();
+ lin2->hide();
+}
+
+AttributeItem::~AttributeItem()
+{
+ delete lin;
+ delete lin2;
+}
+
+void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
+ int column, int width, int align)
+{
+ if ( !p )
+ return;
+ KListViewItem::paintCell( p, cg, column, width, align );
+ if (column == 0)
+ {
+ p->setPen(QPen(QColor(0,0,0)));
+ p->drawLine( width - 1, 0, width - 1, height());
+ }
+}
+
+QString AttributeItem::editorText(int column)
+{
+ if(column == 1)
+ return lin->text();
+ else
+ return lin2->text();
+}
+
+void AttributeItem::replaceCurrentEditor()
+{
+ if(lin->isVisible())
+ {
+ placeEditor(lin, 1);
+ }
+ else if(lin2->isVisible())
+ {
+ placeEditor(lin, 0);
+ }
+}
+
+void AttributeItem::showEditor(int column)
+{
+ if(column == 1)
+ {
+ placeEditor(lin, column);
+ lin->show();
+ lin->setText(text(1));
+ lin->setFocus();
+ }
+ else
+ {
+ placeEditor(lin2, column);
+ lin2->show();
+ lin2->setText(text(0));
+ lin2->setFocus();
+ }
+}
+
+void AttributeItem::hideEditor(int column)
+{
+ m_listView->editorContentChanged();
+ if(column == 1 && lin->isVisible())
+ {
+ setText(1, lin->text());
+ lin->hide();
+ }
+ else if(column == 0 && lin2->isVisible())
+ {
+ setText(0, lin2->text());
+ lin2->hide();
+ }
+}
+
+void AttributeItem::placeEditor( QWidget *w, int column)
+{
+ QRect r = m_listView->itemRect( this );
+ if ( !r.size().isValid() )
+ {
+ m_listView->ensureItemVisible( this );
+ r = m_listView->itemRect( this );
+ }
+ if(column == 1)
+ {
+ r.setX( m_listView->header()->sectionPos( 1 ) );
+ r.setWidth( m_listView->header()->sectionSize( 1 ) - 1 );
+ }
+ else
+ {
+ r.setX( m_listView->header()->sectionPos( 0 ) );
+ r.setWidth( m_listView->header()->sectionSize( 0 ) - 1 );
+ }
+ r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ w->resize( r.size() );
+ m_listView->moveChild( w, r.x(), r.y() );
+}
+
+//Boolean attribute item
+AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+: AttributeItem(parent, title, title2)
+{
+ m_listView = listView;
+ combo = new QComboBox( m_listView->viewport() );
+ combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanTrue);
+ combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanFalse);
+ combo->hide();
+ QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ }
+
+AttributeBoolItem::~AttributeBoolItem()
+{
+ delete combo;
+}
+
+QString AttributeBoolItem::editorText(int)
+{
+ return combo->currentText();
+}
+
+void AttributeBoolItem::showEditor(int)
+{
+ placeEditor(combo);
+ combo->show();
+ if (text(1) == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanTrue)
+ combo->setCurrentItem(0);
+ else
+ combo->setCurrentItem(1);
+ combo->setFocus();
+}
+
+void AttributeBoolItem::hideEditor(int)
+{
+ m_listView->editorContentChanged();
+ setText(1, combo->currentText());
+ combo->hide();
+}
+
+//Boolean attribute item
+AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+: AttributeItem(parent, title, title2)
+{
+ m_listView = listView;
+ urlRequester = new KURLRequester( m_listView->viewport() );
+ urlRequester->setMode(KFile::File | KFile::ExistingOnly );
+ urlRequester->hide();
+ QObject::connect( urlRequester, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ }
+
+AttributeUrlItem::~AttributeUrlItem()
+{
+ delete urlRequester;
+}
+
+QString AttributeUrlItem::editorText(int)
+{
+ KURL url, baseURL;
+ QuantaCommon::setUrl(url, urlRequester->url());
+ baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url();
+ baseURL.setPath(baseURL.directory());
+ url = QExtFileInfo::toRelative(url, baseURL);
+ QString s = url.url();
+ if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol())
+ s.remove(0, url.protocol().length() + 3);
+ return s;
+}
+
+void AttributeUrlItem::showEditor(int)
+{
+ placeEditor(urlRequester);
+ urlRequester->show();
+ KURL url, baseURL;
+ baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url();
+ baseURL.setPath(baseURL.directory());
+ QuantaCommon::setUrl(url, text(1));
+ url= QExtFileInfo::toAbsolute(url, baseURL);
+ urlRequester->setURL(url.url());
+ urlRequester->setFocus();
+}
+
+void AttributeUrlItem::hideEditor(int)
+{
+ m_listView->editorContentChanged();
+ setText(1, editorText());
+ urlRequester->hide();
+}
+
+
+//editable listbox
+//Boolean attribute item
+AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2, Attribute *attr)
+: AttributeItem(parent, title, title2)
+{
+ m_listView = listView;
+ combo = new QComboBox( m_listView->viewport() );
+ Node *node = (static_cast<TagAttributeTree *>(m_listView))->node();
+ QTag *qTag = QuantaCommon::tagFromDTD(node);
+ if (qTag)
+ {
+ if (!attr)
+ attr = qTag->attribute(title);
+ if (attr)
+ {
+ combo->insertStringList(attr->values);
+ if (attr->source == "dcop") //fill the list with a result of a DCOP call
+ {
+ QString interface = "QuantaIf";
+ if (!attr->interface.isEmpty())
+ interface = attr->interface;
+ QString arguments = attr->arguments;
+ arguments.replace("%tagname%", node->tag->name);
+ DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments);
+ if (reply.isValid())
+ {
+ QStringList list = reply;
+ combo->insertStringList(list);
+ }
+ }
+
+ }
+ combo->insertItem("", 0);
+ combo->setEditable(true);
+ }
+ combo->hide();
+ QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ }
+
+AttributeListItem::~AttributeListItem()
+{
+ delete combo;
+}
+
+QString AttributeListItem::editorText(int)
+{
+ return combo->currentText();
+}
+
+void AttributeListItem::showEditor(int)
+{
+ placeEditor(combo);
+ combo->show();
+ int index = -1;
+ Node *node = (static_cast<TagAttributeTree *>(m_listView))->node();
+ QTag *qTag = QuantaCommon::tagFromDTD(node);
+ if (qTag)
+ {
+ Attribute *attr = qTag->attribute(text(0));
+ if (attr)
+ {
+ index = attr->values.findIndex(text(1));
+ }
+ }
+ if (index != -1)
+ combo->setCurrentItem(index + 1);
+ else
+ {
+ combo->changeItem(text(1), 0);
+ combo->setCurrentItem(0);
+ }
+ combo->setFocus();
+}
+
+void AttributeListItem::hideEditor(int)
+{
+ m_listView->editorContentChanged();
+ setText(1, combo->currentText());
+ combo->hide();
+}
+
+//editable color combobox
+AttributeColorItem::AttributeColorItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+: AttributeItem(parent, title, title2)
+{
+ m_listView = listView;
+ combo = new KColorCombo( m_listView->viewport() );
+ combo->setEditable(true);
+ combo->hide();
+ QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ }
+
+AttributeColorItem::~AttributeColorItem()
+{
+ delete combo;
+}
+
+QString AttributeColorItem::editorText(int)
+{
+ QString name = combo->color().name();
+ if (name == "#000000")
+ name = "";
+ combo->setCurrentText(name);
+ return name;
+}
+
+void AttributeColorItem::showEditor(int)
+{
+ placeEditor(combo);
+ combo->show();
+ combo->setColor(text(1));
+ combo->setCurrentText(text(1));
+ combo->setFocus();
+}
+
+void AttributeColorItem::hideEditor(int)
+{
+ m_listView->editorContentChanged();
+ QString name = combo->color().name();
+ if (name == "#000000")
+ name = "";
+ setText(1, name);
+ combo->hide();
+}
+
+//editable style combobox
+AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+: AttributeItem(parent, title, title2)
+{
+ m_listView = listView;
+ m_se = new StyleEditor( m_listView->viewport() );
+ m_se->setButtonIcon(4,0);
+ //combo->setEditable(true);
+ m_se->hide();
+
+ QObject::connect( m_se->button(), SIGNAL( clicked() ), m_listView, SLOT( editorContentChanged() ) );
+ }
+
+AttributeStyleItem::~AttributeStyleItem()
+{
+ delete m_se;
+}
+
+QString AttributeStyleItem::editorText(int)
+{
+ return m_se->lineEdit()->text();
+}
+
+void AttributeStyleItem::showEditor(int)
+{
+ placeEditor(m_se);
+ m_se->show();
+ m_se->lineEdit()->setText(text(1));
+ m_se->setFocus();
+}
+
+void AttributeStyleItem::hideEditor(int)
+{
+ m_listView->editorContentChanged();
+ setText(1, m_se->lineEdit()->text());
+ m_se->hide();
+}
+
diff --git a/quanta/treeviews/tagattributeitems.h b/quanta/treeviews/tagattributeitems.h
new file mode 100644
index 00000000..8d603529
--- /dev/null
+++ b/quanta/treeviews/tagattributeitems.h
@@ -0,0 +1,178 @@
+/***************************************************************************
+ tagattributeitems.h
+ -------------------
+ copyright : (C) 2003 by Andras Mantia <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 TAGATTRIBUTEITEM_H
+#define TAGATTRIBUTEITEM_H
+
+#include <qptrlist.h>
+
+class KColorCombo;
+class KURLRequester;
+class KListView;
+class KListViewItem;
+class QListViewItem;
+class QLineEdit;
+class QComboBox;
+
+class Attribute;
+class EditableTree;
+class TagAttributeTree;
+class Node;
+class StyleEditor;
+
+class TopLevelItem : public KListViewItem
+{
+
+public:
+ TopLevelItem(KListView *parent, const QString& title);
+ TopLevelItem(KListView *parent, QListViewItem* after, const QString& title);
+
+ virtual ~TopLevelItem();
+
+protected:
+
+ void paintCell( QPainter *p, const QColorGroup &cg,
+ int column, int width, int align );
+};
+
+class ParentItem : public KListViewItem
+{
+
+public:
+ ParentItem(TagAttributeTree *listView, QListViewItem *parent);
+
+ virtual ~ParentItem();
+ Node *node(int index);
+ void addNode(Node *node);
+ void showList(bool show);
+
+protected:
+
+ void paintCell( QPainter *p, const QColorGroup &cg,
+ int column, int width, int align );
+
+private:
+ QPtrList<Node> m_nodeList;
+ QComboBox *comboBox;
+ TagAttributeTree *m_listView;
+};
+
+class AttributeItem : public KListViewItem
+{
+public:
+ AttributeItem(QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeItem(EditableTree *listView, const QString& title, const QString& title2);
+ AttributeItem(EditableTree *listView, const QString& title, const QString& title2, QListViewItem* after);
+
+ virtual ~AttributeItem();
+ virtual void replaceCurrentEditor();
+ virtual void showEditor(int column = 1);
+ virtual void hideEditor(int column = 1);
+ virtual void placeEditor(QWidget *w, int column = 1);
+ virtual QString editorText(int column = 1);
+
+ //I'm not sane... lin is the right editor, lin2 is the left one.
+ QLineEdit *lin, *lin2;
+
+protected:
+
+ void paintCell( QPainter *p, const QColorGroup &cg,
+ int column, int width, int align );
+
+ EditableTree *m_listView;
+};
+
+class AttributeNameSpaceItem:public AttributeItem
+{
+public:
+ AttributeNameSpaceItem(QListViewItem* parent, const QString& title, const QString& title2): AttributeItem(parent, title, title2){};
+ AttributeNameSpaceItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2):AttributeItem(listView, parent, title, title2){};
+ virtual ~AttributeNameSpaceItem(){};
+
+};
+
+class AttributeBoolItem : public AttributeItem
+{
+public:
+ AttributeBoolItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+
+ virtual ~AttributeBoolItem();
+ virtual void showEditor(int column = 1);
+ virtual void hideEditor(int column = 1);
+ virtual QString editorText(int column = 1);
+
+private:
+ QComboBox* combo;
+};
+
+class AttributeUrlItem : public AttributeItem
+{
+public:
+ AttributeUrlItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+
+ virtual ~AttributeUrlItem();
+ virtual void showEditor(int column = 1);
+ virtual void hideEditor(int column = 1);
+ virtual QString editorText(int column = 1);
+
+private:
+ KURLRequester* urlRequester;
+};
+
+class AttributeListItem : public AttributeItem
+{
+public:
+ AttributeListItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2, Attribute *attr = 0L);
+
+ virtual ~AttributeListItem();
+ virtual void showEditor(int column = 1);
+ virtual void hideEditor(int column = 1);
+ virtual QString editorText(int column = 1);
+
+private:
+ QComboBox* combo;
+};
+
+class AttributeColorItem : public AttributeItem
+{
+public:
+ AttributeColorItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+
+ virtual ~AttributeColorItem();
+ virtual void showEditor(int column = 1);
+ virtual void hideEditor(int column = 1);
+ virtual QString editorText(int column = 1);
+
+private:
+ KColorCombo* combo;
+};
+
+class AttributeStyleItem : public AttributeItem
+{
+public:
+ AttributeStyleItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+
+ virtual ~AttributeStyleItem();
+ virtual void showEditor(int column = 1);
+ virtual void hideEditor(int column = 1);
+ virtual QString editorText(int column = 1);
+
+private:
+
+ StyleEditor *m_se;
+};
+
+
+#endif
diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp
new file mode 100644
index 00000000..a8e4406b
--- /dev/null
+++ b/quanta/treeviews/tagattributetree.cpp
@@ -0,0 +1,659 @@
+/***************************************************************************
+ tagattributetree.cpp
+ ---------------------
+ copyright : (C) 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qfont.h>
+#include <qpainter.h>
+#include <qtimer.h>
+#include <qlineedit.h>
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qtooltip.h>
+
+//kde includes
+#include <kaction.h>
+#include <klocale.h>
+#include <kpushbutton.h>
+#include <kstringhandler.h>
+#include <kdebug.h>
+#include <kiconloader.h>
+#include <khtmlview.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/view.h>
+#include <dom/dom_node.h>
+
+//app includes
+#include "tagattributetree.h"
+#include "tagattributeitems.h"
+#include "qtag.h"
+#include "node.h"
+#include "parser.h"
+#include "quantacommon.h"
+#include "document.h"
+#include "quantaview.h"
+#include "tag.h"
+#include "wkafkapart.h"
+#include "kafkacommon.h"
+#include "undoredo.h"
+
+#include "viewmanager.h"
+
+EditableTree::EditableTree(QWidget *parent, const char *name)
+: KListView(parent, name)
+{
+ m_editable = true;
+}
+
+EditableTree::~EditableTree()
+{
+
+}
+
+void EditableTree::setCurrentItem( QListViewItem *item)
+{
+ if ( item && m_editable)
+ {
+ QListViewItem *it = currentItem();
+ if ( dynamic_cast<AttributeItem*>(it) )
+ static_cast<AttributeItem*>(it)->hideEditor();
+
+ KListView::setCurrentItem(item);
+ it = currentItem();
+ if ( dynamic_cast<AttributeItem*>(it) )
+ static_cast<AttributeItem*>(it)->showEditor();
+ }
+}
+
+void EditableTree::editorContentChanged()
+{
+
+}
+
+void EditableTree::focusInEvent(QFocusEvent *)
+{
+ /**QListViewItem *it = currentItem();
+ if( dynamic_cast<AttributeItem*>(it))
+ {
+ static_cast<AttributeItem *>(it)->showEditor();
+ static_cast<AttributeItem *>(it)->lin->setFocus();
+ }*/
+}
+
+void EditableTree::focusOutEvent(QFocusEvent *)
+{
+ /**QListViewItem *it = currentItem();
+ if( dynamic_cast<AttributeItem*>(it))
+ {
+ static_cast<AttributeItem *>(it)->hideEditor();
+ }*/
+}
+
+DualEditableTree::DualEditableTree(QWidget *parent, const char *name)
+: EditableTree(parent, name)
+{
+ curCol = 0;
+ setFocusPolicy(QWidget::ClickFocus);
+ this->installEventFilter(this);
+ connect(this, SIGNAL(clicked(QListViewItem *, const QPoint &, int )),
+ this, SLOT(itemClicked(QListViewItem *, const QPoint &, int )));
+}
+
+DualEditableTree::~DualEditableTree()
+{
+
+}
+
+bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
+{
+ AttributeItem *it = dynamic_cast<AttributeItem*>(currentItem());
+ AttributeItem *up = 0L, *down = 0L;
+ if(!it)
+ return KListView::eventFilter(object, event);
+ if(currentItem()->itemAbove())
+ up = dynamic_cast<AttributeItem*>(currentItem()->itemAbove());
+ if(currentItem()->itemBelow())
+ down = dynamic_cast<AttributeItem *>(currentItem()->itemBelow());
+
+ if(event->type() == QEvent::KeyPress && m_editable)
+ {
+ QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ switch(keyevent->key())
+ {
+ case Key_Left:
+ if(curCol == 1 && it->lin->cursorPosition() == 0 )
+ {
+ it->hideEditor(1);
+ it->showEditor(0);
+ it->lin2->setFocus();
+ curCol = 0;
+ }
+ break;
+
+ case Key_Right:
+ if(curCol == 0 && (unsigned)it->lin2->cursorPosition() == it->lin2->text().length())
+ {
+ it->hideEditor(0);
+ it->showEditor(1);
+ it->lin->setFocus();
+ curCol = 1;
+ }
+ break;
+
+ case Key_Up:
+ if(up)
+ {
+ it->hideEditor(curCol);
+ up->showEditor(curCol);
+ }
+ break;
+
+ case Key_Down:
+ if(down)
+ {
+ it->hideEditor(curCol);
+ down->showEditor(curCol);
+ }
+ break;
+ }
+ }
+ return KListView::eventFilter(object, event);;
+}
+
+void DualEditableTree::resizeEvent(QResizeEvent *ev)
+{
+ KListView::resizeEvent(ev);
+ if(!currentItem()) return;
+ AttributeItem *item = dynamic_cast<AttributeItem*>(currentItem());
+ if(item)
+ {
+ item->hideEditor(curCol);
+ item->showEditor(curCol);
+ }
+}
+
+void DualEditableTree::setCurrentItem(QListViewItem *item)
+{
+ if ( item && m_editable)
+ {
+ QListViewItem *it = currentItem();
+ if ( dynamic_cast<AttributeItem*>(it) )
+ {
+ static_cast<AttributeItem*>(it)->hideEditor(0);
+ static_cast<AttributeItem*>(it)->hideEditor(1);
+ }
+
+ KListView::setCurrentItem(item);
+ it = currentItem();
+ if ( dynamic_cast<AttributeItem*>(it) )
+ static_cast<AttributeItem*>(it)->showEditor(curCol);
+ }
+}
+
+void DualEditableTree::editorContentChanged()
+{
+ emit itemModified(dynamic_cast<AttributeItem*>(currentItem()));
+}
+
+void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int column)
+{
+ if(item)
+ {
+ curCol = column;
+ if(item == currentItem())
+ setCurrentItem(item);
+ }
+}
+
+TagAttributeTree::TagAttributeTree(QWidget *parent, const char *name)
+: EditableTree(parent, name)
+{
+ setRootIsDecorated( true );
+ setSorting(-1);
+ setFrameStyle( Panel | Sunken );
+ setLineWidth( 2 );
+ setFocusPolicy(QWidget::ClickFocus);
+ addColumn(i18n("Attribute Name"));
+ addColumn(i18n("Value"));
+ setResizeMode(QListView::LastColumn);
+ m_node = 0L;
+ m_newNode = 0L;
+ m_parentItem = 0L;
+ rebuildEnabled = true;
+}
+
+TagAttributeTree::~TagAttributeTree()
+{
+}
+
+void TagAttributeTree::setCurrentNode(Node *node)
+{
+ if (m_node == node)
+ return;
+ m_node = node;
+ emit newNodeSelected(node);
+ if (!rebuildEnabled)
+ return;
+ clear();
+ m_parentItem = 0L;
+ //We don't want to be able to edit the text node but it's parent.
+ if (node && node->tag->type == Tag::Text)
+ m_node = node = node->parent;
+ if (!node)
+ return;
+#ifdef HEAVY_DEBUG
+ kafkaCommon::coutTree(baseNode, 2);
+ KafkaDocument::ref()->coutLinkTree(baseNode, 2);
+#endif
+ AttributeItem *item = 0L;
+ TopLevelItem *group = 0L;
+ QString attrName;
+ QTag *qTag = QuantaCommon::tagFromDTD(node);
+ Node *n = node->parent;
+ while (n)
+ {
+ if (n->tag->type == Tag::XmlTag)
+ {
+ if (!m_parentItem)
+ {
+ group = new TopLevelItem(this, 0L, i18n("Parent tags"));
+ m_parentItem = new ParentItem(this, group);
+ }
+ m_parentItem->addNode(n);
+ }
+ n = n->parent;
+ }
+
+ if (m_parentItem)
+ m_parentItem->showList(true);
+ if (group)
+ group->setOpen(true);
+// if (!node->tag->nameSpace.isEmpty())
+
+ if(node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd)
+ {
+ QString nameSpace = node->tag->nameSpace;
+ if (node->tag->type == Tag::XmlTagEnd)
+ nameSpace.remove('/');
+ group = new TopLevelItem(this, group, i18n("Namespace"));
+ item = new AttributeNameSpaceItem(this, group, i18n("prefix"), nameSpace);
+ group->setOpen(true);
+ }
+ if (qTag)
+ {
+ group = new TopLevelItem(this, group, i18n("Attributes"));
+ QStringList list;
+ for (int i = 0; i < qTag->attributeCount(); i++)
+ {
+ list += qTag->attributeAt(i)->name;
+ }
+ list.sort();
+ QStringList::Iterator it = list.end();
+ --it;
+ while (it != list.end())
+ {
+ Attribute *attr = qTag->attribute(*it);
+ if (attr->type == "check")
+ {
+ item = new AttributeBoolItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ if (attr->type == "url")
+ {
+ item = new AttributeUrlItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ if (attr->type == "list")
+ {
+ item = new AttributeListItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ if (attr->type == "color")
+ {
+ item = new AttributeColorItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ {
+ item = new AttributeItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ }
+ item->setRenameEnabled(1, true);
+ if (it != list.begin())
+ --it;
+ else
+ break;
+ }
+ group->setOpen(true);
+ for (uint i = 0; i < qTag->commonGroups.count(); i++)
+ {
+ group = new TopLevelItem(this, group, i18n(qTag->commonGroups[i].utf8()));
+ AttributeList *groupAttrs = qTag->parentDTD->commonAttrs->find(qTag->commonGroups[i]);
+ for (uint j = 0; j < groupAttrs->count(); j++)
+ {
+ Attribute *attr = groupAttrs->at(j);
+ attrName = attr->name;
+ if (attr->type == "check")
+ {
+ item = new AttributeBoolItem(this, group, attrName, node->tag->attributeValue(attrName));
+ } else
+ if (attr->type == "url")
+ {
+ item = new AttributeUrlItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ if (attr->type == "list")
+ {
+ item = new AttributeListItem(this, group, attr->name, node->tag->attributeValue(attr->name), attr);
+ } else
+ if (attr->type == "color")
+ {
+ item = new AttributeColorItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ if (attr->type == "css-style")
+ {
+ item = new AttributeStyleItem(this, group, attr->name, node->tag->attributeValue(attr->name));
+ } else
+ {
+ item = new AttributeItem(this, group, attrName, node->tag->attributeValue(attrName));
+ }
+ item->setRenameEnabled(1, true);
+ }
+ group->setOpen(true);
+ }
+
+ }
+ connect(this, SIGNAL(collapsed(QListViewItem*)), SLOT(slotCollapsed(QListViewItem*)));
+ connect(this, SIGNAL(expanded(QListViewItem*)), SLOT(slotExpanded(QListViewItem*)));
+}
+
+void TagAttributeTree::editorContentChanged()
+{
+ AttributeItem *item = dynamic_cast<AttributeItem*>(currentItem());
+ if (m_node && item )
+ {
+ rebuildEnabled = false;
+ if (dynamic_cast<AttributeNameSpaceItem*>(item))
+ {
+ QString nameSpace = item->editorText();
+ m_node->tag->write()->changeTagNamespace(m_node->tag, nameSpace);
+ } else
+ {
+ if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::SourceFocus)
+ {
+ m_node->tag->write()->changeTagAttribute(m_node->tag, item->text(0), item->editorText());
+ }
+ else
+ {
+ //edit the attribute
+ NodeModifsSet *modifs = new NodeModifsSet();
+ kafkaCommon::editNodeAttribute(m_node, item->text(0), item->editorText(), modifs);
+ ViewManager::ref()->activeDocument()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+#ifdef HEAVY_DEBUG
+ kafkaCommon::coutTree(baseNode, 2);
+#endif
+ }
+ }
+ rebuildEnabled = true;
+ }
+}
+
+/**void TagAttributeTree::setCurrentItem( QListViewItem *item )
+{
+ if ( item )
+ {
+ QListViewItem *it = currentItem();
+ if ( dynamic_cast<AttributeItem*>(it) )
+ static_cast<AttributeItem*>(it)->hideEditor();
+
+ KListView::setCurrentItem(item);
+ it = currentItem();
+ if ( dynamic_cast<AttributeItem*>(it) )
+ static_cast<AttributeItem*>(it)->showEditor();
+ }
+}*/
+
+void TagAttributeTree::slotParentSelected(int index)
+{
+ if (m_parentItem)
+ {
+ m_newNode = m_parentItem->node(index);
+ QTimer::singleShot(0, this, SLOT(slotDelayedSetCurrentNode()));
+ }
+}
+
+void TagAttributeTree::slotCollapsed(QListViewItem *item)
+{
+ if (m_parentItem && item == m_parentItem->parent())
+ m_parentItem->showList(false);
+}
+
+void TagAttributeTree::slotExpanded(QListViewItem *item)
+{
+ if (m_parentItem && item == m_parentItem->parent())
+ m_parentItem->showList(true);
+}
+
+void TagAttributeTree::slotDelayedSetCurrentNode()
+{
+ setCurrentNode(m_newNode);
+ if (ViewManager::ref()->activeDocument())
+ {
+ if (ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::SourceFocus)
+ ViewManager::ref()->activeDocument()->view()->setFocus();
+ else
+ KafkaDocument::ref()->getKafkaWidget()->view()->setFocus();
+ }
+}
+
+EnhancedTagAttributeTree::EnhancedTagAttributeTree(QWidget *parent, const char *name)
+: QWidget(parent, name)
+{
+
+ widgetLayout = new QGridLayout( this, 1, 1, 11, 6, "MainLayout");
+
+ attrTree = new TagAttributeTree(this, "TagAttributeTree");
+ attrTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
+ widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 );
+
+ nodeName = new QLabel(this, i18n( "Node Name" ));
+ nodeName->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
+
+ widgetLayout->addWidget( nodeName, 0, 0 );
+ deleteTag = new KPushButton(this, i18n( "Delete Tag" ));
+ deleteTag->setPixmap(SmallIcon("editdelete"));
+ deleteTag->setMaximumHeight(32);
+ deleteTag->setMaximumWidth(32);
+ QToolTip::add(deleteTag, i18n("Delete the current tag only."));
+
+ deleteAll = new KPushButton(this, i18n( "Delete All" ));
+ deleteAll->setPixmap(SmallIcon("editdelete"));
+ deleteAll->setMaximumHeight(32);
+ deleteAll->setMaximumWidth(32);
+ QToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
+
+ widgetLayout->addWidget( deleteTag, 0, 2 );
+ widgetLayout->addWidget( deleteAll, 0, 3 );
+ clearWState( WState_Polished );
+
+ connect(attrTree, SIGNAL(newNodeSelected(Node *)), this, SLOT(NodeSelected(Node *)));
+ connect(deleteTag, SIGNAL(clicked()), this, SLOT(deleteNode()));
+ connect(deleteAll, SIGNAL(clicked()), this, SLOT(deleteSubTree()));
+}
+
+EnhancedTagAttributeTree::~EnhancedTagAttributeTree()
+{
+
+}
+
+void EnhancedTagAttributeTree::setCurrentNode(Node *node)
+{
+ curNode = node;
+ attrTree->setCurrentNode(node);
+ showCaption();
+}
+
+void EnhancedTagAttributeTree::NodeSelected(Node *node)
+{
+ curNode = node;
+ //We don't want to be able to edit the text node but it's parent.
+ if (node && node->tag->type == Tag::Text)
+ curNode = node = node->parent;
+ showCaption();
+ emit newNodeSelected(node);
+}
+
+void EnhancedTagAttributeTree::showCaption()
+{
+ if(curNode)
+ {
+ if(curNode->tag->type == Tag::XmlTag || curNode->tag->type == Tag::XmlTagEnd ||
+ curNode->tag->type == Tag::ScriptTag)
+ {
+ QString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
+ nodeName->setText(KStringHandler::rPixelSqueeze(s, nodeName->fontMetrics(), attrTree->width()- 50));
+ }
+ else if(curNode->tag->type == Tag::Text)
+ nodeName->setText(i18n("Current tag: <b>text</b>"));
+ else if(curNode->tag->type == Tag::Comment)
+ nodeName->setText(i18n("Current tag: <b>comment</b>"));
+ else
+ nodeName->setText(i18n("Current tag:"));
+ }
+}
+
+void EnhancedTagAttributeTree::deleteSubTree()
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if(!curNode || !view->document())
+ return;
+ Node *oldCurNode;
+ NodeModifsSet *modifs;
+ int curLine, curCol;
+ long offset;
+ DOM::Node domNode;
+ QValueList<int> loc;
+
+ //Save the cursor position in kafka/quanta
+ if(view->hadLastFocus() == QuantaView::SourceFocus)
+ curNode->tag->beginPos(curLine, curCol);
+ else
+ {
+ KafkaDocument::ref()->getKafkaWidget()->getCurrentNode(domNode, offset);
+ if(!domNode.previousSibling().isNull())
+ domNode = domNode.previousSibling();
+ else if(!domNode.parentNode().isNull())
+ domNode = domNode.parentNode();
+ else
+ domNode = KafkaDocument::ref()->getKafkaWidget()->document();
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE)
+ offset = domNode.nodeValue().length();
+ else
+ offset = 0;
+ loc = kafkaCommon::getLocation(domNode);
+ }
+
+ //Remove the Nodes
+ oldCurNode = curNode;
+ curNode = 0L;
+ attrTree->setCurrentNode(curNode);
+
+ modifs = new NodeModifsSet();
+ kafkaCommon::extractAndDeleteNode(oldCurNode, modifs);
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+ //set the cursor position in kafka/quanta
+ if(view->hadLastFocus() == QuantaView::SourceFocus)
+ view->document()->viewCursorIf->setCursorPositionReal((uint)curLine, (uint)curCol);
+ else
+ {
+ domNode = kafkaCommon::getNodeFromLocation(loc,
+ KafkaDocument::ref()->getKafkaWidget()->document());
+ KafkaDocument::ref()->getKafkaWidget()->setCurrentNode(domNode, offset);
+ }
+}
+
+void EnhancedTagAttributeTree::deleteNode()
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if(!curNode || !view->document())
+ return;
+
+ Node *oldCurNode, *oldCurNodeParent, *child;
+ QTag *oldCurNodeParentQTag;
+ int curLine, curCol;
+ long offset;
+ DOM::Node domNode;
+ QValueList<int> loc;
+ NodeModifsSet *modifs;
+
+ //Save the cursor position in kafka/quanta
+ if(view->hadLastFocus() == QuantaView::SourceFocus)
+ curNode->tag->beginPos(curLine, curCol);
+ else
+ {
+ KafkaDocument::ref()->getKafkaWidget()->getCurrentNode(domNode, offset);
+ if(!domNode.previousSibling().isNull())
+ domNode = domNode.previousSibling();
+ else if(!domNode.parentNode().isNull())
+ domNode = domNode.parentNode();
+ else
+ domNode = KafkaDocument::ref()->getKafkaWidget()->document();
+ if(domNode.nodeType() == DOM::Node::TEXT_NODE)
+ offset = domNode.nodeValue().length();
+ else
+ offset = 0;
+ loc = kafkaCommon::getLocation(domNode);
+ }
+
+ //remove the Nodes
+ oldCurNode = curNode;
+ oldCurNodeParent = curNode->parent;
+ curNode = 0L;
+ attrTree->setCurrentNode(curNode);
+
+ modifs = new NodeModifsSet();
+ kafkaCommon::extractAndDeleteNode(oldCurNode, modifs, false);
+
+ //Then we see if the new parent - child relationships are valid, and if not, delete the child and restart
+ if(oldCurNodeParent)
+ {
+ oldCurNodeParentQTag = QuantaCommon::tagFromDTD(oldCurNodeParent);
+ if(oldCurNodeParentQTag)
+ {
+ child = oldCurNodeParent->child;
+ while(child)
+ {
+ if(!oldCurNodeParentQTag->isChild(child))
+ {
+ kafkaCommon::extractAndDeleteNode(child, modifs, false);
+ //too lazy to get the real next node ;-)
+ child = oldCurNodeParent->child;
+ }
+ else
+ child = child->next;
+ }
+ }
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+ //set the cursor position in kafka/quanta
+ if(view->hadLastFocus() == QuantaView::SourceFocus)
+ view->document()->viewCursorIf->setCursorPositionReal((uint)curLine, (uint)curCol);
+ else
+ {
+ domNode = kafkaCommon::getNodeFromLocation(loc,
+ KafkaDocument::ref()->getKafkaWidget()->document());
+ KafkaDocument::ref()->getKafkaWidget()->setCurrentNode(domNode, offset);
+ }
+
+}
+
+#include "tagattributetree.moc"
diff --git a/quanta/treeviews/tagattributetree.h b/quanta/treeviews/tagattributetree.h
new file mode 100644
index 00000000..bae0f3ff
--- /dev/null
+++ b/quanta/treeviews/tagattributetree.h
@@ -0,0 +1,143 @@
+/***************************************************************************
+ tagattributetree.h
+ -------------------
+ copyright : (C) 2003 by Andras Mantia <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 TAGATTRIBUTETREE_H
+#define TAGATTRIBUTETREE_H
+
+//qt includes
+#include <qwidget.h>
+
+//kde includes
+#include <klistview.h>
+
+//app includes
+
+class KListView;
+class QListViewItem;
+class ParentItem;
+class Node;
+class QLabel;
+class KPushButton;
+class QGridLayout;
+
+class EditableTree : public KListView {
+Q_OBJECT
+
+public:
+ EditableTree(QWidget *parent = 0, const char *name = 0);
+ virtual ~EditableTree();
+
+ virtual void setCurrentItem( QListViewItem *i);
+ void setEditable(bool b) {m_editable = b;}
+ bool isEditable() {return m_editable;}
+
+public slots:
+ virtual void editorContentChanged();
+ virtual void focusInEvent(QFocusEvent *);
+ virtual void focusOutEvent(QFocusEvent *);
+
+protected:
+ bool m_editable;
+
+};
+
+class DualEditableTree : public EditableTree
+{
+ Q_OBJECT
+public:
+ DualEditableTree(QWidget *parent = 0, const char *name = 0);
+ virtual ~DualEditableTree();
+
+ virtual void setCurrentItem ( QListViewItem *i);
+ int currentColumn() {return curCol;}
+
+protected:
+ virtual bool eventFilter(QObject *object, QEvent *event);
+ virtual void resizeEvent(QResizeEvent *);
+
+signals:
+ void itemModified( QListViewItem *);
+
+public slots:
+ virtual void editorContentChanged();
+
+private slots:
+ void itemClicked(QListViewItem *i, const QPoint &point, int col);
+
+private:
+ int curCol;
+};
+
+class TagAttributeTree : public EditableTree {
+ Q_OBJECT
+
+public:
+ TagAttributeTree(QWidget *parent=0, const char *name=0);
+ virtual ~TagAttributeTree();
+
+ void setCurrentNode(Node *node);
+ //virtual void setCurrentItem( QListViewItem *i );
+ Node *node() const {return m_node;}
+
+public slots:
+ void slotDelayedSetCurrentNode();
+ void slotParentSelected(int index);
+ virtual void editorContentChanged();
+
+private slots:
+ void slotCollapsed(QListViewItem *item);
+ void slotExpanded(QListViewItem *item);
+
+signals:
+ void newNodeSelected(Node *node);
+
+private:
+ Node *m_node;
+ Node *m_newNode;
+ bool rebuildEnabled;
+ ParentItem *m_parentItem;
+};
+
+//An enhanced TagAttributeTree with the tag name and buttons to delete the tag.
+class EnhancedTagAttributeTree : public QWidget
+{
+Q_OBJECT
+public:
+ EnhancedTagAttributeTree(QWidget *parent = 0, const char *name = 0);
+ virtual ~EnhancedTagAttributeTree();
+
+ void setCurrentNode(Node *node);
+ Node *node() const {return attrTree->node();}
+
+signals:
+ void newNodeSelected(Node *node);
+
+private slots:
+ void NodeSelected(Node *node);
+ void deleteNode();
+ void deleteSubTree();
+
+private:
+ void showCaption();
+
+ QLabel *nodeName;
+ KPushButton* deleteAll;
+ KPushButton* deleteTag;
+ TagAttributeTree *attrTree;
+ QGridLayout *widgetLayout;
+ Node *curNode;
+};
+
+#endif
+
diff --git a/quanta/treeviews/templatedirform.ui b/quanta/treeviews/templatedirform.ui
new file mode 100644
index 00000000..4ab6d6c1
--- /dev/null
+++ b/quanta/treeviews/templatedirform.ui
@@ -0,0 +1,170 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>TemplateDirForm</class>
+<comment>/***************************************************************************
+ * *
+ * 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. *
+ * *
+ ***************************************************************************/
+
+</comment>
+<author>(C) 2002 by Andras Mantia &lt;amantia@kde.org&gt;</author>
+<widget class="QDialog">
+ <property name="name">
+ <cstring>TemplateDirForm</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>309</width>
+ <height>157</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Create Template Folder</string>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QLabel" row="1" column="0">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Type:</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Name:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1">
+ <property name="name">
+ <cstring>typesCombo</cstring>
+ </property>
+ </widget>
+ <widget class="QLineEdit" row="0" column="1">
+ <property name="name">
+ <cstring>dirName</cstring>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>parentAttr</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Inherit parent attribute</string>
+ </property>
+ </widget>
+ <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>layout4</cstring>
+ </property>
+ <hbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>38</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonOk</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;OK</string>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>25</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QPushButton">
+ <property name="name">
+ <cstring>buttonCancel</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Cancel</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>38</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </widget>
+ </grid>
+</widget>
+<connections>
+ <connection>
+ <sender>parentAttr</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>typesCombo</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+</connections>
+<tabstops>
+ <tabstop>dirName</tabstop>
+ <tabstop>typesCombo</tabstop>
+ <tabstop>parentAttr</tabstop>
+ <tabstop>buttonOk</tabstop>
+ <tabstop>buttonCancel</tabstop>
+</tabstops>
+<slots>
+ <slot>okBtn_clicked()</slot>
+</slots>
+<layoutdefaults spacing="6" margin="11"/>
+<includehints>
+ <includehint>kcombobox.h</includehint>
+</includehints>
+</UI>
diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp
new file mode 100644
index 00000000..e87e2428
--- /dev/null
+++ b/quanta/treeviews/templatestreeview.cpp
@@ -0,0 +1,1079 @@
+/***************************************************************************
+ templatestreeview.cpp - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001-2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <unistd.h>
+#include <grp.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+// QT includes
+#include <qbuttongroup.h>
+#include <qcheckbox.h>
+#include <qclipboard.h>
+#include <qdir.h>
+#include <qpixmap.h>
+#include <qheader.h>
+#include <qpoint.h>
+#include <qlayout.h>
+#include <qtextedit.h>
+#include <qregexp.h>
+#include <qlabel.h>
+#include <qmap.h>
+#include <qwidgetstack.h>
+
+// KDE includes
+#include <kapplication.h>
+#include <klocale.h>
+#include <kiconloader.h>
+#include <kstandarddirs.h>
+#include <kmainwindow.h>
+#include <kmimetype.h>
+#include <kmessagebox.h>
+#include <kcombobox.h>
+#include <kpopupmenu.h>
+#include <kpropertiesdialog.h>
+#include <kurlrequester.h>
+#include <kurlrequesterdlg.h>
+#include <ktempdir.h>
+#include <ktempfile.h>
+#include <kio/netaccess.h>
+#include <kurldrag.h>
+#include <ktar.h>
+#include <kdebug.h>
+#include <kfile.h>
+
+
+#include "templatestreeview.h"
+#include "copyto.h"
+#include "newtemplatedirdlg.h"
+#include "qextfileinfo.h"
+#include "quantanetaccess.h"
+#include "quantapropertiespage.h"
+#include "resource.h"
+#include "tagaction.h"
+#include "tagmaildlg.h"
+
+#define EXCLUDE ".*\\.tmpl$"
+#define TMPL ".tmpl"
+#define NONE "None"
+
+
+const QString textMenu = I18N_NOOP("Insert as &Text");
+const QString binaryMenu = I18N_NOOP("Insert &Link to File");
+const QString docMenu = I18N_NOOP("&New Document Based on This");
+const QString siteMenu = I18N_NOOP("&Extract Site Template To...");
+QMap<QString, QString> typeToi18n;
+QMap<QString, QString> i18nToType;
+
+
+//TemplatesTreeBranch implementation
+TemplatesTreeBranch::TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden,
+ KFileTreeViewItem *branchRoot)
+ : BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
+{
+}
+
+KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *parent,
+ KFileItem *fileItem )
+{
+ BaseTreeViewItem *tvi = 0;
+ if( parent && fileItem )
+ {
+ KURL url = fileItem->url();
+ tvi = new BaseTreeViewItem( parent, fileItem, this );
+ if (tvi && fileItem->isDir())
+ {
+ if (url.isLocalFile())
+ {
+ QDir dir (url.path(), "", QDir::All);
+ tvi->setExpandable(dir.count() != 2); // . and .. are always there
+ } else {
+ tvi->setExpandable(true); // we assume there is something
+ }
+ } else
+ {
+ url = static_cast<BaseTreeViewItem*>(parent)->url();
+ }
+ QFileInfo dotFileInfo(url.path() + "/.dirinfo");
+ while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
+ {
+ dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ }
+ if (dotFileInfo.exists())
+ {
+ KConfig *config = new KConfig(dotFileInfo.filePath());
+ QString s = config->readEntry("Type");
+ tvi->setText(1, typeToi18n[s]);
+ delete config;
+ }
+
+ }
+ else
+ kdDebug(24000) << "TemplatesTreeBranch::createTreeViewItem: Have no parent" << endl;
+ return tvi;
+}
+
+
+
+TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
+ : BaseTreeView(parent,name), m_projectDir(0), m_mainWindow(parent)
+{
+ typeToi18n["text/all"] = i18n("Text Snippet");
+ typeToi18n["file/all"] = i18n("Binary File");
+ typeToi18n["template/all"] = i18n("Document Template");
+ typeToi18n["site/all"] = i18n("Site Template");
+ i18nToType[i18n("Text Snippet")] = "text/all";
+ i18nToType[i18n("Binary File")] = "file/all";
+ i18nToType[i18n("Document Template")] = "template/all";
+ i18nToType[i18n("Site Template")] = "site/all";
+
+ m_fileMenu = new KPopupMenu(this);
+
+ m_openId = m_fileMenu->insertItem(i18n("Open"), this ,SLOT(slotInsert()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertSeparator();
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+
+ m_folderMenu = new KPopupMenu(this);
+
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, SLOT(slotNewDir()));
+ m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
+ m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
+ m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertSeparator();
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+
+ m_emptyAreaMenu = new KPopupMenu(this);
+ m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
+
+ addColumn(i18n("Templates"), -1);
+ addColumn(i18n("Group"), -1);
+
+ globalURL.setPath(qConfig.globalDataDir + resourceDir + "templates/");
+ newBranch(globalURL);
+
+ localURL.setPath(locateLocal("data", resourceDir + "templates/"));
+ newBranch(localURL);
+
+ connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
+ this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+
+ connect(this, SIGNAL(open(QListViewItem *)),
+ this, SLOT(slotSelectFile(QListViewItem *)));
+
+ setAcceptDrops(true);
+ setSelectionMode(QListView::Single);
+ setDragEnabled(true);
+ setSaveOpenFolder(true);
+ restoreLayout( kapp->config(), className() );
+ // the restored size of the first column might be too large for the current content
+ // we set it to 10 and the listview will adjust it to the size of the largest entry
+ setColumnWidth(0, 10);
+}
+
+TemplatesTreeView::~TemplatesTreeView()
+{
+}
+
+
+KFileTreeBranch* TemplatesTreeView::newBranch(const KURL& url)
+{
+ BaseTreeBranch *newBrnch;
+ if (url == globalURL)
+ {
+ newBrnch = new TemplatesTreeBranch(this, url, i18n("Global Templates"), SmallIcon("ttab"));
+ } else
+ {
+ if (url == localURL)
+ newBrnch = new TemplatesTreeBranch(this, url, i18n("Local Templates"), SmallIcon("ttab"));
+ else
+ {
+ newBrnch = new TemplatesTreeBranch(this, url, i18n("Project Templates"), SmallIcon("ptab"));
+ m_projectDir = newBrnch;
+ }
+ }
+ newBrnch->excludeFilterRx.setPattern(EXCLUDE);
+ addBranch(newBrnch);
+ if (url.isLocalFile())
+ {
+ QDir dir (url.path(), "", QDir::All);
+ newBrnch->root()->setExpandable(dir.count() != 2); // . and .. are always there
+ } else {
+ newBrnch->root()->setExpandable(true); // we assume there is something
+ }
+
+ return newBrnch;
+}
+
+
+/** No descriptions */
+void TemplatesTreeView::slotInsertInDocument()
+{
+
+ KURL url = filterTemplate();
+ if (QuantaCommon::checkMimeGroup(url, "text"))
+ {
+ emit insertFile(url);
+ } else
+ {
+ if (QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
+ {
+ emit insertFile(url);
+ }
+ }
+
+}
+
+void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &point)
+{
+ if (!item)
+ {
+ m_emptyAreaMenu->popup(point);
+ return;
+ }
+ setSelected(item, true);
+ bool hasProject = m_projectName;
+ m_folderMenu->setItemVisible(m_insertFolderInProject, hasProject);
+ m_fileMenu->setItemVisible(m_insertFileInProject, hasProject);
+
+ KFileTreeViewItem *curItem = currentKFileTreeViewItem();
+ if ( curItem->isDir() )
+ {
+ m_folderMenu->setItemVisible(m_menuPasteFolder, isPathInClipboard());
+ if ( curItem == curItem->branch()->root())
+ {
+ m_folderMenu ->setItemVisible(m_deleteMenuId, false);
+ m_folderMenu ->setItemVisible(m_reloadMenuId, true);
+ m_folderMenu ->setItemVisible(m_downloadMenuId, true);
+ } else
+ {
+ m_folderMenu ->setItemVisible(m_deleteMenuId, true);
+ m_folderMenu ->setItemVisible(m_reloadMenuId, false);
+ m_folderMenu ->setItemVisible(m_downloadMenuId, false);
+ }
+ m_folderMenu ->popup(point);
+ } else
+ {
+ m_dirInfo = readDirInfo();
+
+ QString menuText = "";
+
+ if (m_dirInfo.mimeType.upper().contains("TEXT"))
+ menuText = i18n(textMenu.utf8());
+ else if (m_dirInfo.mimeType.upper().contains("FILE"))
+ menuText = i18n(binaryMenu.utf8());
+ else if (m_dirInfo.mimeType.upper().contains("TEMPLATE"))
+ menuText = i18n(docMenu.utf8());
+ else if (m_dirInfo.mimeType.upper().contains("SITE"))
+ menuText = i18n(siteMenu.utf8());
+
+ if (menuText.isEmpty())
+ {
+ m_fileMenu->setItemVisible(m_openId, false);
+ } else
+ {
+ m_fileMenu->setItemVisible(m_openId, true);
+ m_fileMenu->changeItem(m_openId, menuText);
+ }
+ m_fileMenu->setItemVisible(m_menuClose, isFileOpen(currentURL()));
+
+ m_fileMenu->popup( point);
+ }
+}
+/** No descriptions */
+void TemplatesTreeView::slotNewDocument()
+{
+ KURL url = filterTemplate();
+ if (QuantaCommon::checkMimeGroup(url, "text") || QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
+ {
+ QListViewItem *item = currentItem();
+ if (item )
+ {
+ if ( currentKFileTreeViewItem() != currentKFileTreeViewItem()->branch()->root())
+ {
+ emit openFile(KURL());
+ emit insertFile(url);
+ }
+ }
+ }
+}
+
+/** Insert the template as text, image, new document. */
+void TemplatesTreeView::slotInsert()
+{
+ QString menuText = m_fileMenu->text(m_openId);
+
+ if (menuText == i18n(textMenu.utf8()))
+ slotInsertInDocument();
+ else if (menuText == i18n(binaryMenu.utf8()))
+ slotInsertTag();
+ else if (menuText == i18n(docMenu.utf8()))
+ slotNewDocument();
+ if (menuText == i18n(siteMenu.utf8()))
+ slotExtractSiteTemplate();
+}
+
+void TemplatesTreeView::slotSelectFile(QListViewItem *item)
+{
+ if ( !item ) return;
+
+ KFileTreeViewItem *kftvItem = currentKFileTreeViewItem();
+ if ( !kftvItem ) return;
+
+ if ( !kftvItem->isDir() )
+ {
+ m_dirInfo = readDirInfo();
+/* if (m_dirInfo.mimeType.upper().contains("SITE"))
+ {
+ slotExtractSiteTemplate();
+ return;
+ }*/
+ if (expandArchiv(kftvItem)) return;
+ if (m_dirInfo.mimeType.upper().contains("TEXT"))
+ slotInsertInDocument();
+ else if (m_dirInfo.mimeType.upper().contains("FILE"))
+ slotInsertTag();
+ else if (m_dirInfo.mimeType.upper().contains("TEMPLATE"))
+ slotNewDocument();
+ }
+}
+
+void TemplatesTreeView::slotOpen()
+{
+ BaseTreeView::slotSelectFile(currentItem());
+}
+
+/** No descriptions */
+void TemplatesTreeView::slotNewDir()
+{
+ NewTemplateDirDlg *createDirDlg = new NewTemplateDirDlg(this,i18n("Create New Template Folder"));
+ createDirDlg->typesCombo->insertItem(typeToi18n["text/all"]);
+ createDirDlg->typesCombo->insertItem(typeToi18n["file/all"]);
+ createDirDlg->typesCombo->insertItem(typeToi18n["template/all"]);
+ createDirDlg->typesCombo->insertItem(typeToi18n["site/all"]);
+
+ m_dirInfo = readDirInfo();
+
+ if (m_dirInfo.mimeType.isEmpty())
+ {
+ createDirDlg->parentAttr->setText(i18n("&Inherit parent attribute (nothing)"));
+ } else
+ {
+ createDirDlg->parentAttr->setText(i18n("&Inherit parent attribute (%1)").arg(typeToi18n[m_dirInfo.mimeType]));
+ }
+ if (createDirDlg->exec())
+ {
+ QDir dir;
+
+ QString startDir = "";
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ startDir = currentURL().path();
+ } else
+ {
+ startDir = currentURL().path() + "/dummy_file";
+ }
+ startDir = QFileInfo(startDir).dirPath();
+ if (!dir.mkdir(startDir+"/"+createDirDlg->dirName->text()))
+ {
+ KMessageBox::error(this,i18n("Error while creating the new folder.\n \
+ Maybe you do not have permission to write in the %1 folder.").arg(startDir));
+ return;
+ }
+ if (! createDirDlg->parentAttr->isChecked())
+ {
+ m_dirInfo.mimeType = i18nToType[createDirDlg->typesCombo->currentText()];
+ m_dirInfo.preText = "";
+ m_dirInfo.postText = "";
+ writeDirInfo(startDir+"/"+createDirDlg->dirName->text()+"/.dirinfo");
+ }
+ }
+}
+/** No descriptions */
+
+QDragObject * TemplatesTreeView::dragObject ()
+{
+ // don't drag folders
+ if ( ! currentKFileTreeViewItem() || currentKFileTreeViewItem()->isDir() ) return 0;
+
+ m_dirInfo = readDirInfo();
+ if(!m_dirInfo.mimeType.isEmpty()) // only drag when the template type is specified
+ {
+ KURLDrag *drag = new KURLDrag(KURL::List(currentURL()), this);
+ return drag;
+ }
+ return 0;
+}
+
+/** No descriptions */
+void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
+{
+ if (KURLDrag::canDecode(e))
+ {
+ // handles url drops
+ BaseTreeView::contentsDropEvent(e);
+ return;
+ }
+ if (QTextDrag::canDecode(e))
+ {
+ QListViewItem *item = itemAt(contentsToViewport(e->pos()));
+ if (item)
+ {
+ KURL dest;
+ if ( currentKFileTreeViewItem()->isDir() )
+ dest = currentURL();
+ else
+ dest = currentURL().directory(false);
+ dest.adjustPath(+1);
+ QString content;
+ QTextDrag::decode(e, content);
+ KURL url =KURLRequesterDlg::getURL( dest.path() + "template.txt",
+ this, i18n("Save selection as template file:"));
+ if ( !url.isEmpty() )
+ {
+ //now save the file
+ KTempFile* tempFile = new KTempFile(tmpDir);
+ tempFile->setAutoDelete(true);
+ tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ *(tempFile->textStream()) << content;
+ tempFile->close();
+ bool proceed = true;
+ if (QExtFileInfo::exists(url, false, this))
+ {
+ proceed = KMessageBox::warningContinueCancel(this, i18n("<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)),i18n("Overwrite"), i18n("Overwrite")) == KMessageBox::Continue;
+ }
+ if (proceed)
+ {
+ if (!QuantaNetAccess::upload(tempFile->name(), url, m_parent, false))
+ {
+ KMessageBox::error(this,i18n("<qt>Could not write to file <b>%1</b>.<br>Check if you have rights to write there or that your connection is working.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
+ }
+ }
+ delete tempFile;
+ }
+ }
+ }
+ // must be done to reset timer etc.
+ BaseTreeView::contentsDropEvent(e);
+}
+
+/** Reads a .dirinfo file from the selected item's path */
+DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
+{
+ DirInfo dirInfo;
+ QString startDir = dir;
+
+ if (startDir.isEmpty())
+ {
+ if (!currentKFileTreeViewItem()->isDir())
+ {
+ startDir = currentURL().path();
+ } else
+ {
+ startDir = currentURL().path() + "/dummy_file";
+ }
+ }
+
+ QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+
+ while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
+ {
+ dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ }
+
+ KConfig *config = new KConfig(dotFileInfo.filePath());
+ dirInfo.mimeType = config->readEntry("Type");
+ dirInfo.preText = config->readEntry("PreText");
+ dirInfo.postText = config->readEntry("PostText");
+ dirInfo.usePrePostText = config->readBoolEntry("UsePrePostText", false);
+
+ delete config;
+ return dirInfo;
+}
+
+/** Writes a .dirinfo file from the selected item's path */
+bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
+{
+ QString startDir = "";
+
+ if (m_dirInfoFile.isEmpty())
+ {
+ if ( !currentKFileTreeViewItem()->isDir() )
+ {
+ startDir = currentURL().path();
+ } else
+ {
+ startDir = currentURL().path() + "/dummy_file";
+ }
+ } else
+ {
+ startDir = m_dirInfoFile;
+ }
+
+ QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+
+ bool success = false;
+ KConfig *config = new KConfig(dotFileInfo.filePath());
+ if (!config->isReadOnly())
+ {
+ config->writeEntry("Type", m_dirInfo.mimeType);
+ config->writeEntry("PreText", m_dirInfo.preText);
+ config->writeEntry("PostText", m_dirInfo.postText);
+ config->writeEntry("UsePrePostText", m_dirInfo.usePrePostText);
+ config->sync();
+ success = true;
+ }
+ delete config;
+ return success;
+}
+
+void TemplatesTreeView::slotProperties()
+{
+ if ( !currentItem() ) return;
+ KURL url = currentURL();
+
+ KPropertiesDialog *propDlg = new KPropertiesDialog( url, this, 0L, false, false); //autodeletes itself
+
+//Always add the Quanta directory page
+ QFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
+ QVBoxLayout *topLayout = new QVBoxLayout( quantaDirPage);
+ m_quantaProperties = new QuantaPropertiesPage( quantaDirPage, i18n("Quanta") );
+
+ m_quantaProperties->typesCombo->insertItem(typeToi18n["text/all"]);
+ m_quantaProperties->typesCombo->insertItem(typeToi18n["file/all"]);
+ m_quantaProperties->typesCombo->insertItem(typeToi18n["template/all"]);
+ m_quantaProperties->typesCombo->insertItem(typeToi18n["site/all"]);
+
+ m_dirInfo = readDirInfo();
+
+ m_quantaProperties->typesCombo->setCurrentItem(typeToi18n[m_dirInfo.mimeType]);
+
+ KIO::UDSEntry entry;
+ KIO::NetAccess::stat(url, entry, this);
+ KFileItem fItem(entry, url);
+ QString permissions = fItem.permissionsString();
+ QString userName;
+ struct passwd *user = getpwuid(getuid());
+ if (user)
+ userName = QString::fromLocal8Bit(user->pw_name);
+ QString groupName;
+ gid_t gid = getgid();
+ struct group *ge = getgrgid(gid);
+ if (ge)
+ {
+ groupName = QString::fromLocal8Bit(ge->gr_name);
+ if (groupName.isEmpty())
+ groupName.sprintf("%d", ge->gr_gid);
+ } else
+ groupName.sprintf("%d", gid);
+ bool writable = false;
+ if (permissions[8] == 'w' || (permissions[2] == 'w' && userName == fItem.user()) || (permissions[5] == 'w' && groupName == fItem.group()))
+ writable = true;
+
+ QString startDir = "";
+ if (!currentKFileTreeViewItem()->isDir())
+ {
+ startDir = url.path();
+ m_quantaProperties->typeStack->raiseWidget(1);
+ } else
+ {
+ startDir = url.path() + "/dummy_file";
+ m_quantaProperties->typeStack->raiseWidget(0);
+ }
+ m_quantaProperties->setEnabled(writable);
+ QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ m_parentDirInfo = readDirInfo(dotFileInfo.dirPath());
+ if (!dotFileInfo.exists() || m_dirInfo.mimeType == m_parentDirInfo.mimeType)
+ {
+ m_quantaProperties->parentAttr->setChecked(true);
+ }
+ if (m_parentDirInfo.mimeType.isEmpty())
+ {
+ m_quantaProperties->parentAttr->setText(i18n("&Inherit parent attribute (nothing)"));
+ } else
+ {
+ m_quantaProperties->parentAttr->setText(i18n("&Inherit parent attribute (%1)").arg(typeToi18n[m_parentDirInfo.mimeType]));
+ }
+ m_quantaProperties->preTextEdit->setText(m_dirInfo.preText);
+ m_quantaProperties->postTextEdit->setText(m_dirInfo.postText);
+ if (m_dirInfo.usePrePostText)
+ {
+ m_quantaProperties->usePrePostText->setChecked(true);
+ }
+
+ topLayout->addWidget( m_quantaProperties );
+ connect( propDlg, SIGNAL( applied() ), this , SLOT( slotPropertiesApplied()) );
+
+ QString name = url.path() + TMPL;
+ KConfig config(name);
+ config.setGroup("Filtering");
+ name = config.readEntry("Action", NONE);
+ if ( name == NONE )
+ name = i18n(NONE);
+ uint pos = 0;
+ uint j = 1;
+ m_quantaProperties->actionCombo->insertItem(i18n(NONE));
+ QString tmpStr;
+ KActionCollection *ac = m_mainWindow->actionCollection();
+ uint acCount = ac->count();
+ for (uint i = 0; i < acCount; i++)
+ {
+ TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
+ if (action)
+ {
+ QDomElement el = action->data();
+ QString type = el.attribute("type", "tag");
+ if (type == "script")
+ {
+ tmpStr = action->text().replace(QRegExp("\\&(?!\\&)"),"");
+ m_quantaProperties->actionCombo->insertItem(tmpStr);
+ if (tmpStr == name)
+ pos = j;
+ j++;
+ }
+ }
+ }
+ m_quantaProperties->actionCombo->setCurrentItem(pos);
+
+//If the item is a file, add the Quanta file info page
+ addFileInfoPage(propDlg);
+ if (propDlg->exec() == QDialog::Accepted)
+ {
+//TODO: move to slotPropertiesApplied
+ if (url != propDlg->kurl())
+ {
+ itemRenamed(url, propDlg->kurl());
+ }
+ }
+}
+
+
+/** No descriptions */
+void TemplatesTreeView::slotPropertiesApplied()
+{
+ DirInfo m_localDirInfo;
+ QString typeString = "";
+
+ if (!m_quantaProperties->parentAttr->isChecked())
+ {
+ m_localDirInfo.mimeType = m_quantaProperties->typesCombo->currentText();
+ typeString = m_localDirInfo.mimeType;
+ m_localDirInfo.mimeType = i18nToType[m_localDirInfo.mimeType];
+
+ } else
+ {
+ if (m_dirInfo.mimeType != m_parentDirInfo.mimeType)
+ typeString = typeToi18n[m_parentDirInfo.mimeType];
+ m_localDirInfo.mimeType = m_parentDirInfo.mimeType;
+ }
+
+ m_localDirInfo.usePrePostText = m_quantaProperties->usePrePostText->isChecked();
+ m_localDirInfo.preText = m_quantaProperties->preTextEdit->text();
+ m_localDirInfo.postText = m_quantaProperties->postTextEdit->text();
+
+ if ( (m_dirInfo.mimeType != m_localDirInfo.mimeType) ||
+ (m_dirInfo.preText != m_localDirInfo.preText) ||
+ (m_dirInfo.postText != m_localDirInfo.postText))
+ {
+ m_dirInfo.mimeType = m_localDirInfo.mimeType;
+ m_dirInfo.preText = m_localDirInfo.preText;
+ m_dirInfo.postText = m_localDirInfo.postText;
+ m_dirInfo.usePrePostText = m_localDirInfo.usePrePostText;
+ bool result = writeDirInfo();
+ KFileTreeViewItem *item = currentKFileTreeViewItem();
+ if (item && !item->isDir())
+ item = static_cast<KFileTreeViewItem *>(item->parent());
+ if (result && item && !typeString.isEmpty())
+ {
+ if (item->parent() && item->isDir())
+ item->setText(1, typeString);
+ updateTypeDescription(item, typeString);
+ }
+ }
+
+ writeTemplateInfo();
+}
+
+void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QString &typeString)
+{
+ if (item->parent() && item->isDir())
+ item->setText(1, typeString);
+ KFileTreeViewItem *curItem = static_cast<KFileTreeViewItem *>(item->firstChild());
+ while (curItem && curItem != static_cast<KFileTreeViewItem *>(item->nextSibling()))
+ {
+ if (!curItem->isDir())
+ {
+ curItem->setText(1, typeString);
+ } else
+ {
+ QFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
+ if (!dotFileInfo.exists())
+ updateTypeDescription(curItem, typeString);
+ }
+ curItem = static_cast<KFileTreeViewItem *>(curItem->nextSibling());
+ }
+}
+
+/** No descriptions */
+void TemplatesTreeView::slotInsertTag()
+{
+ if (currentItem())
+ {
+ m_dirInfo = readDirInfo();
+ KURL url = currentURL();
+ emit insertTag( url, m_dirInfo);
+ }
+}
+/*
+ Attention, this is called whenever a drop on a kate window happens!
+*/
+void TemplatesTreeView::slotDragInsert(QDropEvent *e)
+{
+ if (KURLDrag::canDecode(e))
+ {
+ KURL::List fileList;
+ KURLDrag::decode(e, fileList);
+
+ if(fileList.empty())
+ return;
+
+ KURL url = fileList.front();
+
+ QString localFileName;
+ if (url.isLocalFile())
+ {
+ localFileName = url.path();
+ m_dirInfo = readDirInfo(localFileName);
+ }
+ QString mimeType = KMimeType::findByURL(url)->name();
+
+ /* First, see if the type of the file is specified in the .dirinfo file */
+ if(m_dirInfo.mimeType.isEmpty())
+ {
+ // no .dirinfo file present, so we insert it as tag
+ emit insertTag(url, m_dirInfo);
+ } else
+ {
+ if(m_dirInfo.mimeType == "text/all") // default to inserting in document
+ {
+ if(!mimeType.contains("text", false) && QuantaCommon::denyBinaryInsert(this) != KMessageBox::Yes)
+ {
+ return;
+ }
+ emit insertFile(KURL::fromPathOrURL( localFileName ));
+ }
+
+ if(m_dirInfo.mimeType == "file/all")
+ {
+ // whatever this is, insert it with a tag (image or link or prefix/postfix)
+ emit insertTag(KURL::fromPathOrURL( localFileName ), m_dirInfo);
+ }
+ else
+ if(m_dirInfo.mimeType == "template/all")
+ {
+ if(!mimeType.contains("text", false) && QuantaCommon::denyBinaryInsert(this) != KMessageBox::Yes)
+ {
+ return;
+ }
+ emit openFile(KURL());
+ emit insertFile(KURL::fromPathOrURL( localFileName ));
+ }
+ }
+ } else
+ if (QTextDrag::canDecode(e))
+ {
+ QString s;
+ QTextDrag::decode(e, s);
+ KMessageBox::information(this,s, "Decode");
+ }
+}
+
+void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const KURL &baseURL, const KURL &templateURL)
+{
+ BaseTreeView::slotNewProjectLoaded(projectName, baseURL, templateURL); // set m_projectName and m_projectBaseURL
+ if (m_projectDir)
+ removeBranch(m_projectDir);
+ if (!templateURL.isEmpty())
+ {
+ newBranch(templateURL);
+ }
+}
+
+
+/*!
+ \fn TemplatesTreeView::writeTemplateInfo()
+ */
+void TemplatesTreeView::writeTemplateInfo()
+{
+ QString fileName = currentURL().path() + TMPL;
+ KConfig config(fileName);
+ config.setGroup("Filtering");
+ if ( m_quantaProperties->actionCombo->currentText() == i18n(NONE) )
+ config.writeEntry("Action", NONE);
+ else
+ config.writeEntry("Action", m_quantaProperties->actionCombo->currentText());
+ config.sync();
+}
+
+void TemplatesTreeView::slotPaste()
+{
+ if (currentItem())
+ {
+ QClipboard *cb = QApplication::clipboard();
+ KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+
+ KURL url;
+ uint j = list.count();
+ for (uint i = 0; i < j; i++)
+ {
+ url = list[i];
+ url.setFileName(url.fileName() + TMPL);
+ if (url.isLocalFile() && QFileInfo(url.path()).exists())
+ list += url;
+ }
+ url = currentURL();
+ if ( ! currentKFileTreeViewItem()->isDir() )
+ url.setFileName(""); // don't paste on files but in dirs
+ KIO::Job *job = KIO::copy( list, url);
+ connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ }
+}
+
+void TemplatesTreeView::slotDelete()
+{
+ if (currentItem())
+ {
+ KURL url = currentURL();
+ QString msg;
+ if ( currentKFileTreeViewItem()->isDir() )
+ msg = i18n("Do you really want to delete folder \n%1 ?\n").arg(url.path());
+ else
+ msg = i18n("Do you really want to delete file \n%1 ?\n").arg(url.path());
+
+ if ( KMessageBox::warningContinueCancel(this, msg, QString::null, KStdGuiItem::del()) == KMessageBox::Continue )
+ {
+ KIO::Job *job = KIO::del(url);
+ connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ url.setFileName(url.fileName()+ TMPL);
+ if ( QFileInfo(url.path()).exists() ) {
+ KIO::Job *job2 = KIO::del(url);
+ connect( job2, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ };
+ }
+ }
+}
+
+/** Filters the template through and action, and returns the modified/filtered
+template file */
+KURL TemplatesTreeView::filterTemplate()
+{
+ KURL url = currentURL();
+ QString name = url.path() + TMPL;
+ KConfig config(name);
+ config.setGroup("Filtering");
+ name = config.readEntry("Action", NONE);
+ TagAction *filterAction = 0L;
+ KActionCollection *ac = m_mainWindow->actionCollection();
+ uint acCount = ac->count();
+ QString tmpStr;
+ for (uint i = 0; i < acCount; i++)
+ {
+ TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
+ if (action)
+ {
+ QDomElement el = action->data();
+ QString type = el.attribute("type", "tag");
+ tmpStr = action->text();
+ tmpStr.replace(QRegExp("\\&(?!\\&)"),"");
+ if (type == "script" && tmpStr == name)
+ {
+ filterAction = action;
+ }
+ }
+ }
+ if (filterAction)
+ {
+ KTempFile* tempFile = new KTempFile(tmpDir);
+ filterAction->setOutputFile(tempFile->file());
+ filterAction->setInputFileName(url.path());
+ filterAction->execute(true);
+ filterAction->setOutputFile(0L);
+ filterAction->setInputFileName(QString::null);
+ tempFile->close();
+ tempFileList.append(tempFile);
+ url.setPath(tempFile->name());
+ }
+ return url;
+}
+
+QString TemplatesTreeView::createTemplateTarball()
+{
+ KURL url = currentURL();
+ KURL dirURL (url);
+ if (!currentKFileTreeViewItem()->isDir())
+ dirURL.setPath(dirURL.directory(false));
+
+ KTempDir* tempDir = new KTempDir(tmpDir);
+ tempDir->setAutoDelete(true);
+ tempDirList.append(tempDir);
+ QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ //pack the files into a .tgz file
+ KTar tar(tempFileName, "application/x-gzip");
+ tar.open(IO_WriteOnly);
+// tar.setOrigFileName("");
+
+ KURL::List files;
+ if ( ! currentKFileTreeViewItem()->isDir() )
+ files.append(url);
+ else {
+ files = QExtFileInfo::allFiles(dirURL, "*", this) ;
+ dirURL = dirURL.upURL();
+ }
+
+ for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ {
+ if (!(*it_f).fileName(false).isEmpty()) {
+ url = QExtFileInfo::toRelative( (*it_f), dirURL) ;
+
+ QFile file((*it_f).path());
+ file.open(IO_ReadOnly);
+ QByteArray bArray = file.readAll();
+ tar.writeFile(url.path(), "user", "group", bArray.size(), bArray.data());
+ file.close();
+ };
+ }
+ tar.close();
+
+ return tempFileName;
+}
+
+void TemplatesTreeView::slotSendInMail()
+{
+ if ( ! currentKFileTreeViewItem() ) return;
+
+
+ QStringList attachmentFile;
+ attachmentFile += createTemplateTarball();
+
+ TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send template in email"));
+ QString toStr;
+ QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
+ QString titleStr;
+ QString subjectStr;
+
+ mailDlg->TitleLabel->setText(i18n("Content:"));
+/* mailDlg->titleEdit->setFixedHeight(60);
+ mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ if ( mailDlg->exec() )
+ {
+ if ( !mailDlg->lineEmail->text().isEmpty())
+ {
+ toStr = mailDlg->lineEmail->text();
+ subjectStr = (mailDlg->lineSubject->text().isEmpty())?i18n("Quanta Plus Template"):mailDlg->lineSubject->text();
+ if ( !mailDlg->titleEdit->text().isEmpty())
+ message = mailDlg->titleEdit->text();
+ } else
+ {
+ KMessageBox::error(this,i18n("No destination address was specified.\n Sending is aborted."),i18n("Error Sending Email"));
+ delete mailDlg;
+ return;
+ }
+ kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ }
+ delete mailDlg;
+}
+
+void TemplatesTreeView::slotUploadTemplate()
+{
+ if ( ! currentKFileTreeViewItem() ) return;
+ emit uploadTemplate(createTemplateTarball());
+}
+
+bool TemplatesTreeView::acceptDrag(QDropEvent* e ) const
+{
+ return (BaseTreeView::acceptDrag(e) || QTextDrag::canDecode(e));
+}
+
+void TemplatesTreeView::slotExtractSiteTemplate()
+{
+ QString startDir = m_projectBaseURL.url();
+ if (startDir.isEmpty())
+ startDir = QDir::homeDirPath();
+ bool error = false;
+ KURLRequesterDlg urlRequester(startDir, i18n("Target folder"), this, "req", true);
+ urlRequester.urlRequester()->setMode(KFile::Directory);
+ if (urlRequester.exec())
+ {
+ KURL targetURL = urlRequester.selectedURL();
+ KURL url = currentURL();
+ QString tempFile;
+ if (KIO::NetAccess::download(url, tempFile, this))
+ {
+ KTar tar(tempFile);
+ if (tar.open(IO_ReadOnly))
+ {
+ const KArchiveDirectory *directory = tar.directory();
+ if (targetURL.protocol() == "file")
+ directory->copyTo(targetURL.path(), true);
+ else
+ {
+ KTempDir* tempDir = new KTempDir(tmpDir);
+ tempDir->setAutoDelete(true);
+ QString tempDirName = tempDir->name();
+ directory->copyTo(tempDirName, true);
+ QStringList entries = directory->entries();
+ KURL::List fileList;
+ for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ fileList.append(KURL::fromPathOrURL(tempDirName + "/" + *it));
+ if (!KIO::NetAccess::dircopy(fileList, targetURL, this))
+ error = true;
+ KIO::NetAccess::del(KURL().fromPathOrURL(tempDirName), this);
+ delete tempDir;
+ }
+ tar.close();
+ } else
+ error = true;
+ KIO::NetAccess::removeTempFile(tempFile);
+ if (!m_projectBaseURL.isEmpty() && !QExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith("."))
+ {
+ if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), QString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
+ {
+ emit insertDirInProject(targetURL);
+ }
+ }
+ } else
+ error = true;
+ if (error)
+ KMessageBox::error(this, i18n("<qt>Some error happened while extracting the <i>%1</i> site template file.<br>Check that you have write permission for <i>%2</i> and that there is enough free space in your temporary folder.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)).arg(targetURL.prettyURL(0, KURL::StripFileProtocol)));
+ }
+}
+
+#include "templatestreeview.moc"
diff --git a/quanta/treeviews/templatestreeview.h b/quanta/treeviews/templatestreeview.h
new file mode 100644
index 00000000..c0df69e5
--- /dev/null
+++ b/quanta/treeviews/templatestreeview.h
@@ -0,0 +1,162 @@
+/***************************************************************************
+ templatestreeview.h - description
+ -------------------
+ begin : Thu Dec 20 2001
+ copyright : (C) 2001-2004 by Andras Mantia <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 TEMPLATESTREEVIEW_H
+#define TEMPLATESTREEVIEW_H
+
+//own includes
+#include "basetreeview.h"
+#include "quantacommon.h"
+
+//forward declarations
+class QuantaPropertiesPage;
+class KMainWindow;
+
+class TemplatesTreeBranch : public BaseTreeBranch {
+
+public:
+ TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
+ const QString& name, const QPixmap& pix,
+ bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
+
+ /** read the mimetype */
+ virtual KFileTreeViewItem* createTreeViewItem(KFileTreeViewItem *parent,
+ KFileItem *fileItem );
+};
+
+
+class TemplatesTreeView : public BaseTreeView {
+ Q_OBJECT
+
+public:
+
+ /**
+ * since this class is a singleton you must use this function to access it
+ *
+ * the parameter are only used at the first call to create the class
+ *
+ */
+ static TemplatesTreeView* const ref(KMainWindow *parent = 0L, const char *name = 0L)
+ {
+ static TemplatesTreeView *m_ref;
+ if (!m_ref) m_ref = new TemplatesTreeView (parent, name);
+ return m_ref;
+ }
+
+ ~TemplatesTreeView();
+ /** Writes a .dirinfo file from the selected item's path */
+ bool writeDirInfo(const QString& dirInfoFile = QString::null);
+ /** Reads a .dirinfo file from the selected item's path */
+ DirInfo readDirInfo(const QString& dir = QString::null);
+
+
+public slots:
+
+ /** Inserts the content of the selected template into the
+ * activ document
+ */
+ void slotInsertInDocument();
+
+ /**
+ * displays the RBM
+ *
+ *
+ * @param listView KListView where the event comes from
+ *
+ * @param item QListViewItem where the mousepointer is hovering
+ *
+ * @param point QPoint coordinates of the event
+ *
+ */
+ void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ /** Creates a new document based in the selected template. */
+ void slotNewDocument();
+ /** Insert the template as text, image, new document. */
+ void slotInsert();
+ /** Extracts the site template to an user specified directory */
+ void slotExtractSiteTemplate();
+ /** No descriptions */
+ void slotNewDir();
+ /** Handles dropping on the document from the template tree */
+ void slotDragInsert(QDropEvent *);
+
+ /**
+ * slot for the RBM
+ *
+ * packs and sends files or folders as attachment to an email
+ */
+ void slotSendInMail();
+ void slotUploadTemplate();
+ virtual void slotSelectFile(QListViewItem *item);
+ void slotOpen();
+ void slotPaste();
+ void slotDelete();
+ /** Properties dialog for template view */
+ virtual void slotProperties();
+ /** Property application for template view */
+ virtual void slotPropertiesApplied();
+ void slotInsertTag();
+
+ /** Sets the project template directory */
+ void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+
+private:
+
+ /** The constructor is privat because we use singleton pattern.
+ * If you need the class use TemplatesTreeView::ref() for
+ * construction and reference
+ */
+ TemplatesTreeView(KMainWindow *parent, const char *name = 0L);
+ /** Filters the template through and action, and returns the modified/filtered
+ template file */
+ KURL filterTemplate();
+ void writeTemplateInfo();
+ void updateTypeDescription(KFileTreeViewItem *item, const QString &typeString);
+
+ BaseTreeBranch *m_projectDir;
+ int m_deleteMenuId;
+ int m_openId;
+ int m_reloadMenuId;
+ int m_downloadMenuId;
+ QuantaPropertiesPage *m_quantaProperties;
+ QString m_projectName;
+ KURL localURL;
+ KURL globalURL;
+ KPopupMenu *m_fileMenu;
+ KPopupMenu *m_folderMenu;
+ KPopupMenu *m_emptyAreaMenu;
+ KMainWindow *m_mainWindow;
+ DirInfo m_dirInfo;
+ DirInfo m_parentDirInfo;
+ int m_insertFileInProject;
+ int m_insertFolderInProject;
+ int m_menuClose; ///< remembers the menu entry
+ int m_menuPasteFolder; ///< remembers the menu entry
+
+signals: // Signals
+ void insertFile(const KURL &);
+ void downloadTemplate();
+ void uploadTemplate(const QString&);
+
+protected: // Protected methods
+ KFileTreeBranch* newBranch(const KURL& url);
+ virtual QDragObject * dragObject();
+// virtual void startDrag();
+ void contentsDropEvent(QDropEvent *event);
+ bool acceptDrag(QDropEvent* e ) const;
+ QString createTemplateTarball();
+};
+
+#endif
diff --git a/quanta/treeviews/uploadtreefile.cpp b/quanta/treeviews/uploadtreefile.cpp
new file mode 100644
index 00000000..2df61f3f
--- /dev/null
+++ b/quanta/treeviews/uploadtreefile.cpp
@@ -0,0 +1,89 @@
+/***************************************************************************
+ uploadtreefile.cpp - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// QT includes
+#include <qdir.h>
+#include <qpixmap.h>
+#include <qfileinfo.h>
+
+// KDE includes
+#include <kfileitem.h>
+#include <kiconloader.h>
+#include <kurl.h>
+
+// app includes
+#include "uploadtreefile.h"
+#include "resource.h"
+
+UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem)
+ : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+{
+ m_url = a_url;
+ isDir = false;
+ parentFolder = parent;
+ m_fileItem = new KFileItem(a_fileItem);
+ m_confirm = false;
+
+ setWhichPixmap("check_clear");
+ setText(0, m_url.fileName());
+}
+
+UploadTreeFile::UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
+ : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+{
+ m_url = a_url;
+ isDir = false;
+ parentFolder = 0L;
+ m_fileItem = new KFileItem(a_fileItem);
+ m_confirm = false;
+
+ //setPixmap( 1, SmallIcon("check") );
+ setWhichPixmap("check_clear");
+ setText(0, m_url.fileName());
+}
+
+
+UploadTreeFile::~UploadTreeFile()
+{
+ delete m_fileItem;
+}
+
+int UploadTreeFile::permissions()
+{
+ if (m_fileItem)
+ return m_fileItem->permissions();
+ else
+ return -1;
+}
+
+/** used for sorting */
+QString UploadTreeFile::key ( int, bool ) const
+{
+ static QString key;
+ key = QString( "1" + text(0) );
+ return key;
+// return QFileInfo(key).extension()+key;
+}
+
+void UploadTreeFile::setWhichPixmap(const QString& pixmap )
+{
+ setPixmap( 1, SmallIcon(pixmap) );
+}
+
+/** No descriptions */
+KURL UploadTreeFile::url()
+{
+ return m_url;
+}
diff --git a/quanta/treeviews/uploadtreefile.h b/quanta/treeviews/uploadtreefile.h
new file mode 100644
index 00000000..54c8ce01
--- /dev/null
+++ b/quanta/treeviews/uploadtreefile.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ uploadtreefile.h - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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 UPLOADTREEFILE_H
+#define UPLOADTREEFILE_H
+
+#include <klistview.h>
+
+#include "uploadtreefolder.h"
+
+/**
+ *@author George Vilches & Andras Mantia
+ */
+
+class KFileItem;
+
+class UploadTreeFile : public KListViewItem {
+public:
+ UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem);
+ UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
+ ~UploadTreeFile();
+
+ void setWhichPixmap(const QString& pixmap);
+ int permissions();
+
+ /** used for sorting */
+ virtual QString key ( int column, bool ascending ) const;
+ /** No descriptions */
+ KURL url();
+ void setConfirmUpload(bool confirm) {m_confirm = confirm;}
+ bool confirmUpload() {return m_confirm;}
+
+public:
+ UploadTreeFolder * parentFolder;
+ KURL m_url;
+ bool isDir;
+ bool m_confirm;
+ KFileItem *m_fileItem;
+};
+
+#endif
diff --git a/quanta/treeviews/uploadtreefolder.cpp b/quanta/treeviews/uploadtreefolder.cpp
new file mode 100644
index 00000000..f38e648c
--- /dev/null
+++ b/quanta/treeviews/uploadtreefolder.cpp
@@ -0,0 +1,116 @@
+/***************************************************************************
+ uploadtreefolder.cpp - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2002 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+// QT includes
+#include <qdir.h>
+#include <qdragobject.h>
+#include <qevent.h>
+#include <qpixmap.h>
+
+// KDE includes
+#include <kiconloader.h>
+
+// app includes
+#include "uploadtreefolder.h"
+#include "uploadtreefile.h"
+#include "resource.h"
+
+UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * parent, const char * name )
+ : KListViewItem( parent, name, "", "", "" )
+{
+ parentFolder = parent;
+ m_url = a_url;
+ m_url.adjustPath(1);
+
+ setPixmap( 0, SmallIcon("folder") );
+ setPixmap( 1, SmallIcon("check") );
+ setText(0, m_url.fileName());
+
+}
+
+UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const char * name )
+ : KListViewItem( parent, name, "", "", "" )
+{
+ parentFolder = 0L;
+ m_url = a_url;
+ m_url.adjustPath(1);
+
+ setPixmap( 0, SmallIcon("folder") );
+ setPixmap( 1, SmallIcon("check") );
+ setText(0, m_url.fileName());
+}
+
+
+void UploadTreeFolder::setOpen( bool open )
+{
+ QListViewItem::setOpen( open );
+}
+
+/** retun full name of the folder */
+//TODO: This should go away. Use url() instead.
+QString UploadTreeFolder::fullName()
+{
+ QString s="";
+
+ if ( parentFolder )
+ {
+ s = parentFolder->fullName();
+ s += m_url.fileName()+"/";
+ }
+ else {
+ s = m_url.fileName();
+ }
+
+ return s;
+}
+
+/** setup */
+void UploadTreeFolder::setup()
+{
+ setExpandable( true );
+ QListViewItem::setup();
+}
+
+/** reload file list */
+void UploadTreeFolder::reloadList()
+{
+ setOpen( false );
+
+ QListViewItem *child;
+ while ( (child = firstChild()) )
+ removeItem( child );
+
+ setOpen( true );
+}
+
+/** need for sorting */
+QString UploadTreeFolder::key ( int, bool ) const
+{
+ static QString key;
+
+ key = QString("0") + text(0);
+
+ return key;
+}
+
+UploadTreeFolder::~UploadTreeFolder()
+{
+}
+
+void UploadTreeFolder::setWhichPixmap(const QString& pixmap )
+{
+ setPixmap( 1, SmallIcon(pixmap) );
+}
+
diff --git a/quanta/treeviews/uploadtreefolder.h b/quanta/treeviews/uploadtreefolder.h
new file mode 100644
index 00000000..1ef77279
--- /dev/null
+++ b/quanta/treeviews/uploadtreefolder.h
@@ -0,0 +1,57 @@
+/***************************************************************************
+ uploadtreefolder.h - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2002 by Andras Mantia <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 UPLOADTREEFOLDER_H
+#define UPLOADTREEFOLDER_H
+
+#include <qfile.h>
+#include <qfileinfo.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include <klistview.h>
+#include <kurl.h>
+
+/**
+ *@author Andras Mantia
+ */
+
+class KURL;
+
+class UploadTreeFolder : public KListViewItem {
+public:
+ UploadTreeFolder( const KURL &a_url, QListView * parent, const char * name);
+ UploadTreeFolder( const KURL &a_url, UploadTreeFolder * parent, const char * name );
+ virtual ~UploadTreeFolder();
+
+ /** used for sorting */
+ virtual QString key ( int column, bool ascending ) const;
+ QString fullName();
+ KURL url() {return m_url;}
+
+ virtual void setOpen( bool );
+ void setup();
+ void setWhichPixmap(const QString& pixmap );
+
+public:
+ UploadTreeFolder * parentFolder;
+ KURL m_url;
+
+public slots: // Public slots
+ void reloadList();
+
+};
+
+#endif
diff --git a/quanta/treeviews/uploadtreeview.cpp b/quanta/treeviews/uploadtreeview.cpp
new file mode 100644
index 00000000..75d0fa0c
--- /dev/null
+++ b/quanta/treeviews/uploadtreeview.cpp
@@ -0,0 +1,451 @@
+/***************************************************************************
+ uploadtreeview.cpp - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2002 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include <qregexp.h>
+
+#include <kcursor.h>
+#include <klocale.h>
+#include <kurl.h>
+#include <kfileitem.h>
+
+#include "uploadtreeview.h"
+#include "quantacommon.h"
+
+UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
+ KListView(parent, name)
+{
+ setRootIsDecorated( true );
+ setSorting( 0 );
+ setMultiSelection(true);
+
+ setFrameStyle( Panel | Sunken );
+ setLineWidth( 2 );
+ addColumn( i18n("Name") );
+ addColumn( i18n("Upload") );
+ addColumn( i18n("Size") );
+ addColumn( i18n("Date") );
+
+ setFocusPolicy(QWidget::ClickFocus);
+
+ connect( this, SIGNAL(selectionChanged()), SLOT(slotSelectFile()));
+ connect( this, SIGNAL(selectionChanged(QListViewItem *)),
+ this, SLOT(slotSelectFile(QListViewItem *)));
+
+ connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int )), SLOT(slotDoubleClicked(QListViewItem *, const QPoint &, int )));
+}
+
+UploadTreeView::~UploadTreeView()
+{
+}
+
+int UploadTreeView::checkboxTree( QListViewItem *it )
+{
+ parentWidget()->setCursor(KCursor::workingCursor());
+
+ QListViewItem *itIter = it ? it->firstChild() : firstChild();
+
+ // bitFlag structure: (0/1)all children exist (0/1)no children exist.
+ // We don't need some children as a bit flag, because that's implied if the bits are "00".
+
+ int bitFlags = 3;
+ int retVal = 1;
+
+ if ( itIter != 0 )
+ {
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ if ( dynamic_cast<UploadTreeFolder *>(itIter) )
+ {
+ int hadCheckFlags = checkboxTree( itIter );
+ bitFlags &= hadCheckFlags;
+ UploadTreeFolder *itF = static_cast<UploadTreeFolder *>(itIter);
+
+ if (hadCheckFlags == 2) {
+ // All children exist.
+ itF->setWhichPixmap( "check" );
+ itF->setSelected( true );
+ }
+ else if (hadCheckFlags == 1) {
+ // No children exist.
+ itF->setWhichPixmap( "check_clear" );
+ itF->setSelected( false );
+ }
+ else {
+ // Some children exist.
+ itF->setWhichPixmap( "check_grey" );
+ itF->setSelected( true );
+ }
+
+ }
+ else if ( dynamic_cast<UploadTreeFile *>(itIter) )
+ {
+ UploadTreeFile *itF = static_cast<UploadTreeFile *>(itIter);
+ if ( itF->isSelected() )
+ {
+ itF->setWhichPixmap("check");
+ // Turn off "no children"
+ if ( bitFlags % 2 == 1 ) bitFlags -= 1;
+ }
+ else
+ {
+ itF->setWhichPixmap("check_clear");
+ // Turn off "all children".
+ if (bitFlags >> 1 == 1) bitFlags -= 2;
+ }
+
+ }
+ }
+ retVal = bitFlags;
+ } else
+ {
+ if ( dynamic_cast<UploadTreeFolder *>(it) )
+ {
+ UploadTreeFolder *itF = static_cast<UploadTreeFolder *>(it);
+ if ( itF->isSelected() )
+ {
+ itF->setWhichPixmap("check");
+ retVal = 2;
+ }
+ else
+ {
+ itF->setWhichPixmap("check_clear");
+ retVal = 1;
+ }
+
+ }
+ }
+
+ parentWidget()->setCursor(KCursor::arrowCursor());
+
+ return retVal;
+}
+
+void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
+{
+ QListViewItem *itIter = 0;
+ if (it == 0) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ itIter->setSelected(select);
+ selectAllUnderNode(itIter, select);
+ if (itIter->isSelected() != select)
+ itIter->setSelected(select);
+ }
+}
+
+void UploadTreeView::slotSelectFile( QListViewItem *it )
+{
+ UploadTreeFolder *itF = dynamic_cast<UploadTreeFolder *>(it);
+ // This need a bit of special behavior for clicking on directories.
+ if ( itF )
+ {
+ itF->setSelected(it->isSelected());
+ selectAllUnderNode( it, it->isSelected() );
+ }
+
+//set the correct checkbox for this item, if it was a folder
+ int hadCheckFlags = checkboxTree(it);
+ if ( itF )
+ {
+ if (hadCheckFlags == 2) {
+ // All children exist.
+ itF->setWhichPixmap( "check" );
+ itF->setSelected( true );
+ }
+ else if (hadCheckFlags == 1) {
+ // No children exist.
+ itF->setWhichPixmap( "check_clear" );
+ itF->setSelected( false );
+ }
+ else {
+ // Some children exist.
+ itF->setWhichPixmap( "check_grey" );
+ itF->setSelected( true );
+ }
+
+ itF = itF->parentFolder;
+ }
+ else
+ {
+ UploadTreeFile *itFile = static_cast<UploadTreeFile*>(it);
+ if (it->isSelected())
+ {
+ itFile->setWhichPixmap("check");
+ itFile->setSelected(true);
+ } else
+ {
+ itFile->setWhichPixmap("check_clear");
+ itFile->setSelected(false);
+ }
+ itF = itFile->parentFolder;
+ }
+
+ //iterate through the item's parents and set the correct checkboxes for them
+ while (itF)
+ {
+ bool hasSelected = false;
+ bool allSelected = true;
+ //check if the item has any children's selected
+ QListViewItemIterator iter(itF->firstChild());
+ while ( iter.current() && iter.current() != itF->nextSibling())
+ {
+ if ( iter.current()->isSelected() )
+ {
+ hasSelected = true;
+ } else
+ {
+ allSelected = false;
+ }
+ ++iter;
+ }
+ if (hasSelected)
+ {
+ if (allSelected)
+ {
+ itF->setWhichPixmap( "check" );
+ } else
+ {
+ itF->setWhichPixmap( "check_grey" );
+ }
+ itF->setSelected( true );
+ } else
+ {
+ itF->setWhichPixmap( "check_clear" );
+ itF->setSelected( false );
+ }
+ itF = itF->parentFolder;
+ }
+}
+
+void UploadTreeView::slotSelectFile( )
+{
+ slotSelectFile(currentItem());
+}
+
+//TODO: This should search based on url's rather than on text(0)
+UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QString& folderName )
+{
+ QListViewItem *itIter = 0;
+ if (it == 0) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ if ( itIter->text(0) == folderName )
+ {
+ return (UploadTreeFolder *)itIter;
+ }
+ }
+ return 0;
+}
+
+UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QString& indent = QString::null )
+{
+ QListViewItem *itIter = 0;
+ if (it == 0) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+// cout << indent << itIter->text(0) << endl;
+ if ( dynamic_cast<UploadTreeFolder *>(itIter) )
+ printTree( (UploadTreeFolder *)itIter, indent + " " );
+ }
+ return 0;
+}
+
+// :NOTE: AFAIK, safe to use only if you are sure the item searched for
+// is already in here. It might be safe otherwise, but use at your own
+// peril.
+QListViewItem* UploadTreeView::findItem(const QString& path )
+{
+ QString item = path;
+ UploadTreeFolder *it = 0;
+ int i;
+ while ( ( i = item.find('/') ) >= 0 )
+ {
+ it = findFolder( it, item.left(i) );
+ if ( it == 0 )
+ return 0;
+ item.remove(0,i+1);
+ }
+
+ QListViewItem *itIter = 0;
+ if ( it == 0 ) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ if ( itIter->text(0) == item )
+ {
+ return itIter;
+ }
+ }
+ return 0;
+}
+
+UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fileItem)
+{
+ QString item = a_url.path(); //TODO: do with real KURL's
+ QString fname = item;
+ int i;
+ uint col = 0;
+ UploadTreeFolder *it = 0;
+ KURL u;
+ while ( ( i = item.find('/', col) ) >= 0 )
+ {
+ if ( i!=0 )
+ {
+ UploadTreeFolder *itTemp = findFolder(it, item.mid(col, i - col));
+ if ( itTemp == 0 )
+ {
+ u = a_url;
+ QuantaCommon::setUrl(u,item.left(i)+"/");
+ if ( it == 0 )
+ {
+ it = new UploadTreeFolder(u, this, "");
+ }
+ else {
+ it = new UploadTreeFolder(u, it, "");
+ }
+ }
+ else
+ {
+ it = itTemp;
+ }
+ }
+ col = i + 1;
+ }
+ UploadTreeFile *file = 0;
+ if ( col < item.length() )
+ {
+ if (it == 0)
+ {
+ file = new UploadTreeFile(this, a_url, a_fileItem);
+ }
+ else
+ {
+ file = new UploadTreeFile(it, a_url, a_fileItem);
+ }
+ }
+ return file;
+}
+
+void UploadTreeView::expandAll( QListViewItem *it )
+{
+ QListViewItem *itIter = it;
+ if (it == 0) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ if ( dynamic_cast<UploadTreeFolder *>(itIter) )
+ {
+ itIter->setOpen( true );
+ expandAll( itIter );
+ }
+ }
+}
+
+void UploadTreeView::collapseAll( QListViewItem *it )
+{
+ QListViewItem *itIter = it;
+ if (it == 0) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ if ( dynamic_cast<UploadTreeFolder *>(itIter) )
+ {
+ itIter->setOpen( false );
+ expandAll( itIter );
+ }
+ }
+}
+
+void UploadTreeView::invertAll( QListViewItem *it )
+{
+ QListViewItem *itIter = it;
+ if (it == 0) itIter = firstChild();
+ else itIter = it->firstChild();
+
+ for( ; itIter != 0; itIter = itIter->nextSibling() )
+ {
+ if ( dynamic_cast<UploadTreeFile *>(itIter) ||
+ ( dynamic_cast<UploadTreeFolder *>(itIter) &&
+ !itIter->firstChild()) )
+ {
+ itIter->setSelected( !itIter->isSelected() );
+ }
+ else
+ {
+ invertAll( itIter );
+ }
+ }
+}
+
+void UploadTreeView::selectAll( bool select )
+{
+ QListViewItemIterator it(this);
+
+ for ( ; it.current(); ++it )
+ {
+ if ( dynamic_cast<UploadTreeFile *>(it.current()) )
+ {
+ it.current()->setSelected( select);
+ } else
+ if ( dynamic_cast<UploadTreeFolder *>(it.current()) &&
+ !it.current()->firstChild() )
+ {
+ it.current()->setSelected( select);
+ }
+ }
+}
+
+
+/** No descriptions */
+QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
+{
+ QListViewItemIterator it(this);
+ UploadTreeFile *fileItem;
+ UploadTreeFolder *folderItem;
+ KURL url;
+ for ( ; it.current(); ++it )
+ {
+ if ( (fileItem = dynamic_cast<UploadTreeFile *>(it.current()) ) !=0)
+ {
+ url = fileItem->m_url;
+ } else
+ {
+ folderItem = static_cast<UploadTreeFolder*>(it.current());
+ url = folderItem->m_url;
+ }
+ if (url == a_url)
+ {
+ return it.current();
+ }
+ }
+
+ return 0L;
+}
+
+void UploadTreeView::slotDoubleClicked(QListViewItem *item, const QPoint &, int )
+{
+ item->setOpen(!item->isOpen());
+}
+
+#include "uploadtreeview.moc"
diff --git a/quanta/treeviews/uploadtreeview.h b/quanta/treeviews/uploadtreeview.h
new file mode 100644
index 00000000..85676e41
--- /dev/null
+++ b/quanta/treeviews/uploadtreeview.h
@@ -0,0 +1,60 @@
+/***************************************************************************
+ uploadtreeview.h - description
+ -------------------
+ begin : Sun Aug 25 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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 UPLOADTREEVIEW_H
+#define UPLOADTREEVIEW_H
+
+#include <qdir.h>
+#include <qpixmap.h>
+#include <qheader.h>
+
+#include "uploadtreefolder.h"
+#include "uploadtreefile.h"
+
+class KFileItem;
+
+/**
+ *@author George Vilches & Andras Mantia
+ */
+
+class UploadTreeView : public KListView {
+ Q_OBJECT
+public:
+ UploadTreeView( QWidget *parent, const char *name=0L );
+ ~UploadTreeView();
+ UploadTreeFile* addItem( const KURL &a_url, const KFileItem &a_fileItem);
+ QListViewItem* findItem( const QString& );
+ int checkboxTree( QListViewItem *it = 0);
+ void expandAll( QListViewItem * = 0 );
+ void collapseAll( QListViewItem * = 0 );
+ void invertAll( QListViewItem * = 0 );
+ virtual void selectAll( bool select);
+ /** No descriptions */
+ QListViewItem* itemByUrl(const KURL& a_url);
+
+public slots:
+ void slotSelectFile( QListViewItem * );
+ void slotSelectFile( );
+ void selectAllUnderNode( QListViewItem *it, bool select );
+
+private slots:
+ void slotDoubleClicked(QListViewItem *, const QPoint &, int );
+
+private:
+ UploadTreeFolder* findFolder( UploadTreeFolder *, const QString&);
+ UploadTreeFolder* printTree( UploadTreeFolder *, const QString&);
+};
+
+#endif
diff --git a/quanta/utility/Makefile.am b/quanta/utility/Makefile.am
new file mode 100644
index 00000000..56522430
--- /dev/null
+++ b/quanta/utility/Makefile.am
@@ -0,0 +1,20 @@
+noinst_LTLIBRARIES = libutility.la
+
+METASOURCES = AUTO
+
+libutility_la_SOURCES = quantacommon.cpp tagaction.cpp toolbartabwidget.cpp \
+ toolbarxmlgui.cpp newstuff.cpp quantanetaccess.cpp qpevents.cpp quantabookmarks.cpp \
+ tagactionmanager.cpp tagactionset.cpp
+
+AM_CPPFLAGS = -I$(top_srcdir)/quanta/src \
+ -I$(top_srcdir)/quanta/parsers \
+ -I$(top_srcdir)/quanta/messages \
+ -I$(top_srcdir)/quanta/dialogs/tagdialogs \
+ -I$(top_srcdir)/quanta/parts/kafka \
+ -I$(top_srcdir)/quanta/project \
+ -I$(top_srcdir)/lib \
+ $(KNEWSTUFF_INCLUDES) \
+ $(KMDI_INCLUDES) $(all_includes)
+
+libutility_la_LDFLAGS = $(all_libraries)
+noinst_HEADERS = qpevents.h tagactionmanager.h tagactionset.h
diff --git a/quanta/utility/myprocess.h b/quanta/utility/myprocess.h
new file mode 100644
index 00000000..a495cdf9
--- /dev/null
+++ b/quanta/utility/myprocess.h
@@ -0,0 +1,36 @@
+/***************************************************************************
+ myprocess.h
+ -------------------
+ begin : Jun 25 2003
+ copyright : (C) 2003 by Andras Mantia <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 MYPROCESS_H
+#define MYPROCESS_H
+
+#include <kprocess.h>
+
+class MyProcess:public KProcess
+{
+ Q_OBJECT
+
+ public:
+ MyProcess();
+ virtual ~MyProcess() {};
+
+ protected:
+ virtual int commSetupDoneC();
+};
+
+
+
+#endif
+
diff --git a/quanta/utility/newstuff.cpp b/quanta/utility/newstuff.cpp
new file mode 100644
index 00000000..f6cbf397
--- /dev/null
+++ b/quanta/utility/newstuff.cpp
@@ -0,0 +1,144 @@
+/***************************************************************************
+ newstuff.cpp - description
+ -------------------
+ begin : Tue Jun 22 12:19:55 2004
+ copyright : (C) 2004 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+ //qt includes
+#include <qfileinfo.h>
+
+//kde includes
+#include <kglobal.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kstandarddirs.h>
+#include <ktar.h>
+
+//app includes
+#include "newstuff.h"
+#include "dtds.h"
+#include "resource.h"
+#include "quantacommon.h"
+#include "qextfileinfo.h"
+
+void QNewDTEPStuff::installResource()
+{
+ bool ok = true;
+ KTar tar(m_tarName, "application/x-gzip");
+ if (tar.open(IO_ReadOnly))
+ {
+ const KArchiveDirectory *directory = tar.directory();
+ QString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ QString dtdName = (*directory->entries().at(0));
+ if (dtdName.isEmpty())
+ {
+ ok = false;
+ } else
+ {
+ directory->copyTo(dtepDir, true);
+ DTDs::ref()->slotLoadDTEP(dtepDir + dtdName, false);
+ }
+ tar.close();
+ } else
+ ok = false;
+ if (!ok)
+ KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded DTEP tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("DTEP Installation Error"));
+}
+
+QNewToolbarStuff::QNewToolbarStuff(const QString &type, QWidget *parentWidget)
+ :KNewStuffSecure(type, parentWidget)
+{
+ connect(this, SIGNAL(loadToolbarFile(const KURL&)), parentWidget, SLOT(slotLoadToolbarFile(const KURL&)));
+}
+
+
+void QNewToolbarStuff::installResource()
+{
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + QFileInfo(m_tarName).fileName());
+ bool ok = true;
+ if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
+ {
+ if (!QExtFileInfo::copy(KURL::fromPathOrURL(m_tarName), destURL, -1, true, false, parentWidget()))
+ ok = false;
+ else
+ {
+ if (KMessageBox::questionYesNo(parentWidget(), i18n("Do you want to load the newly downloaded toolbar?"), i18n("Load Toolbar"), i18n("Load"), KStdGuiItem::cancel()) == KMessageBox::Yes)
+ {
+ emit loadToolbarFile(destURL);
+ }
+ }
+ if (!ok)
+ KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded toolbar tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Toolbar Installation Error"));
+ }
+}
+
+QNewTemplateStuff::QNewTemplateStuff(const QString &type, QWidget *parentWidget)
+ :KNewStuffSecure(type, parentWidget)
+{
+ connect(this, SIGNAL(openFile(const KURL&)), parentWidget, SLOT(slotFileOpen(const KURL&)));
+}
+
+
+void QNewTemplateStuff::installResource()
+{
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + QFileInfo(m_tarName).fileName());
+ bool ok = true;
+ if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
+ {
+ if (!QExtFileInfo::copy(KURL::fromPathOrURL(m_tarName), destURL, -1, true, false, parentWidget()))
+ ok = false;
+ else
+ {
+ if (KMessageBox::questionYesNo(parentWidget(), i18n("Do you want to open the newly downloaded template?"), i18n("Open Template"), KStdGuiItem::open(), KStdGuiItem::cancel()) == KMessageBox::Yes)
+ {
+ emit openFile(destURL);
+ }
+ }
+ if (!ok)
+ KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded template file."), i18n("Template Installation Error"));
+ }
+}
+
+void QNewScriptStuff::installResource()
+{
+ bool ok = true;
+ KTar tar(m_tarName, "application/x-gzip");
+ if (tar.open(IO_ReadOnly))
+ {
+ const KArchiveDirectory *directory = tar.directory();
+ QString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
+ directory->copyTo(scriptsDir, true);
+ tar.close();
+ } else
+ ok = false;
+
+ if (!ok)
+ KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded script tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Script Installation Error"));
+}
+
+void QNewDocStuff::installResource()
+{
+ bool ok = true;
+ KTar tar(m_tarName, "application/x-gzip");
+ if (tar.open(IO_ReadOnly))
+ {
+ const KArchiveDirectory *directory = tar.directory();
+ QString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
+ directory->copyTo(docDir, true);
+ tar.close();
+ } else
+ ok = false;
+
+ if (!ok)
+ KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded script tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("Documentation Installation Error"));
+}
+
+#include "newstuff.moc"
diff --git a/quanta/utility/newstuff.h b/quanta/utility/newstuff.h
new file mode 100644
index 00000000..dd2ad104
--- /dev/null
+++ b/quanta/utility/newstuff.h
@@ -0,0 +1,121 @@
+/***************************************************************************
+ newstuff.h - description
+ -------------------
+ begin : Tue Jun 22 12:19:55 2004
+ copyright : (C) 2004 by Andras Mantia <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 NEWSTUFF_H
+#define NEWSTUFF_H
+
+//qt includes
+#include <qobject.h>
+
+//kde includes
+#include <knewstuff/knewstuffsecure.h>
+/**
+Makes possible downloading and installing a DTEP resource files from a server.
+
+@author Andras Mantia
+*/
+
+class KURL;
+
+class QNewDTEPStuff: public KNewStuffSecure
+{
+ Q_OBJECT
+
+public:
+ QNewDTEPStuff(const QString &type, QWidget *parentWidget=0)
+ :KNewStuffSecure(type, parentWidget){};
+ ~QNewDTEPStuff() {};
+
+private:
+ virtual void installResource();
+};
+
+/**
+Makes possible downloading and installing a Toolbar resource files from a server.
+
+@author Andras Mantia
+*/
+class QNewToolbarStuff: public KNewStuffSecure
+{
+ Q_OBJECT
+
+public:
+ QNewToolbarStuff(const QString &type, QWidget *parentWidget=0);
+ ~QNewToolbarStuff() {};
+
+signals:
+ void loadToolbarFile(const KURL&);
+
+private:
+ virtual void installResource();
+};
+
+/**
+Makes possible downloading and installing a template resource files from a server.
+
+@author Andras Mantia
+*/
+class QNewTemplateStuff: public KNewStuffSecure
+{
+ Q_OBJECT
+
+public:
+ QNewTemplateStuff(const QString &type, QWidget *parentWidget=0);
+ ~QNewTemplateStuff() {};
+
+signals:
+ void openFile(const KURL&);
+
+private:
+ virtual void installResource();
+};
+
+/**
+Makes possible downloading and installing a script resource files from a server.
+
+@author Andras Mantia
+*/
+class QNewScriptStuff: public KNewStuffSecure
+{
+ Q_OBJECT
+
+public:
+ QNewScriptStuff(const QString &type, QWidget *parentWidget=0)
+ :KNewStuffSecure(type, parentWidget){};
+ ~QNewScriptStuff() {};
+
+private:
+ virtual void installResource();
+};
+
+/**
+Makes possible downloading and installing a documentation resource files from a server.
+
+@author Andras Mantia
+ */
+class QNewDocStuff: public KNewStuffSecure
+{
+ Q_OBJECT
+
+ public:
+ QNewDocStuff(const QString &type, QWidget *parentWidget=0)
+ :KNewStuffSecure(type, parentWidget){};
+ ~QNewDocStuff() {};
+
+ private:
+ virtual void installResource();
+};
+
+#endif
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp
new file mode 100644
index 00000000..bb0d5db4
--- /dev/null
+++ b/quanta/utility/qpevents.cpp
@@ -0,0 +1,403 @@
+/***************************************************************************
+ qpevents.cpp - description
+ -------------------
+ begin : Sun Jul 11 2004
+ copyright : (C) 2004 Andras Mantia <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 <qdatetime.h>
+#include <qfile.h>
+#include <qtextstream.h>
+
+//kde includes
+#include <kapplication.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+
+//app includes
+#include "qpevents.h"
+#include "document.h"
+#include "project.h"
+#include "qextfileinfo.h"
+#include "viewmanager.h"
+#include "resource.h"
+#include "quanta.h"
+#include "tagaction.h"
+
+//TODO: Better create a class for each internal event action
+QPEvents::QPEvents(QObject *parent, const char *name)
+ : QObject(parent, name)
+{
+ m_eventNames["before_save"] = i18n("Before Document Save");
+ m_eventNames["after_save"] = i18n("After Document Save");
+ m_eventNames["after_open"] = i18n("After Document Open");
+ m_eventNames["before_close"] = i18n("Before Document Close");
+ m_eventNames["after_close"] = i18n("After Document Close");
+ m_eventNames["after_project_open"] = i18n("After Project Open");
+ m_eventNames["before_project_close"] = i18n("Before Project Close");
+ m_eventNames["after_project_close"] = i18n("After Project Close");
+ m_eventNames["upload_requested"] = i18n("Upload Requested");
+ m_eventNames["before_upload"] = i18n("Before Document Upload");
+ m_eventNames["after_upload"] = i18n("After Document Upload");
+ m_eventNames["after_project_add"] = i18n("After Addition to Project");
+ m_eventNames["after_project_remove"] = i18n("After Removal From Project");
+ m_eventNames["after_commit"] = i18n("After Commit to CVS");
+ m_eventNames["after_update"] = i18n("After Update From CVS");
+ m_eventNames["after_file_move"] = i18n("After Moving File Inside Project");
+ m_eventNames["quanta_start"] = i18n("Quanta Start");
+ m_eventNames["quanta_exit"] = i18n("Quanta Exit");
+// m_eventNames["after_multiple_save"] = i18n("After saving more files at once (like Save All)");
+
+ m_actionNames["email"] = i18n("Send Email");
+ m_actionNames["log"] = i18n("Log Event");
+ m_actionNames["script"] = i18n("Script Action");
+ m_actionNames["action"] = i18n("Non-Script Action");
+}
+
+
+QPEvents::~QPEvents()
+{
+}
+
+void QPEvents::slotEventHappened(const QString& name, const QString& argument1, const QString& argument2)
+{
+ if (!quantaApp || !Project::ref()->eventsEnabled())
+ return;
+ EventActions *events = Project::ref()->events();
+ if (!events) return;
+ if (events->contains(name))
+ {
+ m_eventName = name;
+ QValueList<EventAction> evList = (*events)[name];
+ for (QValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
+ {
+ EventAction ev = *it;
+ if (ev.type == EventAction::Internal)
+ {
+ if (KMessageBox::warningContinueCancel(0L, i18n("<qt>An internal action (<i>%1</i>) associated with an event (<i>%2</i>) will be executed. Do you want to allow the execution of this action?</qt>").arg(ev.action).arg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about internal actions") == KMessageBox::Cancel)
+ return;
+ } else
+ {
+ if (KMessageBox::warningContinueCancel(0L, i18n("<qt>An external action (<i>%1</i>) associated with an event (<i>%2</i>) will be executed. Do you want to allow the execution of this action?</qt>").arg(ev.action).arg(name), i18n("Event Triggered"), i18n("Execute"), "Warn about external actions") == KMessageBox::Cancel)
+ return;
+ }
+ KURL url = KURL::fromPathOrURL(argument1);
+ KURL url2 = KURL::fromPathOrURL(argument2);
+ if (url.isValid())
+ {
+ bool inProject = Project::ref()->contains(url);
+ if (inProject)
+ {
+ if (name == "upload_requested")
+ {
+ ev.arguments << i18n("An upload was initiated");
+ ev.arguments << url.path();
+ handleEvent(ev);
+ }
+ }
+ if (inProject && url2.isValid())
+ {
+ if (name == "before_upload")
+ {
+ ev.arguments << i18n("About to upload a document");
+ ev.arguments << url.path();
+ ev.arguments << url2.path();
+ handleEvent(ev);
+ } else
+ if (name == "after_upload")
+ {
+ ev.arguments << i18n("Document uploaded");
+ ev.arguments << url.path();
+ ev.arguments << url2.path();
+ handleEvent(ev);
+ } else
+ if (name == "after_file_move")
+ {
+ ev.arguments << i18n("Document moved");
+ ev.arguments << url.path();
+ ev.arguments << url2.path();
+ handleEvent(ev);
+ }
+ } else
+ {
+ QString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
+ if (inProject && name == "after_save")
+ {
+ ev.arguments << i18n("Document saved");
+ ev.arguments << relativePath;
+ handleEvent(ev);
+ } else
+ if (inProject && name == "before_save")
+ {
+ ev.arguments << i18n("About to save a document");
+ ev.arguments << relativePath;
+ handleEvent(ev);
+ } else
+ if (inProject && name == "after_open")
+ {
+ ev.arguments << i18n("Document opened");
+ ev.arguments << relativePath;
+ handleEvent(ev);
+ } else
+ if (inProject && name == "after_close")
+ {
+ ev.arguments << i18n("Document closed");
+ ev.arguments << relativePath;
+ handleEvent(ev);
+ } else
+ if (inProject && name == "before_close")
+ {
+ ev.arguments << i18n("About to close a document");
+ ev.arguments << relativePath;
+ handleEvent(ev);
+ } else
+ if (name == "after_project_open")
+ {
+ ev.arguments << i18n("Project opened");
+ ev.arguments << url.path();
+ handleEvent(ev);
+ } else
+ if (name == "after_project_close")
+ {
+ ev.arguments << i18n("Project closed");
+ ev.arguments << url.path();
+ handleEvent(ev);
+ } else
+ if (name == "before_project_close")
+ {
+ ev.arguments << i18n("About to close the project");
+ ev.arguments << url.path();
+ handleEvent(ev);
+ } else
+ if (name == "after_project_add")
+ {
+ ev.arguments << i18n("Document added to project");
+ ev.arguments << url.path();
+ handleEvent(ev);
+ } else
+ if (name == "after_project_remove")
+ {
+ ev.arguments << i18n("Document removed from project");
+ ev.arguments << url.path();
+ handleEvent(ev);
+ }
+ }
+ } else
+ if (name == "after_commit")
+ {
+ ev.arguments << i18n("Document committed");
+ ev.arguments << argument1;
+ handleEvent(ev);
+ } else
+ if (name == "after_update")
+ {
+ ev.arguments << i18n("Document updated");
+ ev.arguments << argument1;
+ handleEvent(ev);
+ } else
+ if (name == "quanta_start")
+ {
+ ev.arguments << i18n("Quanta has been started");
+ ev.arguments << argument1;
+ handleEvent(ev);
+ } else
+ if (name == "quanta_exit")
+ {
+ ev.arguments << i18n("Quanta is shutting down");
+ ev.arguments << argument1;
+ handleEvent(ev);
+ }
+ }
+ }
+ if (!m_eventNames.contains(name))
+ KMessageBox::sorry(0L, i18n("<qt>Unsupported event <b>%1</b>.</qt>").arg(name), i18n("Event Handling Error"));
+}
+
+bool QPEvents::handleEvent(const EventAction& ev)
+{
+ if (ev.type == EventAction::Internal)
+ {
+ if (ev.action == "email")
+ {
+ QString receiver = ev.arguments[0];
+ TeamMember member;
+ if (receiver == "teamleader")
+ member = Project::ref()->teamLeader();
+ else if (receiver.startsWith("subprojectleader-"))
+ {
+ QString s = receiver.remove("subprojectleader-");
+ member = Project::ref()->subprojectLeader(s);
+ SubProject subProject;
+ QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (uint i = 0 ; i < subprojects->count(); i++)
+ {
+ if ((*subprojects)[i].name == s)
+ {
+ subProject = (*subprojects)[i];
+ break;
+ }
+ }
+ if (!subProject.location.isEmpty() && !ev.arguments[2].startsWith(subProject.location))
+ {
+ kdDebug(24000) << ev.arguments[2] << " is not part of the " << subProject.name << "subproject \"" << subProject.location << "\". " << endl;
+ return true;
+ }
+ }
+ else if (receiver.startsWith("taskleader-"))
+ member = Project::ref()->taskLeader(receiver.remove("taskleader-"));
+
+ QString body;
+ for (uint i = 2; i < ev.arguments.count(); i++)
+ body += ev.arguments[i] + "\n";
+ kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", QStringList(), "");
+
+ return true;
+ }
+ if (ev.action == "log")
+ {
+ QString logFile = ev.arguments[0];
+ KURL url = KURL::fromPathOrURL(logFile);
+ if (url.isValid() && !url.isLocalFile())
+ {
+ KMessageBox::sorry(0L, i18n("Logging to remote files is not supported."));
+ return false;
+ }
+ if (!logFile.startsWith("/"))
+ {
+ url = Project::ref()->projectBaseURL();
+ url.addPath(logFile);
+ if (!url.isLocalFile())
+ {
+ KMessageBox::sorry(0L, i18n("Logging to files inside a remote project is not supported."));
+ return false;
+ }
+ }
+ QFile file(url.path());
+ bool result;
+ if (ev.arguments[2] == "create_new")
+ result = file.open(IO_WriteOnly);
+ else
+ result = file.open(IO_WriteOnly | IO_Append);
+ if (result)
+ {
+ QTextStream stream(&file);
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ //Note: the log text should not be translated.
+ QString s = QDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
+ s.append( "Event : " + m_eventName + " : ");
+ s.append( "Action: " + ev.action + " : ");
+ if (ev.arguments[1] == "full")
+ {
+ s.append( "Arguments: ");
+ for (uint i = 1; i < ev.arguments.count(); i++)
+ s.append(ev.arguments[i] + " | ");
+ }
+ s[s.length() - 1] = '\n';
+ stream << s;
+ file.close();
+ }
+ if (!result)
+ {
+ KMessageBox::sorry(0L, i18n("<qt>Logging failed. Check that you have write access to <i>%1</i>.").arg(url.path()));
+ return false;
+ }
+ } else
+ KMessageBox::sorry(0L, i18n("<qt>Unsupported internal event action : <b>%1</b>.</qt>").arg(ev.action));
+ } else
+ if (ev.type == EventAction::External)
+ {
+ //KMessageBox::sorry(0L, i18n("External event actions are not yet supported."));
+ if (ev.action == "script" || ev.action =="action")
+ {
+ QString name = ev.arguments[0];
+ KAction *action = quantaApp->actionCollection()->action(name);
+ TagAction *tagAction = dynamic_cast<TagAction*>(action);
+ if (tagAction)
+ {
+ bool blocking = (ev.arguments[1] == "yes");
+ EventAction event = ev;
+ event.arguments.remove(event.arguments.at(1));
+ tagAction->addArguments(event.arguments);
+ tagAction->execute(blocking);
+ }
+ else
+ if (action)
+ {
+ action->activate();
+ } else
+ KMessageBox::sorry(0L, i18n("<qt>The <b>%1</b> script action was not found on your system.</qt>").arg(name), i18n("Action Execution Error"));
+ } else
+ KMessageBox::sorry(0L, i18n("Unsupported external event action."));
+ } else
+ KMessageBox::sorry(0L, i18n("Unknown event type."));
+ return false;
+}
+
+QString QPEvents::fullEventName(const QString &name)
+{
+ if (m_eventNames.contains(name))
+ return m_eventNames[name];
+ else
+ return name;
+}
+
+QString QPEvents::fullActionName(const QString& name)
+{
+ if (m_actionNames.contains(name))
+ return m_actionNames[name];
+ else
+ return name;
+}
+
+QString QPEvents::eventName(const QString &fullName)
+{
+ for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ {
+ if (fullName == it.data())
+ return it.key();
+ }
+ return fullName;
+}
+
+QString QPEvents::actionName(const QString &fullName)
+{
+ for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ {
+ if (fullName == it.data())
+ return it.key();
+ }
+ return fullName;
+}
+
+QStringList QPEvents::eventNames()
+{
+ QStringList names;
+ for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ {
+ names << it.data();
+ }
+ return names;
+}
+
+QStringList QPEvents::actionNames()
+{
+ QStringList names;
+ for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ {
+ names << it.data();
+ }
+ return names;
+}
+
+#include "qpevents.moc"
diff --git a/quanta/utility/qpevents.h b/quanta/utility/qpevents.h
new file mode 100644
index 00000000..83f6d37b
--- /dev/null
+++ b/quanta/utility/qpevents.h
@@ -0,0 +1,90 @@
+/***************************************************************************
+ qpevents.h - description
+ -------------------
+ begin : Sun Jul 11 2004
+ copyright : (C) 2004 Andras Mantia <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 QPEVENTS_H
+#define QPEVENTS_H
+
+#include <qobject.h>
+
+/**
+@author Andras Mantia
+*/
+
+/** Describes an event action. */
+struct EventAction {
+ /** Possible event types */
+ enum Types {
+ Internal = 0,
+ External = 1
+ };
+ /** The type of the event. See @ref Types */
+ uint type;
+ /** the name of the action to be executed. In case of external events
+ this is the name of the script, in case of internal events it can be one of the
+ following: "email"
+ */
+ QString action;
+ /** The arguments for the event action. It is different for each action.
+ */
+ QStringList arguments;
+};
+
+/** The configured events. The key is the event name, the data is the event description.
+For example: events["before_save"] points to the event data that needs to be used
+before a file is saved. Possible key names are: before_save, after_save, after_open,
+after_project_open, after_project_save, before_upload, after_upload, after_project_add,
+after_project_remove, after_commit
+*/
+typedef QMap<QString, QValueList<EventAction> > EventActions;
+
+class QPEvents : public QObject
+{
+Q_OBJECT
+public:
+ static QPEvents* const ref(QObject *parent = 0L)
+ {
+ static QPEvents *m_ref;
+ if (!m_ref) m_ref = new QPEvents(parent);
+ return m_ref;
+ }
+ ~QPEvents();
+ QString fullEventName(const QString &name);
+ QString fullActionName(const QString &name);
+ QString eventName(const QString &fullName);
+ QString actionName(const QString &fullName);
+ QStringList eventNames();
+ QStringList actionNames();
+
+public slots:
+ /** Called when an event has happened */
+ void slotEventHappened(const QString& name, const QString& argument1, const QString& argument2);
+
+private:
+ QPEvents(QObject *parent = 0, const char *name = 0);
+ /** Calls the action associated with an event. Returns true if the call succeeded, false
+ otherwise. The call might fail if:
+ - the action type is unknown
+ - the script cannot be found
+ - the user canceled the execution
+ */
+ bool handleEvent(const EventAction& ev);
+
+ QMap<QString, QString> m_eventNames;
+ QMap<QString, QString> m_actionNames;
+ QString m_eventName;
+};
+
+#endif
diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp
new file mode 100644
index 00000000..ebca5843
--- /dev/null
+++ b/quanta/utility/quantabookmarks.cpp
@@ -0,0 +1,399 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2002, 2003, 2004 Anders Lund <anders.lund@lund.tdcadsl.dk>
+ Copyright (C) 2002 John Firebaugh <jfirebaugh@kde.org>
+ Copyright (C) 2005 Andras Mantia <amantia@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 version 2 as published by the Free Software Foundation.
+
+ 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.
+*/
+
+#include "quantabookmarks.h"
+
+#include <kapplication.h>
+#include <kconfig.h>
+#include <klocale.h>
+#include <kaction.h>
+#include <kdebug.h>
+#include <kpopupmenu.h>
+#include <kstringhandler.h>
+#include <ktexteditor/markinterface.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/viewcursorinterface.h>
+
+#include <qregexp.h>
+#include <qmemarray.h>
+#include <qevent.h>
+
+#include "viewmanager.h"
+#include "document.h"
+
+/**
+ Utility: selection sort
+ sort a QMemArray<uint> in ascending order.
+ max it the largest (zerobased) index to sort.
+ To sort the entire array: ssort( *array, array.size() -1 );
+ This is only efficient if ran only once.
+*/
+static void ssort( QMemArray<uint> &a, int max )
+{
+ uint tmp, j, maxpos;
+ for ( uint h = max; h >= 1; h-- )
+ {
+ maxpos = 0;
+ for ( j = 0; j <= h; j++ )
+ maxpos = a[j] > a[maxpos] ? j : maxpos;
+ tmp = a[maxpos];
+ a[maxpos] = a[h];
+ a[h] = tmp;
+ }
+}
+
+// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
+
+QuantaBookmarks::QuantaBookmarks(ViewManager *parent,Sorting sort, bool onlyFromActualDocument )
+ : QObject( parent, "bookmarks" )
+ , m_sorting(sort)
+ , m_onlyFromActualDocument(onlyFromActualDocument)
+{
+ m_viewManager = parent;
+ _tries=0;
+ m_bookmarksMenu = 0L;
+ m_doc = 0L;
+}
+
+QuantaBookmarks::~QuantaBookmarks()
+{
+}
+
+void QuantaBookmarks::createActions( KActionCollection* ac )
+{
+ m_bookmarksMenu = (new KActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu();
+ init(ac);
+}
+
+void QuantaBookmarks::init(KActionCollection* ac)
+{
+ m_bookmarkToggle = new KToggleAction(
+ i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
+ this, SLOT(toggleBookmark()),
+ ac, "bookmarks_toggle" );
+ m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
+ m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
+
+ m_bookmarkClear = new KAction(
+ i18n("Clear &All Bookmarks"), 0,
+ this, SLOT(clearBookmarks()),
+ ac, "bookmarks_clear");
+ m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
+
+ m_goNext = new KAction(
+ i18n("Next Bookmark"), "next", ALT + Key_PageDown,
+ this, SLOT(goNext()),
+ ac, "bookmarks_next");
+ m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
+
+ m_goPrevious = new KAction(
+ i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
+ this, SLOT(goPrevious()),
+ ac, "bookmarks_previous");
+ m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
+
+ //connect the aboutToShow() and aboutToHide() signals with
+ //the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
+ connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+
+ marksChanged ();
+}
+
+void QuantaBookmarks::setBookmarksMenu(QPopupMenu* bookmarksMenu)
+
+{
+ m_bookmarksMenu = bookmarksMenu;
+ init();
+}
+
+void QuantaBookmarks::toggleBookmark ()
+{
+ Document *doc = m_doc;
+ if (!doc)
+ doc = m_viewManager->activeDocument();
+ if (doc && doc->markIf)
+ {
+ uint mark = doc->markIf->mark(doc->viewCursorIf->cursorLine());
+ if( mark & KTextEditor::MarkInterface::markType01 )
+ doc->markIf->removeMark(doc->viewCursorIf->cursorLine(),
+ KTextEditor::MarkInterface::markType01 );
+ else
+ doc->markIf->addMark(doc->viewCursorIf->cursorLine(),
+ KTextEditor::MarkInterface::markType01 );
+ }
+ marksChanged();
+}
+
+void QuantaBookmarks::clearBookmarks ()
+{
+ Document *doc = m_viewManager->activeDocument();
+ if (doc && doc->markIf)
+ {
+ QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ for (uint i=0; i < m.count(); i++)
+ doc->markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
+
+ // just to be sure ;)
+ marksChanged ();
+ }
+}
+
+int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems )
+{
+ int insertedItems = 0;
+ if (doc->markIf)
+ {
+ uint line = doc->viewCursorIf->cursorLine();
+ const QRegExp re("&(?!&)");
+ int idx( -1 );
+ int old_menu_count = menu.count();
+ KTextEditor::Mark *next = 0;
+ KTextEditor::Mark *prev = 0;
+
+ QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ QMemArray<uint> sortArray( m.count() );
+ QPtrListIterator<KTextEditor::Mark> it( m );
+
+ if ( it.count() > 0 && insertNavigationItems)
+ menu.insertSeparator();
+
+ for( int i = 0; *it; ++it)
+ {
+ if( (*it)->type & KTextEditor::MarkInterface::markType01 )
+ {
+ QString bText = KStringHandler::rEmSqueeze
+ ( doc->editIf->textLine( (*it)->line ),
+ menu.fontMetrics(), 32 );
+ bText.replace(re, "&&"); // kill undesired accellerators!
+ bText.replace('\t', ' '); // kill tabs, as they are interpreted as shortcuts
+
+ if ( m_sorting == Position )
+ {
+ sortArray[i] = (*it)->line;
+ ssort( sortArray, i );
+ idx = sortArray.find( (*it)->line );
+ if (insertNavigationItems)
+ idx += 3;
+ i++;
+ }
+
+ menu.insertItem(
+ QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ 0, (*it)->line, idx );
+ insertedItems++;
+
+ if ( (*it)->line < line )
+ {
+ if ( ! prev || prev->line < (*it)->line )
+ prev = (*it);
+ }
+
+ else if ( (*it)->line > line )
+ {
+ if ( ! next || next->line > (*it)->line )
+ next = (*it);
+ }
+ }
+ }
+
+ if (insertNavigationItems)
+ {
+ idx = ++old_menu_count;
+ if ( next )
+ {
+ m_goNext->setText( i18n("&Next: %1 - \"%2\"").arg( next->line + 1 )
+ .arg( KStringHandler::rsqueeze( doc->editIf->textLine( next->line ), 24 ) ) );
+ m_goNext->plug( &menu, idx );
+ idx++;
+ }
+ if ( prev )
+ {
+ m_goPrevious->setText( i18n("&Previous: %1 - \"%2\"").arg(prev->line + 1 )
+ .arg( KStringHandler::rsqueeze( doc->editIf->textLine( prev->line ), 24 ) ) );
+ m_goPrevious->plug( &menu, idx );
+ idx++;
+ }
+ if ( next || prev )
+ menu.insertSeparator( idx );
+ }
+ connect(&menu, SIGNAL(activated(int)), this, SLOT(gotoLineNumber(int)));
+ }
+ return insertedItems;
+}
+
+void QuantaBookmarks::bookmarkMenuAboutToShow()
+{
+ KConfig *config = kapp->config();
+ if (config->hasGroup("Kate View Defaults"))
+ {
+ config->setGroup("Kate View Defaults");
+ m_sorting = config->readNumEntry("Bookmark Menu Sorting", 0) == 0 ? Position : Creation;
+ }
+ for (uint i = 0; i < m_othersMenuList.count(); i++)
+ {
+ delete m_othersMenuList[i];
+ }
+ m_othersMenuList.clear();
+ m_others.clear();
+ m_bookmarksMenu->clear();
+ marksChanged();
+
+ Document *doc = m_doc;
+ if (!doc)
+ doc = m_viewManager->activeDocument();
+ QValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
+ if (doc && doc->markIf)
+ {
+ QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+
+ if (!m_onlyFromActualDocument)
+ {
+ m_bookmarkToggle->setChecked( doc->markIf->mark( doc->viewCursorIf->cursorLine() )
+ & KTextEditor::MarkInterface::markType01 );
+ m_bookmarkToggle->plug( m_bookmarksMenu );
+ m_bookmarkClear->plug( m_bookmarksMenu );
+ }
+
+ insertBookmarks(*m_bookmarksMenu, doc, !m_onlyFromActualDocument);
+ if (openedDocuments.count() > 1 && !m_onlyFromActualDocument)
+ m_bookmarksMenu->insertSeparator();
+ }
+ if (!m_onlyFromActualDocument)
+ {
+ int i = 0;
+ for (QValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
+ {
+ if (*it != doc)
+ {
+ QPopupMenu *menu = new QPopupMenu(m_bookmarksMenu);
+ m_bookmarksMenu->insertItem((*it)->url().fileName(), menu);
+ if (insertBookmarks(*menu, *it, false) > 0)
+ {
+ m_othersMenuList.append(menu);
+ m_others.append(*it);
+ i++;
+ } else
+ delete menu;
+ }
+ }
+ }
+}
+
+/*
+ Make sure next/prev actions are plugged, and have a clean text
+*/
+void QuantaBookmarks::bookmarkMenuAboutToHide()
+{
+ m_bookmarkToggle->plug( m_bookmarksMenu );
+ m_bookmarkClear->plug( m_bookmarksMenu );
+ m_goNext->setText( i18n("Next Bookmark") );
+ m_goNext->plug( m_bookmarksMenu );
+ m_goPrevious->setText( i18n("Previous Bookmark") );
+ m_goPrevious->plug( m_bookmarksMenu );
+}
+
+void QuantaBookmarks::goNext()
+{
+ Document *doc = m_doc;
+ if (!doc)
+ doc = m_viewManager->activeDocument();
+ if (doc && doc->markIf)
+ {
+ QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ if (m.isEmpty())
+ return;
+
+ uint line = doc->viewCursorIf->cursorLine();
+ int found = -1;
+
+ for (uint z=0; z < m.count(); z++)
+ if ( (m.at(z)->line > line) && ((found == -1) || (uint(found) > m.at(z)->line)) )
+ found = m.at(z)->line;
+
+ if (found != -1)
+ doc->viewCursorIf->setCursorPositionReal(found, 0);
+ }
+}
+
+void QuantaBookmarks::goPrevious()
+{
+ Document *doc = m_doc;
+ if (!doc)
+ doc = m_viewManager->activeDocument();
+ if (doc && doc->markIf)
+ {
+ QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ if (m.isEmpty())
+ return;
+
+ uint line = doc->viewCursorIf->cursorLine();
+ int found = -1;
+
+ for (uint z=0; z < m.count(); z++)
+ if ((m.at(z)->line < line) && ((found == -1) || (uint(found) < m.at(z)->line)))
+ found = m.at(z)->line;
+
+ if (found != -1)
+ doc->viewCursorIf->setCursorPositionReal(found, 0);
+ }
+}
+
+void QuantaBookmarks::gotoLineNumber(int line)
+{
+ Document *doc = m_doc;
+ if (!doc)
+ doc = m_viewManager->activeDocument();
+ const QObject *s = sender();
+ for (uint i = 0; i < m_othersMenuList.count(); i++)
+ {
+ if (s == m_othersMenuList[i])
+ {
+ doc = m_others[i];
+ break;
+ }
+ }
+ if (doc)
+ {
+ if (doc->isUntitled())
+ {
+ emit gotoFileAndLine("file:" + doc->url().path(), line, 0);
+ } else
+ {
+ emit gotoFileAndLine(doc->url().url(), line, 0);
+ }
+ }
+}
+
+
+void QuantaBookmarks::marksChanged ()
+{
+ Document *doc = m_doc;
+ if (!doc)
+ doc = m_viewManager->activeDocument();
+ if (doc && doc->markIf)
+ {
+ m_bookmarkClear->setEnabled( !doc->markIf->marks().isEmpty() );
+ }
+}
+
+#include "quantabookmarks.moc"
+
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/quanta/utility/quantabookmarks.h b/quanta/utility/quantabookmarks.h
new file mode 100644
index 00000000..10c0aad4
--- /dev/null
+++ b/quanta/utility/quantabookmarks.h
@@ -0,0 +1,99 @@
+/* This file is part of the KDE libraries
+ Copyright (C) 2002, 2003 Anders Lund <anders.lund@lund.tdcadsl.dk>
+ Copyright (C) 2002 John Firebaugh <jfirebaugh@kde.org>
+ Copyright (C) 2005 Andras Mantia <amantia@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 version 2 as published by the Free Software Foundation.
+
+ 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.
+*/
+
+/* Extended bookmark manager. Code taken from the Kate part and adapted to
+Quanta, so it works over multiple document */
+
+#ifndef QUANTABOOKMARKS_H
+#define QUANTABOOKMARKS_H
+
+#include <qobject.h>
+#include <qptrlist.h>
+
+namespace KTextEditor { class Mark; }
+
+class ViewManager;
+class Document;
+
+class KAction;
+class KToggleAction;
+class KActionCollection;
+class QPopupMenu;
+class QMenuData;
+
+
+
+class QuantaBookmarks : public QObject
+{
+ Q_OBJECT
+
+ public:
+ enum Sorting { Position, Creation };
+ QuantaBookmarks(ViewManager *parent, Sorting sort=Position, bool onlyFromActualDocument = false );
+ virtual ~QuantaBookmarks();
+
+ void createActions( KActionCollection* );
+ void setBookmarksMenu(QPopupMenu* bookmarksMenu);
+
+ QuantaBookmarks::Sorting sorting() { return m_sorting; };
+ void setSorting( Sorting s ) { m_sorting = s; };
+ void setDocument(Document *doc) {m_doc = doc;}
+
+ protected:
+ int insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
+ void init(KActionCollection* ac = 0L);
+
+ private slots:
+ void toggleBookmark();
+ void clearBookmarks();
+
+ void bookmarkMenuAboutToShow();
+ void bookmarkMenuAboutToHide();
+
+ void goNext();
+ void goPrevious();
+ void gotoLineNumber(int line);
+
+ void marksChanged ();
+
+ signals:
+ void gotoFileAndLine(const QString&, int, int);
+
+ private:
+ KToggleAction* m_bookmarkToggle;
+ KAction* m_bookmarkClear;
+ KAction* m_goNext;
+ KAction* m_goPrevious;
+
+ Sorting m_sorting;
+ QPopupMenu* m_bookmarksMenu;
+ QValueList<QPopupMenu*> m_othersMenuList;
+ QValueList<Document*> m_others;
+ ViewManager* m_viewManager;
+ Document *m_doc;
+ bool m_onlyFromActualDocument;
+
+ uint _tries;
+};
+
+#endif
+
+// kate: space-indent on; indent-width 2; replace-tabs on;
+// vim: noet ts=2
diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp
new file mode 100644
index 00000000..7cc7fb1b
--- /dev/null
+++ b/quanta/utility/quantacommon.cpp
@@ -0,0 +1,753 @@
+/***************************************************************************
+ quantacommon.cpp - description
+ -------------------
+ begin : Sat Jul 27 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+//system includes
+#include <sys/types.h>
+#include <unistd.h>
+
+//qt includes
+#include <qstringlist.h>
+#include <qdict.h>
+#include <qdir.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qwidget.h>
+
+//kde includes
+#include <kapplication.h>
+#include <dcopref.h>
+#include <kurl.h>
+#include <kdirwatch.h>
+#include <kmimetype.h>
+#include <kstandarddirs.h>
+#include <kmessagebox.h>
+#include <kio/netaccess.h>
+#include <klocale.h>
+#include <kprotocolinfo.h>
+#include <kprogress.h>
+#include <ktempdir.h>
+#include <ktempfile.h>
+
+//remove the below ones when KQPasteAction is removed
+#include <dcopclient.h>
+#include <kdebug.h>
+#include <kpopupmenu.h>
+#include <ktoolbar.h>
+#include <ktoolbarbutton.h>
+#include <kstringhandler.h>
+#include <qwhatsthis.h>
+#include <qtimer.h>
+#include <qclipboard.h>
+#include <qdatastream.h>
+
+#include "qextfileinfo.h"
+#include "quantacommon.h"
+#include "tag.h"
+#include "dtds.h"
+//#include "resource.h"
+
+
+QConfig qConfig; //holds the main configuration settings
+QString tmpDir;
+
+QRegExp scriptBeginRx;
+QRegExp scriptEndRx;
+
+Node *baseNode;
+Parser *parser;
+KDirWatch *fileWatcher;
+KProgress *progressBar;
+
+QString toolbarExtension = ".toolbar.tgz";
+QRegExp newLineRx("\\n");
+QStringList charList; //hold the list of the &char; chars. See the data/chars file.
+QMap<int, QString> replacementMap;
+QPtrList<KTempFile> tempFileList;
+QPtrList<KTempDir> tempDirList;
+bool typingInProgress;
+
+QuantaCommon::QuantaCommon(){
+}
+
+QuantaCommon::~QuantaCommon(){
+}
+
+/** convert tag to upper or lower case */
+QString QuantaCommon::tagCase( const QString& tag)
+{
+ QString sTag = tag;
+
+ switch (qConfig.tagCase)
+ {
+ case 1: sTag = tag.lower();
+ break;
+ case 2: sTag = tag.upper();
+ }
+ return sTag;
+}
+
+/** convert attr of tag to upper or lower case */
+QString QuantaCommon::attrCase( const QString& attr)
+{
+ QString sAttr = attr;
+
+ switch (qConfig.attrCase)
+ {
+ case 1: sAttr = attr.lower();
+ break;
+ case 2: sAttr = attr.upper();
+ }
+ return sAttr;
+}
+
+/** returns the attribute value in quoted form, by taking care of the
+quotation setting*/
+QString QuantaCommon::quoteAttributeValue(const QString& value)
+{
+ QString quote = qConfig.attrValueQuotation;
+ return quote + value + quote;
+}
+
+/** Set's up the url correctly from urlString. */
+void QuantaCommon::setUrl(KURL &url, const QString& urlString)
+{
+ KURL oldUrl = url;
+ url = urlString;
+ if (!KProtocolInfo::isKnownProtocol(url))
+ {
+ url = oldUrl;
+ url.setPath(urlString);
+ if (url.protocol().isEmpty())
+ url.setProtocol("file");
+ }
+}
+
+/** No descriptions */
+bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
+{
+ bool single = false;
+
+ //!doctype is a common tag to all DTDs not listed in the tagsList
+ if(tag.lower() == "!doctype" || tag.lower() == "?xml")
+ return true;
+
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ if (dtd && !tag.isEmpty())
+ {
+ QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ QTag* qtag = dtd->tagsList->find(searchForTag);
+ if (qtag)
+ single = qtag->isSingle();
+ }
+
+ return single;
+}
+
+/** No descriptions */
+bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
+{
+ bool optional = false;
+
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ if (dtd && !tag.isEmpty())
+ {
+ QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ QTag* qtag = dtd->tagsList->find(searchForTag);
+ if (qtag)
+ optional = qtag->isOptional();
+ }
+
+ return optional;
+}
+/** No descriptions */
+bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
+{
+ bool known = false;
+
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ if (dtd && !tag.isEmpty())
+ {
+ QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ if (dtd->tagsList->find(searchForTag))
+ known = true;
+ }
+
+ return known;
+}
+
+AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString& tag)
+{
+ AttributeList* attrs = 0L;
+
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ if (dtd && !tag.isEmpty())
+ {
+ QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ QTag* qtag = dtd->tagsList->find(searchForTag);
+ if (qtag)
+ attrs = qtag->attributes();
+ }
+
+ return attrs;
+}
+
+/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
+QTag* QuantaCommon::tagFromDTD(const QString& dtdName, const QString& tag)
+{
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
+ return tagFromDTD(dtd, tag);
+}
+
+/** Returns the QTag object for the tag "tag" from the DTD. */
+QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const QString& tag)
+{
+ QTag *qtag = 0;
+ if (dtd && !tag.isEmpty())
+ {
+ QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ qtag = dtd->tagsList->find(searchForTag);
+ }
+
+ return qtag;
+}
+
+/** Returns the QTag object for the node "node" from node's DTD. */
+QTag* QuantaCommon::tagFromDTD(Node *node)
+{
+ if(!node || !node->tag)
+ return 0L;
+
+ return tagFromDTD(node->tag->dtd(), node->tag->name);
+}
+
+/** Returns an XML style string containing the GUI for attributes. */
+QString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
+{
+ QString xmlStr;
+ QTextStream stream( &xmlStr, IO_WriteOnly );
+ stream.setEncoding(QTextStream::UnicodeUTF8);
+ if (attributes)
+ {
+ int row = 0;
+ for ( uint i = 0; i< attributes->count();i++)
+ {
+ Attribute *attribute = attributes->at(i);
+ QString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
+ stream << " <attr name=\"" + attribute->name +"\" type=\""+attribute->type+"\"";
+ if (!attribute->defaultValue.isEmpty())
+ stream << " defaultValue=\"" + attribute->defaultValue + "\"";
+ if (!attribute->status.isEmpty())
+ stream << " status=\"" + attribute->status + "\"";
+ stream << ">" << endl;
+ stream << " <text>" << name << "</text>" << endl;
+ if (attribute->type != "check")
+ {
+ stream << " <textlocation col=\"0\" row=\"" << row << "\" />" << endl;
+ }
+ stream << " <location col=\"1\" row=\"" << row << "\" />" << endl;
+
+ if (attribute->type == "list")
+ {
+ stream << " <items>" << endl;
+ for (uint j = 0; j < attribute->values.count(); j++)
+ {
+ stream << " <item>" << attribute->values[j] << "</item>" << endl;
+ }
+ stream << " </items>" << endl;
+ }
+ stream << " </attr>" << endl << endl ;
+ row++;
+ } //for
+ } //if
+
+ return xmlStr;
+}
+
+ /** Returns 0 if the (line,col) is inside the area specified by the other
+arguments, -1 if it is before the area and 1 if it is after. */
+int QuantaCommon::isBetween(int line, int col, int bLine, int bCol, int eLine,
+int eCol){
+ int pos = 0;
+ if (line < bLine || (line == bLine && (col < bCol) )) pos = -1; //it is before
+ if (line > eLine || (line == eLine && (col > eCol) )) pos = 1; //it is after
+
+ return pos;
+}
+
+/** Returns a pointer to a KStandardDirs object usable for plugin searchup. type
+is the plugin binary type (exe or lib). The returned pointer must be deleted by
+the caller!! */
+KStandardDirs* QuantaCommon::pluginDirs(const char *type)
+{
+ KStandardDirs *dirs = new KStandardDirs();
+ dirs->addKDEDefaults();
+ for (uint i = 0; i < qConfig.pluginSearchPaths.count(); i++)
+ {
+ dirs->addResourceDir(type, qConfig.pluginSearchPaths[i]);
+ }
+ return dirs;
+}
+/** Return true, if the url belong to the mimetype group. */
+bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
+{
+ KMimeType::List list = KMimeType::allMimeTypes();
+ KMimeType::List::iterator it;
+ bool status = false;
+ KMimeType::Ptr mime = KMimeType::findByURL(url);
+ QString mimetype = mime->name();
+ mimetype = mimetype.section('/',-1);
+ for ( it = list.begin(); it != list.end(); ++it )
+ {
+ if ( ((*it)->name().contains(group)) && ((*it)->name().find(mimetype) != -1)
+) {
+ status = true;
+ break;
+ }
+ }
+
+ if (!status && group == "text")
+ {
+ if (url.isLocalFile())
+ {
+ KMimeType::Format f = KMimeType::findFormatByFileContent(url.path());
+ if (f.text && f.compression == KMimeType::Format::NoCompression)
+ status = true;
+ } else
+ {
+ QVariant v = mime->property("X-KDE-text");
+ if (v.isValid())
+ status = v.toBool();
+ }
+ }
+ if (!status && group == "text" && mimetype == "x-zerosize")
+ status = true;
+
+ return status;
+}
+
+/** Return true, if the url has the mimetype type. */
+bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
+{
+ bool status = false;
+ QString mimetype = KMimeType::findByURL(url)->name();
+ mimetype = mimetype.section('/',-1);
+ if (mimetype == type) status = true;
+
+ return status;
+}
+
+/** Return true, if the url has exactly the mimetype type. */
+bool QuantaCommon::checkExactMimeType(const KURL& url, const QString& type)
+{
+ bool status = false;
+ QString mimetype = KMimeType::findByURL(url)->name();
+ if (mimetype == type) status = true;
+
+ return status;
+}
+
+/** Returns the url without the filename. */
+KURL QuantaCommon::convertToPath(const KURL& url)
+{
+ KURL result = url;
+ result.setFileName("");
+ result.adjustPath(1);
+ return result;
+}
+
+/** Return a string to be used when an url is saved to the project file.
+ Returns url.url() if it's an absolute url and
+ url.path() if the url is relative */
+QString QuantaCommon::qUrl(const KURL &url)
+{
+ QString result = url.path();
+ if (url.path().startsWith("/")) result = url.url();
+
+ return result;
+}
+/** No descriptions */
+void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
+{
+ KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the parent folder or that the connection to<br><b>%2</b><br> is valid.</qt>")
+ .arg(url.prettyURL(0, KURL::StripFileProtocol))
+ .arg(url.protocol()+"://"+url.user()+"@"+url.host()));}
+
+/**
+Adds the backslash before the special chars (like ?, *, . ) so the returned
+string can be used in regular expressions.*/
+QString QuantaCommon::makeRxCompatible(const QString& s)
+{
+ const uint max = 7;
+ const QRegExp rxs[max]={QRegExp("\\?"),
+ QRegExp("\\*"),
+ QRegExp("\\."),
+ QRegExp("\\^"),
+ QRegExp("\\$"),
+ QRegExp("\\{"),
+ QRegExp("\\}")
+ };
+ const QString strs[max]={QString("\\?"),
+ QString("\\*"),
+ QString("\\."),
+ QString("\\^"),
+ QString("\\$"),
+ QString("\\{"),
+ QString("\\}")
+ };
+ QString str = s;
+ for (uint i = 0; i < max - 1; i++)
+ {
+ str.replace(rxs[i], strs[i]);
+ }
+
+ return str;
+}
+
+/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
+QString QuantaCommon::i18n2normal(const QString& a_str)
+{
+//TODO: a QMap lookup would be faster, but we need a pre-built QMap<QString,QString>
+ const int keywordNum = 15 *5;
+ const QString keywords[keywordNum] =
+ {"normal", "italic", "oblique", "serif", "sans-serif",
+ "cursive", "fantasy", "monospace", "small-caps", "lighter",
+ "bold", "bolder", "xx-small", "x-small", "small",
+ "medium", "large", "x-large", "xx-large", "smaller",
+ "larger", "repeat", "repeat-x", "repeat-y", "no-repeat",
+ "scroll", "fixed", "top", "center", "bottom",
+ "left", "right", "none", "underline", "overline"
+ "line-through", "blibk", "justify","baseline", "sub",
+ "super", "text-top","text-bottom","capitalize","uppercase",
+ "lowercase","thin", "thick", "[length value]","dotted",
+ "dashed", "solid", "double", "groove", "ridge",
+ "inset", "outset", "block", "inline", "list-item",
+ "none", "pre", "nowrap", "disc", "circle",
+ "square", "decimal", "lower-roman","upper-roman","lower-alpha",
+ "upper-alpha","inside","outside", "auto", "both" };
+ QString str = a_str;
+ if (!a_str.isEmpty())
+ {
+ for (int i = 0; i < keywordNum; i++)
+ {
+ if (!keywords[i].isEmpty() && a_str == i18n(keywords[i].utf8()))
+ {
+ str = keywords[i];
+ break;
+ }
+ }
+ }
+ return str;
+}
+
+static const QChar space(' ');
+
+void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
+{
+ //Replace all the commented strings and the escaped quotation marks (\", \')
+ // with spaces so they will not mess up our parsing
+ int pos = 0;
+ int l;
+ QString s;
+ while (pos != -1)
+ {
+ pos = dtd->commentsStartRx.search(str, pos);
+ if (pos != -1)
+ {
+ s = dtd->commentsStartRx.cap();
+ if (s == "\\\"" || s == "\\'")
+ {
+ int i = pos;
+ int slahNum = 0;
+ while (i > 0 && str[i] == '\\')
+ {
+ slahNum++;
+ i--;
+ }
+ if (slahNum % 2 == 0)
+ {
+ pos++;
+ } else
+ {
+ str[pos] = space;
+ str[pos+1] = space;
+ pos += 2;
+ }
+ } else
+ {
+ s = dtd->comments[s];
+ l = str.find(s, pos);
+ l = (l == -1) ? str.length() : l;
+ for (int i = pos; i < l ; i++)
+ {
+ str[i] = space;
+ }
+ pos = l + s.length();
+ }
+ }
+ }
+
+ //Now replace the quoted strings with spaces
+ QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ pos = 0;
+ while (pos != -1)
+ {
+ pos = strRx.search(str, pos);
+ if (pos != -1)
+ {
+ l = strRx.matchedLength();
+ for (int i = pos; i < pos + l ; i++)
+ {
+ str[i] = space;
+ }
+ pos += l;
+ }
+ }
+
+}
+
+bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd)
+{
+ //Return true if position is inside a commented or quoted string
+ QString str = string;
+ int pos = 0;
+ int l;
+ QString s;
+ while (pos != -1)
+ {
+ pos = dtd->commentsStartRx.search(str, pos);
+ if (pos == position)
+ return true;
+ if (pos != -1)
+ {
+ s = dtd->commentsStartRx.cap();
+ if (s == "\\\"" || s == "\\'")
+ {
+ int i = pos;
+ int slahNum = 0;
+ while (i > 0 && str[i] == '\\')
+ {
+ slahNum++;
+ i--;
+ }
+ if (slahNum % 2 == 0)
+ {
+ pos++;
+ } else
+ {
+ str[pos] = space;
+ str[pos+1] = space;
+ pos += 2;
+ }
+ } else
+ {
+ s = dtd->comments[s];
+ l = str.find(s, pos);
+ l = (l == -1) ? str.length() : l;
+ for (int i = pos; i < l ; i++)
+ {
+ str[i] = space;
+ if (i == position)
+ return true;
+ }
+ pos = l + s.length();
+ }
+ }
+ }
+
+ //Now replace the quoted strings with spaces
+ const QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ pos = 0;
+ while (pos != -1)
+ {
+ pos = strRx.search(str, pos);
+ if (pos != -1)
+ {
+ l = strRx.matchedLength();
+ for (int i = pos; i < pos + l ; i++)
+ {
+ str[i] = space;
+ if (i == position)
+ return true;
+ }
+ pos += l;
+ }
+ }
+
+ return false;
+}
+
+DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString& method, const QString& arguments)
+{
+ QStringList argumentList = QStringList::split(",", arguments, true);
+ QString app = "quanta";
+ if (!kapp->inherits("KUniqueApplication"))
+ {
+ pid_t pid = ::getpid();
+ app += QString("-%1").arg(pid);
+ }
+ DCOPRef quantaRef(app.utf8(), interface.utf8());
+ DCOPReply reply;
+ int argumentCount = argumentList.count();
+ if (argumentCount == 0)
+ {
+ reply = quantaRef.call(method.utf8());
+ }
+ else if (argumentCount == 1)
+ {
+ reply = quantaRef.call(method.utf8(), argumentList[0]);
+ }
+ else if (argumentCount == 2)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1]);
+ else if (argumentCount == 3)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1], argumentList[2]);
+ else if (argumentCount == 4)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1], argumentList[2], argumentList[3]);
+ else if (argumentCount == 5)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1], argumentList[2], argumentList[3], argumentList[4]);
+ else if (argumentCount == 6)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1], argumentList[2], argumentList[3], argumentList[4], argumentList[5]);
+ else if (argumentCount == 7)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1], argumentList[2], argumentList[3], argumentList[4], argumentList[5], argumentList[6]);
+ else if (argumentCount == 8)
+ reply = quantaRef.call(method.utf8(), argumentList[0], argumentList[1], argumentList[2], argumentList[3], argumentList[4], argumentList[5], argumentList[6], argumentList[7]);
+
+ return reply;
+}
+
+void QuantaCommon::normalizeStructure(QString f,QStringList& l)
+{
+ f.remove("\t");
+ f.remove("\n");
+ f.remove("\r");
+
+ while(f.contains("<"))
+ {
+ QString z(f);
+ z.truncate(z.find(">")+1);
+ z.remove(0,z.find("<"));
+ f.remove(0,f.find(">")+1);
+ l.append(z);
+ }
+}
+
+bool QuantaCommon::closesTag(Tag *tag1, Tag *tag2)
+{
+ if (tag1->nameSpace.isEmpty())
+ {
+ if (!tag2->nameSpace.isEmpty())
+ return false; //namespace missmatch
+ QString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
+ QString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
+ if ("/" + tag1Name != tag2Name)
+ return false; //not the closing tag
+ } else
+ {
+ if (tag2->nameSpace.isEmpty())
+ return false; //namespace missmatch
+ QString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
+ QString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
+ if ("/" + tag1Name != tag2Name)
+ return false; //namespace missmatch or not the closing tag
+ }
+ return true;
+}
+
+bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSensitive,
+ QString namespaceName2, QString tagName2, bool caseSensitive2)
+{
+ QString tag1Name, tag2Name;
+ if(namespaceName.isEmpty())
+ {
+ if(!namespaceName.isEmpty())
+ return false;//namespace missmatch
+ tag1Name = caseSensitive ? tagName : tagName.upper();
+ tag2Name = caseSensitive2 ? tagName2 : tagName2.upper();
+ if("/" + tag1Name != tag2Name)
+ return false;//not the closing tag
+ }
+ else
+ {
+ if(namespaceName2.isEmpty())
+ return false;//namespace missmatch
+ tag1Name = caseSensitive ? (namespaceName + tagName) : (namespaceName.upper() +
+ tagName.upper());
+ tag2Name = caseSensitive2 ? (namespaceName2 + tagName2) : (namespaceName2.upper() +
+ tagName2.upper());
+ if("/" + tag1Name != tag2Name)
+ return false; //namespace missmatch or not the closing tag
+ }
+ return true;
+}
+
+int QuantaCommon::denyBinaryInsert(QWidget *window)
+{
+ int result = KMessageBox::questionYesNo(window, i18n("The file type is not recognized. \
+ Opening binary files may confuse Quanta.\n Are you sure you want to open this file?"),
+ i18n("Unknown Type"), KStdGuiItem::open(), i18n("Do Not Open"), "Open Everything");
+ return result;
+}
+
+bool QuantaCommon::checkOverwrite(const KURL& url, QWidget *window)
+{
+ bool result = true;
+
+ if (QExtFileInfo::exists(url, false, window))
+ {
+ if (KMessageBox::warningContinueCancel(window,
+ i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ result = false;
+ }
+
+ return result;
+}
+
+QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey)
+{
+ QStringList list = config->readPathListEntry(pKey);
+ QStringList::Iterator end = list.end();
+ for (QStringList::Iterator it = list.begin(); it != end; ++it)
+ {
+ KURL u = KURL::fromPathOrURL(*it);
+ if (u.isValid() && u.isLocalFile())
+ {
+ u.setPath(QExtFileInfo::canonicalPath(u.path()));
+ *it = u.url();
+ }
+ }
+ return list;
+}
+
+QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
+{
+ QString path = config->readPathEntry(pKey);
+ KURL u = KURL::fromPathOrURL(path);
+ if (u.isValid() && u.isLocalFile())
+ {
+ u.setPath(QExtFileInfo::canonicalPath(u.path()));
+ path = u.url();
+ }
+ return path;
+}
+
+QString QuantaCommon::encodedChar(uint code)
+{
+
+ if (replacementMap.contains(code))
+ return QString("%1;").arg(replacementMap[code]);
+ else
+ return QString("&#%1;").arg(code);
+}
+
diff --git a/quanta/utility/quantacommon.h b/quanta/utility/quantacommon.h
new file mode 100644
index 00000000..a88276b7
--- /dev/null
+++ b/quanta/utility/quantacommon.h
@@ -0,0 +1,225 @@
+/***************************************************************************
+ quantacommon.h - description
+ -------------------
+ begin : Sat Jul 27 2002
+ copyright : (C) 2002, 2003 by Andras Mantia <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 QUANTACOMMON_H
+#define QUANTACOMMON_H
+
+#include <kdeversion.h>
+
+#include "qtag.h"
+#include "node.h"
+#include "parser.h"
+
+/**Some common, mostly static functions.
+ *@author Andras Mantia
+ */
+
+#define DEFAULT_DTD QString("-//W3C//DTD HTML 4.01 Transitional//EN")
+
+class QString;
+class DCOPReply;
+class KURL;
+class KStandardDirs;
+class QWidget;
+class Tag;
+
+class KConfig;
+class KPopupMenu;
+
+/** Describes one abbreviation group */
+class Abbreviation{
+public:
+/*A list with abbreviations in the for of: <template templatename, code> */
+ QMap<QString, QString> abbreviations;
+ QStringList dteps;
+};
+
+
+//Quanta main configuration structure
+class QConfig{
+public:
+ //Tag style options
+ uint tagCase;
+ uint attrCase;
+ QChar attrValueQuotation;
+ bool closeOptionalTags;
+ bool closeTags;
+ bool updateClosingTags;
+
+ //editor settings
+ bool useAutoCompletion;
+ bool enableDTDToolbar;
+ QString defaultEncoding;
+
+ //parser options
+ bool instantUpdate;
+ bool showEmptyNodes;
+ bool showClosingTags;
+ uint refreshFrequency;
+ QString defaultDocType;
+ uint expandLevel;
+ bool showDTDSelectDialog;
+ QString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
+ uint toolviewTabs; ///< how does the toolview tabs look like
+
+ //kafka sync options
+ bool quantaRefreshOnFocus;
+ int quantaRefreshDelay;
+ bool kafkaRefreshOnFocus;
+ int kafkaRefreshDelay;
+
+ //kafka indentation options
+ bool inlineNodeIndentation;
+
+ //environment options
+ QString globalDataDir; //not stored, initialized on app startup
+ QStringList pluginSearchPaths; //global but read from plugins.rc
+ QString markupMimeTypes;
+ QString scriptMimeTypes;
+ QString imageMimeTypes;
+ QString textMimeTypes;
+ QString previewPosition;
+ QString docPosition;
+ QString windowLayout;
+ uint autosaveInterval;
+ QString backupDirPath;
+ QString quantaPID;
+ bool showHiddenFiles; ///< show hidden files in files treeview?
+ bool saveTrees; ///< save tree status for local trees?
+ QMap<QString, Abbreviation> abbreviations; ///< the abbreviation groups
+ bool replaceAccented; ///< replace or not the accented characters
+ bool replaceNotInEncoding; ///< replace characters with their entity number if they cannot be saved in the current encoding of the document.
+ bool smartTagInsertion; //enable/disable smartTagInsertion
+ };
+
+typedef struct DirInfo{
+ QString mimeType;
+ QString preText;
+ QString postText;
+ bool usePrePostText;
+ };
+
+/**Some common, mostly static functions.
+ *@author Andras Mantia
+ */
+
+class QuantaCommon {
+public:
+ QuantaCommon();
+ ~QuantaCommon();
+
+ /** convert tag to upper or lower case */
+ static QString tagCase( const QString& tag);
+ /** convert tag to upper or lower case */
+ static QString attrCase( const QString& attr);
+/** returns the attribute value in quoted form, by taking care of the
+quotation setting*/
+ static QString quoteAttributeValue(const QString& value);
+ /** Set's up the url correctly from urlString. */
+ static void setUrl(KURL &url, const QString& urlString);
+ /** No descriptions */
+ static bool isSingleTag(const QString& dtdName, const QString& tag);
+ /** No descriptions */
+ static bool isOptionalTag(const QString& dtdName, const QString& tag);
+ /** No descriptions */
+ static bool isKnownTag(const QString& dtdName, const QString& tag);
+ /** No descriptions */
+ static AttributeList* tagAttributes(const QString& dtdName, const QString& tag);
+ /** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
+ static QTag* tagFromDTD(const QString& dtdName, const QString& tag);
+ /** Returns the QTag object for the tag "tag" from the DTD. */
+ static QTag* tagFromDTD(const DTDStruct* dtd, const QString& tag);
+ /** Returns the QTag object for the node "node" from node's DTD. */
+ static QTag* tagFromDTD(Node *node);
+ /** Returns an XML style string containing the GUI for attributes. */
+ static QString xmlFromAttributes(AttributeList* attributes);
+ /** Returns 0 if the (line,col) is inside the area specified by the other arguments,
+ -1 if it is before the area and 1 if it is after. */
+ static int isBetween(int line, int col, int bLine, int bCol, int eLine, int eCol);
+ /** Returns a pointer to a KStandardDirs object usable for plugin searchup. type is the plugin binary type (exe or lib). The returned
+pointer must be deleted by the caller!! */
+ static KStandardDirs* pluginDirs(const char *type);
+
+ /** Return true, if the url has the mimetype starting with type. */
+ static bool checkMimeGroup(const KURL& url, const QString& type);
+ /** Return true, if the url has the mimetype type. */
+ static bool checkMimeType(const KURL& url, const QString& type);
+ /** Return true, if the url has exactly the mimetype type. */
+ static bool checkExactMimeType(const KURL& url, const QString& type);
+ /** Returns the url without the filename. */
+ static KURL convertToPath(const KURL& url);
+ /** Return a string to be used when an url is saved to the project file.
+ Returns url.url() if it's an absolute url and
+ url.path() if the url is relative */
+ static QString qUrl(const KURL& url);
+ /** No descriptions */
+ static void dirCreationError(QWidget *widget, const KURL& url);
+ /**
+ Adds the backslash before the special chars (like ?, *, . ) so the returned string can be used in regular expressions.
+ */
+ static QString makeRxCompatible(const QString& s);
+ /** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
+ static QString i18n2normal(const QString& a_str);
+
+/** No descriptions */
+ static void normalizeStructure(QString f,QStringList& l);
+ /**Returns true if tag2 is the closing pair of tag1. It's namespace aware.*/
+ static bool closesTag(Tag *tag1, Tag *tag2);
+ static bool closesTag(QString namespaceName, QString tagName, bool caseSensitive,
+ QString namespaceName2, QString tagName2, bool caseSensitive2);
+ static int denyBinaryInsert(QWidget *window);
+ static void removeCommentsAndQuotes(QString& str, const DTDStruct* dtd);
+ static bool insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd);
+ /** Calls a Quanta DCOP method.
+ * @param interface the DCOP interface the method belongs to
+ * @param method the DCOP method name (with the argument types)
+ * @param arguments comma separated list of argument
+ * @return the return value of the DCOP caller
+ */
+ static DCOPReply callDCOPMethod(const QString& interface, const QString& method, const QString& arguments);
+ /** Checks if url exists and shows a question about overwriting it.
+ * @param url the url to check
+ * @return true if the user answered yes, false otherwise.
+ */
+ static bool checkOverwrite(const KURL& url, QWidget *window);
+
+ /**
+ * Same as KConfigBase::readPathListEntry, but resolves symlinks
+ * @param config
+ * @param pKey
+ * @return
+ */
+ static QStringList readPathListEntry(KConfig *config, const QString &pKey);
+
+ /**
+ * Same as KConfigBase::readPathEntry, but resolves symlinks
+ * @param config
+ * @param pKey
+ * @return
+ */
+ static QString readPathEntry(KConfig *config, const QString &pKey);
+
+ /**
+ * Returns the HTML encoding string for character with the specified code.
+ * If no such literal encoding is known (like &auml;), the numeric encoding
+ * is returned: &#code;
+ * @param code the numeric code of the character
+ * @return the encoded string
+ */
+ static QString encodedChar(uint code);
+
+};
+
+#endif
diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp
new file mode 100644
index 00000000..095f9e08
--- /dev/null
+++ b/quanta/utility/quantanetaccess.cpp
@@ -0,0 +1,268 @@
+/***************************************************************************
+ quantanetaccess.h - description
+ -------------------
+ begin : Jun 21 2004
+ copyright : (C) 2004 by Jens Herden <jhe@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; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+#include <qstring.h>
+#include <qwidget.h>
+#include <qdir.h>
+
+#include <kio/netaccess.h>
+#include <kurl.h>
+#include <kmessagebox.h>
+#include <klocale.h>
+#include <kfileitem.h>
+#include <kstringhandler.h>
+
+#include "qextfileinfo.h"
+#include "quantanetaccess.h"
+#include "project.h"
+
+bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* window, bool confirm)
+{
+ bool ok = KIO::NetAccess::upload(src, target, window);
+ if (ok) {
+ checkProjectInsert(target, window, confirm);
+ } else {
+ if (confirm)
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window, bool confirm)
+{
+ bool ok = KIO::NetAccess::file_copy( src, target, permissions, overwrite, resume, window );
+ if (ok) {
+ checkProjectInsert(target, window, confirm);
+ } else {
+ if (confirm)
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window, bool confirm)
+{
+ // don't ask if move is inside of the project
+ bool oldConfirm = confirm;
+ if ( Project::ref()->projectBaseURL().isParentOf(src) &&
+ Project::ref()->projectBaseURL().isParentOf(target) )
+ {
+ confirm = false;
+ }
+ if ( !checkProjectRemove(src, window, confirm)) {
+ return false;
+ }
+ bool ok = KIO::NetAccess::file_move( src, target, permissions, overwrite, resume, window );
+ if (ok) {
+ checkProjectInsert(target, window, confirm);
+ } else {
+ if (oldConfirm)
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm )
+{
+ bool ok = KIO::NetAccess::dircopy( srcList, target, window );
+ if (ok) {
+ KURL url;
+ for ( KURL::List::ConstIterator it = srcList.begin(); it != srcList.end(); ++it ) {
+ url = target;
+ url.adjustPath(+1);
+ url.setFileName((*it).fileName());
+ checkProjectInsert(url, window, confirm);
+ }
+ } else {
+ if (confirm)
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm )
+{
+ KURL targetURL = adjustURL(target);
+ bool oldConfirm = confirm;
+ bool moveInsideProject = false;
+ bool targetInProject = Project::ref()->projectBaseURL().isParentOf(targetURL);
+ KURL url;
+ // first we ask about the URLs in the list without actually removing them from the project
+ for ( KURL::List::ConstIterator it = srcList.begin(); it != srcList.end(); ++it ) {
+ //don't ask if move is inside of the project
+ url = adjustURL(*it);
+ if (targetInProject && Project::ref()->projectBaseURL().isParentOf(url) )
+ {
+ confirm = false;
+ moveInsideProject = true;
+ }
+ if ( !checkProjectRemove(*it, window, confirm, false)) {
+ return false;
+ confirm = oldConfirm;
+ }
+ }
+ // all URLs are confirmed, we remove them from the project
+ for ( KURL::List::ConstIterator it = srcList.begin(); it != srcList.end(); ++it ) {
+ if ( Project::ref()->projectBaseURL().isParentOf(*it) )
+ Project::ref()->slotRemove(*it);
+ }
+ bool ok = KIO::NetAccess::move( srcList, targetURL, window );
+ if (ok) {
+ KURL url;
+ for ( KURL::List::ConstIterator it = srcList.begin(); it != srcList.end(); ++it ) {
+ url = target;
+ url.adjustPath(+1);
+ url.setFileName((*it).fileName());
+ checkProjectInsert(url, window, confirm);
+ Project::ref()->urlMoved(*it, url);
+ }
+ } else {
+ if (confirm)
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
+{
+ if ( !checkProjectDel(url, window, confirm)) {
+ return false;
+ }
+ bool ok = KIO::NetAccess::del( url, window );
+ if (!ok && confirm)
+ {
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions, bool confirm )
+{
+ KURL u = url;
+ u.adjustPath(-1); //some servers refuse to create directories ending with a slash
+ bool ok = KIO::NetAccess::mkdir( u, window, permissions );
+ if (ok) {
+ checkProjectInsert(url, window, confirm);
+ } else {
+ if (confirm)
+ errorMsg(window);
+ }
+ return ok;
+}
+
+
+void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bool confirm)
+{
+ if ( !Project::ref()->hasProject()) return;
+ KURL saveUrl = adjustURL(target);
+ KURL baseURL = Project::ref()->projectBaseURL();
+ if ( baseURL.isParentOf(saveUrl) && !Project::ref()->contains(saveUrl) )
+ {
+ if (confirm)
+ {
+ QString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
+ nice = KStringHandler::lsqueeze(nice, 60);
+ if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("<qt>Do you want to add <br><b>%1</b><br> to the project?</qt>").arg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") )
+ {
+ return;
+ }
+ }
+ KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, saveUrl);
+ if ( fileItem.isDir() )
+ Project::ref()->slotAddDirectory(saveUrl, false);
+ else
+ Project::ref()->slotInsertFile(saveUrl);
+ }
+}
+
+
+bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool confirm, bool remove)
+{
+ if ( !Project::ref()->hasProject() ) return true;
+ KURL url = adjustURL(src);
+ KURL baseURL = Project::ref()->projectBaseURL();
+ if ( baseURL.isParentOf(url) && Project::ref()->contains(url) )
+ {
+ if (confirm)
+ {
+ QString nice = QExtFileInfo::toRelative(url, baseURL).path();
+ nice = KStringHandler::lsqueeze(nice, 60);
+ if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") )
+ {
+ return false;
+ }
+ }
+ if (remove)
+ Project::ref()->slotRemove(url);
+ }
+ return true;
+}
+
+
+bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool confirm)
+{
+ KURL url = adjustURL(src);
+ if ( Project::ref()->hasProject() )
+ {
+ if ( Project::ref()->projectBaseURL().isParentOf(url) && Project::ref()->contains(url) )
+ {
+ if (confirm)
+ {
+ QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ nice = KStringHandler::csqueeze(nice, 60);
+ if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b><br> and remove it from the project?</qt>").arg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") )
+ {
+ return false;
+ }
+ }
+ Project::ref()->slotRemove(url);
+ return true;
+ }
+ }
+ // confirm normal delete if wanted
+ if (confirm) {
+ QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ nice = KStringHandler::csqueeze(nice, 60);
+ return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b>?</qt>").arg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") );
+ }
+ return true;
+}
+
+KURL QuantaNetAccess::adjustURL(const KURL &url)
+{
+ KURL u = url;
+ if ( u.isLocalFile() )
+ {
+ QDir dir(u.path());
+ u.setPath(dir.canonicalPath());
+ }
+ return u;
+}
+
+
+void QuantaNetAccess::errorMsg(QWidget* window)
+{
+ QString msg = KIO::NetAccess::lastErrorString();
+ if ( !msg.isEmpty())
+ KMessageBox::sorry(window, msg);
+}
diff --git a/quanta/utility/quantanetaccess.h b/quanta/utility/quantanetaccess.h
new file mode 100644
index 00000000..abdedc86
--- /dev/null
+++ b/quanta/utility/quantanetaccess.h
@@ -0,0 +1,86 @@
+/***************************************************************************
+ quantanetaccess.h - description
+ -------------------
+ begin : Sat Jul 27 2002
+ copyright : (C) 2004 by Jens Herden <jhe@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; version 2 of the License. *
+ * *
+ ***************************************************************************/
+
+#ifndef QUANTANETACCESS_H
+#define QUANTANETACCESS_H
+
+
+/** @short helperclass to track changes in the project
+
+ This class be used as replacement of KIO::NetAccess (look there for details).
+ Every possible impact on the project will be monitored and signaled to the project.
+
+ If you don't want user interaction use the extra parameter confirm
+
+ If the user don't accept the removal from the project no action happens
+ and the caller gets false as result.
+*/
+
+class QuantaNetAccess
+{
+public:
+
+ static bool upload(const QString& src, const KURL& target, QWidget* window, bool confirm = true);
+
+ static bool copy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ {
+ return file_copy( src, target, -1, false /*not overwrite*/, false, window, confirm );
+ }
+
+ static bool file_copy( const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window, bool confirm = true );
+
+ static bool file_move( const KURL& src, const KURL& target, int permissions,
+ bool overwrite, bool resume, QWidget* window, bool confirm = true );
+
+ static bool dircopy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ {
+ KURL::List srcList;
+ srcList.append( src );
+ return dircopy( srcList, target, window, confirm );
+ };
+
+ static bool dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm = true );
+
+ static bool move( const KURL& src, const KURL& target, QWidget* window, bool confirm = true )
+ {
+ KURL::List srcList;
+ srcList.append( src );
+ return move( srcList, target, window, confirm );
+ }
+
+ static bool move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm = true );
+
+ static bool del( const KURL & url, QWidget* window, bool confirm = true );
+
+ static bool mkdir( const KURL & url, QWidget* window, int permissions, bool confirm = true );
+
+ static void checkProjectInsert(const KURL& target, QWidget* window, bool confirm = true);
+
+ static bool checkProjectRemove(const KURL& target, QWidget* window, bool confirm = true, bool remove = true);
+
+ static bool checkProjectDel(const KURL& target, QWidget* window, bool confirm = true);
+
+ static KURL adjustURL(const KURL &url);
+
+ static void errorMsg(QWidget* window = 0);
+
+private:
+ QuantaNetAccess() {};
+ ~QuantaNetAccess() {};
+
+};
+
+#endif
diff --git a/quanta/utility/resource.h b/quanta/utility/resource.h
new file mode 100644
index 00000000..3f09946e
--- /dev/null
+++ b/quanta/utility/resource.h
@@ -0,0 +1,59 @@
+/***************************************************************************
+ resource.h - description
+ -------------------
+ begin : ÷ÔÒ íÁÊ 9 13:29:57 EEST 2000
+ copyright : (C) 2000 by Dmitry Poplavsky & Alexander Yakovlev & Eric Laffoon <pdima@users.sourceforge.net,yshurik@linuxfan.com,sequitur@easystreet.com>
+ (C) 2001-2003 Andras Mantia <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 RESOURCE_H
+#define RESOURCE_H
+
+
+class KDirWatch;
+class KProgress;
+class QuantaApp;
+class QStringList;
+class KTempFile;
+class KTempDir;
+
+class Node;
+class Parser;
+struct QConfig;
+struct DTDStruct;
+
+
+extern QConfig qConfig;
+extern QString tmpDir;
+
+extern QRegExp scriptBeginRx;
+extern QRegExp scriptEndRx;
+
+extern Node *baseNode;
+extern Parser *parser;
+
+extern KDirWatch *fileWatcher;
+
+extern QString toolbarExtension;
+extern QRegExp newLineRx;
+extern QStringList charList; //hold the list of the &char; chars. See the data/chars file.
+extern QPtrList<KTempFile> tempFileList;
+extern QPtrList<KTempDir> tempDirList;
+
+extern KProgress *progressBar;
+extern QuantaApp *quantaApp;
+extern const QString resourceDir;
+extern bool typingInProgress;
+
+extern int nodeNum;
+
+#endif // RESOURCE_H
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
new file mode 100644
index 00000000..98bcf87c
--- /dev/null
+++ b/quanta/utility/tagaction.cpp
@@ -0,0 +1,1285 @@
+/***************************************************************************
+ tagaction.cpp - description
+ -------------------
+ begin : ?
+ copyright : (C) ? Dmitry Poplavsky
+ (C) 2002-2005 Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+//other includes
+#include <sys/types.h>
+#include <unistd.h>
+
+
+//qt includes
+#include <qdir.h>
+#include <qdom.h>
+#include <qfile.h>
+#include <qtimer.h>
+
+//kde includes
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kprocess.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kshortcut.h>
+#include <kstandarddirs.h>
+#include <ktempfile.h>
+#include <ktexteditor/document.h>
+#include <ktexteditor/viewcursorinterface.h>
+#include <ktexteditor/editinterface.h>
+#include <ktexteditor/selectioninterface.h>
+#include <ktexteditor/selectioninterfaceext.h>
+
+//app includes
+#include "tagaction.h"
+#include "myprocess.h"
+#include "document.h"
+#include "quantaview.h"
+#include "quanta.h"
+// #include "quantadoc.h"
+#include "tagdialog.h"
+#include "messageoutput.h"
+#include "quantacommon.h"
+#include "resource.h"
+#include "qextfileinfo.h"
+#include "undoredo.h"
+#include "kafkacommon.h"
+#include "wkafkapart.h"
+#include "cursors.h"
+#include "tag.h"
+#include "project.h"
+
+#include "viewmanager.h"
+
+MyProcess::MyProcess():KProcess()
+{
+}
+
+int MyProcess::commSetupDoneC()
+{
+ ::setpgid(pid_, 0);
+ return KProcess::commSetupDoneC();
+}
+
+TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool toggle)
+ : KToggleAction(element->attribute("text").isEmpty() ? QString("") : i18n(element->attribute("text").utf8()),
+ KShortcut(element->attribute("shortcut")), 0, 0, parentMainWindow->actionCollection(), element->attribute("name")),
+ //disable toggle now m_toggle(toggle)
+ m_toggle(false)
+{
+ setToolTip(element->attribute("tooltip"));
+ m_parentMainWindow = parentMainWindow;
+ m_modified = false;
+ m_useInputFile = false;
+ m_useOutputFile = false;
+ tag = element->cloneNode().toElement();
+ QString s = tag.attribute("icon");
+ if (!QFileInfo(s).exists())
+ {
+ s = QFileInfo(s).fileName();
+ }
+ setIcon(s);
+ m_file = 0L;
+ loopStarted = false;
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
+ connect(this, SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
+ SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
+#else
+ connect(this, SIGNAL(activated()), SLOT(slotActionActivated()));
+#endif
+ connect(this, SIGNAL(showMessage(const QString&, bool)), m_parentMainWindow, SIGNAL(showMessage(const QString&, bool)));
+ connect(this, SIGNAL(clearMessages()), m_parentMainWindow, SIGNAL(clearMessages()));
+ connect(this, SIGNAL(showMessagesView()), m_parentMainWindow, SLOT(slotShowMessagesView()));
+ connect(this, SIGNAL(createNewFile()), m_parentMainWindow, SLOT(slotFileNew()));
+}
+
+TagAction::~TagAction()
+{
+}
+
+QString TagAction::type()
+{
+ return tag.attribute("type","");
+}
+
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
+bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::ButtonState /*state*/)
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if ( !view || !view->document())
+ return false;
+
+ unsigned int line, col;
+ Document *w = view->document();
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ NodeModifsSet* modifs = new NodeModifsSet();
+
+ QString space;
+ space.fill( ' ', col);
+
+ QString type = tag.attribute("type","");
+
+ if ( type == "tag" && view->hadLastFocus() == QuantaView::VPLFocus && toggable())
+ {
+ KafkaWidget* kafka_widget = KafkaDocument::ref()->getKafkaWidget();
+ QString tag_name = XMLTagName();
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+
+ Node* start_node = 0, *end_node = 0, *current_node = 0;
+ int start_offset = 0, end_offset = 0, current_offset = 0;
+ QString scope;
+ if(kafka_widget->hasSelection())
+ {
+ // get selection
+ start_node = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ end_node = kafkaCommon::getNodeFromLocation(selection.cursorNodeEndSel());
+ current_node = end_node;
+ start_offset = selection.cursorOffset();
+ end_offset = selection.cursorOffsetEndSel();
+ current_offset = end_offset;
+ }
+ else
+ {
+ current_node = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ Q_ASSERT(current_node);
+ if (current_node)
+ {
+ current_offset = selection.cursorOffset();
+
+ start_node = end_node = current_node;
+ start_offset = end_offset = current_offset;
+
+ QTag* tag_description = QuantaCommon::tagFromDTD(KafkaDocument::ref()->getCurrentDoc()->defaultDTD(), XMLTagName());
+ scope = tag_description->scope();
+ // Q_ASSERT(!scope.isNull());
+ if(scope.isNull())
+ scope = "word"; // FIXME temporary
+
+ if(scope.lower() == "word")
+ {
+ // Apply/deapply the tag in the word
+ if(kafkaCommon::isBetweenWords(current_node, current_offset))
+ {
+ kafkaCommon::getStartOfWord(start_node, start_offset);
+ kafkaCommon::getEndOfWord(end_node, end_offset);
+ }
+ }
+ else if(scope.lower() == "paragraph")
+ {
+ kafkaCommon::getStartOfParagraph(start_node, start_offset);
+ kafkaCommon::getEndOfParagraph(end_node, end_offset);
+ }
+ else if(reason != KAction::EmulatedActivation) // is between words: save the state and return
+ {
+ if(!toggled())
+ quantaApp->insertTagActionPoolItem(name());
+ else
+ quantaApp->removeTagActionPoolItem(name());
+
+ return true;
+ }
+ }
+ }
+ Q_ASSERT(start_node && end_node);
+
+/* kdDebug(23100) << "start node string: " << start_node->tag->tagStr() << endl;
+ kdDebug(23100) << "start node offset: " << start_offset << endl;
+ kdDebug(23100) << "start node string length: " << start_node->tag->tagStr().length() << endl; */
+ if (!start_node || !end_node)
+ return true; //FIXME: AndraS: don't crash
+ if(scope != "paragraph") {
+ start_node = kafkaCommon::getCorrectStartNode(start_node, start_offset);
+ end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
+ if (!start_node || !end_node)
+ return true; //FIXME: AndraS: don't crash
+ }
+ NodeSelection cursor_holder;
+ cursor_holder.setCursorNode(current_node);
+ cursor_holder.setCursorOffset(current_offset);
+
+ int inside_tag = kafkaCommon::isInsideTag(start_node, end_node, tag_name);
+ if(inside_tag == -1)
+ {
+ applyTagInSelection(start_node, start_offset, end_node, end_offset, cursor_holder, modifs);
+ }
+ else if(inside_tag == 1)
+ {
+ QString attribute_name(tag.attribute("attribute_name", QString()));
+ QString attribute_value(tag.attribute("attribute_value", QString()));
+
+ // special case
+ if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
+ {
+ Node* tag_parent = kafkaCommon::hasParent(start_node, end_node, tag_name);
+
+ Node* aux1 = start_node->previousSibling();
+ while(aux1->tag->type == Tag::Empty)
+ aux1 = aux1->previousSibling();
+ Node* aux2 = end_node->nextSibling();
+ while(aux2->tag->type == Tag::Empty)
+ aux2 = aux2->nextSibling();
+
+ if(aux1 == tag_parent && aux2 == tag_parent->getClosingNode())
+ {
+ if(tag_parent->tag->attributeValue(attribute_name, true) == attribute_value)
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ else
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, attribute_value, modifs);
+ }
+ else
+ applyTagInSelection(start_node, start_offset, end_node, end_offset, cursor_holder, modifs);
+ }
+ else
+ deapplyTagInSelection(start_node, start_offset, end_node, end_offset, cursor_holder, modifs);
+ }
+ else
+ {
+ applyTagInMixedSelection(start_node, start_offset, end_node, end_offset, cursor_holder, modifs);
+ }
+ w->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, &cursor_holder);
+ KafkaDocument::ref()->getKafkaWidget()->setCurrentNode(cursor_holder.cursorNode(), cursor_holder.cursorOffset());
+ return true;
+ }
+
+ if ( type == "tag" ) {
+ QDomElement otag = (tag.namedItem("tag")).toElement();
+ QDomElement xtag = (tag.namedItem("xtag")).toElement();
+
+ QString attr = otag.text();
+ if ( attr[0] == '<' )
+ attr.remove(0,1);
+ if ( attr.right(1) == ">" )
+ attr.remove( attr.length()-1, 1 );
+ attr = attr.stripWhiteSpace();
+ int i = 0;
+ while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
+ QString name = attr.left(i);
+ attr = attr.remove(0,i).stripWhiteSpace();
+
+ if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
+ {
+ view->insertNewTag(name, attr, xtag.attribute("inLine","true") == "true");
+ }
+ else
+ {
+ QString s1 = QuantaCommon::tagCase(name);
+ if (otag.text().left(1) == "<") s1 = "<"+s1;
+ if (!attr.isEmpty())
+ s1 += " "+QuantaCommon::attrCase(attr);
+ if (otag.text().right(1) == ">")
+ {
+ QTag *dtdTag = QuantaCommon::tagFromDTD(w->defaultDTD(), name);
+ if ( w->defaultDTD()->singleTagStyle == "xml" && dtdTag &&
+ (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional()))
+ )
+ {
+ s1.append(" /");
+ }
+
+ s1.append(">");
+ }
+
+ QString s2;
+ if ( xtag.attribute("use","false") == "true" )
+ {
+ if (qConfig.closeTags)
+ s2 = QuantaCommon::tagCase(xtag.text());
+ if ( xtag.attribute("inLine","true") == "true" )
+ {
+ /** FIXME this is quick and temporary */
+ view->insertOutputInTheNodeTree(s1, s2);
+ }
+ else
+ {
+ view->insertOutputInTheNodeTree(s1, s2);
+ }
+ }
+ else
+ view->insertOutputInTheNodeTree(s1, s2);
+ }
+ }
+
+ if (view->hadLastFocus() != QuantaView::VPLFocus)
+ {
+
+
+ if ( type == "text" )
+ w->insertTag( tag.namedItem("text").toElement().text() );
+
+ if ( type == "script" )
+ {
+ proc = new MyProcess();
+ proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
+
+ QDomElement script = tag.namedItem("script").toElement();
+ QString command = script.text();
+
+
+ if ( !w->isUntitled() ) {
+ QString fname = w->url().url();
+ if ( w->url().protocol() == "file")
+ fname = w->url().path();
+ command.replace("%f", fname );
+ }
+
+ pid_t pid = ::getpid();
+ if (kapp->inherits("KUniqueApplication"))
+ {
+ command.replace("%pid", QString("unique %1").arg(pid));
+ } else
+ {
+ command.replace("%pid", QString("%1").arg(pid));
+ }
+ QString buffer;
+ QString inputType = script.attribute("input","none");
+
+ if ( inputType == "current" ) {
+ buffer = w->editIf->text();
+ } else
+ if ( inputType == "selected" && w->selectionIf) {
+ buffer = w->selectionIf->selection();
+ }
+ command.replace("%input", buffer);
+ command = command.stripWhiteSpace();
+ int pos = command.find(' ');
+ QString args;
+ if (pos != -1)
+ {
+ args = command.mid(pos+1);
+ command = command.left(pos);
+ }
+ if (command.startsWith("~"))
+ {
+ command = command.mid(1);
+ command.prepend(QDir::homeDirPath());
+ }
+
+ *proc << command.stripWhiteSpace();
+ args = args.stripWhiteSpace();
+ if (!args.isEmpty())
+ {
+ pos = 0;
+ while (pos != -1 )
+ {
+ pos = args.find("%scriptdir");
+ QString scriptname;
+ if (pos != -1)
+ {
+ int begin = args.findRev('"', pos);
+ int end = -1;
+ if (begin == -1)
+ {
+ begin = args.findRev('\'', pos);
+ if (begin != -1)
+ end = args.find('\'', pos);
+ } else
+ {
+ end = args.find('"', pos);
+ }
+ if (begin == -1 || end != -1)
+ {
+ begin = args.findRev(' ', pos);
+ if (begin == -1)
+ begin = 0;
+ end = args.find(' ', pos);
+ if (end == -1)
+ end = args.length();
+ }
+ scriptname = args.mid(begin, end - begin).stripWhiteSpace();
+ scriptname.replace("%scriptdir","scripts");
+ // kdDebug(24000) << "Script name is: |" << scriptname << "|" << endl;
+ scriptname = " " + locate("appdata", scriptname);
+ // kdDebug(24000) << "Script found at: " << scriptname << endl;
+ args.replace(begin, end - begin, scriptname);
+ // kdDebug(24000) << "Modified argument list: " << args << endl;
+ }
+ }
+ int pos = args.find("%projectbase");
+ if (pos != -1)
+ {
+ QString s;
+ if (Project::ref()->hasProject())
+ s = Project::ref()->projectBaseURL().url();
+ args.replace("%projectbase", s);
+ }
+ QStringList argsList1 = QStringList::split(' ', args);
+ QStringList argsList;
+ for (uint i = 0; i < argsList1.count(); i++)
+ {
+ if (argsList1[i] == "%userarguments")
+ {
+ for (uint j = 0; j < m_argsList.count(); j++)
+ {
+ argsList.append(m_argsList[j]);
+ }
+ } else
+ argsList.append(argsList1[i]);
+ }
+ m_argsList.clear();
+ *proc << argsList;
+ }
+ firstOutput = true;
+ firstError = true;
+
+ connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ SLOT( slotGetScriptOutput(KProcess*,char*,int)));
+ connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ SLOT( slotGetScriptError(KProcess*,char*,int)));
+ connect( proc, SIGNAL(processExited( KProcess*)), this,
+ SLOT( slotProcessExited(KProcess*)));
+
+
+
+ if (!m_useOutputFile)
+ scriptOutputDest = script.attribute("output","none");
+ else
+ scriptOutputDest = "file";
+ scriptErrorDest = script.attribute("error","none");
+ if (scriptOutputDest == "message")
+ {
+ emit showMessagesView();
+ }
+
+ if (m_useInputFile)
+ {
+ *proc << m_inputFileName;
+ }
+
+ if (proc->start(KProcess::NotifyOnExit, KProcess::All))
+ {
+ emit clearMessages();
+ emit showMessage(i18n("The \"%1\" script started.\n").arg(actionText()), false);
+ if (!m_useInputFile)
+ {
+ if ( inputType == "current" || inputType == "selected" )
+ {
+ proc->writeStdin( buffer.local8Bit(), buffer.length() );
+ }
+ }
+ proc->closeStdin();
+ } else
+ {
+ KMessageBox::error(m_parentMainWindow, i18n("<qt>There was an error running <b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is accessible.</qt>").arg(command + " " + args).arg(command), i18n("Script Not Found"));
+ ViewManager::ref()->activeView()->setFocus();
+ if (loopStarted)
+ {
+ qApp->exit_loop();
+ loopStarted = false;
+ }
+ return false;
+ }
+ }
+ }
+ return true;
+}
+#else
+ // hack to compile. moc doesn't check the "#ifdef" at the declaration and the compiler complains
+ // of no matching function.
+bool TagAction::slotActionActivated(KAction::ActivationReason /*reason*/, Qt::ButtonState /*state*/)
+{return true;}
+#endif
+
+bool TagAction::slotActionActivated()
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ if ( !view || !view->document())
+ return false;
+
+ QString space="";
+ QString output;
+ unsigned int line, col;
+
+ Document *w = view->document();
+ w->viewCursorIf->cursorPositionReal(&line, &col);
+ space.fill( ' ', col);
+
+ QString type = tag.attribute("type","");
+
+ if ( type == "tag" ) {
+ QDomElement otag = (tag.namedItem("tag")).toElement();
+ QDomElement xtag = (tag.namedItem("xtag")).toElement();
+
+ QString attr = otag.text();
+ if ( attr[0] == '<' )
+ attr.remove(0,1);
+ if ( attr.right(1) == ">" )
+ attr.remove( attr.length()-1, 1 );
+ attr = attr.stripWhiteSpace();
+ int i = 0;
+ while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
+ QString name = attr.left(i);
+ attr = attr.remove(0,i).stripWhiteSpace();
+
+ if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
+ {
+ view->insertNewTag(name, attr, xtag.attribute("inLine","true") == "true");
+ }
+ else
+ {
+ QString s1 = QuantaCommon::tagCase(name);
+ if (otag.text().left(1) == "<") s1 = "<"+s1;
+ if (!attr.isEmpty())
+ s1 += " "+QuantaCommon::attrCase(attr);
+ if (otag.text().right(1) == ">")
+ {
+ QTag *dtdTag = QuantaCommon::tagFromDTD(w->defaultDTD(), name);
+ if ( w->defaultDTD()->singleTagStyle == "xml" && dtdTag &&
+ (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional()))
+ )
+ {
+ s1.append(" /");
+ }
+
+ s1.append(">");
+ }
+
+ QString s2;
+ if ( xtag.attribute("use","false") == "true" )
+ {
+ if (qConfig.closeTags)
+ s2 = QuantaCommon::tagCase(xtag.text());
+ if ( xtag.attribute("inLine","true") == "true" )
+ {
+ /** FIXME this is quick and temporary */
+ view->insertOutputInTheNodeTree(s1, s2);
+ }
+ else
+ {
+ view->insertOutputInTheNodeTree(s1, s2);
+ }
+ }
+ else
+ view->insertOutputInTheNodeTree(s1, s2);
+ }
+ }
+
+ if (view->hadLastFocus() != QuantaView::VPLFocus)
+ {
+
+
+ if ( type == "text" )
+ w->insertTag( tag.namedItem("text").toElement().text() );
+
+ if ( type == "script" )
+ {
+ proc = new MyProcess();
+ proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
+
+ QDomElement script = tag.namedItem("script").toElement();
+ QString command = script.text();
+
+
+ if ( !w->isUntitled() ) {
+ QString fname = w->url().url();
+ if ( w->url().protocol() == "file")
+ fname = w->url().path();
+ command.replace("%f", fname );
+ }
+
+ pid_t pid = ::getpid();
+ if (kapp->inherits("KUniqueApplication"))
+ {
+ command.replace("%pid", QString("unique %1").arg(pid));
+ } else
+ {
+ command.replace("%pid", QString("%1").arg(pid));
+ }
+ QString buffer;
+ QString inputType = script.attribute("input","none");
+
+ if ( inputType == "current" ) {
+ buffer = w->editIf->text();
+ } else
+ if ( inputType == "selected" && w->selectionIf) {
+ buffer = w->selectionIf->selection();
+ }
+ command.replace("%input", buffer);
+ command = command.stripWhiteSpace();
+ int pos = command.find(' ');
+ QString args;
+ if (pos != -1)
+ {
+ args = command.mid(pos+1);
+ command = command.left(pos);
+ }
+ if (command.startsWith("~"))
+ {
+ command = command.mid(1);
+ command.prepend(QDir::homeDirPath());
+ }
+
+ *proc << command.stripWhiteSpace();
+ args = args.stripWhiteSpace();
+ if (!args.isEmpty())
+ {
+ pos = 0;
+ while (pos != -1 )
+ {
+ pos = args.find("%scriptdir");
+ QString scriptname;
+ if (pos != -1)
+ {
+ int begin = args.findRev('"', pos);
+ int end = -1;
+ if (begin == -1)
+ {
+ begin = args.findRev('\'', pos);
+ if (begin != -1)
+ end = args.find('\'', pos);
+ } else
+ {
+ end = args.find('"', pos);
+ }
+ if (begin == -1 || end != -1)
+ {
+ begin = args.findRev(' ', pos);
+ if (begin == -1)
+ begin = 0;
+ end = args.find(' ', pos);
+ if (end == -1)
+ end = args.length();
+ }
+ scriptname = args.mid(begin, end - begin).stripWhiteSpace();
+ scriptname.replace("%scriptdir","scripts");
+ // kdDebug(24000) << "Script name is: |" << scriptname << "|" << endl;
+ scriptname = " " + locate("appdata", scriptname);
+ // kdDebug(24000) << "Script found at: " << scriptname << endl;
+ args.replace(begin, end - begin, scriptname);
+ // kdDebug(24000) << "Modified argument list: " << args << endl;
+ }
+ }
+ int pos = args.find("%projectbase");
+ if (pos != -1)
+ {
+ QString s;
+ if (Project::ref()->hasProject())
+ s = Project::ref()->projectBaseURL().url();
+ args.replace("%projectbase", s);
+ }
+ QStringList argsList1 = QStringList::split(' ', args);
+ QStringList argsList;
+ for (uint i = 0; i < argsList1.count(); i++)
+ {
+ if (argsList1[i] == "%userarguments")
+ {
+ for (uint j = 0; j < m_argsList.count(); j++)
+ {
+ argsList.append(m_argsList[j]);
+ }
+ } else
+ argsList.append(argsList1[i]);
+ }
+ m_argsList.clear();
+ *proc << argsList;
+ }
+ firstOutput = true;
+ firstError = true;
+
+ connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ SLOT( slotGetScriptOutput(KProcess*,char*,int)));
+ connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ SLOT( slotGetScriptError(KProcess*,char*,int)));
+ connect( proc, SIGNAL(processExited( KProcess*)), this,
+ SLOT( slotProcessExited(KProcess*)));
+
+
+
+ if (!m_useOutputFile)
+ scriptOutputDest = script.attribute("output","none");
+ else
+ scriptOutputDest = "file";
+ scriptErrorDest = script.attribute("error","none");
+ if (scriptOutputDest == "message")
+ {
+ emit showMessagesView();
+ }
+
+ if (m_useInputFile)
+ {
+ *proc << m_inputFileName;
+ }
+
+ if (proc->start(KProcess::NotifyOnExit, KProcess::All))
+ {
+ emit clearMessages();
+ emit showMessage(i18n("The \"%1\" script started.\n").arg(actionText()), false);
+ if (!m_useInputFile)
+ {
+ if ( inputType == "current" || inputType == "selected" )
+ {
+ proc->writeStdin( buffer.local8Bit(), buffer.length() );
+ }
+ }
+ proc->closeStdin();
+ } else
+ {
+ KMessageBox::error(m_parentMainWindow, i18n("<qt>There was an error running <b>%1</b>.<br>Check that you have the <i>%2</i> executable installed and it is accessible.</qt>").arg(command + " " + args).arg(command), i18n("Script Not Found"));
+ ViewManager::ref()->activeView()->setFocus();
+ if (loopStarted)
+ {
+ qApp->exit_loop();
+ loopStarted = false;
+ }
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
+{
+ QCString tmp( buffer, buflen + 1 );
+ QString text( QString::fromLocal8Bit(tmp) );
+// kdDebug(24000) << "Script output received: |" << text << "|" << endl;
+ Document *w = ViewManager::ref()->activeDocument();
+ if (!w)
+ {
+ kdDebug(24000) << "Document not found." << endl;
+ return;
+ }
+ if ( scriptOutputDest == "cursor" )
+ {
+ w->insertTag( text );
+ } else
+ if ( scriptOutputDest == "selection" )
+ {
+ if ( firstOutput )
+ {
+ int line = dynamic_cast<KTextEditor::SelectionInterfaceExt*>(w->doc())->selEndLine();
+ int col = dynamic_cast<KTextEditor::SelectionInterfaceExt*>(w->doc())->selEndCol();
+ w->viewCursorIf->setCursorPositionReal(line, col);
+ if (w->selectionIf)
+ w->selectionIf->removeSelectedText();
+ }
+ w->insertTag( text );
+ } else
+ if ( scriptOutputDest == "replace" )
+ {
+ if ( firstOutput )
+ w->editIf->clear();
+ w->insertTag( text );
+ } else
+ if ( scriptOutputDest == "new" )
+ {
+ if (firstOutput)
+ {
+ emit createNewFile();
+ w = ViewManager::ref()->activeDocument();
+ }
+ w->insertTag( text );
+ } else
+ if ( scriptOutputDest == "message" )
+ {
+ if ( firstOutput )
+ {
+ emit showMessagesView();
+ emit showMessage(i18n("The \"%1\" script output:\n").arg(actionText()), false);
+ }
+ emit showMessage(text, true);
+ } else
+ if ( scriptOutputDest == "file" && m_file)
+ {
+ if (!m_file->isOpen())
+ m_file->open(IO_ReadWrite);
+ m_file->writeBlock(buffer, buflen);
+ }
+
+ firstOutput = false;
+}
+
+void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen )
+{
+ Document *w = ViewManager::ref()->activeDocument();
+ QCString tmp( buffer, buflen + 1 );
+ QString text( QString::fromLocal8Bit(tmp) );
+
+ if ( scriptErrorDest == "merge" )
+ {
+ scriptErrorDest = scriptOutputDest;
+ firstError = firstOutput;
+ }
+ if ( scriptErrorDest == "cursor" )
+ w->insertTag( text );
+ else
+ if ( scriptErrorDest == "selection" )
+ {
+ if ( firstError )
+ {
+ int line = dynamic_cast<KTextEditor::SelectionInterfaceExt*>(w->doc())->selEndLine();
+ int col = dynamic_cast<KTextEditor::SelectionInterfaceExt*>(w->doc())->selEndCol();
+ w->viewCursorIf->setCursorPositionReal(line, col);
+ if (w->selectionIf)
+ w->selectionIf->removeSelectedText();
+ }
+ w->insertTag( text );
+ } else
+ if ( scriptErrorDest == "replace" )
+ {
+ if ( firstError )
+ w->editIf->clear();
+ w->insertTag( text );
+ } else
+ if ( scriptErrorDest == "new" )
+ {
+ if (firstError)
+ {
+ emit createNewFile();
+ w = ViewManager::ref()->activeDocument();
+ }
+ w->insertTag( text );
+ } else
+ if ( scriptErrorDest == "message" )
+ {
+ if ( firstError )
+ {
+ emit showMessagesView();
+ emit showMessage(i18n("The \"%1\" script output:\n").arg(actionText()), false);
+ }
+ emit showMessage(text, true);
+ }
+
+ firstError = false;
+}
+
+void TagAction::scriptDone()
+{
+ delete proc;
+ proc = 0;
+}
+
+void TagAction::setOutputFile(QFile* file)
+{
+ m_file = file;
+}
+
+void TagAction::setInputFileName(const QString& fileName)
+{
+ m_inputFileName = fileName;
+}
+
+QString TagAction::actionText()
+{
+ QString t = tag.attribute("text");
+ int pos = t.find('&');
+ if (pos < (int)t.length()-1 && t[pos+1] != '&')
+ return t.remove(pos, 1);
+ else
+ return t;
+}
+
+QString TagAction::XMLTagName() const
+{
+ if(tag.attribute("type","").lower() != "tag")
+ return QString();
+
+ QDomElement otag = (tag.namedItem("tag")).toElement();
+ QDomElement xtag = (tag.namedItem("xtag")).toElement();
+
+ QString attr = otag.text();
+ if ( attr[0] == '<' )
+ attr.remove(0,1);
+ if ( attr.right(1) == ">" )
+ attr.remove( attr.length()-1, 1 );
+ attr = attr.stripWhiteSpace();
+ int i = 0;
+ while ( !attr[i].isSpace() && !attr[i].isNull() )
+ ++i;
+ QString name = attr.left(i);
+
+ return name;
+}
+
+QString TagAction::openXMLTagString() const
+{
+ QString name = XMLTagName();
+
+ QDomElement otag = (tag.namedItem("tag")).toElement();
+ QDomElement xtag = (tag.namedItem("xtag")).toElement();
+
+ QString attr = otag.text();
+ if ( attr[0] == '<' )
+ attr.remove(0,1);
+ if ( attr.right(1) == ">" )
+ attr.remove( attr.length()-1, 1 );
+ attr = attr.stripWhiteSpace();
+ attr.remove(0, name.length());
+
+ QString s1 = QuantaCommon::tagCase(name);
+ if (otag.text().left(1) == "<") s1 = "<"+s1;
+ if (!attr.isEmpty())
+ s1 += " "+QuantaCommon::attrCase(attr);
+ if (otag.text().right(1) == ">")
+ {
+ Document* w = ViewManager::ref()->activeView()->document();
+ QTag *dtdTag = QuantaCommon::tagFromDTD(w->defaultDTD(), name);
+ if ( w->defaultDTD()->singleTagStyle == "xml" && dtdTag &&
+ (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional()))
+ )
+ {
+ s1.append(" /");
+ }
+
+ s1.append(">");
+ }
+
+ return s1;
+}
+
+QString TagAction::closeXMLTagString() const
+{
+ QString s2;
+ QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ if ( xtag.attribute("use","false") == "true" )
+ {
+ if (qConfig.closeTags)
+ s2 = QuantaCommon::tagCase(xtag.text());
+ }
+ return s2;
+}
+
+void TagAction::slotActivated()
+{
+// if(m_toggle)
+ KToggleAction::slotActivated();
+//Andras: Disable toggle behavior. It is just too broken.
+ setChecked(false);
+/*
+ if(!m_toggle)
+ setChecked(!isChecked());
+*/
+}
+
+void TagAction::slotProcessExited(KProcess *process)
+{
+ if (loopStarted)
+ {
+ qApp->exit_loop();
+ loopStarted = false;
+ }
+ emit showMessage(i18n("The \"%1\" script has exited.").arg(actionText()), false);
+ delete process;
+}
+
+void TagAction::addArguments(const QStringList &arguments)
+{
+ m_argsList = arguments;
+}
+
+void TagAction::execute(bool blocking)
+{
+ m_useInputFile = false;
+ m_useOutputFile = false;
+ if (blocking)
+ {
+ m_useInputFile = !m_inputFileName.isEmpty();
+ m_useOutputFile = (m_file);
+ if (slotActionActivated())
+ {
+ //To avoid lock-ups, start a timer.
+ timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ timer->start(180*1000, true);
+ QExtFileInfo internalFileInfo;
+ loopStarted = true;
+ m_killCount = 0;
+ internalFileInfo.enter_loop();
+ delete timer;
+ m_useInputFile = false;
+ m_useOutputFile = false;
+ }
+ } else
+ slotActionActivated();
+}
+
+/** Timeout occurred while waiting for some network function to return. */
+void TagAction::slotTimeout()
+{
+ if ((m_killCount == 0) && (KMessageBox::questionYesNo(m_parentMainWindow, i18n("<qt>The filtering action <b>%1</b> seems to be locked.<br>Do you want to terminate it?</qt>").arg(actionText()), i18n("Action Not Responding"), i18n("Terminate"), i18n("Keep Running")) == KMessageBox::Yes))
+ {
+ if (::kill(-proc->pid(), SIGTERM))
+ {
+ m_killCount++;
+ return;
+ }
+ }
+ if (m_killCount > 0)
+ {
+ ::kill(-proc->pid(), SIGKILL);
+ if (loopStarted)
+ {
+ qApp->exit_loop();
+ loopStarted = false;
+ }
+ return;
+ }
+ timer->start(180*1000, true);
+}
+
+void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const
+{
+ QuantaView *view = ViewManager::ref()->activeView();
+ Document* w = view->document();
+
+ Q_ASSERT(view->hadLastFocus() == QuantaView::VPLFocus);
+ Q_ASSERT(toggable());
+
+ QString tag_name = XMLTagName();
+ Q_ASSERT(kafkaCommon::isInsideTag(start_node, end_node, tag_name) == -1);
+
+ QString open_tag = openXMLTagString();
+
+ //We build the node from the tag name
+ Node* node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
+ node->tag->parse(open_tag, w);
+ node->tag->name = QuantaCommon::tagCase(node->tag->name);
+ node->tag->single = QuantaCommon::isSingleTag(w->defaultDTD()->name,
+ node->tag->name);
+
+ long cursor_offset = selection.cursorOffset();
+
+ Node* nodeCursor = start_node;
+ Node* nodeParent = start_node;
+ if (nodeParent->tag->type == Tag::Text)
+ nodeParent = nodeParent->parent;
+
+ //Checking if at least one parent of node can have a Text Node as child, otherwise
+ //it is impossible for the
+ //user to add this node. In that case, try to insert the Node in the closest parent accepting it.
+ //e.g. TR : a normal insertion would require to have the caret in the TABLE Node, but it is
+ //impossible
+ QTag* nodeQTag = QuantaCommon::tagFromDTD(w->defaultDTD(), node->tag->name);
+ if (!nodeQTag) return;
+
+ bool specialTagInsertion = false;
+ QPtrList<QTag> qTagList = nodeQTag->parents();
+ QTag* qTag = 0;
+ for (qTag = qTagList.first(); qTag; qTag = qTagList.next())
+ {
+ if (qTag->isChild("#text", false))
+ break;
+ if (qTag == qTagList.getLast())
+ specialTagInsertion = true;
+ }
+
+ bool nodeTreeModified = false;
+
+ if (specialTagInsertion) // Attention: not smartTagInsertion
+ {
+ //let's try to insert this node in the closest parent accepting it.
+ while (nodeParent)
+ {
+ QTag* nodeParentQTag = QuantaCommon::tagFromDTD(w->defaultDTD(), nodeParent->tag->name);
+ if (nodeParentQTag && nodeParentQTag->isChild(node))
+ {
+ nodeCursor = kafkaCommon::createMandatoryNodeSubtree(node, w);
+ start_offset = 0;
+ kafkaCommon::insertNodeSubtree(node, nodeParent, 0L, 0L, modifs);
+ nodeTreeModified = true;
+ break;
+ }
+ nodeParent = nodeParent->parent;
+ }
+ }
+ else if(!nodeQTag->isSingle())
+ {
+ //If some text is selected in kafka, surround the selection with the new Node.
+ if(!start_node|| !end_node)
+ return;
+ nodeTreeModified = kafkaCommon::DTDinsertRemoveNode(node, start_node, start_offset,
+ end_node, end_offset, w, &nodeCursor, cursor_offset, modifs);
+ }
+
+// w->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+ // FIXME Set the cursor right: the selection can be inverted
+ if(KafkaDocument::ref()->getKafkaWidget()->hasSelection())
+ {
+ nodeCursor = end_node;
+ cursor_offset = end_node->tag->tagStr().length();
+ }
+
+ selection.setCursorNode(nodeCursor);
+ selection.setCursorOffset(cursor_offset);
+
+ //Now update the VPL cursor position
+// KafkaDocument::ref()->getKafkaWidget()->setCurrentNode(nodeCursor, cursor_offset);
+
+ if (!nodeTreeModified)
+ quantaApp->slotStatusMsg(i18n("Cannot insert the tag: invalid location."));
+}
+
+void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const
+{
+ Q_ASSERT(start_node != end_node);
+
+ QString const tag_name = XMLTagName();
+
+ // FIXME o pai pode ser do endNode. nao sei se esta merda eh precisa
+/* Node* tag_parent = kafkaCommon::hasParent(start_node, tag_name);
+ Q_ASSERT(tag_parent);*/
+
+ QuantaView *view = ViewManager::ref()->activeView();
+ Document* w = view->document();
+
+ // Set start and end nodes to the correct node
+ start_node = kafkaCommon::getCorrectStartNode(start_node, start_offset);
+ end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
+
+ // look for commonParent
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
+ if(!commonParent) return;
+
+ Node* cursor_node = selection.cursorNode();
+ long cursor_offset = selection.cursorOffset();
+ kafkaCommon::splitStartAndEndNodeSubtree(start_node, start_offset, end_node, end_offset, commonParent,
+ commonParentStartChildLocation, commonParentEndChildLocation,
+ selection, 0, modifs);
+
+ Q_ASSERT(start_node != end_node);
+
+// kafkaCommon::coutTree(baseNode, 3);
+
+ //We build the node from the tag name
+ QString const open_tag_string = openXMLTagString();
+ Node* new_node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
+ new_node->tag->parse(open_tag_string, w);
+ new_node->tag->name = QuantaCommon::tagCase(new_node->tag->name);
+ new_node->tag->single = QuantaCommon::isSingleTag(w->defaultDTD()->name,
+ new_node->tag->name);
+
+ Q_ASSERT(new_node->tag->type == Tag::XmlTag);
+
+ Node* commonParentStartChild = kafkaCommon::getNodeFromLocation(commonParentStartChildLocation, commonParent);
+ Node* commonParentEndChild = kafkaCommon::getNodeFromLocation(commonParentEndChildLocation, commonParent);
+// if(!commonParentStartChild)
+ commonParentStartChild = kafkaCommon::getCommonParentChild(start_node, commonParent);
+/* if(!commonParentEndChild)
+ commonParentEndChild = kafkaCommon::getCommonParentChild(end_node, commonParent);*/
+
+ // insert the node, child of commonParent and commonParentStartChild as nextSibling
+ kafkaCommon::insertNode(new_node, commonParent, commonParentStartChild, commonParentStartChild, modifs);
+
+ // move commonParentStartChild and commonParentEndChild inside new_node
+ kafkaCommon::moveNode(commonParentStartChild, new_node, 0, selection, modifs, true, true);
+ if(commonParentEndChild)
+ kafkaCommon::moveNode(commonParentEndChild, new_node, 0, selection, modifs, true, true);
+
+ // FIXME Set the cursor right: the selection can be inverted
+ if(KafkaDocument::ref()->getKafkaWidget()->hasSelection())
+ {
+ /*Node* */cursor_node = end_node;
+ /*int */cursor_offset = end_node->tag->tagStr().length();
+ selection.setCursorNode(cursor_node);
+ selection.setCursorOffset(cursor_offset);
+ }
+ cursor_node = selection.cursorNode();
+ cursor_offset = selection.cursorOffset();
+
+ Q_ASSERT(new_node->getClosingNode());
+
+ // FIXME remove possible equal tags inside the main surrounding tag
+ kafkaCommon::mergeInlineNode(new_node, new_node->getClosingNode(), &cursor_node, cursor_offset, modifs);
+ selection.setCursorNode(cursor_node);
+ selection.setCursorOffset(cursor_offset);
+
+ //Now update the VPL cursor position
+// KafkaDocument::ref()->getKafkaWidget()->setCurrentNode(cursor_node, cursor_offset);
+}
+
+void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const
+{
+// QuantaView *view = ViewManager::ref()->activeView();
+// Document* w = view->document();
+
+ QString const tag_name = XMLTagName();
+
+ // Set start and end nodes to the correct node
+ start_node = kafkaCommon::getCorrectStartNode(start_node, start_offset);
+ end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
+
+ // look for commonParent
+ QValueList<int> commonParentStartChildLocation;
+ QValueList<int> commonParentEndChildLocation;
+
+ Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
+ if(!commonParent) return;
+
+/* Node* cursor_node = selection.cursorNode();
+ int cursor_offset = selection.cursorOffset();*/
+ kafkaCommon::splitStartAndEndNodeSubtree(start_node, start_offset, end_node, end_offset, commonParent,
+ commonParentStartChildLocation, commonParentEndChildLocation,
+ selection, /*cursor_node, cursor_offset, */0, modifs);
+
+// kafkaCommon::coutTree(baseNode, 3);
+
+ Node* tag_parent = kafkaCommon::hasParent(start_node, end_node, tag_name);
+ Q_ASSERT(tag_parent);
+
+ QString attribute_name(tag.attribute("attribute_name", QString()));
+ QString attribute_value(tag.attribute("attribute_value", QString()));
+
+ if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
+ {
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ }
+
+ else
+ {
+ Node* common_parent_start_child = kafkaCommon::getCommonParentChild(start_node, tag_parent);
+ Node* common_parent_end_child = kafkaCommon::getCommonParentChild(end_node, tag_parent);
+
+ Node* parent_of_tag_parent = tag_parent->parent;
+ if(common_parent_end_child == common_parent_start_child)
+ common_parent_end_child = 0;
+ if(!common_parent_start_child)
+ common_parent_start_child = kafkaCommon::getCommonParentChild(start_node, commonParent);
+ kafkaCommon::moveNode(common_parent_start_child, parent_of_tag_parent, tag_parent, selection, modifs, true, true);
+
+ if(common_parent_end_child)
+ kafkaCommon::moveNode(common_parent_end_child, parent_of_tag_parent, tag_parent, selection, modifs, true, true);
+
+ // Remove tag_parent node subtree if empty
+ if(!tag_parent->hasChildNodes())
+ kafkaCommon::extractAndDeleteNode(tag_parent, modifs);
+
+ // FIXME Set the cursor right: the selection can be inverted
+ if(KafkaDocument::ref()->getKafkaWidget()->hasSelection())
+ {
+ Node* cursor_node = end_node;
+ int cursor_offset = end_node->tag->tagStr().length();
+ selection.setCursorNode(cursor_node);
+ selection.setCursorOffset(cursor_offset);
+ }
+ //Now update the VPL cursor position
+// KafkaDocument::ref()->getKafkaWidget()->setCurrentNode(cursor_node, cursor_offset);
+ }
+}
+
+// void TagAction::deapplyTagInMixedSelection(Node* start_node, int start_offset, Node* end_node, int end_offset, NodeModifsSet* modifs) const
+// {
+//
+// }
+
+
+#include "tagaction.moc"
+#include "myprocess.moc"
diff --git a/quanta/utility/tagaction.h b/quanta/utility/tagaction.h
new file mode 100644
index 00000000..addb35cf
--- /dev/null
+++ b/quanta/utility/tagaction.h
@@ -0,0 +1,137 @@
+/***************************************************************************
+ tagaction.h - description
+ -------------------
+ begin : ?
+ copyright : (C) ? Dmitry Poplavsky
+ (C) 2002-2005 Andras Mantia <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 TAGACTION_H
+#define TAGACTION_H
+
+#include <kdeversion.h>
+#include <kaction.h>
+#include <kactioncollection.h>
+
+#include <qstring.h>
+#include <qdom.h>
+
+class KMainWindow;
+class QuantaView;
+class KProcess;
+class QDomElement;
+class QFile;
+class QTimer;
+class MessageOutput;
+class Node;
+class NodeModifsSet;
+class NodeSelection;
+
+/**
+ * An action for inserting an XML tag.
+ *
+ * @author Dmitry Poplavsky, dima@kde.org
+ * Andras Mantia, amantia@kde.org
+ * Paulo Moura Guedes, moura@kdewebdev.org
+ */
+
+class TagAction : public KToggleAction
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Create an insert from dom element.
+ * @param toggle If set to true, the class behaves like a KToggleAction;
+ * Else it behaves like a KAction. This avoids the multi-inheritance problem.
+ */
+ TagAction(QDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
+ virtual ~TagAction();
+
+ QDomElement data() const { return tag; }
+ void setModified(bool modified) { m_modified = modified;}
+ bool isModified() const {return m_modified;}
+ void setOutputFile(QFile* file);
+ void setInputFileName(const QString& fileName);
+ void addArguments(const QStringList& arguments);
+ bool toggable() const {return tag.attribute("toggable") == "true";}
+ bool toggled() const {return isChecked();}
+
+ /** Activates the action.
+ @param blocking in case of script actions, the script is run in blocking mode, if this argument is true
+ */
+ void execute(bool blocking);
+ QString type();
+ /**
+ * Remove accelerator from tag action name *
+ */
+ QString actionText();
+
+ QString XMLTagName() const;
+ QString openXMLTagString() const;
+ QString closeXMLTagString() const;
+
+signals:
+ void showMessage(const QString& msg, bool append);
+ void clearMessages();
+ void showMessagesView();
+ void createNewFile();
+
+public slots:
+ virtual void slotActivated();
+
+ /**
+ * We need this information in order to know if queued actions should be applied.
+ * It's public because it can be activated by other classes if there are any queued actions.
+ */
+ virtual bool slotActionActivated(KAction::ActivationReason reason, Qt::ButtonState state);
+
+protected slots:
+ virtual void slotGetScriptOutput( KProcess *, char *buffer, int buflen );
+ virtual void slotGetScriptError( KProcess *, char *buffer, int buflen );
+ virtual void scriptDone();
+ void slotTimeout();
+ void slotProcessExited(KProcess *);
+ virtual bool slotActionActivated();
+
+private:
+ void applyTagInSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const;
+ void applyTagInMixedSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const;
+ void deapplyTagInSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const;
+ void deapplyTagInMixedSelection(Node* start_node, int start_offset, Node* end_node, int end_offset,
+ NodeSelection& selection, NodeModifsSet* modifs) const;
+
+private:
+ KProcess *proc;
+ bool firstError;
+ bool firstOutput;
+ bool m_modified;
+ bool loopStarted;
+ bool m_useInputFile;
+ bool m_useOutputFile;
+ QString scriptOutputDest;
+ QString scriptErrorDest;
+ QTimer* timer;
+ QDomElement tag;
+ QFile* m_file;
+ KMainWindow *m_parentMainWindow;
+ QString m_inputFileName;
+ QStringList m_argsList;
+ uint m_killCount;
+ bool const m_toggle;
+};
+
+
+#endif // TAGACTION_H
diff --git a/quanta/utility/tagactionmanager.cpp b/quanta/utility/tagactionmanager.cpp
new file mode 100644
index 00000000..21183073
--- /dev/null
+++ b/quanta/utility/tagactionmanager.cpp
@@ -0,0 +1,83 @@
+/***************************************************************************
+ tagactionmanager.cpp
+ -------------------
+
+ copyright : (C) 2004 - Paulo Moura Guedes
+ email : moura@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 <kstaticdeleter.h>
+#include <kactioncollection.h>
+#include <kaction.h>
+#include <khtmlview.h>
+#include <klocale.h>
+#include <dom/dom_node.h>
+
+#include <qwidget.h>
+
+#include "tagactionmanager.h"
+#include "tagactionset.h"
+#include "resource.h"
+#include "wkafkapart.h"
+
+
+TagActionManager* TagActionManager::s_mSelf = 0;
+static KStaticDeleter<TagActionManager> staticDeleter;
+
+
+TagActionManager::TagActionManager()
+ : m_actionCollection(0)
+{
+ s_mSelf = this;
+ initActions(KafkaDocument::ref()->getKafkaWidget()->view());
+}
+
+TagActionManager::~TagActionManager()
+{}
+
+TagActionManager* TagActionManager::self()
+{
+ if (!s_mSelf)
+ {
+ staticDeleter.setObject(s_mSelf, new TagActionManager());
+ }
+
+ return s_mSelf;
+}
+
+void TagActionManager::initActions(QWidget* parent)
+{
+ Q_ASSERT(parent);
+
+ m_actionCollection = new KActionCollection(parent);
+
+ TagActionSet* general(new TagActionSet());
+ general->initActions(parent);
+ m_tagActionSets.append(general);
+
+ TableTagActionSet* table(new TableTagActionSet());
+ table->initActions(parent);
+ m_tagActionSets.append(table);
+}
+
+void TagActionManager::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+{
+ TagActionSetAbstract* tagActionSet = 0;
+ for(tagActionSet = m_tagActionSets.first(); tagActionSet; tagActionSet = m_tagActionSets.next())
+ tagActionSet->fillWithTagActions(widget, node);
+}
+
+bool TagActionManager::canIndentDTD(QString const& dtd)
+{
+ return (dtd.contains("HTML", false) ||
+ dtd.contains("XML", false));
+}
diff --git a/quanta/utility/tagactionmanager.h b/quanta/utility/tagactionmanager.h
new file mode 100644
index 00000000..533c3b39
--- /dev/null
+++ b/quanta/utility/tagactionmanager.h
@@ -0,0 +1,74 @@
+/***************************************************************************
+ tagactionmanager.h
+ -------------------
+
+ copyright : (C) 2004 - Paulo Moura Guedes
+ email : moura@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 TAGACTIONMANAGER_H
+#define TAGACTIONMANAGER_H
+
+class KActionCollection;
+namespace DOM
+{
+class Node;
+}
+
+#include <qptrlist.h>
+class QWidget;
+
+class TagActionSetAbstract;
+class TagActionSet;
+class TableTagActionSet;
+
+
+/**
+ * @author Paulo Moura Guedes
+ * This class is a singleton.
+*/
+class TagActionManager
+{
+public:
+ static TagActionManager* self();
+ ~TagActionManager();
+
+ /**
+ * This method is used to fill context menus with apropriated actions for node.
+ * If you want to plug a single action to some widget use actionCollection().
+ * @param widget The widget in wich the actions will be pluged.
+ * @param node The context/current node.
+ */
+ void fillWithTagActions(QWidget* widget, DOM::Node const& node);
+
+ static bool canIndentDTD(QString const& dtd);
+
+ KActionCollection* actionCollection() const
+ {
+ return m_actionCollection;
+ }
+
+private:
+ TagActionManager();
+ TagActionManager(TagActionManager const&)
+ {}
+
+ void initActions(QWidget* parent);
+
+private:
+ static TagActionManager* s_mSelf;
+
+ KActionCollection* m_actionCollection;
+ QPtrList<TagActionSetAbstract> m_tagActionSets;
+};
+
+#endif
diff --git a/quanta/utility/tagactionset.cpp b/quanta/utility/tagactionset.cpp
new file mode 100644
index 00000000..691ad182
--- /dev/null
+++ b/quanta/utility/tagactionset.cpp
@@ -0,0 +1,1172 @@
+/***************************************************************************
+ tagactionset.cpp
+ -------------------
+
+ copyright : (C) 2004 - Paulo Moura Guedes
+ email : moura@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 <kapplication.h>
+#include <kconfig.h>
+#include <kactioncollection.h>
+#include <kactionclasses.h>
+#include <dom/dom_node.h>
+#include <dom/dom_string.h>
+#include <klocale.h>
+
+#include <qwidget.h>
+
+#include "tagactionset.h"
+#include "tagactionmanager.h"
+#include "kafkacommon.h"
+#include "cursors.h"
+#include "undoredo.h"
+#include "wkafkapart.h"
+#include "node.h"
+#include "quantaview.h"
+#include "viewmanager.h"
+#include "tag.h"
+#include "quantacommon.h"
+#include "document.h"
+#include "resource.h"
+
+
+TagActionSetAbstract::TagActionSetAbstract(QObject *parent, const char *name)
+ : QObject(parent, name), m_currentNode(0)
+{}
+
+TagActionSetAbstract::~TagActionSetAbstract()
+{}
+
+Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
+{
+ Q_ASSERT(node);
+
+ Node* aux = node;
+ while(aux && aux->nodeName().lower() != tagName)
+ aux = aux->parent;
+
+ return aux;
+}
+
+Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const& tagName)
+{
+ Node* aux = startParentNode;
+ while(aux && aux->nodeName().lower() != tagName)
+ {
+ aux = aux->nextSibling();
+ if(!startParentNode->hasForChild(aux))
+ return 0;
+ }
+
+ return aux;
+}
+
+bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node const& node)
+{
+ m_currentDomNode = node;
+ m_currentNode = KafkaDocument::ref()->getNode(m_currentDomNode);
+
+ return m_currentNode;
+}
+
+//_____________________________________________________________________________
+
+TagActionSet::TagActionSet(QObject *parent, const char *name)
+ : TagActionSetAbstract(parent, name), m_separator(0)
+{
+ m_separator = new KActionSeparator();
+}
+
+bool TagActionSet::isInTagContext() const
+{
+ return true;
+}
+
+void TagActionSet::initActionMenus(QWidget* /*widget*/)
+{
+}
+
+void TagActionSet::initActions(QWidget* /*parent*/)
+{
+ KActionCollection* ac(TagActionManager::self()->actionCollection());
+
+ QString actionName = "apply_source_indentation";
+ new KAction(i18n("Apply Source Indentation"), 0, this,
+ SLOT(slotApplySourceIndentation()),
+ ac, actionName);
+
+ actionName = "copy_div_element";
+ new KAction(i18n("Copy DIV Area"), 0, this,
+ SLOT(slotCopyDivElement()),
+ ac, actionName);
+
+ actionName = "cut_div_element";
+ new KAction(i18n("Cut DIV Area"), 0, this,
+ SLOT(slotCutDivElement()),
+ ac, actionName);
+}
+
+bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+{
+ bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
+
+ if(!validNode || !isInTagContext())
+ {
+ unplugAllActions(widget);
+ return false;
+ }
+
+ m_separator->unplugAll();
+
+ KActionCollection* ac(TagActionManager::self()->actionCollection());
+
+ KAction* copyDivAction = ac->action("copy_div_element");
+ Q_ASSERT(copyDivAction);
+ KAction* cutDivAction = ac->action("cut_div_element");
+ Q_ASSERT(cutDivAction);
+
+ if(/*!KafkaDocument::ref()->getKafkaWidget()->hasSelection() && */isInDivArea())
+ {
+ if(!copyDivAction->isPlugged(widget))
+ copyDivAction->plug(widget);
+
+ if(!cutDivAction->isPlugged(widget))
+ cutDivAction->plug(widget);
+
+ m_separator->plug(widget);
+ }
+ else
+ {
+ copyDivAction->unplug(widget);
+ cutDivAction->unplug(widget);
+ }
+
+// KAction* applySourceIndentationAction = ac->action("apply_source_indentation");
+// Q_ASSERT(applySourceIndentationAction);
+//
+// applySourceIndentationAction->unplug(widget); // to keep things in order
+// applySourceIndentationAction->plug(widget);
+//
+// m_separator->plug(widget);
+
+ return true;
+}
+
+void TagActionSet::unplugAllActions(QWidget* widget) const
+{
+ KActionCollection* ac(TagActionManager::self()->actionCollection());
+
+ m_separator->unplugAll();
+
+ KAction* applySourceIndentationAction = ac->action("apply_source_indentation");
+ Q_ASSERT(applySourceIndentationAction);
+ applySourceIndentationAction->unplug(widget);
+
+ KAction* copyDivAction = ac->action("copy_div_element");
+ Q_ASSERT(copyDivAction);
+ copyDivAction->unplug(widget);
+
+ KAction* cutDivAction = ac->action("cut_div_element");
+ Q_ASSERT(cutDivAction);
+ cutDivAction->unplug(widget);
+}
+
+void TagActionSet::slotApplySourceIndentation()
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ KConfig* config = kapp->config();
+ config->setGroup("Kate Document Defaults");
+ int indentationWidth = config->readNumEntry("Indentation Width", 4);
+
+ //Once the changes have been made, we will generate the "clean" string for Text Nodes only, and
+ //we will add the empty indentation Nodes.
+ int eLine, eCol;
+ Node* node = baseNode;
+ while(node)
+ {
+ if(/*!node->tag->cleanStrBuilt() && */node->tag->type == Tag::Text)
+ {
+ if(!node->insideSpecial)
+ {
+ node->tag->setStr(KafkaDocument::ref()->generateCodeFromNode(node, 0, 0, eLine, eCol, false));
+ node->tag->setCleanStrBuilt(true);
+ }
+ }
+ if(/*!node->tag->indentationDone() && */!node->insideSpecial)
+ {
+ kafkaCommon::fitIndentationNodes(kafkaCommon::getPrevNodeNE(node), node, modifs);
+ bool goUp = false;
+ kafkaCommon::fitIndentationNodes(node, kafkaCommon::getNextNodeNE(node, goUp), modifs);
+ kafkaCommon::applyIndentation(node, indentationWidth, 0, modifs, qConfig.inlineNodeIndentation);
+ }
+ node = node->nextSibling();
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+}
+
+bool TagActionSet::isInDivArea() const
+{
+ Q_ASSERT(m_currentNode);
+
+ return parentTag(m_currentNode, "div");
+}
+
+void TagActionSet::slotCopyDivElement()
+{
+ Q_ASSERT(m_currentNode);
+
+ Node* divNode = parentTag(m_currentNode, "div");
+ Q_ASSERT(divNode);
+
+ Node* divClosingNode = divNode->getClosingNode();
+ if(!divClosingNode)
+ {
+ kdError(25001) << "DIV element without closing node: " << divNode << endl;
+ return;
+ }
+
+ KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, QString());
+}
+
+void TagActionSet::slotCutDivElement()
+{
+ Q_ASSERT(m_currentNode);
+
+ Node* divNode = parentTag(m_currentNode, "div");
+ Q_ASSERT(divNode);
+
+ Node* divClosingNode = divNode->getClosingNode();
+ if(!divClosingNode)
+ {
+ kdError(25001) << "DIV element without closing node: " << divNode << endl;
+ return;
+ }
+
+ NodeSelectionInd selection_ind;
+ selection_ind.fillWithVPLCursorSelection();
+
+ int cursorOffset = selection_ind.cursorOffset();
+
+ KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, QString());
+
+}
+
+//_____________________________________________________________________________
+
+TableTagActionSet::TableTagActionSet(QObject *parent, const char *name)
+ : TagActionSetAbstract(parent, name), m_separator(0), m_tableActionMenu_0(0), m_insertActionMenu_1(0)
+{
+ m_separator = new KActionSeparator();
+}
+
+bool TableTagActionSet::isInTagContext() const
+{
+ return parentTag(m_currentNode, "table");
+}
+
+void TableTagActionSet::initActionMenus(QWidget* widget)
+{
+ Q_ASSERT(!m_tableActionMenu_0);
+
+ m_tableActionMenu_0 = new KActionMenu(i18n("Table..."), widget);
+ m_insertActionMenu_1 = new KActionMenu(i18n("Insert..."), m_tableActionMenu_0);
+ m_removeActionMenu_1 = new KActionMenu(i18n("Remove..."), m_tableActionMenu_0);
+}
+
+
+void TableTagActionSet::initActions(QWidget* parent)
+{
+ if(!m_tableActionMenu_0)
+ initActionMenus(parent);
+
+ KActionCollection* ac(TagActionManager::self()->actionCollection());
+
+ // Insert___________________________________________________________________________
+
+ QString actionName = "insert_table";
+ //m_actionNames += actionName;
+ new KAction(i18n("Table..."), 0, this,
+ SLOT(slotInsertTable()),
+ ac, actionName);
+
+ actionName = "insert_row_above";
+ //m_actionNames += actionName;
+ new KAction(i18n("Row Above"), 0, this,
+ SLOT(slotInsertRowAbove()),
+ ac, actionName);
+
+ actionName = "insert_row_below";
+ //m_actionNames += actionName;
+ new KAction(i18n("Row Below"), 0, this,
+ SLOT(slotInsertRowBelow()),
+ ac, actionName);
+
+ actionName = "insert_column_left";
+ //m_actionNames += actionName;
+ new KAction(i18n("Column Left"), 0, this,
+ SLOT(slotInsertColumnLeft()),
+ ac, actionName);
+
+ actionName = "insert_column_right";
+ //m_actionNames += actionName;
+ new KAction(i18n("Column Right"), 0, this,
+ SLOT(slotInsertColumnRight()),
+ ac, actionName);
+
+ // Remove___________________________________________________________________________
+
+ actionName = "remove_table";
+ //m_actionNames += actionName;
+ new KAction(i18n("Table"), 0, this,
+ SLOT(slotRemoveTable()),
+ ac, actionName);
+
+ actionName = "remove_rows";
+ //m_actionNames += actionName;
+ new KAction(i18n("Row(s)"), 0, this,
+ SLOT(slotRemoveRows()),
+ ac, actionName);
+
+ actionName = "remove_columns";
+ //m_actionNames += actionName;
+ new KAction(i18n("Column(s)"), 0, this,
+ SLOT(slotRemoveColumns()),
+ ac, actionName);
+
+ actionName = "remove_cells";
+ //m_actionNames += actionName;
+ new KAction(i18n("Cell(s)"), 0, this,
+ SLOT(slotRemoveCells()),
+ ac, actionName);
+
+ actionName = "remove_cells_content";
+ //m_actionNames += actionName;
+ new KAction(i18n("Cell(s) Content"), 0, this,
+ SLOT(slotRemoveCellsContent()),
+ ac, actionName);
+
+ // Merge___________________________________________________________________________
+
+ actionName = "merge_selected_cells";
+ //m_actionNames += actionName;
+ new KAction(i18n("Merge Selected Cells"), 0, this,
+ SLOT(slotMergeSelectedCells()),
+ ac, actionName);
+}
+
+bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+{
+ bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
+
+ if(!validNode || !isInTagContext(/*node*/))
+ {
+ unplugAllActions(widget);
+ return false;
+ }
+
+ m_separator->unplugAll();
+
+ KActionCollection* ac(TagActionManager::self()->actionCollection());
+
+ // Table
+ bool emptyTableActionMenu_0 = true;
+
+ // Insert _____________________________________________________________________
+
+ // Insert
+ bool emptyInsertActionMenu_1 = true;
+
+ // Insert Table
+ KAction* insertTableAction = ac->action("insert_table");
+ Q_ASSERT(insertTableAction);
+
+ m_insertActionMenu_1->remove(insertTableAction);
+ if(canInsertTable())
+ {
+ emptyTableActionMenu_0 = emptyInsertActionMenu_1 = false;
+ m_insertActionMenu_1->insert(insertTableAction);
+
+ m_insertActionMenu_1->insert(m_separator);
+ }
+ // Insert Row Above
+ KAction* insertRowAboveAction = ac->action("insert_row_above");
+ Q_ASSERT(insertRowAboveAction);
+
+ m_insertActionMenu_1->remove(insertRowAboveAction);
+ if(canInsertRowAbove())
+ {
+ emptyTableActionMenu_0 = emptyInsertActionMenu_1 = false;
+ m_insertActionMenu_1->insert(insertRowAboveAction);
+
+ //m_insertActionMenu_1->insert(m_separator);
+ }
+ // Insert Row Below
+ KAction* insertRowBelowAction = ac->action("insert_row_below");
+ Q_ASSERT(insertRowBelowAction);
+
+ m_insertActionMenu_1->remove(insertRowBelowAction);
+ if(canInsertRowBelow())
+ {
+ emptyTableActionMenu_0 = emptyInsertActionMenu_1 = false;
+ m_insertActionMenu_1->insert(insertRowBelowAction);
+
+ m_insertActionMenu_1->insert(m_separator);
+ }
+ // Insert Column Left
+ KAction* insertColumnLeftAction = ac->action("insert_column_left");
+ Q_ASSERT(insertColumnLeftAction);
+
+ m_insertActionMenu_1->remove(insertColumnLeftAction);
+ if(canInsertColumnLeft())
+ {
+ emptyTableActionMenu_0 = emptyInsertActionMenu_1 = false;
+ m_insertActionMenu_1->insert(insertColumnLeftAction);
+
+ //m_insertActionMenu_1->insert(m_separator);
+ }
+ // Insert Column Right
+ KAction* insertColumnRightAction = ac->action("insert_column_right");
+ Q_ASSERT(insertColumnRightAction);
+
+ m_insertActionMenu_1->remove(insertColumnRightAction);
+ if(canInsertColumnRight())
+ {
+ emptyTableActionMenu_0 = emptyInsertActionMenu_1 = false;
+ m_insertActionMenu_1->insert(insertColumnRightAction);
+
+ m_insertActionMenu_1->insert(m_separator);
+ }
+ // Remove _____________________________________________________________________
+
+ // Remove
+ bool emptyRemoveActionMenu_1 = true;
+
+ // Remove Table
+ KAction* removeTableAction = ac->action("remove_table");
+ Q_ASSERT(removeTableAction);
+
+ m_removeActionMenu_1->remove(removeTableAction);
+ if(canRemoveTable())
+ {
+ emptyTableActionMenu_0 = emptyRemoveActionMenu_1 = false;
+ m_removeActionMenu_1->insert(removeTableAction);
+
+ m_removeActionMenu_1->insert(m_separator);
+ }
+ // Remove Row(s)
+ KAction* removeRowsAction = ac->action("remove_rows");
+ Q_ASSERT(removeRowsAction);
+
+ m_removeActionMenu_1->remove(removeRowsAction);
+ if(canRemoveRows())
+ {
+ emptyTableActionMenu_0 = emptyRemoveActionMenu_1 = false;
+ m_removeActionMenu_1->insert(removeRowsAction);
+
+ //m_removeActionMenu_1->insert(m_separator);
+ }
+ // Remove Column(s)
+ KAction* removeColumnsAction = ac->action("remove_columns");
+ Q_ASSERT(removeColumnsAction);
+
+ m_removeActionMenu_1->remove(removeColumnsAction);
+ if(canRemoveColumns())
+ {
+ emptyTableActionMenu_0 = emptyRemoveActionMenu_1 = false;
+ m_removeActionMenu_1->insert(removeColumnsAction);
+
+ //m_removeActionMenu_1->insert(m_separator);
+ }
+/* // Remove Cell(s)
+ KAction* removeCellsAction = ac->action("remove_cells");
+ Q_ASSERT(removeCellsAction);
+
+ m_removeActionMenu_1->remove(removeCellsAction);
+ if(canRemoveCells())
+ {
+ emptyTableActionMenu_0 = emptyRemoveActionMenu_1 = false;
+ m_removeActionMenu_1->insert(removeCellsAction);
+
+ //m_removeActionMenu_1->insert(m_separator);
+ }*/
+ // Remove Cell(s) Content
+ KAction* removeCellsContentAction = ac->action("remove_cells_content");
+ Q_ASSERT(removeCellsContentAction);
+
+ m_removeActionMenu_1->remove(removeCellsContentAction);
+ if(canRemoveCellsContent())
+ {
+ emptyTableActionMenu_0 = emptyRemoveActionMenu_1 = false;
+ m_removeActionMenu_1->insert(removeCellsContentAction);
+
+ //m_removeActionMenu_1->insert(m_separator);
+ }
+ // Remove _____________________________________________________________________
+
+ // Merge
+// bool emptyRemoveActionMenu_1 = true;
+
+ // _____________________________________________________________________________
+
+ // Table
+ m_tableActionMenu_0->unplug(widget);
+ if(!emptyTableActionMenu_0)
+ {
+ m_tableActionMenu_0->plug(widget);
+
+ m_tableActionMenu_0->remove(m_insertActionMenu_1);
+ if(!emptyInsertActionMenu_1)
+ m_tableActionMenu_0->insert(m_insertActionMenu_1);
+
+ m_tableActionMenu_0->remove(m_removeActionMenu_1);
+ if(!emptyRemoveActionMenu_1)
+ m_tableActionMenu_0->insert(m_removeActionMenu_1);
+
+ m_tableActionMenu_0->insert(m_separator);
+ }
+ // Merge selected cells
+ KAction* mergeSelectedCellsAction = ac->action("merge_selected_cells");
+ Q_ASSERT(mergeSelectedCellsAction);
+
+ m_tableActionMenu_0->remove(mergeSelectedCellsAction);
+ if(canMergeSelectedCells())
+ {
+ emptyTableActionMenu_0 = false;
+ m_tableActionMenu_0->insert(mergeSelectedCellsAction);
+
+// m_removeActionMenu_1->insert(m_separator);
+ }
+
+ return true;
+}
+
+void TableTagActionSet::unplugAllActions(QWidget* widget) const
+{
+ m_separator->unplugAll();
+ m_tableActionMenu_0->unplug(widget);
+}
+
+// Insert _____________________________________________________________________
+
+bool TableTagActionSet::canInsertTable() const
+{
+ return false;
+ // return isInTagContext(currentDomNode()); // TODO Implement slotInsertTable
+}
+
+void TableTagActionSet::slotInsertTable()
+{
+ Q_ASSERT(m_currentNode);
+
+}
+
+bool TableTagActionSet::canInsertRowAbove() const
+{
+ return isInTagContext() && parentTag(m_currentNode, "tbody");
+}
+
+void TableTagActionSet::slotInsertRowAbove()
+{
+ Q_ASSERT(m_currentNode);
+
+ Node* nearRow = parentTag(m_currentNode, "tr");
+
+ if(!nearRow)
+ return;
+
+ Node* nodeParent= nearRow->parent;
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+ Node* nodeToInsert = buildEmptyRowSubtree();
+
+ kafkaCommon::insertNodeSubtree(nodeToInsert, nodeParent, nearRow, modifs);
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+bool TableTagActionSet::canInsertRowBelow() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotInsertRowBelow()
+{
+ Q_ASSERT(m_currentNode);
+
+ Node* nearRow = 0;
+ Node* aux = parentTag(m_currentNode, "thead");
+ if(aux)
+ nearRow= firstChildTag(tableStart(), "tr");
+ else
+ nearRow = parentTag(m_currentNode, "tr");
+
+ if(!nearRow)
+ return;
+
+ Node* nodeParent= nearRow->parent;
+ Node* nextSibling = nearRow->SNext();
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+ Node* nodeToInsert = buildEmptyRowSubtree();
+
+ kafkaCommon::insertNodeSubtree(nodeToInsert, nodeParent, nextSibling, modifs);
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+bool TableTagActionSet::canInsertColumnLeft() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotInsertColumnLeft()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ Node* nodeToInsertInBody = buildEmptyTBodyCellSubtree();
+ Node* nodeToInsertInHead = buildEmptyTHeadCellSubtree();
+ Q_ASSERT(nodeToInsertInBody);
+ Q_ASSERT(nodeToInsertInHead);
+
+ int const _currentColumnIndex = currentColumnIndex();
+
+ // thead
+ Node* trChild = firstChildTag(firstChildTag(tableStart(), "thead"), "tr");
+ while(trChild)
+ {
+ Node* thChild = firstChildTag(trChild, "th");
+ for(int i = 0; (i != _currentColumnIndex && thChild); ++i)
+ thChild = thChild->SNext();
+
+ kafkaCommon::insertNodeSubtree(nodeToInsertInHead, trChild, thChild, modifs);
+
+ nodeToInsertInHead = kafkaCommon::duplicateNodeSubtree(nodeToInsertInHead);
+
+ trChild = trChild->SNext();
+ }
+
+ // tbody
+ trChild = firstChildTag(firstChildTag(tableStart(), "tbody"), "tr");
+ while(trChild)
+ {
+ Node* tdChild = firstChildTag(trChild, "td");
+ for(int i = 0; (i != _currentColumnIndex && tdChild); ++i)
+ tdChild = tdChild->SNext();
+
+ kafkaCommon::insertNodeSubtree(nodeToInsertInBody, trChild, tdChild, modifs);
+
+ nodeToInsertInBody = kafkaCommon::duplicateNodeSubtree(nodeToInsertInBody);
+
+ trChild = trChild->SNext();
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+bool TableTagActionSet::canInsertColumnRight() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotInsertColumnRight()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ Node* nodeToInsertInBody = buildEmptyTBodyCellSubtree();
+ Node* nodeToInsertInHead = buildEmptyTHeadCellSubtree();
+ Q_ASSERT(nodeToInsertInBody);
+ Q_ASSERT(nodeToInsertInHead);
+
+ int const _currentColumnIndex = currentColumnIndex();
+
+ // thead
+ Node* trChild = firstChildTag(firstChildTag(tableStart(), "thead"), "tr");
+ while(trChild)
+ {
+ Node* thChild = firstChildTag(trChild, "th");
+ for(int i = 0; (i != _currentColumnIndex + 1 && thChild); ++i)
+ thChild = thChild->SNext();
+
+ kafkaCommon::insertNodeSubtree(nodeToInsertInHead, trChild, thChild, modifs);
+
+ nodeToInsertInHead = kafkaCommon::duplicateNodeSubtree(nodeToInsertInHead);
+
+ trChild = trChild->SNext();
+ }
+
+ // tbody
+ trChild = firstChildTag(firstChildTag(tableStart(), "tbody"), "tr");
+ while(trChild)
+ {
+ Node* tdChild = firstChildTag(trChild, "td");
+ for(int i = 0; (i != _currentColumnIndex + 1 && tdChild); ++i)
+ tdChild = tdChild->SNext();
+
+ kafkaCommon::insertNodeSubtree(nodeToInsertInBody, trChild, tdChild, modifs);
+
+ nodeToInsertInBody = kafkaCommon::duplicateNodeSubtree(nodeToInsertInBody);
+
+ trChild = trChild->SNext();
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+// Remove ________________________________________________________________
+
+bool TableTagActionSet::canRemoveTable() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotRemoveTable()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ Node* _tableStart = tableStart();
+
+ kafkaCommon::extractAndDeleteNode(_tableStart, modifs, true, true);
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+bool TableTagActionSet::canRemoveRows() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotRemoveRows()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+
+ if(!selection.hasSelection())
+ {
+ Node* nearTr = parentTag(m_currentNode, "tr");
+ kafkaCommon::extractAndDeleteNode(nearTr, modifs, true, true);
+ }
+ else
+ {
+ Node* startSelection = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ Node* endSelection = kafkaCommon::getNodeFromLocation(selection.cursorNodeEndSel());
+
+ Node* startTr = parentTag(startSelection, "tr");
+ Node* endTr = parentTag(endSelection, "tr");
+
+ Node* iteratorNode = startTr;
+ bool loop(true);
+ while(iteratorNode && loop)
+ {
+ // the check has to be done before extract
+ if(iteratorNode == endTr)
+ loop = false;
+
+ Node* aux = iteratorNode;
+ iteratorNode = iteratorNode->SNext();
+
+ kafkaCommon::extractAndDeleteNode(aux, modifs, true, true);
+ }
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+bool TableTagActionSet::canRemoveColumns() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotRemoveColumns()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+
+ if(!selection.hasSelection())
+ {
+ int const _currentColumnIndex = currentColumnIndex();
+ removeColumn(_currentColumnIndex, modifs);
+ }
+ else
+ {
+ Node* startSelection = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ Node* endSelection = kafkaCommon::getNodeFromLocation(selection.cursorNodeEndSel());
+
+ int startColumnIndex = columnIndex(startSelection);
+ int endColumnIndex = columnIndex(endSelection);
+ int numberOfColumnsSelected = endColumnIndex - startColumnIndex + 1;
+
+ if(startColumnIndex == -1 || endColumnIndex == -1)
+ return;
+
+ m_currentNode = parentTag(m_currentNode, "tbody"); // m_currentNode will become invalid
+ for(int i = 0; i != numberOfColumnsSelected; ++i)
+ removeColumn(startColumnIndex, modifs);
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+bool TableTagActionSet::canRemoveCells() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotRemoveCells()
+{}
+
+bool TableTagActionSet::canRemoveCellsContent() const
+{
+ return isInTagContext();
+}
+
+void TableTagActionSet::slotRemoveCellsContent()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+
+ if(!selection.hasSelection())
+ {
+ Node* aux = m_currentNode;
+ m_currentNode = parentTag(m_currentNode, "tbody");
+
+ Node* nearTd = parentTag(aux, "td");
+ clearCellContents(nearTd, modifs);
+ }
+ else
+ {
+ Node* startSelection = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ Node* endSelection = kafkaCommon::getNodeFromLocation(selection.cursorNodeEndSel());
+
+ Node* startTd = parentTag(startSelection, "td");
+ Node* endTd = parentTag(endSelection, "td");
+
+ if(!startTd || !endTd)
+ return;
+
+ }
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+// Merge ________________________________________________________________
+
+bool TableTagActionSet::canMergeSelectedCells() const
+{
+ if(!KafkaDocument::ref()->getKafkaWidget()->hasSelection())
+ return false;
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+ QValueList<int> start = selection.cursorNode();
+ QValueList<int> end = selection.cursorNodeEndSel();
+
+ return start != end;
+}
+
+void TableTagActionSet::slotMergeSelectedCells()
+{
+ Q_ASSERT(m_currentNode);
+
+ QuantaView* view = ViewManager::ref()->activeView();
+ NodeModifsSet *modifs = new NodeModifsSet();
+
+ NodeSelectionInd selection;
+ selection.fillWithVPLCursorSelection();
+
+ Q_ASSERT(selection.hasSelection());
+
+ Node* startSelection = kafkaCommon::getNodeFromLocation(selection.cursorNode());
+ Node* endSelection = kafkaCommon::getNodeFromLocation(selection.cursorNodeEndSel());
+
+ Node* startTd = parentTag(startSelection, "td");
+ Node* endTd = parentTag(endSelection, "td");
+
+ Node* nodeIterator = startTd->SNext();
+ Node* stopNode = endTd->SNext();
+ int count = 1;
+ while(nodeIterator && nodeIterator != stopNode)
+ {
+ Node* aux = nodeIterator;
+ nodeIterator = nodeIterator->SNext();
+
+ Node* child = aux->firstChild();
+ while(child)
+ {
+ Node* next = child->next;
+ kafkaCommon::moveNode(child, startTd, 0, modifs);
+ child = next;
+ }
+
+ kafkaCommon::extractAndDeleteNode(aux, modifs);
+
+ ++count;
+ }
+
+ if(count == 1)
+ return;
+
+ kafkaCommon::editNodeAttribute(startTd, "colspan", QString::number(count), modifs);
+ kafkaCommon::editNodeAttribute(startTd, "rowspan", "1", modifs);
+
+ view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
+
+// kafkaCommon::coutTree(baseNode, 3);
+}
+
+//_____________________________________________________________________________
+
+Node* TableTagActionSet::tableStart() const
+{
+ Q_ASSERT(isInTagContext());
+ Q_ASSERT(m_currentNode);
+
+ return parentTag(m_currentNode, "table");
+}
+
+int TableTagActionSet::numberOfColumns() const
+{
+ Node* _tableStart = tableStart();
+ if(!_tableStart)
+ return -1;
+
+ Node* firstTd = firstChildTag(_tableStart, "td");
+
+ if(!firstTd)
+ return -1;
+
+ int count(0);
+ Node* aux = firstTd;
+ while(aux)
+ {
+ ++count;
+ aux = aux->SNext();
+ }
+
+ kdDebug(23100) << "Number of columns: " << count << endl;
+ return count;
+}
+
+int TableTagActionSet::currentColumnIndex() const
+{
+ return columnIndex(m_currentNode);
+/* Node* nearTd = parentTag(m_currentNode, "td");
+ if(!nearTd)
+ return -1;
+
+ Node* _tableStart = tableStart();
+ if(!_tableStart)
+ return -1;
+
+ Node* firstTd = firstChildTag(parentTag(m_currentNode, "tr"), "td");
+ //Node* firstTd = firstChildTag(_tableStart, "td");
+ if(!firstTd)
+ return -1;
+
+ int count(0);
+ Node* aux = firstTd;
+ while(aux && aux != nearTd)
+ {
+ ++count;
+ aux = aux->SNext();
+ }
+
+ if(!aux)
+ count = -1;
+ return count;*/
+}
+
+int TableTagActionSet::columnIndex(Node* node) const
+{
+ Node* nearTd = parentTag(node, "td");
+ if(!nearTd)
+ return -1;
+
+ Node* _tableStart = tableStart();
+ if(!_tableStart)
+ return -1;
+
+ Node* firstTd = firstChildTag(parentTag(node, "tr"), "td");
+ if(!firstTd)
+ return -1;
+
+ int count(0);
+ Node* aux = firstTd;
+ while(aux && aux != nearTd)
+ {
+ ++count;
+ aux = aux->SNext();
+ }
+
+ if(!aux)
+ count = -1;
+ return count;
+}
+
+Node* TableTagActionSet::buildEmptyRowSubtree() const
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+
+ Node* nodeToInsert = kafkaCommon::createNode("", "", Tag::XmlTag, view->document());
+ nodeToInsert->tag->parse("<tr>", view->document());
+ kafkaCommon::createMandatoryNodeSubtree(nodeToInsert, view->document());
+ // now we have: <tr><td></td></tr>
+
+ //Let's -> <tr><td><br></td></tr>
+ Node* brNode = kafkaCommon::createNode("", "", Tag::XmlTag, view->document());
+ brNode->tag->parse("<br>", view->document());
+ Node* tdNode = nodeToInsert->child;
+ kafkaCommon::insertNode(brNode, tdNode, 0, 0);
+
+ int _numberOfColumns = numberOfColumns();
+
+ if(_numberOfColumns == -1)
+ return 0;
+
+ for(int i = 1; i != _numberOfColumns; ++i)
+ {
+ Node* duplicatedTdSubtree = kafkaCommon::duplicateNodeSubtree(tdNode);
+ kafkaCommon::insertNodeSubtree(duplicatedTdSubtree, nodeToInsert, 0, 0);
+ }
+
+ kafkaCommon::coutTree(nodeToInsert, 3);
+
+ return nodeToInsert;
+}
+
+Node* TableTagActionSet::buildEmptyTBodyCellSubtree() const
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+
+ // build tree -> <td><br></td>
+ Node* nodeToInsert = kafkaCommon::createNode("", "", Tag::XmlTag, view->document());
+ nodeToInsert->tag->parse("<td>", view->document());
+ Node* brNode = kafkaCommon::createNode("", "", Tag::XmlTag, view->document());
+ brNode->tag->parse("<br>", view->document());
+ kafkaCommon::insertNode(brNode, nodeToInsert, 0, 0);
+
+ return nodeToInsert;
+}
+
+Node* TableTagActionSet::buildEmptyTHeadCellSubtree() const
+{
+ QuantaView* view = ViewManager::ref()->activeView();
+
+ // build tree -> <td><br></td>
+ Node* nodeToInsert = kafkaCommon::createNode("", "", Tag::XmlTag, view->document());
+ nodeToInsert->tag->parse("<th>", view->document());
+ Node* brNode = kafkaCommon::createNode("", "", Tag::XmlTag, view->document());
+ brNode->tag->parse("<br>", view->document());
+ kafkaCommon::insertNode(brNode, nodeToInsert, 0, 0);
+
+ return nodeToInsert;
+}
+
+void TableTagActionSet::removeColumn(int _currentColumnIndex, NodeModifsSet* modifs)
+{
+ Q_ASSERT(m_currentNode);
+ Q_ASSERT(_currentColumnIndex >= 0);
+ Q_ASSERT(modifs);
+
+ // thead
+ Node* trChild = firstChildTag(firstChildTag(tableStart(), "thead"), "tr");
+ while(trChild)
+ {
+ Node* thChild = firstChildTag(trChild, "th");
+ for(int i = 0; (i != _currentColumnIndex && thChild); ++i)
+ thChild = thChild->SNext();
+
+ kafkaCommon::extractAndDeleteNode(thChild, modifs, true, true);
+
+ trChild = trChild->SNext();
+ }
+
+ // tbody
+ trChild = firstChildTag(firstChildTag(tableStart(), "tbody"), "tr");
+ while(trChild)
+ {
+ Node* tdChild = firstChildTag(trChild, "td");
+ for(int i = 0; (i != _currentColumnIndex && tdChild); ++i)
+ tdChild = tdChild->SNext();
+
+ kafkaCommon::extractAndDeleteNode(tdChild, modifs, true, true);
+
+ trChild = trChild->SNext();
+ }
+}
+
+void TableTagActionSet::clearCellContents(Node* tdNode, NodeModifsSet* modifs)
+{
+ if (!tdNode)
+ return;
+ Node* tdChild = tdNode->child;
+
+ if(!tdChild)
+ return;
+
+ while(tdChild)
+ {
+ Node* aux = tdChild;
+ tdChild = tdChild->next;
+
+ kafkaCommon::extractAndDeleteNode(aux, modifs, true, false);
+ }
+}
+
+//_____________________________________________________________________________
+
+#include "tagactionset.moc"
diff --git a/quanta/utility/tagactionset.h b/quanta/utility/tagactionset.h
new file mode 100644
index 00000000..6bb2448f
--- /dev/null
+++ b/quanta/utility/tagactionset.h
@@ -0,0 +1,161 @@
+/***************************************************************************
+ tagactionset.h
+ -------------------
+
+ copyright : (C) 2004 - Paulo Moura Guedes
+ email : moura@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 TAGACTIONSET_H
+#define TAGACTIONSET_H
+
+namespace DOM
+{
+class Node;
+}
+class KActionSeparator;
+
+#include <qobject.h>
+class QWidget;
+class KActionSet;
+class KActionMenu;
+
+class Node;
+class NodeModifsSet;
+
+/**
+@author Paulo Moura Guedes
+*/
+class TagActionSetAbstract : public QObject
+{
+ Q_OBJECT
+public:
+ TagActionSetAbstract(QObject *parent = 0, const char *name = 0);
+ virtual ~TagActionSetAbstract();
+
+ DOM::Node const& currentDomNode() const {return m_currentDomNode;}
+
+ static Node* parentTag(Node* node, QString const& tagName);
+ static Node* firstChildTag(Node* node, QString const& tagName);
+
+ virtual bool isInTagContext(/*DOM::Node const& node*/) const = 0;
+ virtual void initActions(QWidget* parent) = 0;
+ virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(QWidget* widget) const = 0;
+
+protected:
+ virtual void initActionMenus(QWidget* widget) = 0;
+
+protected:
+ Node* m_currentNode;
+
+private:
+ DOM::Node m_currentDomNode;
+};
+
+
+class TagActionSet : public TagActionSetAbstract
+{
+ Q_OBJECT
+public:
+ TagActionSet(QObject *parent = 0, const char *name = 0);
+ virtual ~TagActionSet() {}
+
+ virtual bool isInTagContext() const;
+ virtual void initActions(QWidget* parent);
+ virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(QWidget* widget) const;
+
+public slots:
+ void slotApplySourceIndentation();
+ void slotCopyDivElement();
+ void slotCutDivElement();
+
+protected:
+ virtual void initActionMenus(QWidget* widget);
+
+private:
+ bool isInDivArea() const;
+
+private:
+ KActionSeparator* m_separator;
+};
+
+
+class TableTagActionSet : public TagActionSetAbstract
+{
+ Q_OBJECT
+public:
+ TableTagActionSet(QObject *parent = 0, const char *name = 0);
+ virtual ~TableTagActionSet()
+ {}
+
+ virtual bool isInTagContext(/*DOM::Node const& node*/) const;
+ virtual void initActions(QWidget* parent);
+ virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(QWidget* widget) const;
+
+public slots:
+ // Insert
+ void slotInsertTable();
+ void slotInsertRowAbove();
+ void slotInsertRowBelow();
+ void slotInsertColumnLeft();
+ void slotInsertColumnRight();
+ // Remove
+ void slotRemoveTable();
+ void slotRemoveRows();
+ void slotRemoveColumns();
+ void slotRemoveCells();
+ void slotRemoveCellsContent();
+ // Merge
+ void slotMergeSelectedCells();
+
+protected:
+ virtual void initActionMenus(QWidget* widget);
+
+private:
+ // Insert
+ bool canInsertTable() const;
+ bool canInsertRowAbove() const;
+ bool canInsertRowBelow() const;
+ bool canInsertColumnLeft() const;
+ bool canInsertColumnRight() const;
+ // Remove
+ bool canRemoveTable() const;
+ bool canRemoveRows() const;
+ bool canRemoveColumns() const;
+ bool canRemoveCells() const;
+ bool canRemoveCellsContent() const;
+ // Merge
+ bool canMergeSelectedCells() const;
+
+ Node* tableStart() const;
+ int numberOfColumns() const;
+ int currentColumnIndex() const;
+ int columnIndex(Node* node) const;
+ Node* buildEmptyRowSubtree() const;
+ Node* buildEmptyTBodyCellSubtree() const;
+ Node* buildEmptyTHeadCellSubtree() const;
+
+ void removeColumn(int index, NodeModifsSet* modifs);
+ void clearCellContents(Node* tdNode, NodeModifsSet* modifs);
+
+private:
+ KActionSeparator* m_separator;
+
+ KActionMenu* m_tableActionMenu_0;
+ KActionMenu* m_insertActionMenu_1;
+ KActionMenu* m_removeActionMenu_1;
+};
+
+#endif
diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp
new file mode 100644
index 00000000..03c6e86b
--- /dev/null
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -0,0 +1,351 @@
+/***************************************************************************
+ toolbartabwidget.cpp
+ ---------------------
+ copyright : (C) 2003 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+//qt includes
+#include <qevent.h>
+#include <qlayout.h>
+#include <qobjectlist.h>
+#include <qpoint.h>
+#include <qtabbar.h>
+#include <qwidgetstack.h>
+#include <qtabwidget.h>
+#include <qfontmetrics.h>
+
+//kde includes
+#include <kaction.h>
+#include <kaccelmanager.h>
+#include <kdeversion.h>
+#include <kiconloader.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kpopupmenu.h>
+#include <ktoolbar.h>
+#include <ktoolbarbutton.h>
+#include <kdebug.h>
+#include <kglobalsettings.h>
+
+//app includes
+#include "toolbartabwidget.h"
+
+ToolbarTabWidget::ToolbarTabWidget(QWidget * parent, const char * name, WFlags f)
+:QTabWidget(parent, name, f)
+{
+ m_popupMenu = new KPopupMenu(this);
+ m_popupMenu->insertTitle(i18n("Toolbar Menu"), 1);
+ m_popupMenu->insertItem(i18n("New Action..."), parent, SLOT(slotNewAction()));
+ m_popupMenu->insertSeparator();
+ m_popupMenu->insertItem(i18n("New Toolbar..."), parent, SLOT(slotAddToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), this, SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, SLOT(slotEditToolbar()));
+
+ connect(this, SIGNAL(removeToolbar(const QString&)),
+ parent, SLOT(slotRemoveToolbar(const QString&)));
+ connect(this, SIGNAL(renameToolbar(const QString&)),
+ parent, SLOT(slotRenameToolbar(const QString&)));
+ connect(this, SIGNAL(editToolbar(const QString&)),
+ parent, SLOT(slotConfigureToolbars(const QString&)));
+ connect(this, SIGNAL(newAction()),
+ parent, SLOT(slotNewAction()));
+ connect(this, SIGNAL(addToolbar()),
+ parent, SLOT(slotAddToolbar()));
+ KAcceleratorManager::setNoAccel(this);
+}
+
+void ToolbarTabWidget::insertTab(QWidget *child, const QString &label, const QString &id)
+{
+ if (child->inherits("KToolBar") && child->parentWidget())
+ {
+ QTabWidget::insertTab(child->parentWidget(), label);
+ toolbarList.insert(id, child);
+ }
+}
+
+QWidget* ToolbarTabWidget::page(int index)
+{
+ QWidget *w = QTabWidget::page(index);
+
+ for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ {
+ if (it.data()->parentWidget() == w)
+ {
+ w = *it;
+ break;
+ }
+ }
+ return w;
+}
+
+QString ToolbarTabWidget::id(QWidget *w) const
+{
+ QString idStr;
+ for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ {
+ if (it.data()->parentWidget() == w)
+ {
+ idStr = it.key();
+ break;
+ }
+ }
+ return idStr;
+}
+
+QString ToolbarTabWidget::id(int index) const
+{
+ QWidget *w = QTabWidget::page(index);
+ QString idStr;
+ for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ {
+ if (it.data()->parentWidget() == w)
+ {
+ idStr = it.key();
+ break;
+ }
+ }
+ return idStr;
+}
+
+QWidget* ToolbarTabWidget::page(const QString& id)
+{
+ QWidget *w = toolbarList.find(id).data();
+ return w;
+}
+
+void ToolbarTabWidget::removePage(QWidget * w)
+{
+ QWidget *parent = w->parentWidget();
+ if (w->inherits("KToolBar") && parent)
+ {
+ QTabWidget::removePage(parent);
+ for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ {
+ if (it.data() == w)
+ {
+ toolbarList.remove(it.key());
+ break;
+ }
+ }
+ delete parent;
+ }
+}
+
+void ToolbarTabWidget::slotRemoveToolbar()
+{
+ emit removeToolbar(tabUnderMouse.lower());
+}
+
+void ToolbarTabWidget::slotRenameToolbar()
+{
+ emit renameToolbar(tabUnderMouse.lower());
+}
+
+void ToolbarTabWidget::slotEditToolbar()
+{
+ emit editToolbar(tabUnderMouseLabel + " <quanta>");
+}
+
+void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
+{
+ if (e->button() == Qt::RightButton)
+ {
+ QPoint p = e->globalPos();
+ QTab *tab = 0L;
+ QWidget *pageW = 0L;
+ for (int i =0; i < tabBar()->count(); i++)
+ {
+ tab = tabBar()->tabAt(i);
+ pageW = page(i);
+ QRect r = tab->rect();
+ QPoint p1 = mapToGlobal(r.topLeft());
+ QPoint p2 = mapToGlobal(r.bottomRight());
+ if (QRect(p1, p2).contains(p))
+ break;
+ else
+ tab = 0L;
+ }
+ tabUnderMouseLabel = tab ? tab->text() : label(currentPageIndex());
+ if (!pageW)
+ pageW = currentPage();
+ for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ {
+ if (it.data()->parentWidget() == pageW)
+ {
+ tabUnderMouse = it.key();
+ break;
+ }
+ }
+ m_popupMenu->changeTitle(1, i18n("Toolbar Menu") + " - " + i18n(tabUnderMouseLabel.utf8()));
+ m_popupMenu->popup(p);
+ }
+}
+
+
+void ToolbarTabWidget::resizeEvent(QResizeEvent *e)
+{
+ QWidget::resizeEvent(e);
+ QWidget *tb;
+ for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ {
+ tb = it.data();
+ tb->resize(QSize(width(), tb->height()));
+ }
+ int i = currentPageIndex();
+ if (i > 0)
+ {
+ setCurrentPage(i -1);
+ } else
+ if (i+1 < count())
+ {
+ setCurrentPage(i + 1);
+ }
+ setCurrentPage(i);
+}
+
+int ToolbarTabWidget::tabHeight() const
+{
+ int height = tabBar()->height();
+ if (height < 2)
+ {
+ height = QFontMetrics(KGlobalSettings::generalFont()).height() + 12;
+ }
+ return height;
+}
+
+
+QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style, bool readConfig)
+:KToolBar (parent, name=0, honor_style, readConfig)
+{
+ m_popupMenu = new KPopupMenu(this);
+ m_toolbarTab = dynamic_cast<ToolbarTabWidget*>(parent->parentWidget());
+ currentActionName = "";
+ m_iconTextMenu = new KPopupMenu(this);
+ m_iconTextMenu->setCheckable(true);
+ m_iconTextMenu->insertItem(i18n("Icons Only"), 0);
+ m_iconTextMenu->insertItem(i18n("Text Only"), 1);
+ m_iconTextMenu->insertItem(i18n("Text Alongside Icons"), 2);
+ m_iconTextMenu->insertItem(i18n("Text Under Icons"), 3);
+ connect(m_iconTextMenu, SIGNAL(activated(int)), SLOT(slotIconTextChanged(int)));
+ connect(m_iconTextMenu, SIGNAL(aboutToShow()), SLOT(slotIconTextMenuAboutToShow()));
+ setIconText(ToolbarTabWidget::ref()->iconText(), false);
+}
+
+void QuantaToolBar::slotIconTextMenuAboutToShow()
+{
+ m_iconTextMenu->setItemChecked(0, false);
+ m_iconTextMenu->setItemChecked(1, false);
+ m_iconTextMenu->setItemChecked(2, false);
+ m_iconTextMenu->setItemChecked(3, false);
+ switch (ToolbarTabWidget::ref()->iconText())
+ {
+ case IconOnly: m_iconTextMenu->setItemChecked(0, true);
+ break;
+ case TextOnly: m_iconTextMenu->setItemChecked(1, true);
+ break;
+ case IconTextRight: m_iconTextMenu->setItemChecked(2, true);
+ break;
+ case IconTextBottom: m_iconTextMenu->setItemChecked(3, true);
+ break;
+ }
+}
+
+void QuantaToolBar::slotIconTextChanged(int id)
+{
+ ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
+ int width = toolbarTab->width();
+ int bigHeight = iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
+ int normalHeight = iconSize() + 10;
+ for (int i = 0; i < toolbarTab->count(); i++)
+ {
+ QuantaToolBar *tb = static_cast<QuantaToolBar*>(toolbarTab->page(i));
+ switch (id)
+ {
+ case 0: tb->setIconText(IconOnly);
+ tb->setGeometry(0,0, width, normalHeight);
+ break;
+ case 1: tb->setIconText(TextOnly);
+ tb->setGeometry(0,0, width, normalHeight);
+ break;
+ case 2: tb->setIconText(IconTextRight);
+ tb->setGeometry(0,0, width, normalHeight);
+ break;
+ case 3: tb->setIconText(IconTextBottom);
+ tb->setGeometry(0,0, width, bigHeight);
+ break;
+ }
+ }
+ toolbarTab->setIconText(iconText());
+ if (id == 3)
+ {
+ toolbarTab->setFixedHeight(toolbarTab->tabHeight() + height() + 3);
+ } else
+ {
+ toolbarTab->setFixedHeight(toolbarTab->tabHeight() + height() + 3);
+ }
+}
+
+void QuantaToolBar::mousePressEvent(QMouseEvent *e)
+{
+ if (e->button() == Qt::RightButton)
+ {
+ m_popupMenu->clear();
+ QPoint p = e->globalPos();
+ if (m_toolbarTab)
+ {
+ m_toolbarTab->tabUnderMouse = m_toolbarTab->id(m_toolbarTab->currentPageIndex());
+ m_toolbarTab->tabUnderMouseLabel = m_toolbarTab->label(m_toolbarTab->currentPageIndex());
+ m_popupMenu->insertTitle(i18n("Toolbar Menu") + " - "
+ + i18n(m_toolbarTab->tabUnderMouseLabel.utf8()));
+ m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, SIGNAL(newAction()));
+ QObjectList* childrenList = queryList("KToolBarButton");
+ for (uint i = 0; i < childrenList->count(); i++)
+ {
+ KToolBarButton *w = static_cast<KToolBarButton*>(childrenList->at(i));
+ QPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
+ QPoint p2 = QPoint(p1.x() + w->width(), p1.y()+w->height());
+ if (QRect(p1, p2).contains(p))
+ {
+ currentActionName = w->textLabel();
+ QString actionName = currentActionName;
+ m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, SLOT(slotRemoveAction()));
+ m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, SLOT(slotEditAction()));
+ break;
+ }
+ }
+ m_popupMenu->insertSeparator();
+ m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, SIGNAL(addToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, SLOT(slotRenameToolbar()));
+ m_popupMenu->insertSeparator();
+ m_popupMenu->insertItem( i18n("Text Position"), m_iconTextMenu);
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, SLOT(slotEditToolbar()));
+ }
+ m_popupMenu->popup(p);
+ }
+}
+
+void QuantaToolBar::slotEditAction()
+{
+ emit editAction(currentActionName);
+}
+
+void QuantaToolBar::slotRemoveAction()
+{
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ {
+ emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName);
+ }
+}
+
+
+#include "toolbartabwidget.moc"
diff --git a/quanta/utility/toolbartabwidget.h b/quanta/utility/toolbartabwidget.h
new file mode 100644
index 00000000..aa800ae6
--- /dev/null
+++ b/quanta/utility/toolbartabwidget.h
@@ -0,0 +1,111 @@
+/***************************************************************************
+ toolbartabwidget.h
+ ---------------------
+ copyright : (C) 2003 by Andras Mantia <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 TOOLBARTABWIDGET_H
+#define TOOLBARTABWIDGET_H
+
+#include <qwidget.h>
+#include <qmap.h>
+
+class QTabWidget;
+class KPopupMenu;
+class QWidgetStack;
+class QTabBar;
+class KToolBar;
+
+class ToolbarTabWidget: public QTabWidget
+{
+ Q_OBJECT
+public:
+ QWidgetStack *m_widgetStack;
+
+ static ToolbarTabWidget* const ref(QWidget *parent = 0L, const char *name = 0L)
+ {
+ static ToolbarTabWidget *m_ref;
+ if (!m_ref) m_ref = new ToolbarTabWidget (parent, name);
+ return m_ref;
+ }
+ virtual ~ToolbarTabWidget(){};
+
+ virtual void insertTab(QWidget *child, const QString &label, const QString &id);
+ virtual QWidget* page(int index);
+ virtual QWidget* page(const QString& id);
+ int tabHeight() const;
+ QString id(QWidget *w) const;
+ QString id(int index) const;
+ KToolBar::IconText iconText() const {return m_iconText;}
+ void setIconText(KToolBar::IconText mode) {m_iconText = mode; emit iconTextModeChanged();}
+
+public slots:
+ virtual void removePage(QWidget * w );
+ virtual void resizeEvent(QResizeEvent *);
+
+private slots:
+ void slotRemoveToolbar();
+ void slotRenameToolbar();
+ void slotEditToolbar();
+
+signals:
+ void removeToolbar(const QString&);
+ void renameToolbar(const QString&);
+ void editToolbar(const QString&);
+ void newAction();
+ void addToolbar();
+ void iconTextModeChanged();
+
+public:
+ QString tabUnderMouse;
+ QString tabUnderMouseLabel;
+
+protected:
+ virtual void mousePressEvent ( QMouseEvent * e );
+
+ KPopupMenu *m_popupMenu;
+ QTabBar *m_tabBar;
+ QMap<QString, QWidget*> toolbarList;
+
+private:
+ ToolbarTabWidget(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ KToolBar::IconText m_iconText;
+
+};
+
+class QuantaToolBar: public KToolBar
+{
+ Q_OBJECT
+
+public:
+ QuantaToolBar (QWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
+ virtual ~QuantaToolBar() {};
+
+private slots:
+ void slotEditAction();
+ void slotRemoveAction();
+ void slotIconTextChanged(int id);
+ void slotIconTextMenuAboutToShow();
+
+signals:
+ void removeAction(const QString&, const QString&);
+ void editAction(const QString&);
+
+protected:
+ virtual void mousePressEvent ( QMouseEvent * e );
+
+ KPopupMenu *m_popupMenu;
+ KPopupMenu *m_iconTextMenu;
+ ToolbarTabWidget *m_toolbarTab;
+ QString currentActionName;
+};
+
+#endif
diff --git a/quanta/utility/toolbarxmlgui.cpp b/quanta/utility/toolbarxmlgui.cpp
new file mode 100644
index 00000000..1d7d1558
--- /dev/null
+++ b/quanta/utility/toolbarxmlgui.cpp
@@ -0,0 +1,27 @@
+/***************************************************************************
+ toolbarxmlgui.cpp - description
+ -------------------
+ begin : Sat Jul 20 2002
+ copyright : (C) 2002 by Andras Mantia <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. *
+ * *
+ ***************************************************************************/
+
+#include "toolbarxmlgui.h"
+
+ToolbarXMLGUI::ToolbarXMLGUI(const QString& xmlFile)
+ : KXMLGUIClient()
+{
+ setLocalXMLFile(xmlFile);
+ setXMLFile(xmlFile, false);
+}
+
+
+ToolbarXMLGUI::~ToolbarXMLGUI(){
+}
diff --git a/quanta/utility/toolbarxmlgui.h b/quanta/utility/toolbarxmlgui.h
new file mode 100644
index 00000000..74ac04cf
--- /dev/null
+++ b/quanta/utility/toolbarxmlgui.h
@@ -0,0 +1,32 @@
+/***************************************************************************
+ toolbarxmlgui.h - description
+ -------------------
+ begin : Sat Jul 20 2002
+ copyright : (C) 2002 by Andras Mantia <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 TOOLBARXMLGUI_H
+#define TOOLBARXMLGUI_H
+
+#include <kxmlguiclient.h>
+
+/**
+ *@author Andras Mantia
+ */
+
+class ToolbarXMLGUI : public KXMLGUIClient {
+public:
+ ToolbarXMLGUI(const QString& xmlFile);
+ ~ToolbarXMLGUI();
+};
+
+#endif